On 06/01/2018 02:57 PM, Nicolas Thierry-Mieg wrote:
For some reason you keep top-posting on this thread, but whatever.

Thanks for forwarding my previous message Akemi, my email address changed and I hadn't updated it. This one should go through.


John: that is the same issue I was having.
 From notes I took at the time:

nvidia-x11-drv includes the subdir:
/usr/lib64/xorg/modules/extensions/nvidia

X.org should not be picking it up for the intel gpu given the bumblebee config, but for some reason it seems it tries to. This leads to a failure to start X.
I solved this by:
sudo mv /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg
and editing /etc/bumblebee/bumblebee.conf so that XorgModulePath (in the driver-nvidia section) points to the new /usr/lib64/xorg/nvidia/ instead of the old /usr/lib64/xorg/modules/extensions/nvidia/ subdir.

I'm sure there's a more elegant solution, but this worked for me. It does require doing the move again each time there's an nvidia driver update...

Note that /var/log/Xorg.0.log should have stuff for your primary (intel) gpu, while /var/log/Xorg.8.log should have the nvidia stuff.

HTH

Over the week-end I took some more time to reinvestigate the issue, in case we actually want to fix it.

Note that I have set up bumblebee on two different laptops, both with an intel integrated GPU and a discrete nvidia GPU, both running Centos 7 and installed similarly (nvidia and bumblebee from elrepo). One works fine with the default configuration, the other doesn't and results in the error that the OP ran into. IOW the issue only occurs on some systems... Maybe due to the order in which the 2 GPUs are found by the kernel or by X.org. I don't know.


On the broken laptop, with the default configuration, Xorg.0.log has:

(==) ModulePath set to "/usr/lib64/xorg/modules"
<snip>
(II) xfree86: Adding drm device (/dev/dri/card1)
(EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card0)
(--) PCI:*(0:0:2:0) 8086:1916:1025:1094 rev 7, Mem @ 0x92000000/16777216, 0xa0000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072 (--) PCI: (0:1:0:0) 10de:139a:1025:1094 rev 162, Mem @ 0x93000000/16777216, 0x80000000/268435456, 0x90000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/65536
(II) LoadModule: "glx"
(II) Loading /usr/lib64/xorg/modules/extensions/nvidia/libglx.so
(EE) Failed to load /usr/lib64/xorg/modules/extensions/nvidia/libglx.so: libnvidia-tls.so.390.59: cannot open shared object file: No such file or directory
(II) UnloadModule: "glx"
(II) Unloading glx
(EE) Failed to load module "glx" (loader failed, 7)

Notice that ModulePath doesn't have /usr/lib64/xorg/modules/extensions/nvidia , but X is still trying to load /usr/lib64/xorg/modules/extensions/nvidia/libglx.so . This fails because it doesn't find libnvidia-tls.so.390.59 , but even if it found it (eg if you symlink that lib somewhere) it wouldn't work, because at this point we want X to load the default /usr/lib64/xorg/modules/extensions/libglx.so .

There is also the error:
/dev/dri/card1: failed to set DRM interface version 1.4: Permission denied
I don't know what that means or what role it plays here. But in a working configuration (see below) I also get this error in Xorg.8.log, and it doesn't seem to cause any issues.


My kludgy solution to the issue is to move the nvidia libglx.so out of the way:
sudo mv /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg
and tell bumblebee where it is now, by setting XorgModulePath in /etc/bumblebee/bumblebee.conf so it now has /usr/lib64/xorg/nvidia/ instead of /usr/lib64/xorg/modules/extensions/nvidia/ .

The system then boots succesfully, glxspheres and "optirun glxspheres" work and use the correct GPUs, and Xorg.0.log now has the following instead of the previous lines:

(==) ModulePath set to "/usr/lib64/xorg/modules"
<snip>
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) xfree86: Adding drm device (/dev/dri/card0)
(--) PCI:*(0:0:2:0) 8086:1916:1025:1094 rev 7, Mem @ 0x92000000/16777216, 0xa0000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072 (--) PCI: (0:1:0:0) 10de:139a:1025:1094 rev 162, Mem @ 0x93000000/16777216, 0x80000000/268435456, 0x90000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/65536
(II) LoadModule: "glx"
(II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.0.0
        ABI class: X.Org Server Extension, version 10.0


As you can see, X is now loading /usr/lib64/xorg/modules/extensions/libglx.so , as it should.
We also don't have the "failed to set DRM interface".
Xorg.8.log shows:
(++) ModulePath set to "/usr/lib64/xorg/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules"
<snip>
(II) xfree86: Adding drm device (/dev/dri/card1)
(EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied
(II) xfree86: Adding drm device (/dev/dri/card0)
(--) PCI:*(0:1:0:0) 10de:139a:1025:1094 rev 162, Mem @ 0x93000000/16777216, 0x80000000/268435456, 0x90000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/65536
(II) LoadModule: "glx"
(II) Loading /usr/lib64/xorg/nvidia/libglx.so

And everything works as expected.

I believe a permanent fix could be to have nvidia-x11-drv install libglx.so in /usr/lib64/xorg/nvidia/ , set ModulePath accordingly in /etc/X11/xorg.conf.d/99-nvidia.conf , and have the default bumblebee.conf file with the fixed XorgModulePath. In this way nvidia GPUs should still work fine for non-bumblee users (thanks to 99-nvidia.conf), and bumblebee should work for everyone.

Thoughts?

Regards,
Nicolas
_______________________________________________
elrepo mailing list
elrepo@lists.elrepo.org
http://lists.elrepo.org/mailman/listinfo/elrepo

Reply via email to