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.

wrthissell
Posts: 3
Joined: 2015/06/23 19:10:44

Re: NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Post by wrthissell » 2018/07/24 00:35:30

Dear Colleagues,
I recommend that you post the steps used, including the grub.cfg kernel load command(s), and Bumblebee packagers (NCSU, ElRepo, or another) you used to get Bumblebee to work on Lenovo Thinkpad P50, P51, and P71.
I had Bumblebee working on my previous Lenovo Thinkpad 541 with Centos 6.8. I no longer have access to that computer. I copied the partitions and installed them on my current Lenovo Thinkpad P50, which now has Centos 6.9 and 7.x (currently 7.5) and I have not been able to get Bumblebee to work on this computer, using either the kernel and kernel-plus boot options.
Here are the support blog reports I have made to seek guidance on how to resolve this issue:

http://elrepo.org/bugs/view.php?id=737
http://elrepo.org/bugs/view.php?id=742

Search for wrthissell at:

https://bugs.launchpad.net/lpbugreporter/+bug/752542

For example, here is the documentation of the error I received in 11-2017:

[wrthissell@Charm-198123060054 ~]$ optirun --debug glxgears64
[ 5117.748483] [DEBUG]optirun version 3.2.1 starting...
[ 5117.748566] [DEBUG]Active configuration:
[ 5117.748588] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 5117.748608] [DEBUG] X display: :8
[ 5117.748672] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/nvidia-bumblebee:/usr/lib/nvidia-bumblebee:/usr/lib64:/usr/lib
[ 5117.748696] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 5117.748727] [DEBUG] Accel/display bridge: auto
[ 5117.748755] [DEBUG] VGL Compression: proxy
[ 5117.748776] [DEBUG] VGLrun extra options:
[ 5117.748803] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[ 5117.748938] [DEBUG]Using auto-detected bridge virtualgl
[ 5121.930021] [INFO]Response: No - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

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

[ 5121.930081] [DEBUG]Socket closed.
[ 5121.930116] [ERROR]Aborting because fallback start is disabled.
[ 5121.930126] [DEBUG]Killing all remaining processes.

Here are some blog reports on other people's issues with ThinkPad P5x and Bumblebee and NVidia drivers:

http://elrepo.org/bugs/view.php?id=779

Thank you in advance for providing guidance on how you were able to get Bumblebee to work on the Lenovo Thinkpad P50, P51, and P71 laptops

wrthissell
Posts: 3
Joined: 2015/06/23 19:10:44

Re: NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Post by wrthissell » 2018/08/01 01:01:12

Dear Colleagues,
Please read the following link for my most recent experiences in trying to get Bumblebee to work on a Lenovo Thinkpad P50 with Centos 7.5:

https://github.com/Bumblebee-Project/Bu ... issues/974

Thank you in advance for providing your assistance.

wrthissell
Posts: 3
Joined: 2015/06/23 19:10:44

Re: NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Post by wrthissell » 2018/09/11 03:23:22

Dear Colleagues,
I have found a fix. Please visit the following web pages at the bottom for documentation:

https://github.com/Bumblebee-Project/Bu ... issues/974

https://devtalk.nvidia.com/default/topi ... 11#5280494

hughesjr
Site Admin
Posts: 254
Joined: 2004/12/05 01:51:26
Location: Corpus Christi, Texas, USA
Contact:

Re: NVIDIA Optimus and bumblebee on Lenovo ThinkPad P51

Post by hughesjr » 2019/01/08 21:23:04

I am looking at this info .. I want to use the NVIDIA drivers on the ThinkPad P51.

It seems that the driving factor for the version you selected (NVIDIA-Linux-x86-390.87.run) and then also the same x86_64 version was it is the latest x86 32 bit version supported.

Is that indeed the reason this version of the driver was chosen?

Post Reply