You are not logged in.

#1 2015-11-14 20:13:38

Ekkoria
Member
From: Florida
Registered: 2014-05-25
Posts: 20

Problem with BBswitch causing hang on boot

Hi,

I recently purchased a new Dell Inspiron 7559, and after a lot of tweaking and playing around I got almost everything working as I'd like. However, I have a couple problems with it that I suspect are probably related to the hardware being too new for drivers to work properly.

My specs include an intel i5-6300 and an Nvidia GTX 960M. I got everything working, including primusrun and bumblebee, so the Nvidia card definitely works. When I try to use bbswitch with bumblebee though, the system hangs on boot before pulling up a graphical environment. I couldn't figure out how to get any logs from my computer at this point and recovering involved booting from a live CD and removing bbswitch manually. How can I diagnose this problem? I don't want to just let the discrete card run all the time - it'll kill my battery life and definitely put undue stress on the GPU.


Also,, after a suspend and resume I get what seems to be a serious GPU error - see here. Has anyone seen something similar?

Last edited by Ekkoria (2015-11-14 20:14:48)

Offline

#2 2016-02-13 12:53:38

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

Hi, I also have the same laptop, and the same problems. I am using the repo bumblebee/nvidia/intel version, kernel 4.4 and here is what I found.

First, everything works fine and dandy, but things hangs the instant you reboot with the bbswitch module. Bumblebee by itself works fine without problem, the battery saving part does not though.

1. Installing bbswitch, but blacklisting it so it won't load, still makes the computer freeze.
2. The problem seems to be with logind, and not bumblebee per se, as it freezes before loading gdm in my case, but still manages to load bumblebee without errors.

This is what journalctl gives me

 
fév 13 13:07:36 sam-laptop systemd-logind[536]: Failed to abandon session scope: Connection reset by peer
fév 13 13:07:36 sam-laptop systemd-logind[536]: Failed to abandon session scope: Transport endpoint is not connected
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: not releasing fd for 13:66, still in use
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:67
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection was disconnected before a reply was received
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:72
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:74
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:64
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:77
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:66
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:65
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:68
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:69
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:76
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:75
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: not releasing fd for 13:66, still in use
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:67
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection was disconnected before a reply was received
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:72
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:74
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:64
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:77
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:66
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:65
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:68
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:69
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:76
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:75
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (II) systemd-logind: releasing fd for 13:71
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (II) systemd-logind: releasing fd for 13:71
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: failed to release device: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[2631]: (EE) systemd-logind: ReleaseControl failed: Connection is closed
fév 13 13:07:38 sam-laptop /usr/lib/gdm/gdm-x-session[613]: (EE) systemd-logind: ReleaseControl failed: Connection is closed

To debug stuff, you can use a live usb with arch and arch-root just like when installing, this let's you try stuff and get logs.
Of course if anyone wants more log/info, happy to help. My version is actually with an i7, same graphic card, doubt it changes anything, but just in case.

In the meantime I just have to let the nvidia card drain my battery, but installing bbswtich and modprobing it, then shuting down the nvidia card works withut problem, but loading at boot does not, go figure.

Offline

#3 2016-02-14 11:29:47

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

I just realised bbswitch has not been updated since december 2013 on it's github (https://github.com/Bumblebee-Project/bbswitch), so it might be missing support for newer card in the first place. Anyone had success with recent hardware by any chance?

Offline

#4 2016-02-18 16:38:39

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

I have the same laptop and the same problem, I really hope somebody finds a solution to this. Is there at least a way to disable nvidia GPU completely, so that it doesn't run at all?

Offline

#5 2016-02-21 12:13:07

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

I dug a bitm ore the problem, but did halfway fix it, by that I mean :

I tried compiling linux-mainline from aur, nvidia-dkms and adding to mkinitcpio the i915/bbswitch to the module array + other random stuff as per https://bbs.archlinux.org/viewtopic.php?id=169742

I doubt this changed anything as it still freezes as soon as I enable bbswitch and reboot, but I instead booted to the command line with systemd.unit=multi-user.target added to my bootloader (systemd-boot in my case.)
So in this case, everything loaded fine, bbswitch was working. Then I just started gdm manually, and it works!

It is a half assed solution, but can anyone try without the custom kernel and nvidia-dkms shenanigans to check if simply starting gdm not automatically works by itself? If so, we would be closer to isolating the root cause.

Offline

#6 2016-02-21 12:33:01

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

I have a default kernel from repo + nvidia package installed and the workaround you mentioned works. I had to manually start bumblebeed.service after logging in though + bbswitch doesn't automaticallly turn off the nvidia card after it is no longer used.

Here is an example (note, that I had to manually remove nvidia-modeset and nvidia to be able to manually turn off the card using bbswitch - see https://github.com/Bumblebee-Project/Bu … issues/719)

# cat /proc/acpi/bbswitch
0000:02:00.0 OFF
# optirun glxgears -info
# cat /proc/acpi/bbswitch
0000:02:00.0 ON
# echo OFF > /proc/acpi/bbswitch
# cat /proc/acpi/bbswitch
0000:02:00.0 ON
# modprobe -r nvidia-modeset nvidia
# echo OFF > /proc/acpi/bbswitch
# cat /proc/acpi/bbswitch
0000:02:00.0 OFF

here are relevant lines from log

bumblebeed[996]: rmmod: ERROR: Module nvidia is in use by: nvidia_modeset
bumblebeed[996]: [  390.275024] [ERROR]Unloading nvidia driver timed out.
kernel: bbswitch: device 0000:02:00.0 is in use by driver 'nvidia', refusing OFF

Last edited by hynner (2016-02-21 12:34:53)

Offline

#7 2016-02-21 12:53:31

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

Indeed, we are looking at the same thing currently,  I also blacklisted a bucnh of of modules, namely nvidia-modeset, nvidia-uvm, nvidia and nouveau.
As soon as I switch of the card with sudo tee /proc/acpi/bbswitch <<< OFF, it comes back on for some reason.
Seems like they still need to figure out what is happening upstream until we can make it work.

Part 2 :

Anyway, by the time I wrote this, I also installed the bumblebee-git package, and now I get

samuel ~/aurbuild/bumblebee-git $ sudo tee /proc/acpi/bbswitch <<<OFF
OFF
samuel ~/aurbuild/bumblebee-git $ cat /proc/acpi/bbswitch
0000:02:00.0 OFF

So it is encouraging, I'll reboot to see if it works without starting gdm by hand. I also have a decent powertop usage now, 15w discharge with 5 h of battery

The battery reports a discharge rate of 14.5 W
The estimated remaining time is 5 hours, 30 minutes

Let's hope it survives rebooting.


Edit : Nope sad

If I restart into a command prompt, the card is disabled, bbswitch works, but gdm will hang when started. If instead I log in, restart the nvidia card, then start gdm, it works. Then I can re-disable the card for the powersaving.
But the instant I start primusrun, it works but I need to manually tell the card to go off afterwards. I might have a bunch of weird configs and tricks gathered from internet, so if anyone wants to try with clean packages to see if it works or not, I'd be glad.

Last edited by dekece (2016-02-21 13:12:47)

Offline

#8 2016-02-21 13:26:25

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

@dekece: And after running something with primusrun do you also have to run modprobe -r nvidia-modeset nvidia before shutting the card down using bbswitch? Or is that already fixed in bumblebee-git package? Anyway I only have repo packages installed and no extra config and I have the same problem as you do, so I guess that you didn't create any more problems.

Offline

#9 2016-02-21 13:30:20

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

I blacklisted the hell out of everything to be sure (which is probably abusive)

cat /etc/modprobe.d/blacklist.conf 
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nvidia_modeset
blacklist nvidia_uvm
blacklist nvidia
blacklist nouveau

the nivida- and nvidia_ is because internet and dmesg were telling me both do exist, so here they go. That's what I meant by random config mostly. Also turns out thta if I start chromium, it uses gpu acceleration and I can not modprobe - r nvidia anymore, so my half assed solution is really stringent.

Offline

#10 2016-02-21 19:21:04

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

Another thing occured to me - to make your workaround a little simpler it is possible to just disable bumblebeed.service, boot normally into the graphical.target and start bumblebeed.service manually after logging in.

Offline

#11 2016-02-21 19:53:07

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

It still hangs because of the bbswitch module, but maybe if I blacklist then modprobe it after it would work, but this is becoming so much hacky and painful for nothing in the end.

Offline

#12 2016-02-21 20:26:14

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

I finally managed to get automatic GPU shutdown working - I compiled this version - https://github.com/arafey/Bumblebee/com … dff6bfe721 - containing a patch for nvidia-modeset and nvidia-uvm. It seems to work well now:

$ cat /proc/acpi/bbswitch
0000:02:00.0 OFF
$ primusrun glxgears -info
$ cat /proc/acpi/bbswitch 
0000:02:00.0 OFF

However it still doesn't solve the issue with not being able to boot with bumblebee enabled sad But at least that's one problem less smile

I compiled it using the bumblebee-git AUR package and changing the source in PKGBUILD to

source=("$_gitname::git://github.com/arafey/Bumblebee.git#branch=master")

I compared the changes to official bumblebee project and right now (as of the commit linked above) it only contains the one fix and seems to be OK (eg. not malicious), but ofc that can change in the future, so be careful.

BTW: I tried chromium and it didn't turn my GPU on.

Offline

#13 2016-02-21 20:33:52

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

Turns out people are discussing how to fix it around here : https://bugs.archlinux.org/task/47140?s … &closedto=

might be the same as your patch, but this one still does not fix everything.

Offline

#14 2016-02-21 21:10:47

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

Yes, that's the arafey guy whose repo I used smile

Anyway they only seem to be discussing the GPU shutdown issue and not the boot hangs with bumblebee enabled, maybe it's unrelated.

Offline

#15 2016-02-25 22:24:44

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

So after some more day of testing :

1. Having bbswitch load is always a no go and leads to a hard freeze.

2. I can boot to gdm with bumblebee off, log in, then start bumblebee to turn off the nvidia card with bbswitch. Everything, including prime, seems to work and I go from 35W to 20W of usage.

3. I can boot to gdm, but sometime (1 out of 3), the screen just boots to black (with backlight) and all subsequent boot have this problem.
Booting to multi-user from systemd-boot will also do that, so it's not a gdm issue.

4. When this happen, I just boot to the 4.5 kernel (for which I did not build bbswitch), and then the next boot to 4.4 will work fine, for some time. No idea if the card is wrongly set up sometimes on shutdown, but this has fixed it everytime so far

5. Sleep kinds of put the computer to sleep, except the graphic card (even with bbswitch as off), so I don't know if it even works. This leads to battery drain + the fan kicks in sometime.


So basically there is no surefire way to make it work so far. As for disabling the nvidia card forever, now that nouveau supports the 900 series, that might be possible in a few mesa and kernel version down the line, who knows (or soon by building your own versions from git I guess).

Offline

#16 2016-02-25 22:36:01

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

Strange, I haven't tested it thouroughly but from what little experimentation I did sleep worked "fine" for me - I only had to create a service that turned on the nvidia card before suspend and I had to shut it off manually after wake up (I wasn't able to do it using service called after wakeup - when I tried that it always led to failed wakeup with screen being completely black and nothing responding).

I don't use linux as my primary system right now, so I can't really confirm that, but as far as I can tell I can boot just fine with bumblebee disabled and then start it manually after logging in.

Offline

#17 2016-08-08 19:06:11

AmiNimA
Member
Registered: 2013-08-08
Posts: 4
Website

Re: Problem with BBswitch causing hang on boot

I have a hemi-workaround! for this.
If somebody just wants to turn off nvidia card and increase the battery life, you can just install bbswitch from the repos. but, you must do some changes!
to prevent bbswitch module from being loaded during boot, which causes freez, first of all if there is bbswitch in this file: /etc/modules-load.d/modules.conf you should remove that.
Now we should make service which loads the bbswitch after a successful login!

ok,

1. add options for bbswitch module like this:
write this

 options bbswitch load_state=0 unload_state=1
 

to this file:

 nano /etc/modprobe.d/bbswitch.conf
 

2. now building a service which runs at boot:

 sudo nano /etc/systemd/system/bbswitchoff.service 

with this content:

 [Unit]
Description=bbswitch off state to nvidia

[Service]
ExecStart=/usr/bin/bbswitchoff

[Install]
WantedBy=multi-user.target 

3. now making a script which loads bbswitch module 60 secs after boot (which is enough)

 sudo nano /usr/bin/bbswitchoff 

with this content:

 #!/bin/sh
sleep 60 # one min
sudo modprobe bbswitch 

then

 sudo chmod +x  /usr/bin/bbswitchoff 

now enabling our service:

 sudo systemctl enable bbswitchoff.service 

now make a reboot. from now on, every time you boot this service starts and call the bbswitch 60s after start. in this way your nvidia card is off and you see the battery life increase.
check the nvidia status by:

 cat /proc/acpi/bbswitch 

which reterns:
0000:01:00.0 OFF

Offline

#18 2016-08-09 09:21:33

MaikuMori
Member
From: Latvia
Registered: 2013-05-29
Posts: 13
Website

Re: Problem with BBswitch causing hang on boot

There was a tip added to the ASUS Zenbook Pro UX501 Wiki page which fixed the freeze issue for me (using bumblebeed+bbswitch).

To allow X to start without locking up when the GPU is powered down via bbswitch, replace the acpi_osi= above with:

acpi_osi=! acpi_osi="Windows 2009"

Last edited by MaikuMori (2016-08-09 09:22:50)

Offline

#19 2016-08-09 11:32:08

AmiNimA
Member
Registered: 2013-08-08
Posts: 4
Website

Re: Problem with BBswitch causing hang on boot

OMG! adding this line to the kernel solved the issue. now bumblebee is running as it should!

 acpi_osi=! acpi_osi="Windows 2009" 

but now backlight Fn keys are broken. even if I add acpi_backlight=native to the kernel line. acpi_osi= shuold not be used, because it causes freeze.

Offline

#20 2016-08-09 17:38:37

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

I can confirm what AmiNimA says - with those parameters backlight cannot be changed using xbacklight, however everything else seems to be working. It also fixes some freezes for me - eg. freeze when I lock my screen or run nvidia-smi with nvidia card switched off. Suspend works with both, but with those parameters I am able to use a service to turn off nvidia card after resume.

For now I use lightdm's session-setup-script to automatically start bumblebeed.service when I log in, but I will take another look at those parameters, since they seem to work better.

Offline

#21 2016-08-09 20:37:37

AmiNimA
Member
Registered: 2013-08-08
Posts: 4
Website

Re: Problem with BBswitch causing hang on boot

it's my kernel line:

 rw quiet i915.enable_execlists=0 acpi_backlight=native acpi_osi=! acpi_osi='Windows 2009' i915.enable_rc6=1 i915.enable_fbc=1 pcie_aspm=force

I don't have freez problem you said. and I can set the bcklights with

 xdotool key --clearmodifiers XF86MonBrightnessUp
xdotool key --clearmodifiers XF86MonBrightnessDown

and

xbacklight -inc 10
xbacklight -dec 10
 

xdotool way shows the popup light icons as you increase or decrease. but xbacklight does not, and it cannot change the brightness bar in gnome-shell menu. but xbacklight is more smoother than xdotool, it feels better. you can assign keyboard shortcuts for these command. such as Super+f5/f6

I had some freez problem after logout, which I noticed it's because of plymouth!!! removed plymouth and those freezes gone for ever.

Last edited by AmiNimA (2016-08-21 13:25:58)

Offline

#22 2016-08-13 16:40:48

hynner
Member
Registered: 2016-02-18
Posts: 20

Re: Problem with BBswitch causing hang on boot

I finally had a chance to test it. Here are the results:

with no kernel parameters setting backlight using fn keys works, bumblebee also works, but I have to start the bumbleed.service later and cannot enable it, there are also some freezes eg. when locking the screen with nvidia gpu turned off.

with

acpi_backlight=native acpi_osi=! acpi_osi='Windows 2009'

I had no freezes, I can enable bumblebeed.service and setting backlight using xbacklight indeed works, but I can no longer set backlight using Fn keys (which I have mapped to change backlight using xbacklight).

with just 

acpi_osi=! acpi_osi='Windows 2009'

it's the same as above but xbacklight doesn't work at all.

So for now I will stick with

acpi_backlight=native acpi_osi=! acpi_osi='Windows 2009'

as I rarely change the backlight. Thanks for the advice.

Offline

#23 2016-08-14 14:25:53

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

This is useful information, I personally just start bumblebee after gdm login (as it starts bbswitch), it works.

I also gave a try regarding these new tricks, but it still hangs on bumblebee + gdm unfortunately. Although, I went to dig for the windows 2009 trick to see what it meant and turns out it report to the bios we are running windows 7 (default is to report windows NT, must be for compatibility reasons with old computers).

Using acpi_osi='Windows 2015' will report as running windows 10 (only works on kernel >= 4.2), and now I no longer have freezing issues nor sleep issues (I did not use the acpi_osi=! line though, as it remove all valid acpi_osi options from the driver or something like that, and we add back windows after, so you might get different effects), everything seems to work a-ok so far, battery does not drain like crazy and everything start up normally afterwards. My backlight Fn buttons also work as expected without any tweaking.

Only issue is I still need to start the whole bumblebee thing by hand. I also only lightly tested sleep a few times, seems to work, if anyone else wants to give it a try.

Offline

#24 2017-07-01 01:13:48

Pook
Member
Registered: 2014-03-09
Posts: 4

Re: Problem with BBswitch causing hang on boot

2017 Precision 3520 here and I experience the same issues as dekece, hynner and AmiNimA. So this is still ongoing even with Dell's new Ubuntu ready precision rollout.

I like control of my backlight so I'm not using any kernel boot parameters. Instead I get my 7-10W dischage by simply NOT using bbswitch with bumblebee. If I know I won't be playing any games, using openCL, or if I need to conserve battery I run

#powertop --auto-tune

Powertop will completely shut down the GPU and I cut 10W off of my power usage. Unfortunately there's an ill effect of this- unless I reboot the laptop I can't seem to revive the GPU once I have powertop kill it.

Despite killing the GPU until the next restart, I think this is a great method to squeeze as much battery life out of the laptop as possible. Being able to set the screen to a minimum and turn off the keyboard backlight can easily get me an extra hour if I find myself travelling or simply being without an outlet.

Kernel is linux-git as of 2017-28-06.
bumblebee-git
nvidia-dkms 381.22-3

Offline

#25 2017-07-01 07:11:25

dekece
Member
Registered: 2013-04-26
Posts: 14

Re: Problem with BBswitch causing hang on boot

I almost forgot about this one, but I practically almost solved it now, including using bumblebee and getting the powerusage you reported.
I still sometimes get a black screen from sleep, but it is so few and far between that I almost never notice, like 1/10 won't wake up (but I don't really use sleep that much)

4jm8if.jpg

I seriously tried so many things that I probably will forget something, but here goes
I use

- stock bumblebee
- stock bbswitch
- stock bumblebeed started by systemd

But, my bootloader entry has this thing on the kernel line

acpi_osi="!Windows 2015" pcie_port_pm=off

And I think that after man trials, thy are the ones the fixed it (well, a few things have changed upstream also I'd guess kernel/bumblebee wise).
Anyway, now I can start stuff with primusrun and not cripple my fancy laptop to get decent battery life out of it, still a bit lower than windows, but if memory servers the original was barely 2h, I can easily do 5-6h now just doing normal stuff like watching youtube and whatnot.

For good measure, between the screenshot and now gnome reports 30% battery left and 1h46, but it still goes very fast between 100 to say 70% and the very last 10% and does not seem super reliable, could be unrelated.
Or maybe, I also think that some power management thingy kicks in at lower battery level, which makes it drain faster when it is almost full but makes the last 50% lasts much longer. Or the indicator is juts plain broken, still wondering.

Last edited by dekece (2017-07-01 07:12:11)

Offline

Board footer

Powered by FluxBB