Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Getting Optimus GPU to be usable

Need help with peripherals or devices?
Post Reply
Message
Author
Yendorian
Posts: 5
Joined: 2017-04-18 21:24

Getting Optimus GPU to be usable

#1 Post by Yendorian »

I've only used Debian Jessie a short while, but I already like it more than Mint. The only thing preventing me from using it exclusively is my Nvidia GeForce 950M card doesn't seem to work with any drivers, despite it being listed as a supported card in the Jessie backports. I have had no success with bumblebee.

Part of the problem seems to be that Debian is using the default Intel VGA.

Code: Select all

lspci | grep NVIDIA
produces the output "01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 950M] [10de:139a] (rev a2)". It isn't seen as "VGA", instead it's a 3D controller.

I've followed the instructions from the Debian Nvidia guide, adding the backport repository (in /etc/apt/sources.list)

Code: Select all

deb http://http.debian.net/debian jessie-backports main contrib non-free

as well as

Code: Select all

sudo apt-get install -t jessie-backports bumblebee-nvidia primus
  • I cannot fix the problem through BIOS.
  • I made sure noveau was blacklisted. I blacklisted it so hard a new color would need to be perceived to fully comprehend how blacklisted it was.
  • I made sure that the bumblebee.conf file used BusID "PCI:01:01:0". I also used "01:01->.<-0" to try to match the lscpi output. Hex formatting of the BusID is not a factor.
  • I've used every combination of "Driver=nvidia", "Driver=nvidia-current" combined with KernelDriver
  • I made a skeleton .xorg file, even though I'm fairly sure this does not relate to my particular situation at all
  • I removed the conf file with "rm /etc/X11/xorg.conf"
All I have to show for any of it when running

Code: Select all

optirun glxgears
are things like

Code: Select all

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.
or

Code: Select all

NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0
I'm fairly sure I'm doomed as I've looked at every forum posting I could find for over a week and futilely attempting recommendations. I also viewed every error and followed each suggestion on bumblebee. I've toyed with the idea of purchasing a new gaming laptop, but based on the documentation, I would not have expected this to be a problem with my current hardware.

I did a new install of Mint to see if I could tease out how it's allowing my GPU to work when Debain isn't. The only drivers it seems to have are the Nvidia-375 drivers, which I had at one point manually installed on my Debian box. I also noticed that mint had "Do not use the device" next to the integrated intel microcode GPU. I'm curious if I were to disable the Intel VGA if Debian would decide to use my Nvidia GPU instead, despite being a 3D controller. But I don't know how to do that and I'm also not sure if it is a good idea. Any advice from the community would be appreciated.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Getting Optimus GPU to be usable

#2 Post by stevepusser »

Don't give up--it is possible, as shown by MX 16 64-bit. You also have to install all the bumblebee, primus and associated packages from jessie-backports to get Bumblebee working correctly with this newer hardware. Our developers tangled with this when getting the automatic bumblebee-nvidia install tool working correctly for the Jessie-based MX 16 64-bit release. However, only the Intel GPU is going to be exposed to the system with normal Bumblebee. The Nvidia stays in the background, just rendering 3D stuff when called upon by Optirun, and then handing it back to the Intel GPU for the display. So make sure you have the correct bumblebee-nvidia tree of dependencies installed--the jessie backports versions thereof.

I would bet that your Intel gpu will also need the jessie-backports kernel, headers, mesa, and xserver-xorg-video-intel driver...did you make sure that was working first?

There is a taskbar indicator tool I haven't ported over yet that's supposed to set the Nvidia GPU as the main player and expose it to the system, but it requires a logout and login to finish the switch. I'll get around to porting that and seeing if it works on my Skylake Optimus laptop with a 940MX GPU.

Edit: I also find the inxi system information script to be quite useful, as on my laptop:

Code: Select all

steve@mx1:~$ inxi -G
Graphics:  Card-1: Intel HD Graphics 520
           Card-2: NVIDIA Device 179c
           Display Server: X.Org 1.16.4 driver: intel Resolution: 1920x1080@60.01hz
           GLX Renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2) GLX Version: 3.0 Mesa 13.0.6

steve@mx1:~$ optirun inxi -G
Graphics:  Card-1: Intel HD Graphics 520
           Card-2: NVIDIA Device 179c
           Display Server: X.Org 1.16.4 driver: intel Resolution: 1920x1080@60.01hz
           GLX Renderer: GeForce 940MX/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 375.26
so we see that the Intel gpu remains as the video device, optirun just switches the glx renderer that is going to provide the rendered output to the Intel gpu for display. Best for you to get Bumblebee working correctly before you and I see if we can switch the display server to the Nvidia one.
MX Linux packager and developer

Yendorian
Posts: 5
Joined: 2017-04-18 21:24

Re: Getting Optimus GPU to be usable

#3 Post by Yendorian »

Emboldened by your support, I took your advice. My GPU is working now! It also managed to get my touchpad working as well! It seems a lot of the problem was I didn't have the wit to install the backport kernel... in any case, as a full time Debian user I'll probably be able to become less of a rookie over time. Thank you so much!

Note: I had made a file at /etc/X11/xorg.conf as part of troubleshooting.After running the jessie-backport kernel, my computer couldn't boot to a GUI until I deleted it.

Code: Select all

#Add backports if driver still unsupported for the 950M
#INSTALL FROM BACKPORTS
#Add backports to sources:
sudo tee -a /etc/apt/sources.list <<< "deb http://ftp.debian.net/debian jessie-backports main contrib non-free"

#INSTALL BUMBLEBEE, WHICH WILL ALLOW THIS OPTIMIS GPU TO FUNCTION
sudo apt install -t jessie-backports bumblebee-nvidia primus
#Support 32 bit applications as well
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt-get install -t jessie-backports primus-libs:i386

#Add user to bumblebee group so applications can be run without sudo
sudo adduser $USER bumblebee

#INSTALL THE BACKPORTS KERNEL
#  Add the kernel to the sources list
sudo tee -a /etc/apt/sources.list <<< "deb http://httpredir.debian.org/debian jessie-backports main"
sudo apt update && sudo apt install linux-image-amd64/jessie-backports

#I got an error at this point:
#The following packages have unmet dependencies:
 #linux-image-4.9.0-0.bpo.2-amd64 : Depends: linux-base (>= 4.3~) but 3.5 is to be installed
 #                                  Recommends: firmware-linux-free but it is not going to be installed
 #                                  Recommends: irqbalance but it is not going to be installed
#E: Unable to correct problems, you have held broken packages.
#Attempt to resolve errors without realizing I accidentally didn't install the kernel from the backports repo, but it resolved the error anyway
sudo apt install firmware-linux-free
sudo apt install irqbalance
sudo apt -t jessie-backports install linux-image-4.9.0-0.bpo.2-amd64
#Make sure headers are installed
sudo apt install -t jessie-backports 
After rebooting, I was able to log in and run optirun glxgears. To my delight, it ran without errors. I haven't tried running any GPU intense applications yet. I'll post results when I get the chance to install and run some. In any case, I've gotten much farther than I did before.
Last edited by Yendorian on 2017-04-19 23:41, edited 3 times in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Getting Optimus GPU to be usable

#4 Post by stevepusser »

Yes, X won't need an xorg.conf file for the Intel driver it will be using full-time with Bumblebee; since it can't see any Nvidia display device, the file telling it to use one only causes a failure. Bumblebee has one for the Nvidia device hidden away in its own folder.

More advanced stuff that I managed to get working: va-api hardware acceleration for a backported mpv 0.24 or my own package of QMPlay2 for the Intel GPU: 4K h.264 video playback that doesn't push the CPU use up at all! These are in my own public jessie multimedia backports repository on the openSUSE build service.

Using the Nvidia GPU for 32-bit programs, such as Space Engine in Wine (requires the Nvidia renderer). Steam games would be similar.

One issue that is currently mysterious is that I will often "lose" the Nvidia GPU after coming back from a suspend to ram--I tried a fix from the Arch wiki Bumblebee entry, but it didn't make any difference.
MX Linux packager and developer

ekeimaja
Posts: 3
Joined: 2017-04-14 10:40

Re: Getting Optimus GPU to be usable

#5 Post by ekeimaja »

On my nVidia 820M I installed just bumblebee nouveau and mesa-utils, and everything works great. It does not need any backports or Xorg configs.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Getting Optimus GPU to be usable

#6 Post by stevepusser »

ekeimaja wrote:On my nVidia 820M I installed just bumblebee nouveau and mesa-utils, and everything works great. It does not need any backports or Xorg configs.
What we have to do depends on the hardware, of course. We simplified it enough in MX 16 by porting all the backports at the time into our main MX repo, so that dolphin_oracle was able to write an Nvidia-driver install tool that determined what version of the driver the hardware required, whether you were running an Optimus hybrid system or a desktop one, and install Bumblebee alongside the Nvidia driver if it was an Optimus one.
MX Linux packager and developer

Post Reply