Bug 504553 - Power management suspends despite activity that one would expect should prevent it.
Summary: Power management suspends despite activity that one would expect should preve...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 6.3.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Akseli Lahtinen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-20 00:59 UTC by James Eder
Modified: 2025-06-17 21:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.5.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Eder 2025-05-20 00:59:18 UTC
SUMMARY
KDE instantaneously suspends my computer the moment my YouTube video finishes playing.

STEPS TO REPRODUCE
1.   Set to suspend after 10 minutes of activity.
2.   Play a YouTube video that is longer than 10 minutes.
3.   Do not move mouse or use keyboard.

OBSERVED RESULT
System will suspend the instant that the video finishes rather than waiting 10 minutes. This is very annoying and disruptive.

EXPECTED RESULT
System suspends 10 minutes after activity stops and that playing a video is considered activity.  The countdown should start when the inhibiting lock is released.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma:
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version:  6.9.0
Comment 1 Akseli Lahtinen 2025-05-20 12:56:17 UTC
Can confirm, the timing has to be quite close. 

I think we should just restart the timer when blocking the sleep is turned off.

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.14.6-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 2 Bug Janitor Service 2025-05-20 15:11:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/548
Comment 3 Akseli Lahtinen 2025-06-16 08:49:56 UTC
Git commit 3feaad466c5e6195ed8541c3c58d899a612511d0 by Akseli Lahtinen.
Committed on 16/06/2025 at 08:43.
Pushed by akselmo into branch 'master'.

PowerDevilAction: refresh action timers on inhibition changes

When inhibitions change, action timers should be restarted.
If they're not restarted, action timer may run to 0 right after
a video playback ends for example, running the action abruptly.

M  +11   -0    daemon/powerdevilcore.cpp

https://invent.kde.org/plasma/powerdevil/-/commit/3feaad466c5e6195ed8541c3c58d899a612511d0
Comment 4 Nate Graham 2025-06-17 21:42:34 UTC
Git commit 31fcf4c07346bc1fcd7b6df07b62330fd0b7db7f by Nate Graham.
Committed on 17/06/2025 at 21:38.
Pushed by ngraham into branch 'Plasma/6.4'.

PowerDevilAction: refresh action timers on inhibition changes

When inhibitions change, action timers should be restarted.
If they're not restarted, action timer may run to 0 right after
a video playback ends for example, running the action abruptly.


(cherry picked from commit 3feaad466c5e6195ed8541c3c58d899a612511d0)

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +11   -0    daemon/powerdevilcore.cpp

https://invent.kde.org/plasma/powerdevil/-/commit/31fcf4c07346bc1fcd7b6df07b62330fd0b7db7f