hyprwm / hypridle

Hyprland's idle daemon
BSD 3-Clause "New" or "Revised" License
404 stars 25 forks source link

core: move to sdbus-cpp2 #96

Closed vaxerski closed 1 month ago

vaxerski commented 1 month ago

Needs testing

@fufexan ci

VirtCode commented 1 month ago

Things like lock_cmd, before_sleep_cmd and after_sleep_cmd dont seem to work anymore. Probably caused by these error messages which are printed:

...
[LOG] wayland done, registering dbus
[WARN] Couldn't connect to logind service ([org.freedesktop.DBus.Error.ServiceUnknown] The name is not activatable)
[LOG] Using dbus path
[WARN] Couldn't retrieve current systemd inhibits ([org.freedesktop.DBus.Error.ServiceUnknown] The name is not activatable)
[TRACE] [core] got poll event
...

main (for reference):

...
[LOG] wayland done, registering dbus
[LOG] Using dbus path /org/freedesktop/login1/session/_33
[TRACE] [core] got poll event
...

Otherwise listeners and their inhibition seems to work (tested with wayland idle inhibitor)

vaxerski commented 1 month ago

@VirtCode try now

VirtCode commented 1 month ago

The connection seems to do something now:

[LOG] wayland done, registering dbus
[LOG] Using dbus path /org/freedesktop/login1/session/_33

However, the before_sleep commands etc. are still not working. Also, the normal listeners don't seem to work anymore. It's also odd that there are no longer any [TRACE] [core] got poll event printed.

vaxerski commented 1 month ago

piss of shit, I'll fix it later, not at pc rn

vaxerski commented 1 month ago

try now

VirtCode commented 1 month ago

okay great, the lock_cmd etc. work fine now.

However something is broken with dbus inhibits, the locks don't get removed. This is from just pausing and resuming the same video in ff, where as on main it would go from 1 to 0 to 1...:

[LOG] wayland done, registering dbus
[LOG] Using dbus path /org/freedesktop/login1/session/_33
[LOG] ScreenSaver inhibit: true dbus message from  (owner: :1.16) with content video-playing
[LOG] Inhibit locks: 1
[LOG] Cookie 1337 sent
[LOG] ScreenSaver inhibit: true dbus message from  (owner: :1.16) with content video-playing
[LOG] Inhibit locks: 2
[LOG] Cookie 1338 sent
[LOG] ScreenSaver inhibit: true dbus message from  (owner: :1.16) with content video-playing
[LOG] Inhibit locks: 3
[LOG] Cookie 1339 sent
[LOG] ScreenSaver inhibit: true dbus message from  (owner: :1.16) with content video-playing
[LOG] Inhibit locks: 4
[LOG] Cookie 1340 sent
[LOG] ScreenSaver inhibit: true dbus message from  (owner: :1.16) with content video-playing
[LOG] Inhibit locks: 5
[LOG] Cookie 1341 sent
vaxerski commented 1 month ago

@andresilva you committed that feature, any ideas?

vaxerski commented 1 month ago

thanks bae

VirtCode commented 1 month ago

yeah, also saw this yesterday and tried to patch it out locally, but it doesn't fix the issue. Can still reproduce it on 0.1.4.

To me it looks like the second callback (UnInhibit) just never gets called.

vaxerski commented 1 month ago

open a new issue