Nvidia laptop, dual monitor problem in Debian
Is the HDMI by any chance connected directly to the GPU? The port may not be used by default by xrandr in Debian due to Optimus (laptop iGPU/dGPU switching)..
On another laptop, with an Nvidia card, I had a very similar problem. Here is what I did:
xrandr --setprovideroutputsource NVIDIA-G0 modesetting
to set the nvidia driver as a usable provider for xrandr, and then
xrandr --auto
to enable and autoconfigure the screen.
Run lshw -c video
, and look for the line with “configuration”. The loaded driver is prefixed with “driver=”. Example output:
[email protected]:~$ xrandr --setprovideroutputsource NVIDIA-G0 modesetting [email protected]:~$ xrandr --auto [email protected]:~$ lshw -c video WARNING: you should run this program as super-user. *-display description: VGA compatible controller product: GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: iomemory:600-5ff iomemory:640-63f irq:195 memory:5f000000-5fffffff memory:6000000000-63ffffffff memory:6400000000-6401ffffff ioport:4000(size=128) memory:60000000-6007ffff *-display description: VGA compatible controller product: Intel Corporation vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 01 width: 64 bits clock: 33MHz capabilities: vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: iomemory:640-63f iomemory:400-3ff irq:176 memory:642c000000-642cffffff memory:4000000000-400fffffff ioport:5000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff WARNING: output may be incomplete or inaccurate, you should run this program as super-user.