Bug 401499 - Idle Inhibit not working correctly
Summary: Idle Inhibit not working correctly
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Vlad Zahorodnii
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-28 11:38 UTC by Aleksey Samoilov
Modified: 2018-11-29 16:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0


Attachments
WAYLAND_DEBUG (46.30 KB, text/plain)
2018-11-28 18:42 UTC, Aleksey Samoilov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Samoilov 2018-11-28 11:38:57 UTC
SUMMARY

I added support for zwp_idle_inhibit_manager_v1 to RetroArch (frontend for Libretro API). Despite the fact that zwp_idle_inhibit_manager_v1_create_inhibitor is configured, screensaver is appear anyway. Related RetroArch issue https://github.com/libretro/RetroArch/issues/7671

STEPS TO REPRODUCE
1. Build RetroArch from master wit --enable-wayland
2. Set screen locking to 1 min in System Settings
3. Run RetroArch and wait

OBSERVED RESULT

Screenlock appear after 1 min

EXPECTED RESULT

Screenlock doesn't appear

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon git unstable
(available in About System)
KDE Plasma Version: 5.14.90
KDE Frameworks Version: 5.51
Qt Version: 5.11.2

ADDITIONAL INFORMATION

Same code works fine in Sway wayland compositor
Comment 1 Martin Flöser 2018-11-28 17:11:14 UTC
We don't have support for this interface.
Comment 2 Martin Flöser 2018-11-28 17:18:36 UTC
(In reply to Martin Flöser from comment #1)
> We don't have support for this interface.

We have support, I added it myself...
Comment 3 Martin Flöser 2018-11-28 17:27:43 UTC
The support in KWin is incomplete. We added the support only because applications were failing to start without it. But we don't use the information at all.
Comment 4 Martin Flöser 2018-11-28 17:29:24 UTC
(In reply to Martin Flöser from comment #3)
> The support in KWin is incomplete. We added the support only because
> applications were failing to start without it. But we don't use the
> information at all.

No, I'm wrong again. We block screen lock, etc.
Comment 5 Martin Flöser 2018-11-28 17:29:51 UTC
Could you please run the application with WAYLAND_DEBUG=1 and attach the output here?
Comment 6 Aleksey Samoilov 2018-11-28 18:42:33 UTC
Created attachment 116552 [details]
WAYLAND_DEBUG
Comment 7 Martin Flöser 2018-11-28 18:55:54 UTC
Given the debug output I don't see a reason why it should not work.
Comment 8 Vlad Zahorodnii 2018-11-28 22:41:55 UTC
I think I found why it's not working.
Comment 9 Vlad Zahorodnii 2018-11-29 16:17:45 UTC
Git commit 437d35eee2421565f505ebe16909349891f31cc6 by Vlad Zagorodniy.
Committed on 29/11/2018 at 16:17.
Pushed by vladz into branch 'master'.

[wayland] Check presence of the inhibitor object when a client is registered in IdleInhibition

Summary:
Some applications are not able to inhibit the idle behavior because
each of them creates an inhibitor object before the corresponding
ShellClient object becomes ready for painting.
FIXED-IN: 5.15.0

Test Plan: idle-inhibit client (from wlroots/examples) works.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17227

M  +6    -6    autotests/integration/idle_inhibition_test.cpp
M  +10   -10   idle_inhibition.cpp

https://commits.kde.org/kwin/437d35eee2421565f505ebe16909349891f31cc6