Dids / klipper-priority-fix

A simple but hacky workaround for raising Klipper service priorities on lower end SBCs like BTT-CB1, to avoid timeouts and failed prints.
MIT License
10 stars 1 forks source link

renice: failed to set priority for 48687 (process ID): Permission denied #1

Open sjqlwy opened 1 year ago

sjqlwy commented 1 year ago

Ubuntu 22.04 jammy, in my situaition, I commeted User=pi Group=pi to make it work, is there any more elegant method?

sjqlwy commented 1 year ago

https://github.com/Dids/klipper-priority-fix/blob/648deea17eac77414cb5b7606ae20fdbe37716e3/klipper-priority-fix.py#L19C9-L19C9, maybe the reason is sudo not work in systemd service ?

cmd = f"renice -n {KLIPPY_NICE_VALUE} -p {pid} || sudo renice -n {KLIPPY_NICE_VALUE} -p {pid}"