Bug 368822 - Laptop is suspended when locked even though it's connected to a power source
Summary: Laptop is suspended when locked even though it's connected to a power source
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: Battery Monitor (show other bugs)
Version: 5.7.4
Platform: Neon Linux
: NOR major
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-14 22:50 UTC by KDE Neon user
Modified: 2017-06-14 23:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Energy settings (67.97 KB, image/png)
2016-09-14 22:51 UTC, KDE Neon user
Details
Energy settings 2 (69.08 KB, image/png)
2016-09-14 22:52 UTC, KDE Neon user
Details
power settings (878 bytes, text/plain)
2016-09-22 22:06 UTC, Guillaume DE BURE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description KDE Neon user 2016-09-14 22:50:52 UTC
Neon now suspends my session even though I haven't changed my settings.

Reproducible: Always

Steps to Reproduce:
1. Set your energy saving settings to never suspend on AC power, but to suspend on battery after 20 minutes
2. Lock the screen but kept your laptop plugged in without closing the lid

Actual Results:  
Laptop is suspended when you come back.

Expected Results:  
Laptop should stay turned on with just the screen locked up.

This wasn't a problem until this week on KDE Neon.
Comment 1 KDE Neon user 2016-09-14 22:51:17 UTC
Created attachment 101089 [details]
Energy settings
Comment 2 KDE Neon user 2016-09-14 22:52:05 UTC
Created attachment 101090 [details]
Energy settings 2
Comment 3 KDE Neon user 2016-09-14 22:54:42 UTC
Note: I've used a BIOS setting that sets a 80% limit for my )Samsung) battery change. This has never been a problem though. 

When it's at that value, Windows just changes the battery status to "not charging", and Linux keeps displaying "charging - 79%", but this has never interfered with any energy options.
Comment 4 Kai Uwe Broulik 2016-09-15 07:01:03 UTC
Can you check what profile PowerDevil is actually using when plugged in?

qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement org.kde.Solid.PowerManagement.currentProfile

Should return "AC" for plugged in.

> When it's at that value, Windows just changes the battery status to "not charging", and Linux keeps displaying "charging - 79%",

Can you check upower -d whether it notices that? We theoretically handle the "plugged in but not charging" case but if the driver/kernel doesn't report it properly we can't really tell.

Harald, could there have been a systemd update or sth like that in neon? I fear this is again a regression there or some new bullshit service trying to be smart.
Comment 5 KDE Neon user 2016-09-15 20:11:10 UTC
> qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement org.kde.Solid.PowerManagement.currentProfile

AC

> upower -d

Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path:          ADP1
  power supply:         yes
  updated:              Qua 14 Set 2016 19:40:35 BRT (77133 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              yes
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               SAMSUNG Electronics
  power supply:         yes
  updated:              Qui 15 Set 2016 17:04:43 BRT (85 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               charging
    warning-level:       none
    energy:              35,076 Wh
    energy-empty:        0 Wh
    energy-full:         44,4 Wh
    energy-full-design:  48,84 Wh
    energy-rate:         9,99 W
    voltage:             11,774 V
    time to full:        56,0 minutes
    percentage:          79%
    capacity:            90,9091%
    technology:          lithium-ion
    icon-name:          'battery-full-charging-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         yes
  updated:              Qua 14 Set 2016 19:42:38 BRT (77010 seconds ago)
  has history:          no
  has statistics:       no
  battery
    present:             yes
    state:               charging
    warning-level:       none
    energy:              35,076 Wh
    energy-full:         44,4 Wh
    energy-rate:         9,99 W
    time to full:        56,0 minutes
    percentage:          79%
    icon-name:          'battery-full-charging-symbolic'

Daemon:
  daemon-version:  0.99.4
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: HybridSleep
Comment 6 Kai Uwe Broulik 2016-09-15 20:16:43 UTC
Thanks. I don't see any clear indication of why this happens.

Can you perhaps test and play around with the following:
* Does it only happen when the screen is locked or generally?
* When you set a timeout of, say 1 minute, for AC is that properly respected?
* When you seta timeout of, say 1 minute, for Battery but disable it for AC, does it still suspend after 1 minute? I need to figure out if it's actually us (PowerDevil) suspending or some other system service
Comment 7 Guillaume DE BURE 2016-09-22 22:05:23 UTC
I have a very similar issue, I will provide details hoping they are related. I will provide my settings file.

In my case, on AC, suspending is completely disabled, and closing the lid is set to "Do Nothing". Nevertheless, when I close the lid, laptop suspends.

To answer Kai Uwe:
* Does it only happen when the screen is locked or generally? 
--> in my case, it happens only when I close the lid, even if session is not locked
* When you set a timeout of, say 1 minute, for AC is that properly respected? 
--> No. No suspend happens unless I close the lid
* When you set a timeout of, say 1 minute, for Battery but disable it for AC, does it still suspend after 1 minute? I need to figure out if it's actually us (PowerDevil) suspending or some other system service
--> No, in that case, suspend is not happening

If there is anything I can provide to help nail down the issue, please ask :)
Comment 8 Guillaume DE BURE 2016-09-22 22:06:48 UTC
Created attachment 101238 [details]
power settings
Comment 9 KDE Neon user 2017-06-14 23:44:04 UTC
I'm back to KDE Neon and haven't had this problem again yet. I'll open a new issue in case something like that happens again.

Guillaume DE BURE, open a separate issue if you're still having problems.