Feature request: modify bumblebee to unload nvidia modules if power management is done by the kernel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bumblebee (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
It would be great to implement something like feature request bumblebee#978 (https:/
To confirm this, I tried modifying the Ubuntu bumblebee source package, but it fails to build in Cosmic on my laptop with a number of reference errors like so (even though I do have libkmod2 installed):
/usr/bin/ld: src/module.o: in function `module_is_loaded':
/home/rocko/
So I modified the bumblebee develop branch from git (https:/
@@ -227,8 +228,12 @@ static void switch_
char driver[
if (bb_config.
- /* do not disable the card if PM is disabled unless exiting */
- return;
+ /* RR: unload the driver loaded by the graphics card */
+ bb_log(LOG_INFO, "PM disabled, unloading nvidia drivers anyway\n");
+ if (pci_get_
+ module_
+ }
+ return;
}
//if card is on and can be switched, switch it off
but I have also included changing configuration defaults like PM_METHOD=none and setting up the Ubuntu library paths for nvidia and primus in Ubuntu 18.04/18.10 (see https:/
Then I configured and built it with:
autoreconf -f
./configure CONF_DRIVER=nvidia CONF_DRIVER_
CONF_
CONF_
--prefix=/usr --sysconfdir=/etc
make clean
make && sudo make install
I disabled bbswitch via /etc/modprobe.
blacklist bbswitch
and then on reboot, optirun seems to be working fine:
$ optirun glxinfo|grep NVIDIA
server glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL core profile version string: 4.6.0 NVIDIA 396.54
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 396.54
OpenGL shading language version string: 4.60 NVIDIA
and afterwards, the nvidia card is turned off:
$ cat /sys/bus/
suspended
This works even after a suspend/resume cycle.
ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: bumblebee 3.2.1-17 [modified: usr/bin/
Uname: Linux 4.19.0-
ApportVersion: 2.20.10-0ubuntu9
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Sep 11 13:30:22 2018
InstallationDate: Installed on 2017-08-16 (390 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: bumblebee
UpgradeStatus: Upgraded to cosmic on 2018-08-15 (26 days ago)
mtime.conffile.
mtime.conffile.
The attachment "bumblebee- git-develop. diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]