Bug 422033 - Break never counts down to zero in Wayland
Summary: Break never counts down to zero in Wayland
Status: ASSIGNED
Alias: None
Product: rsibreak
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: HI normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords: wayland-only
: 453372 474405 479774 484145 484925 491943 508542 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-24 20:57 UTC by Borden
Modified: 2025-08-20 23:47 UTC (History)
19 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 Borden 2020-05-24 20:57:21 UTC
RSIBreak works fairly well in KDE running on X on Debian Bullseye. It has short breaks and long breaks and when the break comes up the pop-up appears and counts down however many seconds I specify (unless I touch the mouse or keyboard) then goes away until the next break.

In Wayland KDE, behaviour is similar EXCEPT when it's time to take a break. The pop-up appears in the top left corner of my screen for some reason, which is irritating but not fatal. The timer will start at the predetermined break duration. After one second, however, having not touched the computer at all, it will reset the countdown. It does this forever until I click "Skip break"

I am trying to switch to Wayland, so I have been able to reproduce this bug every time for the past two days - which is as long as I have been trying to use Wayland.

STEPS TO REPRODUCE
1. Run RSIBreak normally from within KDE running on top of Wayland.
2. Wait for the break pop-up to appear.

OBSERVED RESULT
Break timer keeps resetting after one second, meaning that it never gets to zero unless the break is skipped.

EXPECTED RESULT
As in X, RSIBreak on Wayland should count down to zero if there is no contact with the computer. If there is contact with the computer, the timer should reset and start the countdown again.


SOFTWARE/OS VERSIONS
Linux: 5.6.0-1-amd64
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.5
Comment 1 Méven Car 2020-05-25 14:11:10 UTC
> In Wayland KDE, behaviour is similar EXCEPT when it's time to take a break. The pop-up appears in the top left corner of my screen for some reason, which is irritating but not fatal.

This seems like an osd placement related issue.
A fix like Kscreen might be in order or how plasma does it.
https://phabricator.kde.org/D28916

It might have some side-effect after.
Comment 2 Albert Astals Cid 2020-05-25 18:01:07 UTC
FWIW personally i don't really have much stamina to fix this in wayland, so Merge Request more than welcome
Comment 3 Dominik Waurenschk 2020-11-14 11:51:27 UTC
I have just come across this exact issue myself. I investigated the code and found that RSIBreak calls KIdleTime, which uses a platform-specific plugin to find the idle time.

For wayland, this prints a warning to console that the plugin does not support polling idle time (it does support timeouts it seems).
But, then it returns 0, which RSIBreak in turn interprets as 0 seconds of idle time and resets the timer.

So if it's not possible to measure idle time on wayland (or really hard to do), I think it could be fixed by having that plugin return an error (like -1 or so) instead of 0, and then have RSIBreak use it's own timer and listen to the resumingFromIdle signal perhaps to reset? (I haven't checked if this would work).

Just wanted to add to add to this bug report that's it's not actually an RSIBreak problem, rather a KIdleTime or KWayland problem.
Comment 4 Bug Janitor Service 2020-11-16 15:17:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/rsibreak/-/merge_requests/4
Comment 5 Eric Mesa 2021-07-20 23:15:51 UTC
Adding that this also happens on Fedora 34
Comment 6 joelsgp@protonmail.com 2023-05-15 13:20:12 UTC
Would it be a good idea to create a temporary fix by adding `-platform xcb` to the desktop file, to force it to use x11 for the time being?
Comment 7 Nicolas Fella 2023-09-16 12:12:05 UTC
*** Bug 474405 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Fella 2023-09-16 12:12:23 UTC
*** Bug 453372 has been marked as a duplicate of this bug. ***
Comment 9 valdikss 2024-01-13 22:48:20 UTC
*** Bug 479774 has been marked as a duplicate of this bug. ***
Comment 10 valdikss 2024-01-13 22:49:00 UTC
version 0.12.15
When the break event occur, the timer ("for a duration of") does not decrease for more than 1 second.

I have 40 seconds short break. When the timer for break event kicks in and window appears, there's constantly either "please relax for 40 seconds" or "please relax for 39 seconds" message, switching between 40 and 39 seconds. It never decreases to 38 seconds or more. After 39 seconds, 40 seconds again.

The window disappears after 5-10 seconds.

Could it be a Wayland-related issue and the application fails to receive keyboard/mouse activity data? I tried to put my mouse cursor inside the window, but that didn't change anything.


STEPS TO REPRODUCE
1. Wait until break event occur and new window appears
2. Do not touch the keyboard or mouse

OBSERVED RESULT
The timer on break event beginning never decreases past 1 second 

EXPECTED RESULT
Break event starts

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 39
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.6.9-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 13th Gen Intel® Core™ i5-1340P
Memory: 30,9 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: Intel(R) Client Systems
Product Name: NUC13ANKi5
System Version: N11211-203
Comment 11 joelsgp@protonmail.com 2024-03-07 12:25:07 UTC
It's a shame this hasn't been fixed for the Plasma 6 release because this is a dealbreaker for me. I'll have to keep using X11 until this is fixed.
Comment 12 mox 2024-03-21 17:12:44 UTC
*** Bug 484145 has been marked as a duplicate of this bug. ***
Comment 13 Albert Astals Cid 2024-04-02 17:04:58 UTC
*** Bug 484925 has been marked as a duplicate of this bug. ***
Comment 14 Luigi Toscano 2024-11-11 14:13:42 UTC
*** Bug 491943 has been marked as a duplicate of this bug. ***
Comment 15 Nik Nikovsky 2025-08-20 23:47:23 UTC
*** Bug 508542 has been marked as a duplicate of this bug. ***