JSubelj / g910-gkey-macro-support

GKey support for Logitech G910 Keyboard on Linux
GNU General Public License v3.0
99 stars 29 forks source link

System Service crashes while booting ... #77

Closed schoenid closed 1 month ago

schoenid commented 1 year ago

Describe the bug If the service gets started with: systemctl start g910-gkeys, then it's working. If the service is enabled with: systemctl enable --now g910-gkeys, then nothing happens after login. systemctl status g910-gkeys reports, that the service was haltet wit core dumped ... whatever this means, it's crashed.

With: systemctl start g910-gkeys, the service starts normally and it's working fine.

To Reproduce Steps to reproduce the behavior:

  1. Install OS freshly
  2. Install the service
  3. Look, what happen's ...

Expected behavior Setup, reboot, working.

Additional info Workaround: I've added some further parameters to g910-gkeys.service ... now it's working rock stable.

[Unit]
Description=Support for Logitech g910 keyboard gkeys
Documentation=https://github.com/JSubelj/g910-gkey-macro-support/wiki

Wants=network.target
After=syslog.target network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/env g910-gkeys
TimeoutStopSec=5
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Maybe this could be added to the package too? The Issue could then be closed.

Desktop (please complete the following information):

Betriebssystem: Ubuntu Studio 22.04
KDE-Plasma-Version: 5.24.7
KDE-Frameworks-Version: 5.92.0
Qt-Version: 5.15.3
Kernel-Version: 5.15.0-69-lowlatency (64-bit)
Grafik-Plattform: X11
Prozessoren: 16 × 13th Gen Intel® Core™ i7-13700K
Speicher: 62.6 GiB Arbeitsspeicher
Grafikprozessor: llvmpipe
Keyboard: Logitech G910 Spectrum

Additional context There were some python warnings (deprecated ...), while installing ... but it's working anyway ... g910-led works fine, but I have to press M1 (or any other M#) to activate the LED on it.

Thanks Thank you for this service :) , it's great !!! Now even my multimedia keys are working, which was not the case before :))

suabo commented 1 year ago

Thank you for the contribution. I'll add the lines to the g910-gkeys.service file in the next release.

There were some python warnings (deprecated ...), while installing ... but it's working anyway ... g910-led works fine, but I have to press M1 (or any other M#) to activate the LED on it.

I removed the integration of g910-led and added the signals for activating the leds on the memory keys, so it'll work for everyone.

Hope I'll find some time soon to get the next release out. There are a lot of improvments in terms of performance and usb device handling. So be sure to watch out for the update.

suabo commented 10 months ago

I already upped the timeout and added the two lines for restart in the dev branch. These changes will be added in v0.3.1.

I checked the added lines and can't see any reason why it would be necessary to add these lines:

Wants=network.target
After=syslog.target network-online.target

The service is in no need of the network and the syslog is socket-activated.