Comments (7)
On 12/30/2011 11:20 AM, Peter wrote:
The driver can be autodetected but can also be configured. Let's do it for PM as well which could have the next options:
- auto
- bbswitch
- switcheroo
- nono
Reply to this email directly or view it on GitHub:
https://github.com/Bumblebee-Project/bumblebeed/issues/14
Is the "switcheroo" option assuming a patched switcheroo?
What would the behavior be on an unpatched kernel?
from bumblebee.
I agree as long as the configuration file takes precedence in case something goes wrong, like in GH-8.
Not really sure about how the "auto" option should work (how it should detect the method). Here is my suggestion, once proposed by @Thulinma:
- look for bbswitch first, if present, set it as method.
- then look for vga-switcheroo if nouveau is present, set it as method
- none found, then go for the configured option
from bumblebee.
I totally agree with this stuff.
Configurable, and if not configured or manually set to "auto" follow what @Samsagax wrote above.
One thing though: I feel like the auto should re-detect available methods every time the card is (attempted to be) switched. This way it will work if somebody inserts or removes the bbswitch module after starting bumblebeed, for example, without crashing / failing. Perhaps display a debug message if the used method changes, something like that?
Of course, when set to anything else than auto, it should never switch to a different method at all :-)
from bumblebee.
@Thulinma If someone wants to use bbswitch, it should be configured. It's a bad idea to mix PM methods up as they're not compatible with each other. Especially vga_switcheroo will fail, it keeps the state in a variable where bbswitch looks up the state when called.
One possibility is using modinfo
to check for the availability of bbswitch. The config_validate function contains such a call to check whether a driver is valid or not. One thing to keep in mind: sometimes drivers cannot be unloaded (marked as "permanent"). This occurs if the toolset used for compiling the kernel is different from the one used for compiling a kernel module.
A nice way for how auto
works if by calling a (yet to be created) function in the struct which is called by swich_check(). For bbswitch, it could check whether the driver is loaded or not. In the case of vga_switcheroo, it can check whether the driver is nouveau or not. I haven't a solution for the vga_switcheroo incompatibilities yet.
from bumblebee.
Sounds like a failsafe approach to auto detection. Like that
from bumblebee.
@Samsagax The proposed values are options for the config file
@LLStarks The behavior on an unpatched kernel is just a lockup if the card is attempted to be used. The test for vga_switcheroo could be (switch = /sys/kernel/debug/vgaswitcheroo/switch):
- read the contents of $switch, if it's off then assume that it's available
- if it's on, try to turn it off, then check the pci config space at /proc/bus/pci/ID/HERE
- if all bits are 1 (FF FF ...), then vga_switcheroo is available. Write ON again and assume that it's available.
- If the bits are not all 1, vga_switcheroo did not work. Write ON again to avoid lockups.
For the above to work, nouveau needs to be loaded.
from bumblebee.
Proposal: drop the ENABLE_POWER_MANAGEMENT
option and introduce PM_METHOD
with the options mentioned in the first post:
- auto (default)
- bbswitch
- switcheroo (disable for auto-detection since it's still buggy, activate if it's explicitly requested in the config)
- none
If the configured method fails, it defaults to none
. (unless someone has good arguments for why it should behave different, like exiting with an error)
from bumblebee.
Related Issues (20)
- Cannot run vmware by optirun
- [Doubt] Do I need to install Bumblebee ? HOT 1
- Error compiling with gcc 10.2.0 HOT 2
- bumblebee + vm
- Multi monitor setup Optimus/Bumblebee with Cinnamon Desktop Environment HOT 1
- Unloading module nvidia-drm in use on Ubutnu 20.10 HOT 1
- [XORG] (EE) Failed to load module "glx" (module does not exist, 0) HOT 4
- Bumblebee does not work in SecureBoot
- unreferenced object in kmemleak HOT 1
- Two graphic cards and no HDMI out
- Bad Performance With Bumblebee HOT 2
- Nvidia card always starts turned ON
- Proprietary drivers: Unable to locate/open config directory: "/etc/bumblebee/xorg.conf.d" HOT 10
- Optimus AMD + NVidia HOT 2
- Website partially unreachable (on IPv6 or without www) HOT 1
- [issue] [primus] [steam] `primus: fatal: failed to load ligGL.so`
- [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module.
- [ERROR]No integrated video card found, quitting. HOT 1
- [ERROR]No discrete video card found, quitting
- Download page not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bumblebee.