Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access secondary GPU #749

Closed
bartQu9 opened this issue Mar 28, 2016 · 84 comments
Closed

Cannot access secondary GPU #749

bartQu9 opened this issue Mar 28, 2016 · 84 comments
Assignees
Milestone

Comments

@bartQu9
Copy link

bartQu9 commented Mar 28, 2016

Distro: Debian Stretch (Testing)
Kernel:4.4.0-1-amd64 #1 SMP Debian 4.4.6-1 (2016-03-17) x86_64 GNU/Linux

My bumblebee was working fine but now, when I'm trying to run any aplication on the seccondary GPU via optirun I receive followning error:

root@bartek-debian:/home/bartek# optirun -vv neverball
[ 1259.287028] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 1259.287640] [DEBUG]optirun version 3.2.1 starting...
[ 1259.287657] [DEBUG]Active configuration:
[ 1259.287662] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 1259.287667] [DEBUG] X display: :8
[ 1259.287671] [DEBUG] LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
[ 1259.287676] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 1259.287681] [DEBUG] Accel/display bridge: auto
[ 1259.287685] [DEBUG] VGL Compression: proxy
[ 1259.287692] [DEBUG] VGLrun extra options: 
[ 1259.287704] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
[ 1259.287784] [DEBUG]Using auto-detected bridge primus
[ 1259.295078] [INFO]Response: No - error: [XORG] (EE) 

[ 1259.295100] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) 

[ 1259.295110] [DEBUG]Socket closed.
[ 1259.295140] [ERROR]Aborting because fallback start is disabled.
[ 1259.295151] [DEBUG]Killing all remaining processes.
[bumblebee-bugreport-20160328_140734.tar.gz](https://github.com/Bumblebee-Project/Bumblebee/files/191774/bumblebee-bugreport-20160328_140734.tar.gz)

The major problem is that I don't receive any specific error just Cannot access secondary GPU - error: [XORG] (EE)

Here is my bumblebee-bugreport:
bumblebee-bugreport-20160328_140734.tar.gz

@dfszb
Copy link

dfszb commented Apr 4, 2016

I had a similar issue (with my Ubuntu 15.10 installation). The problem in my case was an incorrect naming of the NVidia module in the bumblebee.conf file. Also checking your bumblebee.conf file I can see that [bumblebeed] section's Driver parameter is not set and [driver-nvidia] section's KernelDriver=nvidia-current (I had to change this to specific nvidia module version on ubuntu).
Also in the xorg.conf.nvidia the BusID is commented out (the correct value can be found using lspci and checking for the nvidia graphic card).

@sysrq-reisub
Copy link

I'm having the EXACT problem in ubuntu 16.04, in ubuntu 15.10 was working fine. I really can't get out this. Also with nouveau

@sysrq-reisub
Copy link

Also I don't have any /var/log/Xorg.8.log but in Xorg.0.log i got

510.566 config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/drm/card1 /dev/dri/card1
513.524 config/udev: Adding drm device (/dev/dri/card1) card1 /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/drm/card1
513.524 xfree86: Adding drm device (/dev/dri/card1)
514.954 LoadModule: "modesetting"
514.954 Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
514.954 Module modesetting: vendor="X.Org Foundation"
[ 514.954] compiled for 1.18.3, module version = 1.18.3
[ 514.954] Module class: X.Org Video Driver
[ 514.954] ABI class: X.Org Video Driver, version 20.0
514.954 UnloadModule: "modesetting"
514.954 Unloading modesetting

I waited a couple of seconds and seems like the module doens't unload.

493.451 config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/drm/card1 /dev/dri/card1
495.654 config/udev: Adding drm device (/dev/dri/card1) card1 /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/drm/card1
495.654 xfree86: Adding drm device (/dev/dri/card1)
497.123 LoadModule: "modesetting"
497.123 Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
497.123 Module modesetting: vendor="X.Org Foundation"
[ 497.123] compiled for 1.18.3, module version = 1.18.3
[ 497.123] Module class: X.Org Video Driver
[ 497.123] ABI class: X.Org Video Driver, version 20.0
497.123 UnloadModule: "modesetting"
497.123 Unloading modesetting
497.123 Failed to load module "modesetting" (already loaded, 0)
[ 497.123] xf86: found device 1

@seism0saurus
Copy link

I have exactly the same problem with Sparky Linux (it is a Debian testing distribution). Exactly the same error message as issuer.
Additionally my Xorg log file shows:


May  2 21:03:38 sparky bumblebeed[2410]: [  372.174542] [ERROR][XORG] (EE)

May  2 21:03:38 sparky bumblebeed[2410]: [  372.174580] [ERROR][XORG] (EE)

May  2 21:03:38 sparky bumblebeed[2410]: [  372.174590] [ERROR][XORG] (EE)

May  2 21:03:38 sparky bumblebeed[2410]: [  372.174597] [ERROR][XORG] (EE)

May  2 21:03:38 sparky bumblebeed[2410]: [  372.174604] [ERROR][XORG] (EE)

May  2 21:03:38 sparky bumblebeed[2410]: [  372.174610] [ERROR]X did not start properly

My configuration files are edited according to dfszb but it doesn't help.

@bluca
Copy link
Member

bluca commented May 2, 2016

If you are on Debian testing/unstable or ubuntu 16.04 or any derivative with Xorg >= 1.18, make sure you don't have xserver-xorg-legacy installed, as it's incompatible with bumblebee.

@sysrq-reisub
Copy link

Already tried, but nvidia-361 on ubuntu won't let me login through lightdm (idk why) and it is he only nvidia driver which does not require the xorg-legacy package.

@bluca
Copy link
Member

bluca commented May 2, 2016

Only the legacy 340 series should require the legacy wrapper, not sure why they depend on it in Ubuntu... Anyway, maybe you could try to hack the /usr/bin/Xorg script to never run the wrapper?

@seism0saurus
Copy link

Thank you bluca. Uninstalling the xserver-org-legacy package solved the problem.
I did search the web, but couldn't find a hint of that incompatibility.

@sysrq-reisub
Copy link

I'll try this evening to hack the nvidia package and see if the problem is solved.

@ArchangeGabriel
Copy link
Member

I’m not sure of the state of this issue. Is it a distro-specific problem with Ubuntu way of packaging Xorg?

@dfszb
Copy link

dfszb commented May 6, 2016

In my case this was caused by the configuration files, editing the config files helped. (and I guess this means it was a distro-specific issue).

@ArchangeGabriel
Copy link
Member

Yes, from further reading in #759 and #761, I’ve figured out that things seems quite broken by default on Ubuntu 16.04. Looking for someone using that distro to look into that.

@ArchangeGabriel
Copy link
Member

Maybe a bug should be filed at https://bugs.launchpad.net/ubuntu/+source/bumblebee.

@bartQu9
Copy link
Author

bartQu9 commented May 6, 2016

I also think it's a distro-specific issue. In my case this problem appeared when I did a kernel upgrade via apt-get, but I'm not able to tell You wheter/ and what packages were required to satisfy dependiencies. Coincidentally I had to do clear inststallation with newer kernel version and then fresh bumblebee installation worked well.

@bartQu9
Copy link
Author

bartQu9 commented May 6, 2016

I want only remind that in my case used distribution was Debian

@ArchangeGabriel
Copy link
Member

@bartQu9 Yes, but you went able to solve it by reinstalling/cleaning the conf. Other people around here on Ubuntu 16.04 seems to have to modify default conf files/ldconfig to get things working.

@sysrq-reisub
Copy link

I've got Ubuntu 16.04 and I've solved by manually removing the xorg wrapper from the xorg-legacy package, checked that in Ubuntu 15.10 and it wasn't a dependency, so that's why the problem came just with this version of Ubuntu. This occurs with all versions of the nvidia driver. Strangely, after a second reboot, I wasn't also able to login into unity from lightdm, after doing this trick, so I had to remove/reset the dconf configuration of my user.

@TiZ-HugLife
Copy link

Well this is a conundrum. I run my games in a secondary X server, which I can't start unless I have xserver-xorg-legacy. But bumblebee now conflicts with xserver-xorg-legacy? Is there some way around this? I was thinking I could copy that Xorg wrapper somewhere that it won't get run by default, and have my script's startx invoke it manually, but is there a better way to get around this?

@ArchangeGabriel
Copy link
Member

If it’s a matter of Xorg wrapper, #743 could help.

@TiZ-HugLife
Copy link

Yeah, that seems like a good thing to have in any case... however, it seems that if I remove xserver-xorg-legacy, my game running script still works as long as my regular user can access my tty dev. I should look into some way to make sure my user can always access the ttys with udev. So never mind my concerns, haha!

@SG5
Copy link

SG5 commented May 10, 2016

@bluca after remove package xserver-xorg-legacy I've got error

[ERROR]Cannot access secondary GPU - error: XORG Failed to load module "mouse" (module does not exist, 0)

@bluca
Copy link
Member

bluca commented May 10, 2016

I guess xorg doesn't work for you without the legacy wrapper. If you are on Debian, we just uploaded a version that bypasses it without needing to remove it.

@TiZ-HugLife
Copy link

Do you think the package is likely to work on Ubuntu Xenial as well? If so, where can I snag it?

@ArchangeGabriel
Copy link
Member

No, that’s on 16.04, like everyone else here. We’re quite close to release 4.0, hope for Ubuntu users that @Vincent-C or @happyaron (or even yourself @bluca, I’m not sure who does what now in this packaging team…) will be able to release it to the PPA too.

@TiZ-EX1 Not sure about the state today, but normally it should (when Debian packaging entered the game, we made sure that it would work for both to relieve Ubuntu packaging work when downstreaming).

@bluca
Copy link
Member

bluca commented May 10, 2016

@TiZ-EX1 - the built binary .deb is not compatible, the nvidia-driver is quite different in Ubuntu. However the source is shared, so if you rebuild it locally in Ubuntu it should work. But I've only tested it in 15.10, not in 16.04 (don't have a machine with that yet). Some feedback would actually be useful to have :-) Repo: https://anonscm.debian.org/cgit/pkg-nvidia/bumblebee.git/

@ArchangeGabriel - I'm not sure I've got powers to do releases on the PPA. The package in the official Ubuntu archive is synced automatically, so 16.10 already has the new version with the fix: http://packages.ubuntu.com/yakkety/bumblebee
But AFAIK Ubuntu doesn't sync from Sid after release, so it won't make it in Xenial unless a Ubuntu dev uploads it manually.

@Vincent-C
Copy link
Member

If anyone needs me to make an upload to the PPA, just give me a shout! I'm only loosely following along with bumblebee since @bluca has basically been taking care of everything on the Debian side (I'm just taking the opportunity to catch up with all my other neglected packages in Debian after being MIA for a while). As for an update via the official Ubuntu archive, I don't think we've ever bothered with that in the past, since Ubuntu SRUs are just as much of a hassle as Debian stable updates, so we've just seemed to expect Ubuntu users to use the PPA.

@ppmt
Copy link

ppmt commented Sep 1, 2016

Hello @bluca , thanks for helping. Here the log file Xorg.8.log

https://gist.github.com/ppmt/b35a24b512bf0c37a2e60b883a187844

@user-az
Copy link

user-az commented Sep 2, 2016

Hi. My workaround for "mouse" problem is
0. Reading for archlinux forums I'd found smthng like "restart your bumblebee service"
So, after restarting the one and starting
$optirun --status
Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.
But trying
$optirun glxgears
I still had the same "mouse" problem.

  1. I've checked lspci for my nvidia card
    01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M](rev ff)
  2. I have uncommented string in /etc/bumblebee/xorg.conf.nvidia
    BusID "PCI:01:00:0"

Now I can run without errors
$optirun glxgears

Hope it will help somebody on a similar hardware.

@ppmt
Copy link

ppmt commented Sep 2, 2016

@user-az : thanks a lot! that did it for me too.

I uncommented the BUSID line and now it all works. Optirun will launch the app.

without optirun :
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
304 frames in 5.0 seconds = 60.644 FPS
301 frames in 5.0 seconds = 60.037 FPS

and with optirun :
$ optirun glxgears
9357 frames in 5.0 seconds = 1871.284 FPS
9323 frames in 5.0 seconds = 1864.526 FPS

@jryaonj
Copy link

jryaonj commented Oct 2, 2016

I've got the same problem on Ubuntu 16.04, and removing package xserver-xorg-legacy really helps!
I use my laptop with only one external screen with HDMI connection (which means no consideration for xserver compatibility issues needed), and now everything seems OK.

@louisgv
Copy link

louisgv commented Dec 22, 2016

I can confirm that doing
sudo apt remove xserver-xorg-legacy

then restart bumblebeed worked for me.

@davidparks21
Copy link

Confirming that removing xserver-xorg-legacy worked for me on Linux Mint 18.1 on an MSI GS 60 Ghost with 970M and an Intel embedded GPU.

@taylorkline
Copy link

taylorkline commented Jan 5, 2017

For anyone who stumbles across this bug Googling, thanks to somebody on the Arch forums I have realized that this may be because of TLP disabling the GPU driver if you get [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card . Fix is to blacklist the GPU driver with RUNTIME_PM_BLACKLIST and RUNTIME_PM_DRIVER_BLACKLIST:

https://bbs.archlinux.org/viewtopic.php?id=218757

@GatoAmarilloBicolor
Copy link

For me too.

@afro-coder
Copy link

@BaronBaleron could you please post the screen of the xorg nvidia file?

@HugoPoi
Copy link

HugoPoi commented Jan 31, 2017

LinuxMint 18.1 (Xenial) - Asus U36JC, GT218M [GeForce 310M]
I need package nvidia-340 (only this one supporting GeForce 310M) but depends on xserver-xorg-legacy so I do sudo dpkg -r --force-all xserver-xorg-legacy
After reboot everything work !
You also need to remove xserver-xorg-legacy in /var/lib/dpkg/status on Depends line of nvidia-340 package. (This is needed to avoid apt say dependencies of nvidia is missing and need to be install)
Edit : Proper way to force apt staying like that is holding the package with sudo apt-mark hold xserver-xorg-legacy

This was referenced Feb 20, 2017
@colceagus
Copy link

colceagus commented May 1, 2017

Hello, I have removed xserver-xorg-legacy, and xserver-xorg-videau-nouveau, blacklisted nouveau (to be able to boot/login successfully), the BUSID is uncommented and has the right ID "PCI:01:00:0". I've done the Screen trick, I managed to start bumblebeed, but the error is still in syslog. I've done the TLP trick too.
I'm using nogpumanager in grub.

I'm running Ubuntu 16.04.4LTS with 4.10.0.20-generic kernel and NVIDIA 378.13 driver.

The syslog: https://pastebin.com/06BCUdRH

This appeared after upgrading to 4.10.0.20-generic. On 4.10.0.19-generic all was running smooth. Couldn't do it on 4.10.0.19 again.

Please help!

@bluca
Copy link
Member

bluca commented May 1, 2017

What laptop & GPU do you have?

@colceagus
Copy link

colceagus commented May 1, 2017

Hi @bluca ,

Dell XPS 15 9560
gtx 1050 4gb

I added +iglx to /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf to make normal opengl apps work with intel. Could not run them before.

I installed nvidia-381 from the apt repos (no nvidia proprietary drivers install, even though I installed 378 by extracting the driver and patching it with a patch from the nvidia forums, https://devtalk.nvidia.com/default/topic/995429/linux/failed-installed-nvidia-with-kernel-4-10/). Before installing 378 from extracted and patched sources, I installed bumblebee-nvidia, which brought nvidia-304 and nvidia-current as dependencies. After I installed nvidia-378 from patched installer, i tried installing from apt repos, with no luck still. I tried upgrading the nvidia drivers to 381.

By installing the nvidia-381, apt said a lot of packages were going to be removed (including nvidia-current), I read that sometimes this was the issue. I will make another pastebin. https://pastebin.com/VDNqz13Z
This is the terminal output from apt. (apart from the subject, if you know how to solve the
/sbin/ldconfig.real: /usr/local/lib/libboost_math_tr1l.so.1.62.0 is not a symbolic link errors, I'll send you a beer through paypal :)) )

I changed the bumblebee.conf to point to 381 drivers. Reboot. All works. What should I check for now ?
I tested runnning glxgears with and without optirun. bbswitch indicator is on when running with optirun, off when running without.

Thanks,
Daniel.

@bluca
Copy link
Member

bluca commented May 1, 2017

Sorry, I'm a bit lost - is it working with 381 or not?

Also make sure to use the Xenial testing PPA if you are on 16.04: https://launchpad.net/~bumblebee/+archive/ubuntu/testing

@colceagus
Copy link

colceagus commented May 1, 2017 via email

@bluca
Copy link
Member

bluca commented May 1, 2017

I've just uploaded a new version that will fix apt trying to remove everything when installing nvidia-381.

If you can run "optirun glxgears -info" a couple of times and it works, and it prints that it's using the nvidia GLX driver then you are all good.

@colceagus
Copy link

colceagus commented May 1, 2017 via email

@bluca
Copy link
Member

bluca commented May 1, 2017

I'm referring to a different problem - bumblebee-nvidia depends on a list of available drivers, and 381 was missing. It's now been added to the list.

Yes, you shouldn't have multiple versions of the driver packages installed in Ubuntu, they conflict with each other, so it's correct to have only one.

Happy you could get it working - given all issues here seem solved, I'll close now for housekeeping.

@bluca bluca closed this as completed May 1, 2017
@colceagus
Copy link

As I've witnessed, the default driver for bumblebee-nvidia was nvidia-304. What version are you going to recommend when one installs bumblebee-nvidia for the first time ?
Installation of the nvidia-381 removed 304 and installed its dependencies, as you can see in the log.

@bluca
Copy link
Member

bluca commented May 1, 2017

It depends on the hardware. Different series support different cards, the distribution should have an autodetect script, else Nvidia's website has the official list

@colceagus
Copy link

I get a strange behavior after 1 day of using it. Didn't happen until today, though. I put the laptop to sleep using the right-most menu from the status bar. Touchpad loses its click and tap-to-click on wake-up, same for restart.

@colceagus
Copy link

fixed after updating to next version of bumblebee released.

@JeffMings
Copy link

For those struggling with systems like mine, this may save you the headaches and time I spent:
-System- ThinkPad T430s with I5, intel integrated graphics and Nvidia NVS 5200m.
-Ubuntu 16.04, completely updated
-I was never able to get Bumblebee to work completely, using the test/dev PPA. Since it is known to work correctly with 16.10, Ubuntu users are probably better off just switching from 16.04 to 16.10.
-Using the NVidia 375 binary/closed driver and Nvidia Prime worked surprisingly well, with very little pain. I am able to explicitly switch between integrated Intel and Nvidia easily with Nvidia Prime.
-The performance gains from the Nvidia GPU are minor (playing Eve Online under Wine) and the steps necessary to work around the graphics artifacts and rendering issues aren't worth the trouble. None of the graphics glitches occur using the integrated Intel graphics.
-Amazingly, the frame rate for the Intel graphics improved with the NVidia 375 driver.

@conema
Copy link

conema commented Jul 17, 2018

In relation to @jkdf2's comment, powertop give the same problem.

@msandy
Copy link

msandy commented Dec 9, 2018

If you are on Debian testing/unstable or ubuntu 16.04 or any derivative with Xorg >= 1.18, make sure you don't have xserver-xorg-legacy installed, as it's incompatible with bumblebee.

This!

Finally fixed the issue on my Dell 5520:

$ glxgears -info
GL_RENDERER   = Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) 
GL_VERSION    = 3.0 Mesa 17.3.9
GL_VENDOR     = Intel Open Source Technology Center
$ optirun glxgears -info
GL_RENDERER   = Quadro M1200/PCIe/SSE2
GL_VERSION    = 4.6.0 NVIDIA 390.87
GL_VENDOR     = NVIDIA Corporation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests