-
Notifications
You must be signed in to change notification settings - Fork 142
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
Issues when using bumblebee with nvidia-driver-390 in Ubuntu 18.04 #951
Comments
I just began having a similar problem. I am using OpenSuse Tumbleweed, and after a few recent updates (to kernel 4.15.10, and to nvidia driver 390.42 from 390.25), I noticed that bumblebee has recently stopped being able to turn off the GPU once it is turned on. I had also narrowed the problem down to the nvidia_drm module as the one which becomes "locked" in use despite the fact that lsmod does not show any other module to be dependent on it. On my system at least, lsmod does not show that nvidia_drm is being used by drm_kms_helper, it shows nothing, although the use count is still 1. Something has changed either in recent kernels or in the nvidia driver that causes the module to always be in use once loaded and this is disrupting the operation of bumblebee. I tried the workaround suggested by @rockorequin and it does work, but I'm wondering if there is any downside to it? Optirun seems to work, and the GPU does now turn off, but will there be any missing functionality by completely disabling the nvidia_drm and nvidia_modeset modules? |
If you're just using bumblebee/optirun/primus and not PRIME, I don't think you'll lose anything important at this stage. See https://us.download.nvidia.com/XFree86/Linux-x86/390.42/README/kms.html for a description of the modules: they are still considered experimental and aren't fully implemented. I believe modeset lets you change the screen resolution using the kernel, which results in flicker-free resolution changes, but my guess is that the intel module is doing that with optirun/primus (so you actually want i915.modeset=1 in your boot line). |
On Debian I forced non-glvnd with bumblebee as they caused too much problems. I'm not a maintainer of the Nvidia drivers in Ubuntu so can't do much there I'm afraid - if possible I suggest to switch to non-glvnd. |
That sounds reasonable. One possible thing of concern from the page you linked is that the drm module is apparently needed for atomic mode setting required by Wayland, but if, as you point out, the actual mode setting in an virtualgl or primus environment is being done by the intel driver, then it may not be an issue. I'm not running Wayland so can't immediately test out whether disabling Nvidia drm causes a problem there. Ultimately, it's probably good to figure out the root cause and see if there is a solution for it, but with the work-around, it's not that urgent. |
I am running into the same issue with bumblebee and nvidia 390. How are you able to track which kernel module is causing the problem ? I get a hard freeze of the system and I have to go to recovery and uninstall bumblebee to recover |
@powderluv: do you mean the hard freeze that I mentioned if I have nvidia.modeset=1 in the kernel boot parameters? This one is caused by a bug in the nvidia module. Do you still get a hard freeze if you put nvidia.modeset=0 in your kernel boot parameters? (If you're using Ubuntu, https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter shows how to do this.) |
@rockorequin I see it with nvidia.modeset=0 |
Hi! It initially looks for it at unexistent path, for unknown reason: /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 but there is no such package, that holds library here nowadays. So, since primusrun don't have any config file, you may do it either:
|
primusrun should work oob now since a few days back (they updated it). It disables all the necessary modules that was listed in the original post. Though, I did change the library paths according to what the original post said. While I can get bumblebeed to load I cannot successfully use optirun:
/var/log/syslog:
|
@fgblomqvist: does "sudo modprobe nvidia" give you any more information? Are you using the standard 4.15 kernel or the 4.16 one? I'm using the 4.16.1 kernel and I need to patch the nvidia module to get 390.48 to load properly, or I get a load error when I try to modprobe it (and the same error messages from optirun/bumblebeed that you are seeing). In case you're using 4.16, here is what fixes it for me. I'm using the ubuntu nvidia module, so it's installed with dkms. The patch I'm using for 4.16 is called buildfix_kernel_4.16.patch and it sits in the directory. I have to add this to the dkms.conf file:
The buildfix file is /usr/src/nvidia-490.48/patches/buildfix_kernel_4.16.patch and contains:
|
I uninstalled Bumblebee to be able to use the nvidia driver flawlessly for some gaming the other day, but I'll reinstall it and try again this weekend or so and report back! |
I found out that you also have to disable the nvidia-fallback service, because it ignores aliasing nouveau to off: systemctl disable nvidia-fallback.service Otherwise, this loads nouveau when it doesn't detect the nvidia module, and then you can't load the nvidia module and optirun reports that it can't find nvidia. |
I fixed
Adding |
I'm also having issues getting bumblebee to work properly in 18.04. Has anyone got a reasonable work around yet or are the devs working to fix this? |
I'm facing the same problem reported by QkiZMR. Moreover if I try to start a program without 3D redering (i.e. optirun gedit) everything works as expected. Here the output of optirun glxheads:
|
That glx error smells like a GLVND problem, check what Ubuntu + mesa + the nvidia driver do with regards to libglvnd |
Can someone please post a guide for getting this working on Ubuntu 18.04 Bionic Beaver? I can't seem to figure it out. I have kernel 4.15 and a GTX 870m. I don't care which driver as long as it's not Nouveau. |
It seems like there have been a lot of problems with Ubuntu 18.04. People have also been posting some information in issue #764 |
Did anyone try a clean install? |
I was on a clean install, but I don't know what to do once installed. |
I have the same problem as well. Fresh install of Ubuntu 18.04, nvidia 390, no good. :( |
Same issue here, Freshe install of ubuntu 18.04, nvida 390 and optirun is broken. |
I can confirm this on my kubuntu 18.04 too. |
I have the same problem, too:
|
Been getting the same error as radub7, with 396. |
Any fix to this error?
|
@athulpn problem with drivers? |
@athulpn: "systemctl status bumblebeed" and "grep -i nvidia /var/log/syslog" or "journalctl -e" might show some relevant information. See also the thread at https://bugs.launchpad.net/ubuntu/+source/bumblebee/+bug/1758243 and check that you have for instance disabled the nvidia-fallback service. |
I think the kernel module is not inserted properly. Any workaround from this log
|
@athulpn: you probably have a file in /etc/modprobe.d with the line "alias nvidia off" in it. eg prime-select sets this in /etc/modprobe.d//blacklist-nvidia.conf. This stops bumblebee from loading the nvidia module. If you comment out the line and restart bumblebee with "sudo systemctl restart bumblebeed", hopefully things will work. |
@rockorequin Thanks, it worked like 😄 👍 |
Should i disable nvidia-prime-boot.service as it is throwing errors during boot.
|
I have just installed a fresh install of Ubuntu 18.04 on a Dell XPS 15 9570 with nVidia 1050 TI and this is pain. I need to just disable the nvidia GPU on boot completely as I only care about productivity on Linux. I have installed the proprietary nvidia drivers from the repo and have chosen the intel card with |
You can turn off splash screen by editing /etc/default/grub. You need to remove |
@athulpn yep, tried that before. Leaves me with just the black screen. 😐 |
@niosus |
@MrDeepPurple so just to make sure I understood correctly. The sequence of actions:
Does this look ok for you? I have tried it before with |
@niosus I'm using a Clevo laptop with nVidia 970M but it seems that this problem is common on most laptop with mid-high end nvidia cards. I tried with several combinations of Anyway I suggest you to edit /etc/default/grub before installing bumblebee or after installing but before rebooting. bbswitch should not try to deatcivate nvidia card before this step. |
@MrDeepPurple adding Maybe this is because my laptop runs new hardware that nothing works. 🤔 UPD: also tried removing TLP in case it interferes with the boot process. Still the same behavior. UPD2: the same error message pops up when the boot is successful without the installed bumblebee, so the issue that prevents the boot is different than I thought.. 🤔 |
I just managed to run bumblebee on 18.04. So it is possible. The most relevant information is on AskUbuntu: https://askubuntu.com/a/1042950/55241 |
@adamryczkowski Thank you so much for the workaround! I'm using 396.24 nvidia driver and it works great. |
fixes for handling DRM devices is backported to systemd bionic (237-3ubuntu10.2), which means we no longer need to alias nvidia_drm to "off" https://launchpad.net/ubuntu/bionic/+source/systemd/+changelog |
Hello, It has been mentioned here multiple times but I seem to be unable to find the root cause of this issue. Here is my blacklist-nvidia.conf content:
And this is my nvidia card: Any ideas what may be going on wrong here? :( |
Lol, ok, so it was this one: https://github.com/Bumblebee-Project/Bumblebee/wiki/Troubleshooting#errorcannot-access-secondary-gpu---error-xorg-ee-no-devices-detected |
I have changed the primusrun library path, but I can't get it to call the nvidia gpu. It's seems to still use the intel gpu. Even primusrun glxinfo shows that it is using intel. optirun is able to use the nvidia gpu. |
Hello, On Ubuntu 18.04 with 390 Nvidia driver, Bumblebee does not work for me. optirun glxgears primusrun glxgears (while it works on Archlinux) an idea ? My Nvidia card : my file config of bumblebee (/etc/bumblebee) : http://nux87.free.fr/pb-bumblebee/bumblebee.zip thx |
@scurrvy2020 I'm having the same problem; running
With Did you ever figure it out? Are others able to get |
edit /usr/bin/primusrun, change it into something like this: #!/bin/bash
# Readback-display synchronization method
# 0: no sync, 1: D lags behind one frame, 2: fully synced
# export PRIMUS_SYNC=${PRIMUS_SYNC:-0}
# Verbosity level
# 0: only errors, 1: warnings (default), 2: profiling
# export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1}
# Secondary display
# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8}
# "Accelerating" libGL
export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/libGL.so.1'}
# "Displaying" libGL
export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'}
# Directory containing primus libGL
PRIMUS_libGL=${PRIMUS_libGL:-'/usr/$LIB/primus'}
# On some distributions, e.g. on Gentoo, libnvidia-tls.so is not available
# in default search paths. Add its path manually after the primus library
bblibs=$(echo -ne 'Q LibraryPath\0' | \
socat - UNIX-CONNECT:/var/run/bumblebee.socket | sed 's/^Value: \(.*\)/\1/' | tr -d '\0')
PRIMUS_libGL=${PRIMUS_libGL}${bblibs:+:$bblibs}
# Mesa drivers need a few symbols to be visible
# export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}
# Need functions from primus libGL to take precedence
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# And go!
export __GLVND_DISALLOW_PATCHING=1
exec "$@" |
@adamryczkowski thanks for the great share! Also I found a one stop shop for all the current issues with Bumblebee on Ubuntu 18.04. https://bugs.launchpad.net/ubuntu/+source/bumblebee/+bug/1758243 The following are other two very good sources for reference. https://www.pcsuggest.com/nvidia-optimus-ubuntu/ PS: I'm currently running Nvidia 390.87 driver with 4.18.7 Kernel on Ubuntu. |
For information, on my system the Thanks for your great help on getting it to work @rockorequin 👍 |
bumblebee doesn't work out of the box with Ubuntu's nvidia-driver-390, which I guess is using libglvnd0:
a) I needed to blacklist more drivers via /etc/modprobe.d/ to stop the nvidia driver loading, specifically nvidia_drm and nvidia_modeset. i think "prime-select intel" will also do this if you have nvidia-prime installed.
b) Some paths needed changing in /etc/bumblebee/bumblebee.conf in the [driver-nvidia] section:
With these changes, I can run both 32 bit and 64 bit apps using optirun (but not primusrun) in a X11 gnome-shell session.
There are two other issues I ran into:
If I boot with nvidia-drm.modeset=1 in the grub command line, running optirun makes the entire laptop hang (I think this is a bug in the nvidia driver, which is crashing with a divide-by-zero error, and this takes down X and I can't switch to a tty console). It runs OK if I don't boot with nvidia-drm.modeset=1 or if I boot with nvidia-drm.modeset=0.
bumblebee can turn the nvidia card off when it starts, but as soon as the nvidia module is loaded, it loads nvidia_drm, which links to drm_kms_helper and then bumblebee can't remove the nvidia modules. This means that bumblebee can't turn off the nvidia card when optirun terminates. To fix this, I added "alias nvidia_drm off" and "alias nvidia_modeset off" to my conf file in /etc/modprobe.d. So I have this file:
The text was updated successfully, but these errors were encountered: