Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TLP conflicts with Bumblebee, disabling GPU until reboot #244
After going to battery, even if AC reconnected, until reboot.
After being on battery-only,
Steps to reproduce the problem
Have a device that supports Nvidia Optimus, the technology that uses the integrated graphics but switches to the discrete graphics card as required, and install the Bumblebee driver to manage it. Then attempt to run an application in this mode with
For reference, see this GitHub issue over at Bumblebee.
referenced this issue
Jan 5, 2017
As a first step a concept how to to reliably detect nvidia eGPUs and Optimus would be nice. A PCI ID of "01:00.0" seems not sufficient to me.
Unfortunately the existing blacklisting via driver (nvidia, nouveau et. al.) doesn't work in your case, because the disabled eGPU has no driver loaded.
Reliably detect: search for two VGA+3D devices in PCI devices (so VGA+VGA, VGA+3D or 3D+3D, though I’ve never seen that one AFAIR), one being Intel and the other Nvidia (you want to avoid Nvidia+Nvidia for instance). The PCI ID is definitively a bad idea, we’ve seen it going from 01 to 10 at least.
However, the issue is to be (partially?) fixed in bbswitch, since supporting 4.8 kernel PCIe port PM require making bbswitch a proper driver. This is the target for next milestone, but only @Lekensteyn is working on it and he has been quite busy for a while.
In my udev I have this rule to match nvidia GPUs:
Starting with kernel 4.8, PCIe ports support RPM, but this may have undesired effects if no PCI driver is loaded for the Nvidia GPU (on an hybrid graphics laptop). The result is that loading the driver fails, unless you remove the PCI device via sysfs and rescan the parent PCIe bus. No idea why that is the case though.
Maybe you could do a similar thing, disabling RPM for all nvidia GPUs as above. When nouveau is in use, it will enable RPM itself. When nvidia blob is in use, RPM is not usable anyway.
Here is mine:
That’s being said, @Lekensteyn idea to blacklist all Nvidia GPU from RPM looks fine indeed.
added a commit
Jan 13, 2017
I admit that I don't have the understanding of RPM that y'all do but it seems to be working great for me. I purged
Here's an output of