Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: jgalec on 05 November 2021, 18:14:33

Title: system76-power.service with runit
Post by: jgalec on 05 November 2021, 18:14:33
Hello there!  In my previous Arch installation I used to use system76-power for managing graphics and power profiles in my system (AMD Radeon RX Vega 10 as iGPU and NVIDIA GeForce GTX 1650 as dGPU), which worked perfectly.

The thing is, I recently switched to Artix (loved it so far) to get away from systemd, and I'm new to the runit init system, but when using systemd, system76-power used to run through systemctl enable --now system76-power.service, and I want to continue using this utility.

How can I make it work with runit?

Thanks! And apologies if the question sounds dumb.
Title: Re: system76-power.service with runit
Post by: Arch_user on 05 November 2021, 18:18:58
Provide content of system76-power.service
Title: Re: system76-power.service with runit
Post by: jgalec on 05 November 2021, 18:24:10
Of course!

Code: [Select]
[Unit]
Description=System76 Power Daemon

[Service]
ExecStart=/usr/bin/system76-power daemon
Restart=on-failure
Type=dbus
BusName=com.system76.PowerDaemon

[Install]
WantedBy=multi-user.target

Source: https://github.com/pop-os/system76-power/blob/master/debian/system76-power.service
Title: Re: system76-power.service with runit
Post by: Arch_user on 05 November 2021, 18:37:34
Put following content in  /etc/runit/sv/system76-power/run and start service
Code: [Select]
#!/bin/sh
exec /usr/bin/system76-power daemon

I hope it will work fine , but not sure
Title: Re: system76-power.service with runit
Post by: jgalec on 05 November 2021, 20:31:25
Doesn't seem to work :c

(https://i.imgur.com/hjm6qI2.png)
Title: Re: system76-power.service with runit
Post by: jgalec on 05 November 2021, 20:42:40
nvm, I forgot to give execution rights to run, and according to sv status system76-power it's working, but when running system76-power graphics hybrid it throws an error

(https://i.imgur.com/guOqCGu.png)
Title: Re: system76-power.service with runit
Post by: ndowens on 05 November 2021, 21:16:26
Looks like the app/script would have to be patched to remove systemd stuff before you could use it