Hypridle segfaults on startup due to libsdbus-c++.so.2 (I'm having exact same issue in CachyOS)

This issue was logged yesterday with hyprwm. Evidently it results from the ArchLinux update of the sdbus-cpp 2.3.0-1 package yesterday.

Is there something CachyOS can do to recompile hypridle with the older sdbus-cpp, or must we wait for ArchLinux to downstream the fix.

Within the GitHub discussion, users are recompiling hypridle themselves, but I’m new to CachyOS and have never done this before.

Apologies for not including log files. I thought it to be redundant given that the GitHub posting is exactly what I’m experiencing since yesterday.

Kind regards,
Impeccable Tuna

Here’s my journalctl dump which matches the reported issue on GitHub:
May 19 15:05:52 cachyb16 hypridle[111457]: [LOG] wayland done, registering dbus
May 19 15:05:52 cachyb16 hypridle[111457]: [LOG] Sleep inhibition enabled - inhibiting until the wayland session gets locked
May 19 15:05:52 cachyb16 systemd-coredump[111459]: Process 111457 (hypridle) of user 1000 dumped core.

                                               Stack trace of thread 111457:
                                               #0  0x00007f662bb570a5 _ZN5sdbus8internal5Proxy21registerSignalHandlerERKNS_13InterfaceNameERKNS_10MemberNameESt8functionIFvNS_6SignalEEE (libsdbus-c++.so.2 + 0x3b0a5)
                                               #1  0x000055c3189eb701 n/a (/usr/bin/hypridle + 0x24701)
                                               #2  0x000055c3189f4c9f n/a (/usr/bin/hypridle + 0x2dc9f)
                                               #3  0x000055c3189d4340 n/a (/usr/bin/hypridle + 0xd340)
                                               #4  0x00007f662b227c8e n/a (libc.so.6 + 0x27c8e)
                                               #5  0x00007f662b227dcb __libc_start_main (libc.so.6 + 0x27dcb)
                                               #6  0x000055c3189d57a5 n/a (/usr/bin/hypridle + 0xe7a5)
                                               ELF object binary architecture: AMD x86-64

May 19 15:05:52 cachyb16 systemd[4004]: hypridle.service: Main process exited, code=dumped, status=11/SEGV
May 19 15:05:52 cachyb16 systemd[4004]: hypridle.service: Failed with result ‘core-dump’.

I’ve heard that the ArchLinux community expects a fix by later today.

I’ve figured out how to re-compile hypridle on my own fixing the issue whilst waiting for the official fixed binary.
With a working system snapshot to restore my system config if it all went horribly wrong, I did the following:
sudo pacman -S hyprland-protocols

sudo pacman -S cmake

git clone https://github.com/hyprwm/hypridle.git\ncd hypridle

cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr

cmake –build build –config Release -j$(nproc)

sudo cmake –install build

sudo reboot now

After the reboot, screen locking is again working in Hyprland. :+1:
This is the first time I’ve ever built from source to fix an issue. Very cool.
I’ll remove my manually built binary as soon as I see the official ArchLinux binary published to the repos.

Linux is my new favourite toy! :slightly_smiling_face:

Several people have offered more concise commands and approaches to recompiling hypridle at the original GitHub posting of the bug at hypridle segfaults on startup · Issue #200 · hyprwm/hypridle · GitHub than the commands I shared above.

And apparently, this is the proper way to do it:

The developer has released the fixed version 30 minutes ago. I imagine the updated code will find its way into the ArchLinux repos shortly.