Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888199 - sys-power/switcheroo-control support elogind
Summary: sys-power/switcheroo-control support elogind
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: NeedPatch, PullRequest
Depends on:
Blocks:
 
Reported: 2022-12-24 21:01 UTC by Jan Henke
Modified: 2023-08-18 08:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Henke 2022-12-24 21:01:22 UTC
sys-power/switcheroo-control currently has a hard dependency on Systemd. It would be very useful to be able to use this package with elogind as well. Would it be possible to support either elogind or systemd for this package?
Comment 1 Pacho Ramos gentoo-dev 2022-12-25 09:25:54 UTC
Has anyone tested it on a non-systemd setup? Supposedly it only works with systemd
Comment 2 Jan Henke 2022-12-28 21:42:51 UTC
It seems I was not the only one to wonder about using it without systemd. While patching the ebuild to make it work without Systemd, I found a forum post which already included everything needed:

https://forums.gentoo.org/viewtopic-p-8738677.html?sid=e6c42817200127ce40e9e6d6b33a75b9

I have tested the ebuild with these modifications on a system with two GPUs and it works.

I have opened a PR on github with a -r1 of the current ebuild with the required modifications.
Comment 3 Larry the Git Cow gentoo-dev 2022-12-29 10:44:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05c2d14051f6814adc367615b155dd58c46fcc36

commit 05c2d14051f6814adc367615b155dd58c46fcc36
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2022-12-29 10:40:10 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2022-12-29 10:44:25 +0000

    sys-power/switcheroo-control: Support openRC too
    
    It seems switcheroo-control can also run on openRC systems with an init.d
    service. Install service files for both unconditionally following current
    policy of not relying on USE flags to control single-files installation.
    
    Thanks-to: Jan Henke
    Thanks-to: GDH-gentoo
    Thanks-to: fedeliallalinea
    Closes: https://bugs.gentoo.org/888199
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 .../files/switcheroo-control-init.d                | 12 +++++
 .../switcheroo-control-2.6-r1.ebuild               | 63 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2023-08-18 08:26:02 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=960c84be96d5478975a5b560ba81b171036f7b26

commit 960c84be96d5478975a5b560ba81b171036f7b26
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-08-18 08:07:12 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-08-18 08:25:53 +0000

    profiles: musl: Drop sys-power/switcheroo-control package.mask
    
    Bug: https://bugs.gentoo.org/888199
    Bug: https://bugs.gentoo.org/911784
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 profiles/features/musl/package.mask | 1 -
 1 file changed, 1 deletion(-)