With NVIDIA, kdm displays login window on "VGA-0", which isn't there

I’m trying to get rid of a really strange issue on a Laptop Lenovo T420s, with a discrete GPU from NVIDIA and using openSuse 13.2 as well as the nvidia driver from the repo.

kdm displays on the laptop screen the usual background, but the login screen on an display “VGA-0”, which is not connected. Into the system xinitrc in /etc/init.d … I put the line

xrandr --output VGA-0 --off

but without any succes.

Any ideas how I could get rid of that stupid VGA-0 ? Somehow the nvidia driver assumes that there were a VGA-0 monitor and it were the primary display.

Is this an optimus system ie a Intel+NVIDIA GPUs

If so remove the NVIDIA driver and use Bumblebee


follow instruction exactlt but first be sure you have removed any other NVIDIA driver completely

Try to set the primary display in nvidia-settings and then let it generate an xorg.conf. Then copy that to /etc/X11/ and it should have effect for the login screen.

Well, yes, it is such an Optimus trash notebook: the DPI port is connected to the nvidia card only. So installing Bumblebee makes usage of the dpi port impossible. But thank you anyway for the idea.

You know, I use that adapted boot.local. So having a xorg.conf including an nvidia-card probably will brake the intel driver, if used. I’ll have to search whether there is an alternative name, such as xorg-nvidia.conf or something like that. However, good idea, thank you.

What “adapted boot.local” are you using?
If you use the standard nvidia driver, you don’t use the intel chip anyway.
And just installing that driver breaks intel’s OpenGL support.

So an xorg.conf specifying the nvidia driver should work I think.
If it gives you problems, just remove the file again.

You can not use the Intel chip if you have the normal NVIDIA driver installed. NVIDIA messes with the mesa file and replaces it with one that is incompatible with any other driver/chip. The NVIDIA-bumblebee driver essential stops this and leaves the X stack alone. Or you could just use nouveau driver

Note the real problem is that NVIDIA does not support their own optimus tech on Linux so bumblebee is the work around.

I don’t see how you could use both chips without Bumblebee…But then optimus is a mess

Good luck

Wolfi, you yourself made valuable contributions to this boot.local: https://forums.opensuse.org/showthread.php/505630-Nvidia-installiert-auf-Optimus-Laptop-Intel-fehlt-jetzt-3D

But yes, we can! In the BIOS there is a switch: use either the integrated GPU, the discrete GPU or Optimus. If I switch to the integrated GPU, boot.local tells the kernel which driver to load. Usually I stick to the integrated GPU, but if I need the DisplayPort, I reboot, changing the BIOS to Nvidia at the restart.

So what I’m searching is a way to tell nvidia not to use VGA-0, if the nvidia driver is used. As far as I remember, there was something like xorg.conf.nvidia, maybe I can use that to realise wolfi’s idea.

Ah yes.
Sorry, I didn’t connect your name to that script…

So you want to switch between nvidia and intel.
Then you’d need to disable/remove the xorg.conf when booting with intel of course.

This should work:

mode=$(/sbin/lspci | egrep 'VGA|3D');
#Make sure we are in command of /usr/X11R6/lib
if  -e /etc/ld.so.conf.d/nvidia-gfxG0*.conf ]; then
    /bin/rm /etc/ld.so.conf.d/nvidia-gfxG0*.conf

#Check graphics mode and take apropriate action
if  `echo $mode | grep -c "Intel" ` -gt 0 ]; then
      /usr/sbin/update-alternatives --set libglx.so /usr/lib64/xorg/modules/extensions/xorg/xorg-libglx.so
      if  -e /etc/X11/xorg.conf ]; then
          mv /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia

if  -e /usr/X11R6/lib64/libGL.so.1 ]; then
    /bin/rm /usr/X11R6/lib64/libGL.so.1

if  -e /usr/X11R6/lib/libGL.so.1 ]; then
    /bin/rm /usr/X11R6/lib/libGL.so.1

if  `echo $mode | grep -c "NVIDIA" ` -gt 0 ]; then
    /usr/sbin/update-alternatives --set libglx.so /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so
    /sbin/ldconfig /usr/X11R6/lib64
    /sbin/ldconfig /usr/X11R6/lib
    if  -e /etc/X11/xorg.conf.nvidia ]; then
        mv /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf

Maybe for you, but not to me. “Of course” – grmbl.

Hey, thank you very much, those lines improved the new boot.local a lot! I’m gonna test it during the next weeks an will be back…

Have a nice weekend!

And thanks to you as well, gogalthorp (by the way, has this nick a meaning?)

No just a name I have used for a long time

The hardware is different with the differnt modes in the BIOS. Most optimus machine appear to be optimus only forget any other mode.

Wolfi’s suggestion should work