Made to Order Software Corporation Logo

Screensaver killing X11 with an NVidia GPU

In the last few months, I have had some problems with my desktop computer. It would enter the screensaver and not get out of the mode easily. I was able to get the screen video back by flipping through the monitor input ports (It has three: HDMI 1, HDMI 2 and DisplayPort).

Until a few days ago when the system decided to install a new version of the NVidia driver: v580.126.09. That first crashed the GPU and the output video was gone. I had to reboot the hard way (sudo init 0 took the system mostly down and then given that it did not turn off the computer, hit the power button for 5 seconds).

When I first installed my server, I had an issue with a ghost screen. The mouse would disappear to the right of the screen, because there was a pretend screen on the right side name VGA-1-1 (not too sure how the name gets determined, many people report a None-1-1 screen instead).

Looking around, I found a solution to prevent that screen from being live. It was as simple as disabling it. This can be done permanently by adding a boot command line parameter:

# Edit /etc/default/grub.d/50_disable_simpledrm.cfg
# And copy/paste this line:
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT initcall_blacklist=simpledrm_platform_driver_init"

# Save that file and then run the following to update grub
sudo update-grub

When looking at the preferences, the "Unknown" screen was still there, but looking at the definitions, it was clearly marked as disabled.

That has worked for a pretty long time, but now with that newer upgrade of the NVidia driver, it was not sufficient. Actually, it is probably 2 or 3 versions back since I started to have issues for a while now.

The next possible fix is to remove that monitor entirely. This is actually pretty simple, you just need to edit a file and add a few lines, X11 settings, which tell NVidia that it needs to ignore that screen.

First, make sure that you are indeed running X11. If you are in wayland, things are completely different and you probably shouldn't follow any of these instructions.

$ echo $XDG_SESSION_TYPE
x11

Note that the Wayland setting in the GDM is extremely confusing since it shows a default and has a comment which are contradictory. When you have an NVidia card, the default is to not use Wayland.

Edit the file /etc/X11/xorg.conf.d/10-disable-vga.conf and write the following in it (note that the "10" defines an order in which to load the files, any number from 00 to 99 will work):

# Get rid of the VGA-1-1 monitor
Section "Monitor"
    Identifier "VGA-1-1"
    Option "Ignore" "true"
EndSection

The name "VGA-1-1" comes from the name of the ghost display. The way to get that name is to use the xrandr command line:

xrandr | less

You can ignore all the monitors that are marked as disconnected. You should have one connected monitor per physical monitor and one representing the Ghost monitor. As mentioned above, I've seen many reporting "None-1-1" as the name. In my case, it shows up as "VGA-1-1". I'm not too sure where the name comes from (how it's chosen—it seems to come from the NVidia driver, but there doesn't seem to be a convention for the name itself). I've also seen a couple of references to "Unknown-1".

Note that one reason I thought the VGA-1-1 display was the cause is the fact that once I got things to show up again (although probably just by luck,) the windows were all small. The GDM does that to make sure that the windows fit in the current system. The VGA-1-1 default resolution was 1024x768, so really small compared to my 4K screen.

Additional information can be found on slackoverflow:

"Could not switch the monitor configuration" on "None-1-1 connected output"

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.