-
Notifications
You must be signed in to change notification settings - Fork 78
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
Linux 3.6 and bbswitch power on / off issues. #35
Comments
Also, disabling powersaving in bumblebee.conf lets everything work great. So this is definitely an issue with bbswitch. |
I am using 3.6.1 and it works fine. Where does this come from:
When using PMMethod=bbswitch (or auto) in bumblebeed.conf, it will only enable the card if you run |
No scripts, that's actually a bbswitch.conf file in /etc/modprobe.d/ telling the bbswitch to enable the card when loaded. I've tried enabling the card on loading, disabling the card on loading and leaving the whole dern thing alone and none of it works. If I disable bbswitch power management everything works fine. |
You mean
|
Well it would appear that something was wrong and that everything is OK now. I wish I could say more than that... the only thing I've changed is my bbswitch.conf file in /etc/modprobe.conf, and again, this exact same configuration wasn't working before.
my bumblebee.conf: and my dmesg now: While I'm happy it is working... I'm completely confused as to why! I've reviewed all my services and can't find anything that would have been trying to turn on the card before bbswitch was loaded. |
OK, well, I'm retarded. I hadn't upgraded back to 3.6.1 from 3.5.4. So THAT's why it worked! So consider the above a baseline. I'll post the linux 3.6.1 stuffs soon. |
Alright, I upgraded to linux 3.6.1 and didn't change ANYTHING from the working 3.5.4 installation. bbswitch won't power the card. Here's my dmesg: http://codepad.org/bgQi273g Interestingly to note, my laptop has a little indicator light to let me know the status of the Nvidia GPU. |
Please check
(untested in this setting, you might need to add an Identifier and Screen keyword to it, see /etc/bumblebee/xorg.conf.nouveau for an example). This is necessary becauses Xorg 1.13 supports multiple drivers (intel, nouveau, ...) for PRIME. You should try the above xorg.conf addition only when your /var/log/Xorg.0.log tries to bind the nvidia card, I do not see the nouveau/nvidia driver being loaded (blacklisted?) so that is a good thing. |
Alright, being working on this some more. I added the above to my xorg.conf and made it so that nvidia and nouveau are no longer blacklisted. The computer turns on and powers off the nvidia card. After this, it won't turn back on! |
Also, any attempts to change bbswitch's power state through the command line gives me a Permission Denied error. Thanks again for all the helpful tips! I was sure the AutoAddGPU was going to do it! I was excited to see my card power off after booting up! |
And it seems this guy is having the same problem: |
@cybercyst You have to keep nouveau and nvidia blacklisted, otherwise bbswitch will refuse to power off the GPU. Instead of attaching dmesg, can you please attach the output of C'mon... permission denied, what do you think that the issue is then? I have seen the linked bug (see the comments of that bug) was already fixed before the final 3.4 version. |
journalctl -ba > journal.txt @Lekensteyn Thanks again for your patience AND help man. ;) Just one reminder, if I take this exact same system and setup and downgrade to linux 3.5.4 everything works, and with linux 3.6.1 it doesn't. |
The relevant lines are:
This means that something asked Bumblebeed (=> bbswitch) to power on the nvidia card (optirun ....). Something is not really clear to me in your story, can you manually power on/off the card by writing ON or OFF to /proc/acpi/bbswitch as root? Then check the state by reading that file. I think that something has become asynchronous (or takes a longer time) in 3.6, causing bbswitch to return before the card is actually off. But then bumblebeed immediately reads the file after the write returns and thus reports the old state (which is off). If the above does not make things clear, please disable bumblebeed, reboot and try writing OFF/ON to bbswitch manually. |
That was actually me running optirun glxspheres after booting into X. As you've seen the nvidia card doesn't power on and so the whole thing doesn't work. I've tried manually writing ON and OFF to bbswitch and the same result. The card just won't respond and it puts the same errors in my syslog. I did try disabling bumblebeed.service and rebooting and just manually loading the bbswitch module and manually turning it on and off with /proc/acpi/bbswitch and this didn't work either. |
Please try bbswitch from the develop branch, I have changed D3hot to D3cold. Not sure if that actually fixes things, but it is worth testing. If that fails, try bisecting the kernel. |
@Lekensteyn Hrm, well that also didn't work. /me rolls up his sleeves. Git bisection here we come! |
After bisecting the kernel, here's the kernel commit that breaks this for me:
|
Hi cybercyst and Lekensteyn, thanks for diving into the issue. I just want to report that I can reproduce the issue after updating to 3.6.2 (became archlinux stable). With disabled bumblebeed:
nvidia/nouveau is blacklisted. |
So just a question... does bbswitch need to change to work with the newer kernel, or would a bug report upstream to the kernel devs be appropriate? |
I think you need to file a bug at kernel bugzilla. I can also not see why the commit you bisected cause issues with this, but let upstream help figuring it out. |
Here's the bug report over there, which links back to here. INFINITE LOOP! |
FIXED:
to:
Everything works as expected now. |
On further testing, the above does turn on and off the card, but causes the battery to still drain quickly since I guess devices aren't able to be shut on and off by the linux kernel? |
I am on Fedora 18 and the 3.6 kernel is compiled with CONFIG_VGA_SWITCHEROO=y |
Switching off the card with "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" works for me |
switcheroo works because nouveau claims the device. I am working on a solution right now. |
Fixes regression in Linux 3.6 when run-time power management is enabled. See https://bugzilla.kernel.org/show_bug.cgi?id=48981 for a discussion.
bbswitch should be fixed now. Please test bbswitch. I think that Bumblebee is still broken though because /proc/pci/01/00.0 still reports the wrong values. I am waiting for upstream to report whether this is intended or not. |
The new bbswitch in the develop branch does indeed work, even with CONTROL_RUNTIME_PM="auto". I can launch stuff on my card and it turns of after. Thanks! |
bbswitch from the develop branch does not seem to work for me. |
@Jodell88 You might have to reboot for the new version. Does manually writing ON/OFF work? Logs or it did not happen. |
ON/OFF works for me |
I've rebooted numerous times. Dmesg http://pastebin.com/SrDjm5hA If I use bbswitch as my PMMethod I can't turn my card on. If I don't use bbswitch, I can't turn it off. |
Works great for me (Arch 3.6.2) but I have this in dmesg every time I run applications with optirun:
It's not actually refusing to change state: $ cat /proc/acpi/bbswitch
0000:01:00.0 OFF $ optirun cat /proc/acpi/bbswitch
0000:01:00.0 ON $ cat /proc/acpi/bbswitch
0000:01:00.0 OFF Great job anyway, thanks! |
@Jodell88, how did you install bbswitch? |
@dapolinario I modified the dkms-bbswitch-git PKGBUILD from the AUR to use the develop branch. You made the same changes I did based on your comment in the AUR. |
What is your laptop? And your video card? My dmesg output is equal to @Dreamer4135 (D3cold), but your dmesg output is only D3. |
Dell XPS L502X, Nvidia GT 525M, Intel Core i7-2630QM |
Same as mine, except the processor. Remove all (bumblebee and bbswitch with configuration files) and reinstall to see if resolves. |
@dapolinario I did as you suggested and I can report that bbswitch works! It also mentions D3cold and not D3 in dmesg. Thanks for everyone's help for getting this problem fixed. |
Fixed with bbswitch 0.5 - closing. |
Any issues in Bumblebee related to PCI config space that could occur in 3.6 should be fixes in future 3.6 versions: |
I have similar problem on kernel 4.8.11-1 ( I am using Antergos linux, based on Arch ). I thought the issue was related to Sometime it works sometime I got the error: |
@postadelmaga I would recommend having a look at the following threads: |
I recently upgraded to linux 3.6 out of the testing repo in ArchLinux and now bbswitch won't power on and off the card.
I've come from a working bumblebee installation on linux 3.5 and seems that maybe something's changed in the acpi setup.
Here's my dmesg: http://pastebin.archlinux.fr/450067
I have nvidia and nouveau blacklisted and all combinations of bbswitch module options yield the same result.
The text was updated successfully, but these errors were encountered: