View previous topic :: View next topic |
Author |
Message |
finoderi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Oct 2021 Posts: 52
|
Posted: Mon Sep 25, 2023 4:26 am Post subject: Bizarre dbus setting for power-profiles-daemon |
|
|
Some time ago I've noticed that dbus tries to launch power-profiles-daemon when system starts and fails every time. Finally I decided to figure out what's going on and found what looks like some off coloured joke.
There is a file called 'net.hadess.PowerProfiles.service' in /usr/share/dbus-1/system-services with the following content:
Code: | [D-BUS Service]
Name=net.hadess.PowerProfiles
Exec=/bin/false
User=root
SystemdService=power-profiles-daemon.service |
No wander it fails to launch every time. If '/bin/false' is replaced with an actual address (Exec=/usr/libexec/power-profiles-daemon), the service is successfully launched by dbus.
I have two questions: why on Earth dbus even tries to launch this service by default and why its config leads to nowhere?
Apparently those who want this service running at login can add it to the default run level or launch it as usual (with rc-service power-profiles-daemon start). Why start it through dbus and condition it to fail? Should it be fixed? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Banana Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
![](images/avatars/5204386264b863c6da7ffb.jpg)
Joined: 21 May 2004 Posts: 1618 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Goverp Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/152613747847c6fd276c31a.jpg)
Joined: 07 Mar 2007 Posts: 2106
|
Posted: Mon Sep 25, 2023 8:21 am Post subject: |
|
|
Interesting. On my OpenRc system the power-profiles-daemon starts without problem
IIUC, the /usr/share/dbus-1/system-service/net.hadess.PowerProfiles.service is a SystemD default configuration to disable the service, which would usually be overwritten by a file somewhere in /etc/systemd/ that would run the executable. AFAICT, if you're running OpenRc, that file is irrelevant, and it's the /etc/init.d/power-profiles-daemon file that starts the service, provided you added it to the default runlevel as documented in the ebuild. _________________ Greybeard |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GDH-gentoo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/4552800915d460a483ae8d.jpg)
Joined: 20 Jul 2019 Posts: 1606 Location: South America
|
Posted: Mon Sep 25, 2023 12:24 pm Post subject: Re: Bizarre dbus setting for power-profiles-daemon |
|
|
finoderi wrote: | why on Earth dbus even tries to launch this service by default and why its config leads to nowhere? |
Because upstream doesn't seemingly care (or know) about anything that isn't systemd. dbus-daemon doesn't launch it by default. It launches it when someone wants to send a message to well-known bus name net.hadess.PowerProfiles, and, with systemd, this line is what actually starts the daemon:
Code: | SystemdService=power-profiles-daemon.service |
Exec= is ignored. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer ![Smile :)](images/smiles/icon_smile.gif) |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though ![Smile :)](images/smiles/icon_smile.gif) |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
finoderi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Oct 2021 Posts: 52
|
Posted: Mon Sep 25, 2023 12:57 pm Post subject: |
|
|
Thanks to everybody for clarification.
So if someone doesn't use systemd and doesn't need this service, it will fail every time the system boots just because... why not? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GDH-gentoo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/4552800915d460a483ae8d.jpg)
Joined: 20 Jul 2019 Posts: 1606 Location: South America
|
Posted: Mon Sep 25, 2023 1:08 pm Post subject: |
|
|
finoderi wrote: | So if someone doesn't use systemd and doesn't need this service, it will fail every time the system boots just because... why not? |
If dbus-daemon started the daemon, it is because some process tried to communicate with it, so I would call the "doesn't need this service" into question... _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer ![Smile :)](images/smiles/icon_smile.gif) |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though ![Smile :)](images/smiles/icon_smile.gif) |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
finoderi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Oct 2021 Posts: 52
|
Posted: Mon Sep 25, 2023 1:22 pm Post subject: |
|
|
GDH-gentoo wrote: | If dbus-daemon started the daemon, it is because some process tried to communicate with it, so I would call the "doesn't need this service" into question... |
I see. I use KDE and dbus-daemon tries to launch power-profiles-daemon even when 'Power management profile' isn't checked in KDE's System Settings. And I haven't found any other setting related to it. Could it be a KDE bug? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Goverp Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/152613747847c6fd276c31a.jpg)
Joined: 07 Mar 2007 Posts: 2106
|
Posted: Fri Sep 29, 2023 5:26 pm Post subject: |
|
|
finoderi wrote: | Thanks to everybody for clarification.
So if someone doesn't use systemd and doesn't need this service, it will fail every time the system boots just because... why not? |
When I installed power-profiles-daemon the emerge log included some instructions. From the ebuild:
Code: | if [[ -z "${REPLACING_VERSIONS}" ]]; then
if systemd_is_booted; then
elog "You need to enable the service:"
elog "# systemctl enable ${PN}"
else
elog "# rc-update add ${PN} default"
fi
fi
|
so it should be in the default runlevel. On my system its status is "started". Whether it's doing anything is a different question ![Smile :-)](images/smiles/icon_smile.gif) _________________ Greybeard |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3345 Location: Canada
|
Posted: Sat Jul 20, 2024 7:13 am Post subject: |
|
|
Goverp wrote: | finoderi wrote: | Thanks to everybody for clarification.
So if someone doesn't use systemd and doesn't need this service, it will fail every time the system boots just because... why not? |
When I installed power-profiles-daemon the emerge log included some instructions. From the ebuild:
Code: | if [[ -z "${REPLACING_VERSIONS}" ]]; then
if systemd_is_booted; then
elog "You need to enable the service:"
elog "# systemctl enable ${PN}"
else
elog "# rc-update add ${PN} default"
fi
fi
|
so it should be in the default runlevel. On my system its status is "started". Whether it's doing anything is a different question ![Smile :-)](images/smiles/icon_smile.gif) |
On my Openrc KDE laptop with power management, power-profiles-daemon after installation is not in any rc levels, and is not started |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
finoderi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Oct 2021 Posts: 52
|
Posted: Sat Jul 20, 2024 12:24 pm Post subject: |
|
|
dmpogo wrote: | On my Openrc KDE laptop with power management, power-profiles-daemon after installation is not in any rc levels, and is not started |
It's not started but it still tries to start and fails with an error:
Code: | [dbus-daemon] [system] Activated service 'net.hadess.PowerProfiles' failed: Launch helper exited with unknown return code 1 |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|