Bug 472541 - Powerdevil idle script does not respect idle inhibition of wljoywake or caffeine
Summary: Powerdevil idle script does not respect idle inhibition of wljoywake or caffeine
Status: REOPENED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.6
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-23 17:51 UTC by Svyatoslav Timofeev
Modified: 2024-07-20 14:50 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Svyatoslav Timofeev 2023-07-23 17:51:11 UTC
SUMMARY
***
Idle Script in settings of Power Management is separated from Idle Inhibit, which makes impossible wljoywake and caffeine to create screensaver inhibited by joystick
***


STEPS TO REPRODUCE
1. Setup wljoywake or caffeine to inhibit idle
2. Set Idle Script to Screensaver under Wine
3. Script Inhibit does not work!

OBSERVED RESULT
Screensaver on wine still running on Screen Inhibit, which is "undefined behavior"

EXPECTED RESULT
Idle Script should be inhibited by programs

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: CachyOS (Arch Linux)
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Comment 1 Nicolas Fella 2023-07-23 18:16:08 UTC
> 2. Set Idle Script to Screensaver under Wine

What you you mean with this?
Comment 2 Svyatoslav Timofeev 2023-07-23 19:40:46 UTC
(In reply to Nicolas Fella from comment #1)
> > 2. Set Idle Script to Screensaver under Wine
> 
> What you you mean with this?

Oh, sorry.
I'm using Windows Screensaver in Wine, such as fancy Dream Aquarium
Comment 3 Svyatoslav Timofeev 2023-07-23 20:01:55 UTC
(In reply to Nicolas Fella from comment #1)
> > 2. Set Idle Script to Screensaver under Wine
> 
> What you you mean with this?

I wrote simple script for launching Windows screensaver with Wine.
But, it triggers when screensaver of KDE (screen locker, screen sleep) inhibited by other programs, such as Caffeine or wljoywake

There is no way to prevent script from triggering, while screensaver inhibited by programs or D-Bus
Comment 4 Jakob Petsovits 2023-12-03 06:01:20 UTC
Not sure how wljoywake or caffeine inhibit idle, but Bug 457859 (systemd-inhibit is not respected) seems like a related issue.
Comment 5 Oded Arbel 2024-03-20 18:35:45 UTC

*** This bug has been marked as a duplicate of bug 457859 ***
Comment 6 Jakob Petsovits 2024-04-04 03:21:18 UTC
Reopening as "not a duplicate". I haven't gotten around to testing custom script idle behavior, but this is different to Bug 457859 which is not at all about custom scripts and just talks about preventing regular suspend actions.
Comment 7 Martino Fontana 2024-07-05 17:41:32 UTC
I found another app that has the same problem.
https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit/issues/1
Comment 8 Martino Fontana 2024-07-20 14:50:28 UTC
Regarding `wljoywake` and `wayland-pipewire-idle-inhibit`, it seems that KDE is implementing the `zwp_idle_inhibit_manager_v1` protocol correctly.
It's other compositors that implement incorrectly, and these apps that rely on incorrect behavior.
See https://github.com/swaywm/sway/issues/8080, and https://codeberg.org/river/river/issues/1079#issuecomment-2013817.

(So, I guess that this issue report is a https://xkcd.com/1172/ situation.)

Caffeine (not -ng) is another situation, since it uses `xdg-screensaver`. https://bugs.kde.org/show_bug.cgi?id=383575#c4