snyball/hawck

Crash if /dev/input/by-id does not exist

quasisphere opened this issue · 2 comments

Hello,

I tried to run Hawck on Asahi Linux, which is an Arch-based distribution with extra drivers and patches for Apple Silicon macs. For some reason in my case udev does not create the folder /dev/input/by-id that Hawck tries to watch in its hotplug-code, resulting in a crash.

I was able to get Hawck working by commenting out the line
kbman.startHotplugWatcher();
in src/KBDDaemon.cpp but I think it would still be nice to have some proper fix upstream. Perhaps by polling /dev/input/by-path instead (which seems to exist), or just disabling polling if /dev/input/by-id does not exist?

@quasisphere I think it would definitely be reasonable to just not start the hotplug-watcher at all if the --no-hotplug argument is given. Or potentially just making this error non-fatal, and just printing a warning, unless --no-hotplug is given.

Hopefully fixed as of 99f2c9b, unless I just added more bugs :)