Starting GDM on NVIDIA results in black screen

Hi,

I have a Lenovo ThinkPad P71 with an Intel HD Graphics P630 and an NVIDIA Quadro P5000 graphics adapter.

When I have Hybrid Graphics enabled in the BIOS, GDM starts without problems with the graphics/drm-next-kmod Intel driver (well, it complains about GLX but that is most probably because X is trying to use the NVIDIA GLX library) and I see something on the screen. Starting GDM with the NVIDIA driver (latest version 390.87) does not work of course as the Intel GPU is controlling the display and the NVIDIA driver is complaining about not being able to connect to any display. So far so good.

When I switch to Discrete Graphics in the BIOS (switching off the Intel graphics adapter), GDM seems to start on the Quadro but I get a black screen. If I wait 10 minutes until the screen shuts off and I switch it on again by pressing a key or touching the touchpad, I see the X mouse cursor and can also move it but the rest of the screen is still black.

/var/log/Xorg.0.log is not looking too bad; I see some suspicious error messages about Clutter in /var/log/gdm/:0.log though (see attached files). I also attached my /boot/loader.conf and /etc/rc.conf and the dmesg output. Everything was compiled from ports and I enabled Wayland if there was the option.

I am running FreeBSD 11.2-RELEASE.

Any help would be greatly appreciated. BTW, if I get the NVIDIA driver to work I am considering using VirtualGL as described here.

Regards
Thomas
 

Attachments

  • :0.log.txt
    13.9 KB · Views: 290
  • Xorg.0.log.txt
    19.6 KB · Views: 294
  • dmesg.txt
    8.8 KB · Views: 312
  • loader.conf.txt
    1,011 bytes · Views: 323
  • rc.conf.txt
    995 bytes · Views: 298
Thanks for the reply, I do not have a secondary monitor configured so the position part does not apply. I have disabled the Composite extension but that did not change anything (except that I see in Xorg.0.log that the extension has been disabled). Still getting a black screen.

Thomas

Edit: Starting a plain X session with startx actually does work. So the problem seems to be related to Clutter and Wayland(?).
 
Well, if you see this error message
Code:
libGL error: No matching fbConfigs or visuals found
in /var/log/gdm/:0-greeter.log then you are using the libGL library from Mesa instead from the NVIDIA driver. That is what I found out after some googling. ;) By the way, I attached the wrong file, I did not mean to attach /var/log/gdm/:0.log.

For testing purposes I backed up the original library and replaced it with the NVIDIA one and — lo and behold — GDM starts up. :)

Just a few open issues now.
  1. If I log out, I get a black screen again. Maybe the NVIDIA driver does not like vt(4) with efifb? Edit: SirDice seems to agree.
  2. The GNOME Tracker crashes with a core dump (I see a tracker-miner-fs.core file in my home directory). I already tried to investigate this issue but did not get very far. It was also coredumping when I tried out GNOME 3.28 from the GNOME development ports tree.
  3. When I change the language in GNOME, nothing happens except that restarting GNOME takes a very long time (probably forgot to configure something).
  4. The mouse pointer changes its size depending on its position which is odd.
Maybe I can get around the first issue when I switch to VirtualGL.

Thanks! We were writing our replies at almost the exact same time. ;)

Thomas
 
If I log out, I get a black screen again.

Note that black is the default Xorg background color, it might be just that.

Maybe the NVIDIA driver does not like vt(4) with efifb? Edit: SirDice seems to agree.

Yeah, pretty obnoxious bug. There are quite a few complaints on the FreeBSD bugtracker:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213912
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224069
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201461
 
Note that black is the default Xorg background color, it might be just that.
No, the screen is black like in Ctrl+Alt+Fn does not do anything, but the machine is still fully functional. Is not GDM restarted after a logout? This would more or less be the same like switching to the console from X which also results in a black screen.

I think I will either try
Code:
hw.vga.textmode=1
or see if I can get around this by switching to Intel + NVIDIA over VirtualGL as fb from graphics/drm-next-kmod works without problems.

Thomas
 
Well, if you see this error message
Code:
libGL error: No matching fbConfigs or visuals found
in /var/log/gdm/:0-greeter.log then you are using the libGL library from Mesa instead from the NVIDIA driver. That is what I found out after some googling. ;) By the way, I attached the wrong file, I did not mean to attach /var/log/gdm/:0.log.

For testing purposes I backed up the original library and replaced it with the NVIDIA one and — lo and behold — GDM starts up. :)

Just a few open issues now.
  1. If I log out, I get a black screen again. Maybe the NVIDIA driver does not like vt(4) with efifb? Edit: SirDice seems to agree.
  2. The GNOME Tracker crashes with a core dump (I see a tracker-miner-fs.core file in my home directory). I already tried to investigate this issue but did not get very far. It was also coredumping when I tried out GNOME 3.28 from the GNOME development ports tree.
  3. When I change the language in GNOME, nothing happens except that restarting GNOME takes a very long time (probably forgot to configure something).
  4. The mouse pointer changes its size depending on its position which is odd.
Maybe I can get around the first issue when I switch to VirtualGL.


Thanks! We were writing our replies at almost the exact same time. ;)

Thomas

Hey, I have the same issue with the same errrors in gdm log, how do I apply your fix and replace the libGL with nvidia one?
 
Hey, I have the same issue with the same errrors in gdm log, how do I apply your fix and replace the libGL with nvidia one?
I strongly recommend that you do not do it like I did (because that was a quick & dirty hack) but check out PR 226403. You need to patch the Makefile of x11/nvidia-driver and rebuild the port, then it should work. I just replaced libGL.so.1.2.0 which is not how you should do it. ;)
 
I strongly recommend that you do not do it like I did (because that was a quick & dirty hack) but check out PR 226403. You need to patch the Makefile of x11/nvidia-driver and rebuild the port, then it should work. I just replaced libGL.so.1.2.0 which is not how you should do it. ;)

it's weird because xfce works but gnome/gdm doesnt using the current libGL. Do you think i need to compile nvidia driver from ports with that patch to get gnome going in this case?
 
it's weird because xfce works but gnome/gdm doesnt using the current libGL.
GNOME definitely needs OpenGL to work while I am pretty sure that Xfce does not. That is why Xfce starts even with the "incorrect" libGL.

anyway, what is the command to apply that patch ?
  1. You need to download attachment 191260 from the first message of PR 226403.
  2. Copy x11_nvidia-driver_Makefile.diff to /usr/ports/x11/nvidia-driver.
  3. Go to /usr/ports/x11/nvidia-driver.
  4. Execute patch Makefile < x11_nvidia-driver_Makefile.diff and then make install clean (or use portmaster(8) for example). If you have already installed the driver before and you are installing it manually, run make deinstall first.
Thomas
 
so i only need to compile nvidia driver , gnome can be used from packages right?
Don't mix ports with packages you will break your system, instead make a package from that port (inside the port run make package to create a binary package which is not automatically installed on your machine, you have to use pkg install to install it) or you could use ports-mgmt/poudriere to build custom packages.
 
any idea how to fix my mouse? doesnt work in either X or text mode.
Cannot really help you with your mouse issue but there are already several threads about mice not working, e.g.
You might want to check them out.

Meanwhile I was able to (temporarily) fix the segfault in tracker-miner-fs (not exactly X.Org-related but oh well). The issue has been reported already 2 months back. For now the solution is to compile sysutils/tracker-miners with -O0. It is sufficient to add CFLAGS+=-O0 in the port Makefile.

Thomas
 
No, the screen is black like in Ctrl+Alt+Fn does not do anything, but the machine is still fully functional. Is not GDM restarted after a logout? This would more or less be the same like switching to the console from X which also results in a black screen.

I think I will either try
Code:
hw.vga.textmode=1
or see if I can get around this by switching to Intel + NVIDIA over VirtualGL as fb from graphics/drm-next-kmod works without problems.

Thomas

Please show me the exact command you used to link the libGL that made it work.
 
Please show me the exact command you used to link the libGL that made it work.
Disclaimer: Do not do it like this! Patch the Makefile of x11/nvidia-driver!
You asked for it...

# mv /usr/local/lib/libGL.so.1.2.0 /usr/local/lib/libGL.so.1.2.0.orig
# cp /usr/local/lib/libGL-NVIDIA.so.1 /usr/local/lib/libGL.so.1.2.0


Again, it is extremely bad to do it like this.

Thomas
 
Back
Top