Ubuntu 19.04 doesn't detect my HDMI display

Looks like prime-select/gpu-manager thinks it’s running in “on-demand” mode. Please run
sudo prime-select nvidia
again and reboot.
If that doesn’t help you cann add
Option “PrimaryGPU” “Yes”
inside the output class of /usr/share/X11/xorg.conf.d/10-nvidia.conf as a workaround.

Hello, I have a similar problem, my MSI GS65 with a GTX1070 mobile, doesn’t detect any display, in hdmi or displayport. I’m running pop os 20.04, which i suspect isn’t that different from ubuntu 19.10.
I’ve tried this and this allready, maybe I’ve done something wrong, or it isn’t my problem. I would appreciate if somebody could help me.
Here’s is my bug file.nvidia-bug-report.log (2.3 MB)

Everything seems to be fine, the nvidia gpu is running, all outputs are visible and enabled but no monitor is detected.
Did you create the log with an external monitor connected?

Nope, that may be the reason why.
Now it’s working, but I’m sure it wont last all day, since I haven’t done anything overnight and now it’s working.
It is doing as in the last couple days, where it just worked for some time but when i suspend it or try to plug in the third monitor and adjust the position of all three in the gnome-settings app, (including the orientation) it stops detecting the external ones, will see, for now it is working…
Anyways here I leave the bug report with it both connected, in case it helps. Thanks for the help.nvidia-bug-report.log (2.4 MB)

Hello, it is being working for the last couple days, but now the middle and primary monitor doesn’t show anything. I’ve run the bug report again with both connected. I reported a different situation two days ago, but I think I answered to the general topic not to your answer. Today it seems like they are all setup, but the primary display doesn’t turn on, I can move the mouse inside it and there are apps opened in that monitor though.
Please take a look if you can.
nvidia-bug-report.log (3.1 MB)

Nothing in the logs. At the time you were creating it, both monitors were detected fine and used.
Faulty monitor? Did you try disconnecting /reconnecting power to it when the issue happens?

It looks like it is something about HDMI compatibility, I’ve previously being using it with HDMI on Windows 10 and it always worked, and also works with other machines.
I switched the HDMI cable ends, changed the monitor, changed the cables, and what always happens is that the laptop detects it and shows it up in the gnome settings and I can actually move inside that monitor an put windows in there, without seeing anything, the monitors say “no signal detected”, and turn into standby mode. For the displayport I use a regular displayport cable that came with the display conected to an adapter to mini displayport, which works, but if I use that same adapter with the HDMI cable it doesn’t show up.
Super weird, yesterday it worked all day just fine, idk what has changed overnight.

Might be an unreliable hdmi socket where the data lines lose connection but the ddc lines work so it’s detected but doesn’t display anything. Gently move the connector up and down and check if that reconnects the data lines.

I got a new laptop (Ryzen4800h + nvidia 2060). The laptop is connected to two external 1080p monitors. All 3 monitors (laptop display+hdmi+dp-via-usbc) work fine on windows, but it does not detect all monitors under a dual-boot Ubuntu 18.04.4 linux + nvidia-drivers-440 (5.3 kernel, set nvidia as primary, disabled modsetting, disabled secure boot, blacklisted nouveau).

The nvidia bug report file is attached. Only one monitor is detected and used.

Appreciated if you can share a workaround.

nvidia-bug-report.log (1.0 MB)

fangq@invocation:~$ xrandr -q

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1440x576      50.00  
   1440x480      59.94  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)

fangq@invocation:~$ nvidia-smi

Wed Jun  3 13:30:34 2020       
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce RTX 2060    Off  | 00000000:01:00.0  On |                  N/A |
| N/A   43C    P8     7W /  N/A |    432MiB /  5934MiB |      3%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0       975      G   /usr/lib/xorg/Xorg                           245MiB |

fangq@invocation:~$ sudo prime-select query

Please see this:

thanks for the pointers. if I use my nvidia gpu as the primary gpu (setting “PrimaryGPU” to “yes” in 10-nvidia.conf), do I still need a 5.6 kernel for the AMD gpu to work? (by the way, amd gpu does work if I set primary-select intel, but it also sees only 1 display).

@generix, I just installed the 5.6 kernel deb files, reinstalled nvidia-driver-440, and added PrimaryGPU yes in 10-nvidia.conf, added the two optimus.desktop files, rebooted several times, but I still have the same issue running this new kernel.

my updated log file is attached. any additional change I need to make?

nvidia-bug-report.log (1.0 MB)

Please remove ‘nomodeset’ kernel parameter, it turns off amdgpu.

yes, I previously had "nvidia-drm.modeset=1" in grub’s kernel parameter, however, after setting it to 0, I still can’t see other screens.

the updated log file is attached here.

nvidia-bug-report.log (979.8 KB)

You’re missing the amdgpu firmware:

[    3.778567] amdgpu 0000:05:00.0: Direct firmware load for amdgpu/renoir_gpu_info.bin failed with error -2
[    3.778570] amdgpu 0000:05:00.0: Failed to load gpu_info firmware "amdgpu/renoir_gpu_info.bin"
[    3.778576] amdgpu 0000:05:00.0: Fatal error during GPU init

Like mentioned in the other thread I linked to, it is not advisable to do this on 18.04. Besides having a compiler mismatch, you’ll have to copy over the missing renoir firmware files from amdgpu - kernel/git/firmware/linux-firmware.git - Repository of firmware blobs for use with the Linux kernel
to /lib/firmware/amdgpu.

Afterwards, run
sudo update-initramfs -u

it works! all 3 displays are now usable. thank you @generix so much for your help!

I am wondering if you can comment on how I can set up the computer so that I use the AMD iGPU for graphics, while keeping the 2060 GPU for cuda programming as a dedicated device?

I’ve done this successfully using Intel’s iGPU+NVIDIA GPU on several of my desktops. Please see this thread: [SOLVED] Run CUDA on dedicated NVIDIA GPU while connecting monitors to Intel HD graphics, is this possible? - #6 by FangQ

However, when I type prime-select intel and reboot, I see two problems:

  1. the amd gpu only sees two displays (eDP-1 and HDMI-1), but it does not see the display connected to DP-0.

  2. Moreover, nvidia-smi also complains that the nvidia device is not found. On my Intel+NVIDIA setup, I was able to see nvidia-smi outputs despite the graphics is handled by Intel’s iGPU.

again, much appreciated if you can share any comments.

here is the log when I boot with amd gpu:
nvidia-bug-report.log (788.7 KB)

The external connector DP-0 is hardwired to the nvidia gpu so is only available if the nvidia gpu is actively rendering. No way around it.
nvidia-smi sees no device because on intel profile the nvidia driver is blacklisted, you would have to manually load it.
sudo modprobe nvidia nvidia-modeset nvidia-drm nvidia-uvm
or just enable nvidia-persistenced
sudo systemctl enable nvidia-persistenced

thanks. now I finally understood why you said the HDMI has to pass through the AMD GPU - so, the HDMI ports is physically connected to the amd gpu, but the DP ports are physically connected to the nvidia gpu. this makes sense to me now.

it is interesting that when I run glmark2 benchmark, the AMD iGPU (RENOIR) gives a score of 9600 while RTX2060 has a score of 3000. I felt that 2060 is supposed to be beefier than the AMD iGPU from the specs. is this what you have expected?

just trying your commands to manually enable the nvidia modules, I got the below error messages, any further comment is appreciated.

fangq@invocation:~$ sudo modprobe nvidia nvidia-modeset nvidia-drm nvidia-uvm
[sudo] password for fangq: 
modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)

also, when running nvidia-persistenced, I also see a different error

fangq@invocation:~$ sudo systemctl enable nvidia-persistenced
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.

Also the internal screen is driven by the amdgpu.
ASUS built this notebook series in many different flavours, some have all external connectors wired to the amd gpu, some have all wired to the nvidia gpu and yours is a mixed one.

Running benchmarks on a hybrid gpu system is always tricky. If the benchmark runs at high fps, the dgpu will be slower because there’s a lot of overhead from copying the pixmaps from dgpu to igpu. You should use a fullscreen heavy benchmark like an Unigine demo to get the correct results.

Looks like the gpu-manager is hard-disabling the nvidia modules by aliasing them to ‘off’. So you would have to also find the alias/blacklist file in either /etc/modprobe.d/* or /lib/modprobe.d/* and delete it before modprobing.