# Precision 5510 No backlight control resuming from suspend

## ]grimm[

I'm having difficulty resuming my Precision 5510 after suspending.  I'm currently using the Intel GPU for primary graphics output and the Nvidia through bumblebee as needed.  I'm running gentoo-sources:4.6.3.

I'm able to put the laptop to sleep either with a lid trigger or by calling pm-suspend (I'm using openRC instead of systemd so I'm still using pm-utils to suspend.)  The machine goes to sleep reliably and will wake up but with odd behavior of the backlight upon resuming.  Adjusting the backlight with the hotkeys, a slider widget or by directly echoing values into /sys/class/backlight/intel_backlight/brightness will not adjust the backlight.  The hotkeys will still trigger the OSD to react as if brightness is being lowered.  However, once I hit the bottom of the brightness scale or echo "0" into the sysfs node, the backlight will turn off and can be turned on again.

Unfortunately, there's a second side effect that I've seen from this odd suspend behavior.  Once I have suspended and resumed the computer, I won't be able to use the hotkeys to adjust brightness after rebooting the computer.  Echoing into sysfs or using GUI widget slider will adjust the backlight but the hotkeys will not react or trigger events in X (including when I test with xev).  However, the backlight and keys still work because I am able to adjust the backlight during POST and the bootloader, it is only after the kernel initializes that I lose control.  I am yet to be able to isolate how it is that I regain hotkey usage again, but after some combination of suspends, resumes and reboots, I'm usually able to get things working again, but it's a frustrating procedure since I can't reproduce it reliably.

Does anyone have any thoughts on what might be going on here or how I might be able to properly re-initialize the backlight?  This seems to be the only problem that I am still having and it is quite vexing.  This doesn't seem to happen with systemd based suspend and resume, but I'm yet to test it exhaustively.  Has anyone else encountered a similar issue?

I'm on the most recent BIOS and am booting using legacy boot instead of EFI should that be relevant.  I've also tried the different quirks available to pm-utils to no avail and have also tried passing "acpi_osi=Linux/!Windows 2012 and acpi_backlight=vendor/native/video in all combinations but to no avail.  vbetool stops functioning after I resume from suspend and will respond to any attempted usage with "Real mode call failed".

----------

## SXShaX

Hey friends I have seen your reply in my post! I'm using 5510 with gentoo and systemd and nothing incorrect with suspend, however I found my NVIDIA card have some trouoble... I also use bumblebee and seems it's normal. Reading the dmesg I found bbswitch closed the NVIDIA card after booting as it was supposed. However, after use optirun to run someting, bbswitch won't close NVIDIA card automatically, still I can disable it via "sudo rmmod nvidia_modeset nvidia && sudo tee /proc/acpi/bbswitch <<<OFF". But it seems a bbswitch's job. Do you know where the problem is?

----------

## SXShaX

Plus once my fan starts work, it won't stop, instead it just keep working in a lowest mode, is this fine?

----------

## ]grimm[

 *SXShaX wrote:*   

> Hey friends I have seen your reply in my post! I'm using 5510 with gentoo and systemd and nothing incorrect with suspend, however I found my NVIDIA card have some trouoble... I also use bumblebee and seems it's normal. Reading the dmesg I found bbswitch closed the NVIDIA card after booting as it was supposed. However, after use optirun to run someting, bbswitch won't close NVIDIA card automatically, still I can disable it via "sudo rmmod nvidia_modeset nvidia && sudo tee /proc/acpi/bbswitch <<<OFF". But it seems a bbswitch's job. Do you know where the problem is?

 

My understanding is that correcting this behavior is something that's actively under development from the Bumblebee team.  I've been following these issues:

https://github.com/Bumblebee-Project/Bumblebee/pull/762

https://github.com/Bumblebee-Project/Bumblebee/issues/719

It seems like the latest changes have been merged into git but I haven't tested them out yet.  I'm afraid I only occasionally use my Nvidia card, so I haven't been tracking this too closely.

I'm not sure what to say about the fan.  I do at times experience a similar phenomenon but generally speaking, the fan seems to turn off if I leave the laptop idle without anything taxing running (like compiling.)  However, if I'm actively using the machine (even just writing this response for example) the fan is running at a very low speed.  For what it's worth, I'm relying on P-states, powerclamp and thermald for my power management, I guess the behavior could be different if you're using something else.

I'm sorry to not be of much more help.

----------

## SXShaX

In fact, I think, since we both have this kind of computer, if we can compare some data to each other, we will know more about problems. Have you see your fan via i8kutils? Just enable it in kernel, install i8kutils, run i8kctl, you can see your fan and cpu temperature (It seems I can't use cat /sys/class/thermal/thermal_zone0/temp, it just return 25000, clearly a fake number, can you use this? May be something wrong in my kernel.)

On my computer, when it just boot from void (not reboot, just boot after place a while), the fan was disabled and with temperature rise they will enable automatically, but it seems they will never turn down just like other computers, in a low temperature it's in nearly 2500 rps, with a noise unlikely to be heard. But it can easily turn up to 3200 rps with a noise can be heard, and unless I lock the screen for a while, it won't slow down. It is supposed to be 2500 rps since it work under this rate in Windows, and also quiet. You said your fan stop after idle, but my seems never stop to 0, and need to idle a while to slow down. Maybe your fan just running in 2500 rps so you can hardly hear it?

About Bumblebee and bbswitch, once boot from void, the nvidia card is off as it is supposed. But once I run optirun something and exit, the card will keep on instead off automatically, however, I can turn off it by myself.

So, thanks for your help, and could you reply some data about your fan and nvidia card after optirun? So I can see if my settings have something wrong.

----------

## ]grimm[

The processor fan is at 0 RPM when idle this usually takes on the order of five to ten minutes of non-usage to trigger.  When I start using the computer again, the fans generally turn on and run at 2500 RPM and don't increase unless I do something processor or GPU intensive like compiling code or playing a game.  I see the same value of 25000 in /sys/class/thermal/thermal_zone0/temp, but I generally use lm_sensors to grab my temperature so I hadn't checked that value before.

With respect to Bumblebee, I see the same behavior that you do.  In fact, it seems like the card is on at boot even before I invoke something with optirun which possibly explains the relatively poor battery life that I see.  Like I mentioned in my previous reply, this seems to be a known and recognized bug in Bumblebee that was only patched in a recent git update so perhaps grabbing bumblebee from git could help solve this problem.

----------

## SXShaX

 *]grimm[ wrote:*   

> The processor fan is at 0 RPM when idle this usually takes on the order of five to ten minutes of non-usage to trigger.  When I start using the computer again, the fans generally turn on and run at 2500 RPM and don't increase unless I do something processor or GPU intensive like compiling code or playing a game.  I see the same value of 25000 in /sys/class/thermal/thermal_zone0/temp, but I generally use lm_sensors to grab my temperature so I hadn't checked that value before.
> 
> With respect to Bumblebee, I see the same behavior that you do.  In fact, it seems like the card is on at boot even before I invoke something with optirun which possibly explains the relatively poor battery life that I see.  Like I mentioned in my previous reply, this seems to be a known and recognized bug in Bumblebee that was only patched in a recent git update so perhaps grabbing bumblebee from git could help solve this problem.

 

hmm...The bumblebee seems not influence me a lot, for I hardly use the nvidia card and I can disable it manaully. After start bumblebeed, the NVIDIA card is always off after boot. And about the fan...It seems your fan behavior more properly then mine. My fan is at 0 rpm when boot up, after using a while, it grows to 2500 rpm, but if I just do something like chrome, it may turn up to 3200 rpm...and if I lock it via Super+L, after a few minutes it turn down to 2500...while compling the fan works really hard as 4000 rpm and quite good.

I must say thanks to your help, but I think I may have something wrong in my kernel. Could you please teach me how you configure you kernel about your fan? 

Plus, I'm not kidding, but I think the difference between our computer may because our different place and weather. In my place now it's mid-summer and having a temperature in 30°C, or our computer hardware have something different?Mine is E3-1505M v5/16G/256G NVMe + 1TB HDD/M1000M, how about yours?

----------

## ]grimm[

Here's my kernel configuration:  https://share.riseup.net/#OvenG14jIjOxqy_ji3Qh_g

I was thinking about the ambient temperature as a possible cause for your fans to spin up, I'm currently generally using my laptop in a climate controlled environment where the temperature is maintained at 23°C, although I have also used it for a sustained period of time in a flat with no air conditioning where the temperature was generally around 28°C and I never noticed the fans hitting speeds higher than 2500 RPM unless I was stressing the CPU/GPU in some obvious way and not just browsing the web, composing email, editing text or other computationally undemanding tasks.

I have a similar configuration to you with the E3-1505M v5/16G/256G NVMe SSD but in my case I have the extended battery instead of the rotational HDD.  However, this seems to be something that would increase temperature rather than alleviate it, so I'm not sure that's relevant.

Could I inquire as to how it is that you are able to maintain the Nvidia card turned off after booting?  I too have bumblebeed starting at boot but for some reason my card is also active.  Are you using an explicit xorg.conf?  I wonder if it's because I have an nvidia section in there that's causing the modules to be loaded when xorg starts.

----------

## SXShaX

 *]grimm[ wrote:*   

> Here's my kernel configuration:  https://share.riseup.net/#OvenG14jIjOxqy_ji3Qh_g
> 
> I was thinking about the ambient temperature as a possible cause for your fans to spin up, I'm currently generally using my laptop in a climate controlled environment where the temperature is maintained at 23°C, although I have also used it for a sustained period of time in a flat with no air conditioning where the temperature was generally around 28°C and I never noticed the fans hitting speeds higher than 2500 RPM unless I was stressing the CPU/GPU in some obvious way and not just browsing the web, composing email, editing text or other computationally undemanding tasks.
> 
> I have a similar configuration to you with the E3-1505M v5/16G/256G NVMe SSD but in my case I have the extended battery instead of the rotational HDD.  However, this seems to be something that would increase temperature rather than alleviate it, so I'm not sure that's relevant.
> ...

 

Sure it's my environment too hooooooooot...My room has no air condition and the HDD isn't a reason of temperature. Today is not hot and my fan just in 2500 rpm.

About bumblebee I really want help you but I just installed it with bbswitch, and I use systemd, via systemctl enable bumblebeed to make it start while booting, if there was something specially...maybe I learn from Arch's PAGBUILD, write a blacklist of nvidia driver like following

touch my /etc/modprobe.d/bumblebee.conf and edit:

```

# Keep NVIDIA from auto-uploading.

blacklist nvidia nvidia-modeset nvidia-uvm nouveau

```

This will prevent nvidia driver being autoloaded by kernel. You reboot and run optirun --status should see it's off.

Do not edit anything else about bumblebee, keep it as just after install, and I have no xorg.conf, maybe you should delete it. Only thing was install it, enable it, write /etc/modprobe.d/bumblebee.conf.

I just do this and the nvidia card is off after booting, but I think tweak them may be dangerous, I'm lucky have nothing wrong.

If you are using nvidia driver (not nouveau), I think this command will help you disable the nvidia card manaully, and safer than use a blacklist (maybe? But I don't have troubles with blacklist).

after optirun something use this to disable nvidiac card:

```

sudo rmmod nvidia_modeset nvidia && sudo tee /proc/acpi/bbswitch <<<OFF

```

----------

## ]grimm[

Perfect, thanks for that tip.  I also just compiled the latest build of bumblebee (3.2.1-2016-07-24) and it properly unloads modules and turns the card off again after usage.

```

~ $ optirun --status

Bumblebee status: Ready (3.2.1-2016-07-24-Format:%h$). X inactive. Discrete video card is off.

~ $ optirun -b primus glxspheres

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)

Visual ID of window: 0x95

Context is Direct

OpenGL Renderer: Quadro M1000M/PCIe/SSE2

61.609549 frames/sec - 68.756257 Mpixels/sec

~ $ optirun --status

Bumblebee status: Ready (3.2.1-2016-07-24-Format:%h$). X inactive. Discrete video card is off.

```

----------

## SXShaX

 *]grimm[ wrote:*   

> Perfect, thanks for that tip.  I also just compiled the latest build of bumblebee (3.2.1-2016-07-24) and it properly unloads modules and turns the card off again after usage.
> 
> ```
> 
> ~ $ optirun --status
> ...

 

oohhhh, I'm happy to see your bumblebee are better, and I'll do my upgrade now to see whether it has a newer version. Now the only problem is my fan still work in 2500 rpm -- no stop, but not bad.

----------

## SXShaX

 *]grimm[ wrote:*   

> Perfect, thanks for that tip.  I also just compiled the latest build of bumblebee (3.2.1-2016-07-24) and it properly unloads modules and turns the card off again after usage.
> 
> ```
> 
> ~ $ optirun --status
> ...

 

Where the newest is? I havn't found it...

----------

## ]grimm[

 *SXShaX wrote:*   

> 
> 
> Where the newest is? I havn't found it...

 

I just hacked together an ugly ebuild that grabbed it from Github but it's very poorly written.  There's a 9999 ebuild in the bumblebee overlay but you should be careful because it builds the master branch instead of the develop branch (the latter has new code while the former was last updated in 2013).  Check this comment for how to build the git release properly using the ebuild:  https://github.com/Bumblebee-Project/Bumblebee/issues/565#issuecomment-39073890

----------

## SXShaX

 *]grimm[ wrote:*   

>  *SXShaX wrote:*   
> 
> Where the newest is? I havn't found it... 
> 
> I just hacked together an ugly ebuild that grabbed it from Github but it's very poorly written.  There's a 9999 ebuild in the bumblebee overlay but you should be careful because it builds the master branch instead of the develop branch (the latter has new code while the former was last updated in 2013).  Check this comment for how to build the git release properly using the ebuild:  https://github.com/Bumblebee-Project/Bumblebee/issues/565#issuecomment-39073890

 

Sorry, but I want to know your BIOS version?

----------

## ]grimm[

 *SXShaX wrote:*   

>  *]grimm[ wrote:*    *SXShaX wrote:*   
> 
> Where the newest is? I havn't found it... 
> 
> I just hacked together an ugly ebuild that grabbed it from Github but it's very poorly written.  There's a 9999 ebuild in the bumblebee overlay but you should be careful because it builds the master branch instead of the develop branch (the latter has new code while the former was last updated in 2013).  Check this comment for how to build the git release properly using the ebuild:  https://github.com/Bumblebee-Project/Bumblebee/issues/565#issuecomment-39073890 
> ...

 

01.02.10

----------

## SXShaX

 *]grimm[ wrote:*   

>  *SXShaX wrote:*    *]grimm[ wrote:*    *SXShaX wrote:*   
> 
> Where the newest is? I havn't found it... 
> 
> I just hacked together an ugly ebuild that grabbed it from Github but it's very poorly written.  There's a 9999 ebuild in the bumblebee overlay but you should be careful because it builds the master branch instead of the develop branch (the latter has new code while the former was last updated in 2013).  Check this comment for how to build the git release properly using the ebuild:  https://github.com/Bumblebee-Project/Bumblebee/issues/565#issuecomment-39073890 
> ...

 

Unluckily like some people I have a screen backlight wave problem with 1.2.10...So I am using 1.2.00, maybe new bios updated fan control? But I don't want screen wave...

----------

## SXShaX

Hey my friend I just found my sound card didn't work properly, I always have crackling when playing sounds, while in Windows not. Do you have the same problem?

----------

