Can not detect and connect to external HDMI monitor on hybrid Intel/NVIDIA laptop

Hello,

First time to use Arch-based Manjaro linux and I have problems with HDMI connection to an external monitor on a hybrid Intel/NVIDIA laptop.

I searched and read several relevant topics, however can not solve my problem.

My graphic cards information:

Graphics:
  Device-1: Intel UHD Graphics driver: i915 v: kernel 
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] driver: N/A 
  Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting 
  resolution: 1920x1080~144Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 21.0.1 

Installed driver:

core/mhwd-nvidia 460.67-1 [installed]
core/mhwd-nvidia-390xx 390.141-1 [installed]
extra/libvdpau 1.4-1 [installed]
extra/linux510-nvidia 460.67-3 (linux510-extramodules) [installed]
extra/nvidia-prime 1.0-4 [installed]
extra/nvidia-utils 460.67-1 [installed]
multilib/lib32-nvidia-utils 460.67-1 [installed]

I already installed optimus-manager and optimus-manager-qt. Also, I installed video-hybrid-intel-nvidia-prime, video modesetting, video-vesa. I can not install video-nvidia since it conflict with video-hybrid-intel-nvidia-prime.

My problem:
My laptop can not detect and connect to an external monitor using HDMI port. The laptop is dual boot and HDMI works well with Windows.

xrandr information:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    144.00*+  60.02    59.97    59.96    59.93  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  

If you need the nvidia-bug-report.log, I can provide.

Could you please help me with advice? I tried a few days without any results. Perhaps problem in NVIDIA driver or mis-configuration?

Thang

Hi, it’s been a few months since I’ve read it, but I think it’s related to hybrid drivers.

Try with installing free drivers instead of proprietary - not ideal if you need them for other things, but I think it’s not working otherwise.

Hi Falav,

I uninstalled the proprietary driver, only keep the free drivers (attached image) but nothing happened when I restarted the laptop.

As I understood, the HDMI cable connects to NVIDIA card. Therefore I have to force my laptop use the NVIDIA card when connecting to HDMI, right?

or could you please tell me what is the problems of my laptop now?

Thang

The driver is not loaded, that’s at least one of the problems. Please install video-hybrid-intel-nvidia-prime again, then reboot, afterwards run nvidia-modprobe, and post the output of sudo dmesg | grep -i nvidia and inxi -Gazy.

Not really now,you can use hybrid mode and the HDMI port will work fine now.

Thank you for jumping in. Please have a look at the outputs:

With Inxi -Gazy:

Graphics:
Device-1: Intel UHD Graphics vendor: Micro-Star MSI driver: i915 v: kernel
bus-ID: 00:02.0 chip-ID: 8086:9bc4 class-ID: 0300
Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q]
vendor: Micro-Star MSI driver: N/A alternate: nouveau, nvidia_drm, nvidia
bus-ID: 01:00.0 chip-ID: 10de:2520 class-ID: 0300
Display: x11 server: XORG 1.20.11 compositor: kwin_x11 driver:
loaded: modesetting unloaded: intel alternate: fbdev,vesa display-ID: :0
screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
s-diag: 582mm (22.9")
Monitor-1: eDP-1 res: 1920x1080 hz: 144 dpi: 142 size: 344x193mm (13.5x7.6")
diag: 394mm (15.5")
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 21.0.2
direct render: Yes

With sudo dmesg | grep -i nvidia:

[ 1.661566] audit: type=1400 audit(1618884064.530:9): apparmor=“STATUS” o
peration=“profile_load” profile=“unconfined” name=“nvidia_modprobe” pid=276
comm=“apparmor_parser”
[ 1.662290] audit: type=1400 audit(1618884064.530:10): apparmor=“STATUS”
operation=“profile_load” profile=“unconfined” name=“nvidia_modprobe//kmod” p
id=276 comm=“apparmor_parser”
[ 3.133526] nvidia: loading out-of-tree module taints kernel.
[ 3.133532] nvidia: module license ‘NVIDIA’ taints kernel.
[ 3.254379] nvidia: module verification failed: signature and/or required
key missing - tainting kernel
[ 3.441964] nvidia-nvlink: Nvlink Core is being initialized, major device
number 234
[ 3.442372] nvidia 0000:01:00.0: enabling device (0000 → 0003)
[ 3.442492] nvidia: probe of 0000:01:00.0 failed with error -1
[ 3.442506] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 3.442507] NVRM: None of the NVIDIA devices were initialized.
[ 3.442629] nvidia-nvlink: Unregistered the Nvlink Core, major device num
ber 234
[ 87.375531] nvidia-nvlink: Nvlink Core is being initialized, major device
number 234
[ 87.375938] nvidia: probe of 0000:01:00.0 failed with error -1
[ 87.375948] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 87.375949] NVRM: None of the NVIDIA devices were initialized.
[ 87.376101] nvidia-nvlink: Unregistered the Nvlink Core, major device num
ber 234

I am using optimus-manager-qt with hybrid mode loaded when laptop started.

Installed driver:

  1. video-hybrid-intel-nvidia-prime
  2. video-linux
  3. video-modesetting

Thank you for your advice. I installed optimus-manager-qt and set the mode as hybrid at the moment. However, my laptop still can not detect an external monitor through HDMI port. Windows work normally.

The nvidia driver is not loaded yet.

I only have video-hybrid-intel-nvidia-prime and video-modesetting,where video-linux comes from? try uninstall that to see if the driver loads.

This is a problem, the probe fails. Please try the following:

sudo rmmod nvidia-drm nvidia-modeset nvidia
sudo modprobe nvidia NVreg_ResmanDebugLevel=0
sudo dmesg | egrep -i '(nvrm|nvidia)' 


I uninstalled video-linux and keep the driver as attached image, but still nothing happen after reboot.

Please have a look at the outputs:
With sudo rmmod nvidia-drm nvidia-modeset nvidia:

rmmod: ERROR: Module nvidia_drm is not currently loaded
rmmod: ERROR: Module nvidia_modeset is not currently loaded
rmmod: ERROR: Module nvidia is not currently loaded

With sudo modprobe nvidia NVreg_ResmanDebugLevel=0:

modprobe: ERROR: could not insert ‘nvidia’: No such device

With sudo dmesg | egrep -i '(nvrm|nvidia)':

[ 2.891733] nvidia: loading out-of-tree module taints kernel.
[ 2.891739] nvidia: module license ‘NVIDIA’ taints kernel.
[ 2.924958] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 2.934164] nvidia-nvlink: Nvlink Core is being initialized, major device number 234
[ 2.934438] nvidia 0000:01:00.0: enabling device (0000 → 0003)
[ 2.934535] NVRM: request_mem_region failed for 0M @ 0x0. This can
NVRM: occur when a driver such as rivatv is loaded and claims
NVRM: ownership of the device’s registers.
[ 2.934538] nvidia: probe of 0000:01:00.0 failed with error -1
[ 2.934547] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 2.934548] NVRM: None of the NVIDIA devices were initialized.
[ 2.934648] nvidia-nvlink: Unregistered the Nvlink Core, major device number 234
[ 248.254414] nvidia-nvlink: Nvlink Core is being initialized, major device number 234
[ 248.254417] NVRM: probing 0x10de 0x2520, class 0x30000
[ 248.254767] NVRM: request_mem_region failed for 0M @ 0x0. This can
NVRM: occur when a driver such as rivatv is loaded and claims
NVRM: ownership of the device’s registers.
[ 248.254770] nvidia: probe of 0000:01:00.0 failed with error -1
[ 248.254779] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 248.254779] NVRM: None of the NVIDIA devices were initialized.
[ 248.254866] nvidia-nvlink: Unregistered the Nvlink Core, major device number 234

Something is wrong with my hardware configuration, right? It’s seem to be complex to me.

This is causing the probe failure. Interesting that it says “0M @ 0x0”, this is very probably not what it should be.

What’s the output of grep -r 'nouveau' /etc/modprobe.d/?

/etc/modprobe.d/mhwd-gpu.conf:blacklist nouveau
/etc/modprobe.d/blacklist-nvidia-nouveau.conf:blacklist nouveau
/etc/modprobe.d/blacklist-nvidia-nouveau.conf:options nouveau modeset=0

Here the output.

I suggest reporting the issue here with a title like “nvidia kernel driver cannot bind to RTX 3060 laptop GPU”, and make sure to include the output of inxi -Gazy, the output of sudo dmesg | egrep -i '(nvrm|nvidia)' that you posted previously, the nvidia driver version, and the kernel version.

Thank you for your help. That means we can not solve the problem right now and have to wait for the updated driver?

Could you tell me my problem regarding the NVIDIA card itself or just the driver not well support for Linux at the moment?

Unfortunately I have no idea, to both questions.

Thank you for your time. I will report to NVIDIA forum and post here when having the answers.

I posted in the NVIDIA forum and here is the answer:

[ 0.463197] pci_bus 0000:00: Some PCI device resources are unassigned, try booting with pci=realloc

Please try that advice from dmesg.

[ 3.737] (==) Matched modesetting as autoconfigured driver 0
[ 3.737] (==) Matched intel as autoconfigured driver 1
[ 3.737] (==) Matched fbdev as autoconfigured driver 2
[ 3.737] (==) Matched vesa as autoconfigured driver 3
[ 3.737] (==) Assigned the driver to the xf86ConfigLayout
[ 3.737] (II) LoadModule: “modesetting”
[ 3.738] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 3.740] (II) Module modesetting: vendor=“X.Org Foundation”
[ 3.740] compiled for 1.20.11, module version = 1.20.11
[ 3.740] Module class: X.Org Video Driver
[ 3.740] ABI class: X.Org Video Driver, version 24.1
[ 3.740] (II) LoadModule: “intel”
[ 3.740] (WW) Warning, couldn’t open module intel
[ 3.740] (EE) Failed to load module “intel” (module does not exist, 0)

The intel driver cannot be found…

Sorry if this is too simple but how can I do a booting with pci=realloc? I checked my boot options but nothing regarding graphic card nor pci options.

Thang

If you use GRUB, then open /etc/default/grub, and append pci=realloc to GRUB_CMDLINE_LINUX_DEFAULT so that it says

GRUB_CMDLINE_LINUX_DEFAULT="<other stuff> pci=realloc"

.

Then run sudo update-grub and reboot.

Yeah, updated grub file with pci=realloc but still nothing happen when connecting to HDMI. :sweat_smile: