Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Figure out an alternative to xprintidle on Wayland #391

Open
poperigby opened this issue Nov 9, 2020 · 15 comments · May be fixed by #576
Open

[Discussion] Figure out an alternative to xprintidle on Wayland #391

poperigby opened this issue Nov 9, 2020 · 15 comments · May be fixed by #576

Comments

@poperigby
Copy link

Currently, xprintidle only works on applications running through XWayland. This makes it pretty useless if you're using primarily Wayland native applications. swayidle could be something to look at.

@slgobinath
Copy link
Owner

Honestly I am not familiar with Wayland though I have noticed issues on Wayland machines. There is an attempt to solve this issue here #338

Any suggestions are welcomed

@poperigby
Copy link
Author

I'm not too familiar with it either, but I thought I'd just try and start up a discussion.

@ilario
Copy link
Contributor

ilario commented Jan 26, 2021

I just tested swayidle on Gnome+Wayland and the output states: "Display doesn't support idle protocol" which was expected as swayidle looks for this protocol inside some KDE stuff (see here). Maybe this is about the Gnome implementation (I didn't look into it in detail)?

@smith558
Copy link

smith558 commented May 6, 2021

Becoming more urgent as Ubuntu has just switched to Wayland as default from 21.04 onwards releases.

@m00nwtchr
Copy link

For anyone not using sway, you can just set XDG_CURRENT_DESKTOP=sway for safeeyes, but really there's no need to limit the swayidle solution to just sway. (A number of wayland compositors support it)

@meldafert
Copy link

See #553 - now that ext-idle-notify-v1 is merged and used by swayidle by default, this should be the proper solution.

@Sohail-XD
Copy link

Any update on this? meldafert's pr seems to fix it.

@wolftune
Copy link

on KDE 6 in wayland, Safeeyes doesn't work at all. It thinks I'm always idle and thus never triggers any breaks.

I think what's needed is support for kde-idle

@meldafert
Copy link

@wolftune Can you test with #553?

@wolftune
Copy link

wolftune commented Mar 15, 2024

@meldafert EDIT: it doesn't work.

@wolftune
Copy link

wolftune commented Mar 15, 2024

Update: it allowed breaks at all. Initially, I was missing swayidle and that forced Smart Pause to be turned off

I tested with installing swayidle, and now it does the breaks even if I am idle. Swayidle is running, but it still isn't pausing when I do nothing on the system.

It's NOT working, it needs to support kde-idle

That said, this helped me with a workaround for now: If I turn off Smart Pause, then the regular release version works (but no smart-pause of course). With the #553 change, it works without Smart Pause whether or not Smart Pause setting is on. So, that's at least different.

To review:

  • no breaks at all with main version and Smart Pause on (xidle wrongly indicates idle always)
  • works with Smart Pause off
  • the PR removes the problem with xidle indicating wrong idleness
  • swayidle does not actually work in KDE as far as I can tell, kde-idle support is needed

@Mange
Copy link

Mange commented May 17, 2024

There are other alternatives beyond swayidle (hypridle, for example). Is it better to stop relying on commands to be installed and instead check the current session's idle state via DBus instead?

Then I think it should work for any combination of X11 and Wayland, KDE, Gnome, Sway, Hyprland, etc.?

@deltragon
Copy link
Collaborator

I have implemented using ext-idle-notify-v1 directly in #576.
@wolftune @Mange Could you test this branch, if it works for you? Please give me feedback on the PR if it does not.

@wolftune
Copy link

@deltragon I tried to review how to test, but I'm stuck. Can you point me to how to install the version from the branch so I can test it?

@Mange
Copy link

Mange commented Jun 22, 2024

I'm testing it right now. I think I'm running the code in the branch after starting it with python3 -m safeeyes, but I don't know how Python works.

In either case, I've left the machine idle for 9 minutes and I have not gotten any short breaks yet. Seems magic.
Right now I'm testing it by actually being active on the machine to see if it still prompts me for a break or not. I've not used SafeEyes for months now due to lack of idle detection, so I'm still getting used to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants