optimus-manager icon indicating copy to clipboard operation
optimus-manager copied to clipboard

Would you support OpenRC ?

Open galaxy001 opened this issue 5 years ago • 12 comments

I find this tool use org.freedesktop.systemd1, which makes it not working under Artix Linux.

Would you consider support OpenRC ?

galaxy001 avatar Jul 20 '19 13:07 galaxy001

optimus-manager relies on Systemd because it needs an init system to hook itself into. It would probably be possible to adapt it for OpenRC (assuming it provides the features I need) but I have zero experience using it.

So it's on the TODO list I guess, but to be honest I'll probably focus on making optimus-manager compatible with more popular distros first (like Fedora).

Askannz avatar Jul 21 '19 08:07 Askannz

@Askannz Playing around with "optimus-manager" in "Gentoo" I find out that I can run it quite easily with OpenRC. I just need return True from "_is_service_active_dbus" here - https://github.com/Askannz/optimus-manager/blob/master/optimus_manager/checks.py

Returning "True" of course isn't an actual solution, it's more a hack to see if changing only this place is enough. But everything seems working. I can create a proper patch with check if the daemon is active.

Do you see any other places in code that could break due to the absence of systemd?

p.s. I also had to create openRC starting script similar to "optimus-manager.service" but it didn't require me to change any code of "optimus-manager" itself.

anlorn avatar May 09 '20 00:05 anlorn

@anlorn Did you get it working without major issues? I will like to use it for openRC, can you upload the changes you did?

ghost avatar May 31 '20 13:05 ghost

@Diago87 I was using it for a while, didn't encounter any issues.

Mostly I was using version 1.2.2, but a ~week ago I switched to using HEAD of the repository.

I just prepared and created a PR to add openRC support - https://github.com/Askannz/optimus-manager/pull/282

p.s. Please be aware, that if you are using gentoo, for now you should take ebuilds from my local fork(you can find details in the PR description).

anlorn avatar Jul 04 '20 04:07 anlorn

In Gentoo, when I am running rc-service optimus-manager start I am getting this error:

tart-stop-daemon: user `/usr/bin/optimus-manager-daemon' not found

please help/

snekiepete avatar Aug 29 '20 03:08 snekiepete

For running optimus-manager on Artix, use this package from AUR: https://aur.archlinux.org/packages/optimus-manager-openrc-git/

xmine64 avatar Feb 25 '21 14:02 xmine64

For running optimus-manager on Artix, use this package from AUR: https://aur.archlinux.org/packages/optimus-manager-openrc-git/

There is already ones in the official artix universe repository.

karimrir1 avatar Sep 10 '21 18:09 karimrir1

There is already ones in the official artix universe repository.

Yes, I just checked it and it's based on my PKGBUILD.

https://gitea.artixlinux.org/linuxer/Artix-Optimus/src/branch/master/optimus-manager-git/PKGBUILD

xmine64 avatar Sep 28 '21 04:09 xmine64

I have patched it for Artix and the link of the latest PKGBUILD is at https://gitea.artixlinux.org/Universe/optimus-manager-git, cause I moved it to our Universe repo.

Also, all relative services for OpenRC, Runit and s6, are there as separated packages (the Artix way)

linuxergr avatar Sep 28 '21 09:09 linuxergr

I have patched it for Artix and the link of the latest PKGBUILD is at https://gitea.artixlinux.org/Universe/optimus-manager-git, cause I moved it to our Universe repo.

Also, all relative services for OpenRC, Runit and s6, are there as separated packages (the Artix way)

Yes I saw your work. You added support for different service managers and display managers. Your work contains part of mine and I'm excited to see that. I'm not an Artix user anymore but I wrote PKGBUILD for optimus-manager-openrc-git when I had Artix and used it myself. I tried to write service files for runit and s6 just for experiment, but I couldn't do it well. only OpenRC works properly.

xmine64 avatar Sep 29 '21 08:09 xmine64

Yes I saw your work. You added support for different service managers and display managers. Your work contains part of mine and I'm excited to see that. I'm not an Artix user anymore but I wrote PKGBUILD for optimus-manager-openrc-git when I had Artix and used it myself. I tried to write service files for runit and s6 just for experiment, but I couldn't do it well. only OpenRC works properly.

Yup, it was an expected behavior by your package, to work properly with OpenRC, but not possible to work for the rest of the inits. All DMs have to start in their own way for optimus to work, cause are providing the dependencies for the optimus service/init which in their turn starts the daemon, so a total population of 19 packages (including Artix packages specs for inits) and services was created by my side for that, not a real easy stuff.

linuxergr avatar Sep 29 '21 17:09 linuxergr

Yup, it was an expected behavior by your package, to work properly with OpenRC, but not possible to work for the rest of the inits. All DMs have to start in their own way for optimus to work, cause are providing the dependencies for the optimus service/init which in their turn starts the daemon, so a total population of 19 packages (including Artix packages specs for inits) and services was created by my side for that, not a real easy stuff.

Yeah there's a need for that. Good luck btw.

xmine64 avatar Sep 30 '21 11:09 xmine64

Check this fix: https://github.com/Askannz/optimus-manager/pull/427

If not working, reopen.

es20490446e avatar Mar 27 '24 05:03 es20490446e