View previous topic :: View next topic |
Author |
Message |
drbrezner n00b
Joined: 21 May 2016 Posts: 25 Location: Germany
|
Posted: Sun Aug 25, 2024 6:10 am Post subject: [SOLVED] Sound/Pipewire/systemctl problem |
|
|
hi!
i installed a new gentoo system and now i'm trying to setup sound according to the gentoo pipewire wiki. as root i have sound (except for firefox-bin but that's probably a different topic...).
when i try to configure my standard user by
Code: |
systemctl --user disable --now pulseaudio.socket pulseaudio.service
systemctl --user enable --now pipewire-pulse.socket wireplumber.service
systemctl --user enable --now pipewire.service
systemctl status pipewire.service
|
i get
Code: |
Failed to disable unit: Process org.freedesktop.systemd1 exited with status 1
Failed to enable unit: Process org.freedesktop.systemd1 exited with status 1
Failed to enable unit: Process org.freedesktop.systemd1 exited with status 1
Unit pipewire.service could not be found.
|
so, my user has somehow not enough rights to perform the systemctl commands.
what might i have missed? any group, my user needs to be part of? any systemd-setting activating multi-user...?
thanks a lot in advance!
Last edited by drbrezner on Wed Aug 28, 2024 6:11 pm; edited 1 time in total |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 497
|
Posted: Sun Aug 25, 2024 9:01 am Post subject: |
|
|
Why are you using Code: | systemctl status pipewire.service | and not Code: | systemctl --user status pipewire.service | ?
And for what needs the user "root" any sound? |
|
Back to top |
|
|
drbrezner n00b
Joined: 21 May 2016 Posts: 25 Location: Germany
|
Posted: Sun Aug 25, 2024 11:43 am Post subject: |
|
|
you are right, the --user is missing on the last command, however that doesn't change anything:
Code: |
systemctl --user disable --now pulseaudio.socket pulseaudio.service
systemctl --user enable --now pipewire-pulse.socket wireplumber.service
systemctl --user enable --now pipewire.service
systemctl --user status pipewire.service
|
yields executed as my standard (=non-root) user:
Code: |
Failed to disable unit: Process org.freedesktop.systemd1 exited with status 1
Failed to enable unit: Process org.freedesktop.systemd1 exited with status 1
Failed to enable unit: Process org.freedesktop.systemd1 exited with status 1
Failed to get properties: Process org.freedesktop.systemd1 exited with status 1
|
and you are also perfectly right, root does not need sound. i am trying to activate sound for my standard user. yet, it seems i am missing sth since the systemctl commands do not succeed but exit with code 1.
what am I doing wrong? what further information should i provide to solve this? |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 497
|
Posted: Sun Aug 25, 2024 4:37 pm Post subject: |
|
|
Do you have the USE=dbus flag set?
As normal user Code: | emerge --pretend --verbose media-video/pipewire
echo $DBUS_SESSION_BUS_ADDRESS | ? |
|
Back to top |
|
|
drbrezner n00b
Joined: 21 May 2016 Posts: 25 Location: Germany
|
Posted: Sun Aug 25, 2024 5:55 pm Post subject: |
|
|
Yes, dbus USE-flag is set.
Code: | root ~ # emerge --pretend --verbose media-video/pipewire
Local copy of remote index is up-to-date and will be used.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 1.06 s (backtrack: 0/20).
[ebuild R ] media-video/pipewire-1.0.7-r1:0/0.4::gentoo USE="X bluetooth dbus echo-cancel extra pipewire-alsa readline sound-server ssl systemd -doc -ffmpeg -flatpak -gsettings -gstreamer -ieee1394 -jack-client -jack-sdk -liblc3 -lv2 -man -modemmanager -roc (-selinux) (-system-service) -test -v4l -zeroconf" ABI_X86="(64) -32 (-x32)" 1.692 KiB
|
the output of the other command is:
Code: | root ~ # echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/tmp/dbus-HiJix3yFuV,guid=188a79264abba1f9e4ce3dfe66cb17a2 |
Code: | user ~ $ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/tmp/dbus-HiJix3yFuV,guid=188a79264abba1f9e4ce3dfe66cb17a2 |
|
|
Back to top |
|
|
drbrezner n00b
Joined: 21 May 2016 Posts: 25 Location: Germany
|
Posted: Sun Aug 25, 2024 6:45 pm Post subject: |
|
|
I just made another observation:
Code: | user ~ $ shutdown -h now
Call to PowerOff failed: Interactive authentication required.
user ~ 1 $ |
Usually, I can shutdown the computer as user. |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 497
|
Posted: Mon Aug 26, 2024 3:16 pm Post subject: |
|
|
In my opinion (I may be wrong): Your DBUS_SESSION_BUS_ADDRESS variable looks strange. Do you execute the dbus-launch command manually or in a script?
I would expect a value like "unix:path=/run/user/1000/bus" where the part "1000" is the same as "id -u" (the user id). But my expectations may be wrong.
Regarding the shutdown problem: This might be related to your PolicyKit configuration. |
|
Back to top |
|
|
drbrezner n00b
Joined: 21 May 2016 Posts: 25 Location: Germany
|
Posted: Mon Aug 26, 2024 5:40 pm Post subject: |
|
|
Dbus is launched during the boot process by systemd using the out of the box implementation and configuration, which I do not have modified.
I also think that somehow my standard user does not have the usual permissions compared to my former gentoo installations.
The shutdown problem seems not so much a surprise anymore regarding that
Code: | root /sbin # l | grep shutdown
lrwxrwxrwx 1 root root 9 18. Aug 14:57 shutdown -> systemctl*
root /sbin # |
I also compared the groups my former standard users where members of with no differences.
What could be wrong with PolicyKit? I never configured it or worked with it consciously.
Another strange effect: my standard user has ctrl+alt+backspace disabled, i.e. that combination does not restart my Xorg server. |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 424
|
Posted: Mon Aug 26, 2024 6:35 pm Post subject: |
|
|
https://bugs.gentoo.org/934314
Per this (possibly unrelated) bug report, maybe try downgrading from version sys-auth/polkit-124-r1 to version sys-auth/polkit-123 (if that applies to you)? Both are available. |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 459 Location: Naarm/Melbourne, Australia
|
Posted: Wed Aug 28, 2024 12:39 am Post subject: |
|
|
drbrezner wrote: | Dbus is launched during the boot process by systemd using the out of the box implementation and configuration, which I do not have modified. |
The `dbus` service launches the system bus. This is not the same as a D-Bus session bus. This is a frequent point of misunderstanding, which is why i added the following to the 'D-Bus' page on the wiki:
Quote: | There are two distinct D-Bus buses: the system bus and the session bus. The system bus is for messages related to the system as a whole, e.g. hardware connects and disconnects. The session bus, on the other hand, is for messages related to a specific user session, e.g. an X or Wayland session. The dbus service provided by OpenRC and systemd only provides the system bus, not a session bus. |
A D-Bus session bus can be started in multiple ways, e.g. via dbus-daemon(1) (which, in my setup, i call from my ~/.zlogin script), dbus-run-session(1) or dbus-launch(1). Some GUIs will take care of this for you; for others, such as window managers like Sway, one needs manually specify that a session bus needs to created, by starting the WM via the session bus creation command (e.g. `dbus-run-session sway`).
sMueggli wrote: | I would expect a value like "unix:path=/run/user/1000/bus" where the part "1000" is the same as "id -u" (the user id). But my expectations may be wrong. |
Indeed, the value described by drbrezner looks fine, and is a standard style of value. For example, my current DBUS_SESSION_BUS_ADDRESS is:
Code: | unix:path=/tmp/dbus-S8bVC2lyFo,guid=34199760089bcce9e45faf7566cb0dd1 |
|
|
Back to top |
|
|
drbrezner n00b
Joined: 21 May 2016 Posts: 25 Location: Germany
|
Posted: Wed Aug 28, 2024 6:11 pm Post subject: |
|
|
rab0171610 wrote: | https://bugs.gentoo.org/934314
Per this (possibly unrelated) bug report, maybe try downgrading from version sys-auth/polkit-124-r1 to version sys-auth/polkit-123 (if that applies to you)? Both are available. |
That was the problem! Thanks a lot for pointing that out. Now the "systemct --user ..." stuff works without error. Thanks a lot! |
|
Back to top |
|
|
|