Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sound/Pipewire/systemctl problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Tue Oct 15, 2024 3:35 pm    Post subject: Sound/Pipewire/systemctl problem Reply with quote

[Administrator note: this post, and only this post, was originally attached to the solved topic [SOLVED] Sound/Pipewire/systemctl problem. -Hu]

I have all of those Problems as well, but the solution does not work for me. Anything else I can do? Thank you in advance.
PS: How did you manage to solve the shutdown and permission problems?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22533

PostPosted: Tue Oct 15, 2024 4:42 pm    Post subject: Reply with quote

Welcome to the forums. If you have the same problem as described in the referenced thread, then the solution described in that thread will work for you. If that solution did not work for you, then either you implemented it incorrectly or you have a different problem.

Generally, you should not reopen a solved thread if you need help with the problem it solved. Instead, you should open a new thread, using the old one as a guide for what information to share. You should describe what steps you have taken to try to solve the problem and what, if any, effect those steps had.
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Tue Oct 15, 2024 6:25 pm    Post subject: Reply with quote

Thank you! I was unsure if I should start a new topic. So I'm on a fresh Gentoo Install (Mate Desktop/systemd) and have all of the Problems that were described in the Other Thread. With my previous Gentoo installation I never had problems with user rights. Like the creator of the other thread, I have problems starting Pipewire for the user with systemctl. I get the error:
Code:
Failed to enable unit: Process org.freedesktop.systemd1 exited with status 1


When I check the status I get:
Code:
Failed to get properties: Process org.freedesktop.systemd1 exited with status 1


In the other Thread the Solution for this Problem was to downgrade to Polkit-123. I tried to do so but it didn't change anything.

I also can't shut down or restart the computer. If I try, I am thrown back into lightdm and have to do it from there.

I have one more problem: In my previous installation external drives could be mounted automatically. now I get an error message that I am not authorized to do so.

The only thing I did differently on this Installation was using Btrfs instead of ext4 and encrypting my drive.

I am Glad for any help. Many Thanks in advance.

Please Note: English is not my Native Language, so If there is anything unclear just ask. :)
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Fri Oct 18, 2024 7:39 pm    Post subject: Reply with quote

Since nobody has replied yet, I assume that nobody knows how to solve the problem. When I installed Gentoo I used this guide for the encryption setup & the Gentoo Handbook for everything else. If there is anything I might have overlooked that could be causing these problems, I would be very grateful for a suggestion.
Back to top
View user's profile Send private message
NeglectedRudderPug
n00b
n00b


Joined: 04 Oct 2023
Posts: 24

PostPosted: Sat Oct 19, 2024 3:55 pm    Post subject: Reply with quote

Interesting.

What user groups is your user in? From your regular user account try the groups command, you should get a similar (but probably not the same) output like this:

Code:
username@host ~ % groups
wheel video libvirt plugdev username


If you're using udisks and polkit for mounting devices, you'll want to be in the plugdev group, without it you'll get the error you described. For shutdown / reboots you may need wheel.

It sounds to me you might have missed the final steps?
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Finalizing
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sat Oct 19, 2024 4:23 pm    Post subject: Reply with quote

Hey,
Thank you for your response!

My user is in the following groups:
Code:
florian@floriangentoo ~ $ groups
wheel video usb users plugdev vboxusers pipewire florian


I have installed acct-group/plugdev very early during the installation, because I wanted to install Network Manager.
I am also in group wheel, because I use sudo.
Back to top
View user's profile Send private message
NeglectedRudderPug
n00b
n00b


Joined: 04 Oct 2023
Posts: 24

PostPosted: Sat Oct 19, 2024 4:44 pm    Post subject: Reply with quote

Hmm. Starting with the basics:

Did you make any changes to the polkit or dbus configuration files? If yes, what did you change?

I assume dbus is running?
Code:

$ echo $DBUS_SESSION_BUS_ADDRESS
unix:[..]


As long as you get something from this, it's running. This should be setup automatically by your desktop environment.

Did you use a desktop profile? Desktop profiles automatically set the "policykit" use flag, but it's possible to not be set if not using a desktop profile.

Check with:
Code:
$ euse -I policykit


You should get a list with installed packages matching the use flag.

If not, edit /etc/portage/make.conf and add "policykit" to your global use flags. And then run "emerge --ask --changed-use --deep @world".
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sat Oct 19, 2024 5:16 pm    Post subject: Reply with quote

No, I didn't change the configuration files.
dbus is running.
Code:

echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/tmp/dbus-11ioavDSkR,guid=6fb06832d6c4e5dd05539eff6713b119

I did chose the "default/linux/amd64/23.0/desktop/systemd (stable)" Profile.

Policykit is set & used.

Custom global USE FLAGS are: "xinerama networkmanager pipewire jack pulseaudio dist-kernel -bluetooth"

Thank you once again for your response
Back to top
View user's profile Send private message
NeglectedRudderPug
n00b
n00b


Joined: 04 Oct 2023
Posts: 24

PostPosted: Sat Oct 19, 2024 7:50 pm    Post subject: Reply with quote

GentooFan2024 wrote:
No, I didn't change the configuration files.
dbus is running.
Code:

echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/tmp/dbus-11ioavDSkR,guid=6fb06832d6c4e5dd05539eff6713b119

I did chose the "default/linux/amd64/23.0/desktop/systemd (stable)" Profile.

Policykit is set & used.

Custom global USE FLAGS are: "xinerama networkmanager pipewire jack pulseaudio dist-kernel -bluetooth"

Thank you once again for your response


That's odd. Why is your dbus path in /tmp? Shouldn't it be in /run/user? Can you use systemctl at all as user?

Try:
Code:
$ systemctl --user status


Does this work?

Also check, as root:
Code:
$ systemctl status user@1000.service
$ journalctl -xru user@1000.service


Replace 1000 with your users id. Any significant errors showing?

Also:
Code:
$ ls -lav /run/user/


This should show a directory with your user id which is owned by your user.
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sat Oct 19, 2024 8:45 pm    Post subject: Reply with quote

Okay, I did all the things you suggested, with very interesting results:

Code:
florian@floriangentoo ~ $ systemctl --user status
Failed to read server status: Process org.freedesktop.systemd1 exited with status 1


In my case the user id was exactly 1000 so I did:
Code:

floriangentoo ~ # systemctl status user@1000.service
○ user@1000.service - User Manager for UID 1000
     Loaded: loaded (/usr/lib/systemd/system/user@.service; static)
    Drop-In: /usr/lib/systemd/system/user@.service.d
             └─10-login-barrier.conf
     Active: inactive (dead)
       Docs: man:user@.service(5)


Out of Interest I tried restarting the server:
Code:
floriangentoo ~ # systemctl restart user@1000.service
Job for user@1000.service failed because the control process exited with error code.
See "systemctl status user@1000.service" and "journalctl -xeu user@1000.service" for details.


I did what the error message suggested:
Code:

floriangentoo ~ # systemctl status user@1000.service
× user@1000.service - User Manager for UID 1000
     Loaded: loaded (/usr/lib/systemd/system/user@.service; static)
    Drop-In: /usr/lib/systemd/system/user@.service.d
             └─10-login-barrier.conf
     Active: failed (Result: exit-code) since Sat 2024-10-19 22:14:37 CEST; 18s ago
       Docs: man:user@.service(5)
    Process: 31699 ExecStart=/usr/lib/systemd/systemd --user (code=exited, status=1/FAILURE)
   Main PID: 31699 (code=exited, status=1/FAILURE)
      Error: 49 (Das Protokoll ist nicht verfügbar)
        CPU: 10ms

Okt 19 22:14:37 floriangentoo systemd[1]: Starting User Manager for UID 1000...
Okt 19 22:14:37 floriangentoo (systemd)[31699]: pam_unix(systemd-user:session): session opened for user florian(uid=1000) by florian(uid=0)
Okt 19 22:14:37 floriangentoo (systemd)[31699]: pam_systemd(systemd-user:session): Failed to get user record: Input/output error
Okt 19 22:14:37 floriangentoo systemd[31699]: Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
Okt 19 22:14:37 floriangentoo (sd-pam)[31701]: pam_unix(systemd-user:session): session closed for user florian
Okt 19 22:14:37 floriangentoo systemd[1]: user@1000.service: Main process exited, code=exited, status=1/FAILURE
Okt 19 22:14:37 floriangentoo systemd[1]: user@1000.service: Failed with result 'exit-code'.
Okt 19 22:14:37 floriangentoo systemd[1]: Failed to start User Manager for UID 1000.

Code:

floriangentoo ~ # journalctl -xeu user@1000.service
Okt 19 22:14:37 floriangentoo systemd[1]: Starting User Manager for UID 1000...
░░ Subject: A start job for unit user@1000.service has begun execution
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ A start job for unit user@1000.service has begun execution.
░░
░░ The job identifier is 2662.
Okt 19 22:14:37 floriangentoo (systemd)[31699]: pam_unix(systemd-user:session): session opened for user florian(uid=1000) by florian(uid=0)
Okt 19 22:14:37 floriangentoo (systemd)[31699]: pam_systemd(systemd-user:session): Failed to get user record: Input/output error
Okt 19 22:14:37 floriangentoo systemd[31699]: Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
Okt 19 22:14:37 floriangentoo (sd-pam)[31701]: pam_unix(systemd-user:session): session closed for user florian
Okt 19 22:14:37 floriangentoo systemd[1]: user@1000.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ An ExecStart= process belonging to unit user@1000.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Okt 19 22:14:37 floriangentoo systemd[1]: user@1000.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ The unit user@1000.service has entered the 'failed' state with result 'exit-code'.
Okt 19 22:14:37 floriangentoo systemd[1]: Failed to start User Manager for UID 1000.
░░ Subject: A start job for unit user@1000.service has failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ A start job for unit user@1000.service has finished with a failure.
░░
░░ The job identifier is 2662 and the job result is failed.


Note: This is a shortened version of the Error message there were many lines with just the "~" character.

Next:
Code:
floriangentoo ~ # journalctl -xru user@1000.service
Okt 19 22:14:37 floriangentoo systemd[1]: Failed to start User Manager for UID 1000.
░░ Subject: A start job for unit user@1000.service has failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ A start job for unit user@1000.service has finished with a failure.
░░
░░ The job identifier is 2662 and the job result is failed.
Okt 19 22:14:37 floriangentoo systemd[1]: user@1000.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ The unit user@1000.service has entered the 'failed' state with result 'exit-code'.
Okt 19 22:14:37 floriangentoo systemd[1]: user@1000.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ An ExecStart= process belonging to unit user@1000.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Okt 19 22:14:37 floriangentoo (sd-pam)[31701]: pam_unix(systemd-user:session): session closed for user florian
Okt 19 22:14:37 floriangentoo systemd[31699]: Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
Okt 19 22:14:37 floriangentoo (systemd)[31699]: pam_systemd(systemd-user:session): Failed to get user record: Input/output error
Okt 19 22:14:37 floriangentoo (systemd)[31699]: pam_unix(systemd-user:session): session opened for user florian(uid=1000) by florian(uid=0)
Okt 19 22:14:37 floriangentoo systemd[1]: Starting User Manager for UID 1000...
░░ Subject: A start job for unit user@1000.service has begun execution
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ A start job for unit user@1000.service has begun execution.
░░
░░ The job identifier is 2662.

And lastly:
Code:

floriangentoo ~ # ls -lav /run/user/
insgesamt 0
drwxr-xr-x  2 root root  40 19. Okt 22:14 .
drwxr-xr-x 21 root root 480 19. Okt 15:16 ..


Something is very Odd here. It seems to complain about $XDG_RUNTIME_DIR. I have never heard of that.
Back to top
View user's profile Send private message
NeglectedRudderPug
n00b
n00b


Joined: 04 Oct 2023
Posts: 24

PostPosted: Sat Oct 19, 2024 9:54 pm    Post subject: Reply with quote

That result is expected, that is, you shouldn't ever need or want to manually start that service. It should be running automatically as soon as you login.

Does lightdm have the systemd USE flag activated?

Also, you could try this, but consider this an "untested, may or may not work and could cause a failure in login" kind of thing and is just a theory. I don't use lightdm so have no way of checking for myself at the moment.

According to:
https://wiki.gentoo.org/wiki/LightDM

Theoretically we may be able to:

Code:

root $ cp /etc/pam.d/lightdm /root/lightdm.bak
root $ cat /etc/pam.d/lightdm | grep pam_systemd.so

If that returned nothing:
Code:

root $ echo "session   required   pam_systemd.so" >> /etc/pam.d/lightdm


Reboot and try logging in as your user using lightdm. If you successfully get logged in go to your terminal and try "systemctl --user status" again.

If it still doesn't work or you get other login related issues:
Code:

root $ cp lightdm.bak /etc/pam.d/lightdm


I'd like to also mention, I am just a user like you, I too am prone to errors. Hence the backup. :lol:
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sat Oct 19, 2024 10:21 pm    Post subject: Reply with quote

I did try that, but it resulted in Problems, so I restored the backup. Nevertheless, thank you very much for your help!

The systemd Use Flag is globally set by the Profile.
Back to top
View user's profile Send private message
NeglectedRudderPug
n00b
n00b


Joined: 04 Oct 2023
Posts: 24

PostPosted: Sun Oct 20, 2024 12:15 am    Post subject: Reply with quote

Hmm. It really should 'just work' to be honest. I took the liberty of noseying through the ebuild:
https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-misc/lightdm/lightdm-1.32.0-r2.ebuild

Which lead me to: https://bugs.gentoo.org/372229

So.. it should absolutely be loading pam_systemd already. A slightly deeper dive lead me to /etc/pam.d/system-login - you should find pam_systemd already in this file.

I'm not sure what's going on here. The other thread spoke about downgrading polkit, which you've already tried. Did you also try going up to 125, it's worth a shot I guess?
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sun Oct 20, 2024 2:10 pm    Post subject: Reply with quote

I actually did upgrade to Polkit-125 but that didn't work. I apologize, I should have mentioned that earlier.
I found something interesting in the file you mentioned:
Code:
floriangentoo ~ # cat /etc/pam.d/system-login | grep pam_systemd.so
-session   optional   pam_systemd.so


"optional" instead of "required". Maybe I should change that?
Back to top
View user's profile Send private message
NeglectedRudderPug
n00b
n00b


Joined: 04 Oct 2023
Posts: 24

PostPosted: Sun Oct 20, 2024 2:37 pm    Post subject: Reply with quote

GentooFan2024 wrote:
I actually did upgrade to Polkit-125 but that didn't work. I apologize, I should have mentioned that earlier.
I found something interesting in the file you mentioned:
Code:
floriangentoo ~ # cat /etc/pam.d/system-login | grep pam_systemd.so
-session   optional   pam_systemd.so


"optional" instead of "required". Maybe I should change that?

That appears to be set correctly, it matches perfectly with what is in the original stage3, and also what is on my system. So, it's probably best to leave that.

What does the system do when you try from tty? Login to your user account on tty (no gui, ctrl + alt + f6, for example) and run systemctl --user from there, does it output correctly then?

I guess another option you could try is using the stage3 to extract the /etc/pam.d/* files into your current /etc/pam.d/* directory - this would catch anything that may have gone amiss for some odd reason, though it will not include the files added by lightdm and other sources, so be sure that you do not to empty out additional files or that you have them reinstalled by the ebuilds that originally added them.

You could also check for other missing files, for example do you have /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop? Though admittedly I'm taking guesses at the moment. :oops:
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sun Oct 20, 2024 3:58 pm    Post subject: Reply with quote

I tried everything:

When I run systemctl --user from tty I get a "Failed to connect to bus: Kein Medium gefunden." error. ("Kein Medium gefunden" is German for "No media found".)

I checked the /etc/pam.d/ directory and compared it with the latest stage3. The files had the Identical date. Two files were older, but their content was identical.

/etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop does exist.

On my search I have found this: https://bbs.archlinux.org/viewtopic.php?id=275801

I will try the solution out, maybe it helps.
Back to top
View user's profile Send private message
GentooFan2024
n00b
n00b


Joined: 15 Oct 2024
Posts: 10

PostPosted: Sun Oct 20, 2024 4:03 pm    Post subject: Reply with quote

Update: Doesn't help: I get the same error as above.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum