Bug 331767 - Automatic suspending doesn't work on a laptop when external monitor is active
Summary: Automatic suspending doesn't work on a laptop when external monitor is active
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-daemon (show other bugs)
Version: 4.13.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-05 14:28 UTC by sparhawk
Modified: 2015-03-12 02:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sparhawk 2014-03-05 14:28:33 UTC
I have an external monitor that I use with my laptop via the Mini Display Port (--output DP1). Automatic suspending works perfectly with the external monitor disconnected, or with it monitor inactive [1]. I have it set to automatically suspend after x minutes, and leave the laptop lid open. With the external monitor in use, with either the internal monitor disabled [2] or also enabled [3], the laptop will no longer suspend automatically.

[1] xrandr --output LVDS1 --auto --output DP1 --off # only internal monitor active. Works.
[2] xrandr --output LVDS1 --off --output DP1 --auto # only external monitor active. Fails.
[3] xrandr --output DP1 --auto --primary --output LVDS1 --auto --right-of DP1 # both active. Fails.

I installed xprintidle to see if it agreed that my laptop was "inactive" (and should presumably be suspending). I looped it to run every minute, and it confirmed that my computer was "inactive", even though it didn't sleep automatically.

Oddly enough, if I test with Screen Energy Saving > Switch off after > 1 min, the screen will switch off (with dual monitors). So it seems that my computer does know it's "inactive" on some level.

Finally, there's no sign that the computer has undergone a quick suspend-resume cycle, from inspecting /var/log/pm-suspend.log .

Reproducible: Always

Steps to Reproduce:
1. Connect external monitor to laptop and enable it, either with internal monitor enabled or not.
2. Set computer to automatically suspend after one minute.
3. Wait one minute.
Actual Results:  
Computer stays awake.

Expected Results:  
Computer should suspend automatically.

I'm not sure if relevant, but with both monitors active, I tried closing the lid of the laptop. The computer actually suspended. I'm not sure if this is meant to happen, but I was told that it might be related [4].

[4] https://forum.kde.org/viewtopic.php?f=63&t=119864&sid=d95a5198459d3501e1dc5e4fc255aea5&p=303743#p303743
Comment 1 sparhawk 2014-07-27 02:24:35 UTC
For others hitting this bug, I've installed xautolock, which works fine in all situations.
Comment 2 sparhawk 2014-07-27 02:38:40 UTC
Also, I just tested again. This bug is still present in 4.13.3 (not available in the drop down?), running on Arch. (I was previously on Kubuntu.)
Comment 3 sparhawk 2014-08-21 10:35:32 UTC
Still here in KDE 4.14.0.
Comment 4 Oscar Pereira 2014-09-15 12:57:19 UTC
I use KDE with ArchLinux, and was also seeing the (ancillary) problem of the system suspending when the lid went down and there is an external monitor connected. But I think that's related to the "Never prevent an action on lid close" option (System Settings -> Hardware -> Power Management -> Advanded). I had it checked; unchecking it made the laptop suspend when lid closed and no ext. monitor plugged; and NOT suspend when lid closed and external monitor plugged in.

But I do note that this only functions as expected after configuring (or disabling) the external monitor. I.e. if you are working with an external monitor, and then just unplug it, and don't run the setup tool again (even though you'll be shown a pop up asking if you want to), then closing the lid willl NOT suspend the machine (and vice-versa).

Hope this helps.
Comment 5 Oscar Pereira 2014-09-15 12:58:39 UTC
(In reply to Oscar Pereira from comment #4)
> I use KDE 
Version 4.14.0
Comment 6 sparhawk 2014-09-16 15:37:24 UTC
I should mention that I had this problem in Kubuntu, and now I still see it in Arch.

@Oscar, I'm not sure if your problems are unrelated to mine. I'm not entirely sure how closing the lid relates to automatic suspend. I see my bug when leaving the lid open; I don't even try to close it.

In regards to your issue, I don't entirely understand what "Never prevent an action on lid close" is meant to do. However, I can close the lid without sleeping leaving this checked, if I configure System Settings > Hardware > Power Management > Enegy Saving > On AC Power > Button events handling > When laptop lid closed > Do nothing.
Comment 7 sparhawk 2014-12-11 00:26:38 UTC
Still here in 4.14.3. I tested all three permutations and the behaviour is identical to my original post. Is there any more information I can provide?
Comment 8 Jonathan Riddell 2015-03-11 19:17:34 UTC
This bug is reported on libsolid which is the kdelibs4 version of the solid library.  It is now in maintenance mode.  If you think it should still be fixed in the KDE Frameworks 5 version of solid please move it to or report a bug on frameworks-solid or Powerdevil.
Comment 9 sparhawk 2015-03-12 02:49:33 UTC
Looks like this has been fixed in solid 5.7.0-1 in Arch Linux. Thanks for the update.