You are not logged in.

#1 2021-09-27 19:27:02

iestynapmwg
Member
Registered: 2021-09-27
Posts: 28

'phantom' VGA monitor with nvidia driver

I'm migrating my system from Ubuntu to Arch and have run into a problem after installing the nvidia driver. This is on a laptop with combo intel/nvidia graphics, and i'm following the guide for nvidia-only setup. The problem is that the nvidia driver insists there is a VGA monitor connected, while there isn't -- i only have the laptop's display. Oh, this is the nvidia-390 driver, for an older laptop, in case that matters.

The result of this is that, after booting, GDM places the login screen on the non-existent monitor. I can move the mouse cursor around and bring it onto my (real) display, and i can log in blindly by tapping the up-arrow to get to my login, press enter, enter password. And then use
xrandr --output VGA-0 --off
to remove the phantom screen.

This problem also suddenly appeared during an upgrade when i was using Ubuntu a few years ago. At the time, i eventually found a cleaner fix by removing the phantom monitor altogether. This was done by adding "video=VGA-2:d" to the linux boot command line parameters in grub. That "VGA-2" came from looking at /sys/class/drm, which in Ubuntu looks like:

$ ls -l /sys/class/drm
total 0
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card0 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card0-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card0-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card0-LVDS-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card0-VGA-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-VGA-1
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
lrwxrwxrwx 1 root root    0 Sep 27 14:09 card1-VGA-2 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-VGA-2
lrwxrwxrwx 1 root root    0 Sep 27 14:09 renderD128 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD128
lrwxrwxrwx 1 root root    0 Sep 27 14:09 renderD129 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD129
-r--r--r-- 1 root root 4096 Sep 27 14:09 version

The non-existent VGA-2 is "connected" to card1, the nvidia card.

This fix does not work in Arch, though. When i boot into Arch, the listing is:

lrwxrwxrwx 1 root root    0 Sep 27 13:35 card0 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0
lrwxrwxrwx 1 root root    0 Sep 27 13:35 card0-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
lrwxrwxrwx 1 root root    0 Sep 27 13:35 card0-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1
lrwxrwxrwx 1 root root    0 Sep 27 13:35 card0-LVDS-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1
lrwxrwxrwx 1 root root    0 Sep 27 13:35 card0-VGA-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-VGA-1
lrwxrwxrwx 1 root root    0 Sep 27 13:35 card1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
lrwxrwxrwx 1 root root    0 Sep 27 13:35 renderD128 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD128
lrwxrwxrwx 1 root root    0 Sep 27 13:35 renderD129 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD129
-r--r--r-- 1 root root 4096 Sep 27 13:35 version

And so there is no VGA-2 to disable on boot. And yes, i tried. That's the same listing with and without the "video=..." boot parameter.

Turning the phantom monitor off after Xorg starts, using xrandr, seems like a crude hack to me. There is apparently a better solution, but it doesn't work under Arch. If i could figure out why and fix THAT, i'd be much happier! As the previous fix (with Ubuntu) involved kernel boot parameters, is there maybe something i can do with loading modules in the initramfs? I already added the "nvidia" module, but that didn't make a difference. I haven't looked into it yet, but can i build a custom kernel that wouldn't even have this problem to begin with?

Thanks!

Offline

Board footer

Powered by FluxBB