Skip to content

Fails to detect system pause on python-pywayland 0.4.19 #906

Closed
getsolus/packages
#10963

Description

@0x09AF

Describe the bug
Fails to detect system idle, stays active forever. When I come back to the PC - I may get prompted for a break immediately or it would be on break already

To Reproduce
Steps to reproduce the behavior:

  1. Launch from application menu
  2. Leave mouse alone for the idle duration
  3. Observe the eye doesn't become gray

Expected behavior
The icon should turn gray and should not count time against break time

Desktop (please complete the following information):

  • OS with version: Arch Linux x86_64
  • Desktop Env with version: niri 26.04 (Wayland)
  • Safe Eyes version: 3.5.0-1

Debug Log
safeeyes.log

Configuration
safeeyes.json

Screenshots

Troubleshooting info
After editing /usr/lib/python3.14/site-packages/safeeyes/plugins/smartpause/ext_idle_notify.py

--- from pywayland.protocol.wayland.wl_seat import WlSeat
+++ from pywayland.protocol.wayland import WlSeat

the application started working as expected.

$ pacman -Qi python-pywayland
Installed From  : cachyos-extra-v3
Name            : python-pywayland
Version         : 0.4.19-1.1

$ python3 -c 'from pywayland.protocol.wayland.wl_seat import WlSeat'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from pywayland.protocol.wayland.wl_seat import WlSeat
ModuleNotFoundError: No module named 'pywayland.protocol.wayland.wl_seat'; 'pywayland.protocol.wayland' is not a package

$ python3 -c 'from pywayland.protocol.wayland import WlSeat; print(WlSeat)'
<class 'pywayland.protocol.wayland.WlSeat'>

Activity

  1. Lupccs commented on Sep 5, 2026

    @Lupccs

    It also fails to launch a pause, if I force it.

    Environment

    SafeEyes (AUR safeeyes package, Arch/CachyOS)
    Python 3.14
    python-pywayland 0.4.19-1.1
    KDE Plasma on Wayland

    Problem
    SafeEyes crashes on startup during plugin_manager.start() while loading the smartpause plugin:

    File ".../safeeyes/plugins/smartpause/ext_idle_notify.py", line 29, in
    from pywayland.protocol.wayland.wl_seat import WlSeat
    ModuleNotFoundError: No module named 'pywayland.protocol.wayland.wl_seat'; 'pywayland.protocol.wayland' is not a package

    Because this exception is unhandled, it propagates up through do_startup and the whole application fails to initialize — not just the smartpause feature. Breaks never fire, including forced breaks (safeeyes -t).

    Root cause
    Recent pywayland releases (confirmed with 0.4.19, built Aug 2025) changed how generated protocol code is laid out: instead of a subpackage per protocol with a submodule per interface (pywayland/protocol/wayland/wl_seat.py), each protocol is now a single flat module containing all its interface classes directly (pywayland/protocol/wayland.py, containing class WlSeat). The old nested import path no longer exists.

    Fix
    In safeeyes/plugins/smartpause/ext_idle_notify.py, change:

    python
    from pywayland.protocol.wayland.wl_seat import WlSeat

    to:

    python
    from pywayland.protocol.wayland import WlSeat

    This matches the current pywayland API and resolves the crash. Ideally this import should also be wrapped in a try/except (similar to the existing handling for ext_idle_notify_v1) so that a future pywayland/idle-notify API change degrades smartpause gracefully instead of blocking the entire app from starting.

  2. archisman-panigrahi commented on Sep 5, 2026

    @archisman-panigrahi
    Collaborator

    Fix In safeeyes/plugins/smartpause/ext_idle_notify.py, change:

    python from pywayland.protocol.wayland.wl_seat import WlSeat

    to:

    python from pywayland.protocol.wayland import WlSeat

    @0x09AF Can you please check whether this fixes the issue?

  3. 0x09AF commented on Sep 5, 2026

    @0x09AF
    Author

    @archisman-panigrahi Yes, it does. I also described the fix in my first post as well.

  4. added a commit that references this issue on Sep 5, 2026
    b05fa39
  5. added a commit that references this issue on Sep 5, 2026
    908ab20
  6. archisman-panigrahi commented on Sep 5, 2026

    @archisman-panigrahi
    Collaborator

    @0x09AF Sorry, I did not notice your patch before.
    I just released a new version with this patch.

    Thank you @0x09AF and @Lupccs

  7. added a commit that references this issue on Oct 6, 2026
  8. added a commit that references this issue on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions