device_monitor: handle suspend/resume via logind PrepareForSleep#86
device_monitor: handle suspend/resume via logind PrepareForSleep#86borkra wants to merge 1 commit into
Conversation
Solves the problem of of USB serial re-enumerating to a different device on resume, this caused by gtkterm holding old device Subscribe to the systemd-logind PrepareForSleep D-Bus signal so that the serial port is closed cleanly before the system suspends and reopened automatically on resume. Fixes: wvdakker#18 Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
8dc585d to
2568e21
Compare
|
Thanks. Does this also work voor non-systemd systems? I cannot test this. |
|
It should, testing of this kind of tough though. The issue is modern Gnome out-of-the-box requires systemd. Gentoo created some shims to use Gnome without systemd, but I am not sure if anybody using that, even with Gentoo. As such I am not sure what is your target here? Support for some old versions Gnome that could work without systemd? Full Gentoo support? |
|
Forgot to mention, the notification software listening to, is provided by systemd-logind or elogind for sysv cases. |
|
@wvdakker on gtk 4.10 pull, I added docker container that allows testing no systemd case. It works fine. BTW, new baud rate logic does not work quite right in old glibc new kernel case I had to fix it over there |
Solves the problem of of USB serial re-enumerating to a different device on resume, this caused by gtkterm holding old device
Subscribe to the systemd-logind PrepareForSleep D-Bus signal so that the serial port is closed cleanly before the system suspends and reopened automatically on resume.
Fixes: #18