A possible workaround is to add a service to the systemd sleep.target
, this would be similar to the 'lock on suspend' workaround from: How to lock screen on suspend? - #13 by moocan. Instead of locking stuff, we use DBUS to tell Onboard to show up.
The wake-up command is here: onboard/DBUS.md at main · dr-ni/onboard · GitHub
So, roughly speaking (I haven't tested any of this) you could create a file like /etc/systemd/system/wakeup-onboard-on-suspend.service
[Unit]
Description="Wake up that Onboard keyboard before suspend"
Before=sleep.target
[Service]
Type=oneshot
User=root
ExecStartPre=/usr/bin/logger --tag 'loginctl' --priority auth.info 'Sending wakeup to Onboard keyboard'
ExecStart=dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show
StandardOutput=journal
[Install]
WantedBy=sleep.target
Then systemd enable wakeup-onboard-on-suspend.service
should do the trick to get the service going.
If you can get something like that working, then you can always expand on it to make it more user-friendly (i.e. you could write a more sophisticated script that remembers the status of Onboard prior to sleep, and restore it, etc).