Skip to content

device_monitor: handle suspend/resume via logind PrepareForSleep#86

Open
borkra wants to merge 1 commit into
wvdakker:masterfrom
borkra:suspend-resume-reconnect
Open

device_monitor: handle suspend/resume via logind PrepareForSleep#86
borkra wants to merge 1 commit into
wvdakker:masterfrom
borkra:suspend-resume-reconnect

Conversation

@borkra

@borkra borkra commented Apr 5, 2026

Copy link
Copy Markdown

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

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>
@borkra borkra force-pushed the suspend-resume-reconnect branch from 8dc585d to 2568e21 Compare April 6, 2026 11:52
@wvdakker

wvdakker commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Thanks. Does this also work voor non-systemd systems? I cannot test this.

@borkra

borkra commented Jun 5, 2026

Copy link
Copy Markdown
Author

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?

@borkra

borkra commented Jun 8, 2026

Copy link
Copy Markdown
Author

Forgot to mention, the notification software listening to, is provided by systemd-logind or elogind for sysv cases.

@borkra

borkra commented Jun 17, 2026

Copy link
Copy Markdown
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

device monitoring not working when host goes to sleep

2 participants