Getting bumblebee to work on a Lenovo P52

Hi all!

I have a Lenovo P52 with the following graphic cards:

Intel UHD graphics 630
Nvidia Quadro P2000

I have followed (more or less) these instructions (https://forums.opensuse.org/showthread.php/531453-Installing-openSUSE-Leap-15-0-and-bumblebee-on-hardware-with-NVIDIA-Optimus-graphics) with one exception: I installed gnome. I could get to gdm, but when I tried to login, I only got a black screen. Using Ctrl+Alt+Fx allowed me to get a text terminal, but switching back to the gdm (without having logged in) led to a black screen, too. this happened independent from the windowmanager I selected (I tried gnome, plasma, IceWM). After installing kdm and using it as display manager (see question below), I can login into plasma, but not into gnome. ](https://forums.opensuse.org/showthread.php/531453-Installing-openSUSE-Leap-15-0-and-bumblebee-on-hardware-with-NVIDIA-Optimus-graphics)
If I try to start using the discrete card, I got the following error:


patta@linux-3qip:~> optirun -vv glxgears
 3171.447101] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
 3171.447425] [DEBUG]optirun version 3.2.1 starting...
 3171.447431] [DEBUG]Active configuration:
 3171.447433] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
 3171.447435] [DEBUG] X display: :8
 3171.447437] [DEBUG] LD_LIBRARY_PATH: 
 3171.447439] [DEBUG] Socket path: /var/run/bumblebee.socket
 3171.447442] [DEBUG] Accel/display bridge: auto
 3171.447444] [DEBUG] VGL Compression: proxy
 3171.447446] [DEBUG] VGLrun extra options: 
 3171.447448] [DEBUG] Primus LD Path: /usr/lib64/primus:/usr/lib/primus
 3171.447466] [DEBUG]Using auto-detected bridge virtualgl
 3171.576627] [INFO]Response: No - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

 3171.576636] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

 3171.576653] [DEBUG]Socket closed.
 3171.576662] [ERROR]Aborting because fallback start is disabled.
 3171.576665] [DEBUG]Killing all remaining processes.

The corresponding Xorg.8.log is


  3171.460] 
X.Org X Server 1.19.6
Release Date: 2017-12-20
  3171.460] X Protocol Version 11, Revision 0
  3171.460] Build Operating System: openSUSE SUSE LINUX
  3171.460] Current Operating System: Linux linux-3qip 4.12.14-lp150.12.16-default #1 SMP Tue Aug 14 17:51:27 UTC 2018 (28574e6) x86_64
  3171.460] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.12.14-lp150.12.16-default root=UUID=ca7a388f-db26-414f-8c98-788e28ebf7fd nouveau.modeset=0 res
ume=/dev/disk/by-uuid/667b53dc-c1b2-428a-b13b-c9ce5ddf02b8 splash=silent quiet showopts
  3171.460] Build Date: 17 April 2018  12:00:00PM
  3171.460]  
  3171.460] Current version of pixman: 0.34.0
  3171.460]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
  3171.460] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
  3171.460] (==) Log file: "/var/log/Xorg.8.log", Time: Wed Oct  3 22:59:51 2018
  3171.460] (++) Using config file: "/etc/bumblebee/xorg.conf.nouveau"
  3171.460] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
  3171.460] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
  3171.460] (==) ServerLayout "Layout0"
  3171.460] (==) No screen section available. Using defaults.
  3171.460] (**) |-->Screen "Default Screen Section" (0)
  3171.460] (**) |   |-->Monitor "<default monitor>"
  3171.461] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
  3171.461] (**) |   |-->Device "DiscreteNvidia"
  3171.461] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
  3171.461] (**) Option "AutoAddDevices" "false"
  3171.461] (**) Option "AutoAddGPU" "false"
  3171.461] (**) Not automatically adding devices
  3171.461] (==) Automatically enabling devices
  3171.461] (**) Not automatically adding GPU devices
  3171.461] (==) Max clients allowed: 256, resource mask: 0x1fffff
  3171.461] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.
  3171.461]    Entry deleted from font path.
  3171.461] (==) FontPath set to:
        /usr/share/fonts/misc:unscaled,
        /usr/share/fonts/Type1/,
        /usr/share/fonts/100dpi:unscaled,
        /usr/share/fonts/75dpi:unscaled,
        /usr/share/fonts/ghostscript/,
        /usr/share/fonts/cyrillic:unscaled,
        /usr/share/fonts/truetype/,
        built-ins
  3171.461] (==) ModulePath set to "/usr/lib64/xorg/modules"
  3171.461] (==) |-->Input Device "<default pointer>"
  3171.461] (==) |-->Input Device "<default keyboard>"
  3171.461] (==) The core pointer device wasn't specified explicitly in the layout.
        Using the default mouse configuration.
  3171.461] (==) The core keyboard device wasn't specified explicitly in the layout.
        Using the default keyboard configuration.
  3171.461] (II) Loader magic: 0x55da01ba7d00
  3171.461] (II) Module ABI versions:
  3171.461]    X.Org ANSI C Emulation: 0.4
  3171.461]    X.Org Video Driver: 23.0
  3171.461]    X.Org XInput driver : 24.1
  3171.461]    X.Org Server Extension : 10.0
  3171.461] (--) using VT number 2

  3171.461] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
  3171.462] (II) xfree86: Adding drm device (/dev/dri/card0)
  3171.462] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
  3171.464] (--) PCI:*(0:1:0:0) 10de:1cba:17aa:225f rev 161, Mem @ 0xa3000000/16777216, 0x60000000/268435456, 0x70000000/33554432, I/O @ 0x00002000/128, BIOS @ 0x????????/524288
  3171.464] (II) LoadModule: "glx"
  3171.464] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
  3171.464] (II) Module glx: vendor="X.Org Foundation"
  3171.464]    compiled for 1.19.6, module version = 1.0.0
  3171.464]    ABI class: X.Org Server Extension, version 10.0
  3171.464] (II) LoadModule: "nouveau"
  3171.465] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so
  3171.465] (II) Module nouveau: vendor="X.Org Foundation"
  3171.465]    compiled for 1.19.6, module version = 1.0.15
  3171.465]    Module class: X.Org Video Driver
  3171.465]    ABI class: X.Org Video Driver, version 23.0
  3171.465] (II) LoadModule: "mouse"
  3171.465] (II) Loading /usr/lib64/xorg/modules/input/mouse_drv.so
  3171.465] (II) Module mouse: vendor="X.Org Foundation"
  3171.465]    compiled for 1.19.6, module version = 1.9.2
  3171.465]    Module class: X.Org XInput Driver
  3171.465]    ABI class: X.Org XInput driver, version 24.1
  3171.465] (II) LoadModule: "kbd"
  3171.465] (II) Loading /usr/lib64/xorg/modules/input/kbd_drv.so
  3171.465] (II) Module kbd: vendor="X.Org Foundation"
  3171.465]    compiled for 1.19.6, module version = 1.9.0
  3171.465]    Module class: X.Org XInput Driver
  3171.465]    ABI class: X.Org XInput driver, version 24.1
  3171.465] (II) NOUVEAU driver 
  3171.465] (II) NOUVEAU driver for NVIDIA chipset families :
  3171.465]    RIVA TNT        (NV04)
  3171.465]    RIVA TNT2       (NV05)
  3171.465]    GeForce 256     (NV10)
  3171.465]    GeForce 2       (NV11, NV15)
  3171.465]    GeForce 4MX     (NV17, NV18)
  3171.465]    GeForce 3       (NV20)
  3171.465]    GeForce 4Ti     (NV25, NV28)
  3171.465]    GeForce FX      (NV3x)
  3171.465]    GeForce 6       (NV4x)
  3171.465]    GeForce 7       (G7x)
  3171.465]    GeForce 8       (G8x)
  3171.465]    GeForce GTX 200 (NVA0)
  3171.465]    GeForce GTX 400 (NVC0)
  3171.575] (EE) [drm] Failed to open DRM device for pci:0000:01:00.0: -19
  3171.575] (EE) No devices detected.
  3171.575] (EE) 
Fatal server error:
  3171.575] (EE) no screens found(EE) 
  3171.575] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
  3171.575] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
  3171.575] (EE) 
  3171.575] (EE) Server terminated with error (1). Closing log file.

The error messages from above are repeated in the system log (journalctl), I do not know where to find more information.

I would like to switch back to gnome and, of course, be able to use the discrete graphics. Does anyone know how to proceed now?

One last question: To enable kdm, I had to uninstall gdm, since setting the DISPLAYMANAGER value in the /etc/sysconfig editor in yast did not change it. How does one change the displaymanager?

Best wishes,

patta42

After installing the proprietary nvidia driver as detailed here: https://en.opensuse.org/SDB:NVIDIA_Bumblebee

In contrast to the tutorial, I did not link any libraries (got a black screen then).

After that,

optirun glxgears

did work.

However, I was not able to use the HDMI port on the laptop.


xrandr -q

showed only the laptop monitor and


intel-virtual-output

failed with


No VIRTUAL outputs on ":0"

To be able to use the HDMI output, I followed these instructions: https://github.com/Bumblebee-Project/Bumblebee/issues/855

I added a dummy “nvidia” section to /etc/X11/xorg.conf.d/ and a dummy “intel” section to /etc/bumblebee/xorg.conf.nvidia

Now,


xrandr -q

shows (besides different resolutions for the laptop monitor)


VIRTUAL1 disconnected (normal left inverted right x axis y axis)

and


intel-virtual-output -f

does not exit anymore.

In the moment, I have not second monitor available, so I cannot test the HDMI output.

However, still there are some problems:

  • I cannot get into gnome.
  • If I switch on the discrete card (by optirun true, for example) and switch it off again, the system does not wake up after lid close.

Maybe this helps others to get bumblebee to work on a P52.

Best,

patta42