I had two services pointing to SH and BASH in /bin directory but those are at /usr/bin. Fixed it. Need some advice on which should I use SH or BASH for these scripts. I’m having fail errors.
The curious thing is that I wasn’t getting screen tearing so I wonder if that was fixed and maybe I don’t need the GPU-FIX service anymore. Or was it running anyways?
Can anyone tell me what’s wrong? And where do I look for logs to confirm I’m still failing after I tried to fix it.
Yeah the scripts were executables but the services weren’t and I check and the others were. So I set mine with chmod +x. The GPU service was running after that but I’ve been changing the led fix from plain led-fix to led-fix.sh and back an forth. Disabling and enabling the service to make it catch the executable because it was complaining not found with systemctl status led-fix.service
So I moved it to the name it was looking for and that was it.
The GPU service can be onshot but maybe I should make the Leds service like this:
[Unit]
Description=<description about this service>
[Service]
ExecStart=<script which needs to be executed>
Restart=always
[Install]
WantedBy=multi-user.target
Led-fix service failed again, I think I need to use autostart. I’m on KDE, should I run it a startup or before sessions startup if I want it to light up for login?
● led-fix.service - Logitech led startup
Loaded: loaded (/etc/systemd/system/led-fix.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-10-11 06:22:04 AST; 4min 32s ago
Process: 626 ExecStart=/usr/bin/led-fix (code=exited, status=2)
Main PID: 626 (code=exited, status=2)
Oct 11 06:22:04 localhost systemd[1]: Starting Logitech led startup...
Oct 11 06:22:04 localhost led-fix[638]: Matching or compatible device not found !
Oct 11 06:22:04 localhost systemd[1]: led-fix.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 11 06:22:04 localhost systemd[1]: led-fix.service: Failed with result 'exit-code'.
Oct 11 06:22:04 localhost systemd[1]: Failed to start Logitech led startup.
Looks like an error message from either g213-led or g203-led in that script:
g213-led -fx cycle all 20000ms && sudo g203-led cycle 20000
If those commands work despite the service failing it might be a race condition.
Waiting some time before issuing the commands can be a viable workaround in such cases: