NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Issues related to hardware problems
Post Reply
jhylkema
Posts: 3
Joined: 2018/02/23 06:26:45

NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Post by jhylkema » 2018/02/24 09:42:57

All:

I just got a Lenovo P51 (Core-I7 7700HQ 2.8GHz 8-core) with an NVIDIA M1200M discrete graphics card. I followed the procedure at https://elrepo.org/tiki/bumblebee, but when I try to test it using optirun nvidia-settings, I get this error message:

Code: Select all

$ optirun nvidia-settings 
[ 8370.224241] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[ 8370.224325] [ERROR]Aborting because fallback start is disabled.
Tried to run it as root, still no dice.

I mean, it's really not terribly important to me to have it work, but I would hate to have that shiny NVIDIA chip sitting inside the chassis and not earning its keep.

Some more info:

Code: Select all

$ uname -sr
Linux 3.10.0-693.17.1.el7.x86_64

Code: Select all

$ dmesg | grep nvidia
[    2.510162] nvidia: loading out-of-tree module taints kernel.
[    2.512186] nvidia: module license 'NVIDIA' taints kernel.
[    2.523491] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    2.531616] nvidia-nvlink: Nvlink Core is being initialized, major device number 242
[    2.533204] nvidia 0000:01:00.0: enabling device (0004 -> 0007)
[    4.461924] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.25  Wed Jan 24 19:29:37 PST 2018
[    5.166997] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   15.377483] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF
[  204.038354] nvidia 0000:01:00.0: irq 138 for MSI/MSI-X
[ 8365.371363] nvidia 0000:01:00.0: irq 138 for MSI/MSI-X
Any help would be appreciated.

PS: Aside from this issue, my Centos experience on this laptop has been phenomenal. I was positively orgasmic when the wifi card Just Worked(TM) out of the box with the stock kernel, for example, doubly so after all of the blood, sweat, and tears I went through to get the bloody Broadcom chip working on my old MacBook Pro, among other things. If you have the means, I highly suggest picking [a P51] up.

flatline
Posts: 1
Joined: 2018/03/01 05:31:14

Re: NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Post by flatline » 2018/03/01 05:55:27

I just recently bought a P71, which has a very similar discrete graphics card setup as your P51. Bumblebee will definitely work with it - what you are seeing there in the logs is the nvidia driver is being loaded upon boot, which makes it impossible for bumblebee to later access the nvidia driver as it will be 'locked' by the nvidia card. What you will need to do is black list the nvidia modules (which should have already been done by bumblebee setup). This will then allow bumblebee to load and unload them as needed. Also make sure the nouveau driver is blacklisted. My bumblebee black list includes the following:

blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nouveau

Once you black list the modules, reboot, and you will find the nvidia modules no longer are visible in the system logs via dmesg. Starting optirun should work fine.

The second problem you will encounter is that the P51's external ports are wired directly to the Nvidia discrete card. This presents an issue for docking and/or just pluging in an external monitor - you will find that the monitor remains blank if you are running bumblebee - this is because bumblebee works exclusively with the Intel graphics chip to save power and only uses the nvidia card to render to a framebuffer. You can probably spin up another xsession for the external display port and have it work - though your laptop monitor and external monitors likely won't have a shared desktop.

An alternative setup would be to run in hybrid graphics mode but allow the nvidia driver to run the show. For that you would have to remove bumblebee, and create an xconfig to support your laptop and external monitors. I have tried this setup and can you tell that it definitely works for the P71 - I am able to dock with that configuration - monitor configurations are supported as extensions of your laptop such that you have one large workspace and its able to run two 30 inch 2.5 monitors easily. Docks and undocks nicely as well.

Post Reply