Going to sleep when lid closed (battery vs AC)

I have configured my laptop to:
DO NOT go to sleep when the lid is closed & running on AC
DO go to sleep when the lid is closed & running on battery

Mainly because I often use it to play music/stream videos & I don’t want the laptop screen open.

This works OK - I close the lid on AC, the screen goes blank but the system is running. When I close the lid on battery, the system suspends/sleeps.

If I close the lid on AC, and then at some point later unplug the AC lead, the system goes to sleep, which is what I want it to do.
However, when I open the lid after the above (either on battery still or on AC) the password box/unlock screen appears. I enter my password & I get my KDE 4 desktop, which then promptly goes back to sleep & I have to press the power button & unlock it again.

This doesn’t happen if the laptop has gone to sleep when I closed the lid (ie I was already on battery when I closed the lid).
It only happens when the laptop goes to sleep with the lid already closed (ie I was on AC when I closed the lid, and then unplugged it with the lid still closed)

In short: gong to sleep with the lid already closed because of switching to battery (cable unplugged) means on wakeup/lid open it goes back to sleep again after being unlocked (regardless of then being on AC or battery).

I realise it’s probably an edge issue, but if anyone has found the same thing or has any ideas on workarounds? Could it be a bug that needs reporting?

  • weighty foe wrote, On 10/10/2011 04:56 PM:
    > I have configured my laptop to:
    > DO NOT go to sleep when the lid is closed& running on AC
    > DO go to sleep when the lid is closed& running on battery

KDE, Gnome…?

Uwe

Sorry, KDE4.7.2

This doesn’t happen if the laptop has gone to sleep when I closed the lid (ie I was already on battery when I closed the lid).
It only happens when the laptop goes to sleep with the lid already closed (ie I was on AC when I closed the lid, and then unplugged it with the lid still closed)

In short: gong to sleep with the lid already closed because of switching to battery (cable unplugged) means on wakeup/lid open it goes back to sleep again after being unlocked (regardless of then being on AC or battery).

I realise it’s probably an edge issue, but if anyone has found the same thing or has any ideas on workarounds? Could it be a bug that needs reporting?

IIRC, I’ve experineced the same issue (openSUSE 11.3 and 11.4, KDE4.6.x) if the power state changes between suspending and resuming. I’ve never bothered to check into it further though. (I guess a minor tweak of Solid’s power management code would fix this).

Can you try creating new powerprofiles for that and use these?

Uwe

Yes, sure.

Should I also delete the ones that I’ve edited (the default ones)?

  • weighty foe wrote, On 10/11/2011 02:46 PM:
    > Should I also delete the ones that I’ve edited (the default ones)?

<shrug> Shouldn’t make a difference.

Uwe