You are not logged in.
Pages: 1
Hey, I decided to install Arch with i3 today and so far it's been going great, except that my PulseAudio refuses to work. I had no audio, until I installed alsa-utils and raised my volume through alsamixer. Sound works, but PulseAudio not working is causing issues still..
I tried a lot of solutions I looked up, but none of them have really worked.
Here's what happens when I try to enable PulseAudio
sudo systemctl --user enable pulseaudio
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined^ same for starting it.
Pavucontrol of course doesn't work either, it's stuck on "Establishing connection to PulseAudio. Please wait..."
My method of launching i3 is startx. Here's my .xinitrc
/usr/bin/start-pulseaudio-x11
exec i3Commands like
pulseaudio --start,
pulseaudio -D,
pulseaudio --checkand so on return absolutely nothing, nothing happens and PulseAudio stays broken.
I'm completely at a loss here, any ideas? I can't even control my volume in a comfortable way with PulseAudio being borked ![]()
Offline
Hello,
Is that your complete .xinitrc? I mis some stuff in it (see second note in the wiki.
It should not be needed to set "/usr/bin/start-pulseaudio-x11" in your xinitrc, so you can remove that (I also wonder what that line should do).
And why do you elevate privileges to enable your user service?
So not:
sudo systemctl --user enable pulseaudiobut
systemctl --user enable pulseaudio --nownote:
--now in combination with enable wil start and enable the service (unit) directly.
Last edited by Archlin (2021-01-16 19:09:19)
Offline
It is the entire .xinitrc, should it look like this, then?
/etc/X11/xinit/xinitrc
exec i3Rookie mistake on using sudo there, I guess ;P
If I do it like you say, this happens
systemctl --user enable pulseaudio --now
Failed to enable unit: Unit file /usr/lib/systemd/user/pulseaudio.service is masked.Offline
Offline
I say read the wiki I linked to.
Edit .xinitrc as it should be (so also without the pulseaudio line) and restart your system.
I guess it will be fine then.
Incase it it is not.
First check the status of pulse with
systemctl status pulseaudio.service It it is not there that is no issue.
If it is there and you see " masked" in the loaded line it is an issue.
Try to unmask it with
sudo systemctl unmask pulseaudio.serviceSo next check the status of the user unit.
systemctl --user status pulseaudio.service If it is not there try to enable it with the earlier provided command.
Last edited by Archlin (2021-01-16 19:07:12)
Offline
I say read the wiki I linked to.
Edit .xinitrc as it should be (so also without the pulseaudio line) and restart your system.I guess it will be fine then.
Incase it it is not.
First check the status of pulse with
systemctl status pulseaudio.serviceIt it is not there that is no issue.
If it is there and you see " masked" in the loaded line it is an issue.Try to unmask it with
sudo systemctl unmask pulseaudio.serviceSo next check the status of the user unit.
systemctl --user status pulseaudio.serviceIf it is not there try to enable it with the earlier provided command.
whoops, seems like my .xinitrc was indeed pretty messed up. Fixed it as shown on the Arch wiki.
systemctl status pulseaudio.service
Unit pulseaudio.service could not be found.Carrying on and going over step 2 as you say it's no issue if it's not there,
systemctl --user status pulseaudio.service
* pulseaudio.service
Loaded: masked (Reason: Unit pulseaudio.service is masked.)
Active: inactive (dead)Okay, then going to step 2 to unmask it, this happens
sudo systemctl unmask pulseaudio.service
Unit pulseaudio.service does not exist, proceeding anyway.After "unmasking"
systemctl --user status pulseaudio.service
* pulseaudio.service
Loaded: masked (Reason: Unit pulseaudio.service is masked.)
Active: inactive (dead)PulseAudio still could not be found with systemctl status after that. Trying to enable with the earlier command also says that it's masked.
Last edited by Nevu (2021-01-16 19:17:54)
Offline
Urm..
It is your user service that is masked so that command does not apply.
try
systemctl unmask --user pulseaudio.serviceIf it does not work you need to remove the symlink to /dev/null
file /usr/lib/systemd/user/pulseaudio.servicewill return something like
~
/usr/lib/systemd/user/pulseaudio.service: symbolic link to /dev/nullIf it does remove it
sudo rm /usr/lib/systemd/user/pulseaudio.servicenext run
sudo systemctl daemon-reloadand check the status again.
Offline
Urm..
It is your user service that is masked so that command does not apply.
try
systemctl unmask --user pulseaudio.serviceIf it does not work you need to remove the symlink to /dev/null
file /usr/lib/systemd/user/pulseaudio.servicewill return something like
~ /usr/lib/systemd/user/pulseaudio.service: symbolic link to /dev/nullIf it does remove it
sudo rm /usr/lib/systemd/user/pulseaudio.servicenext run
sudo systemctl daemon-reloadand check the status again.
After doing these steps, now both --user and normal status commands return
Unit pulseaudio.service could not be found.Offline
Don't run the --user commands as root/with sudo.
Offline
And read the actual wiki: https://wiki.archlinux.org/index.php/PulseAudio#Running
Offline
After doing these steps, now both --user and normal status commands return
Unit pulseaudio.service could not be found.
Great.
So I guess you figured out yourself that you now can start the service again with.
systemctl --user enable pulseaudio --nowand it should work.
I wonder how you even get it masked in the first place.
Tip: read the wiki and maybe even manpages, these have lots of info.
Last edited by Archlin (2021-01-16 20:56:21)
Offline
Nevu wrote:After doing these steps, now both --user and normal status commands return
Unit pulseaudio.service could not be found.Great.
So I guess you figured out yourself that you now can start the service again with.
systemctl --user enable pulseaudio --nowand it should work.
I wonder how you even get it masked in the first place.
Tip: read the wiki and maybe even manpages, these have lots of info.
systemctl --user start pulseaudio
Failed to start pulseaudio.service: Unit pulseaudio.service not found.I really don't understand. Pavucontrol still hangs on establishing connection too.. Did plenty of searching on the wiki, other forums to no avail.
On the brighter side, I figured out keybinds for alsamixer and now I can adjust my volume without PulseAudio which was my main issue. At this point, I'm just worried if PulseAudio behaving like that will cause me any issues in the future.
Offline
Did you fix your xinitrc in the mean time and relog? All of this reads like your session isn't quite properly set up still. Did you manually try to move pulseaudio service files around? What's your output of
systemctl status
sudo fuser -v /dev/snd/*
pacman -Qkk pulseaudioOffline
This is my bad, It is a user unit and I provided the "global" command.
You needed to run
systemctl --user daemon-reload and then
systemctl --user enable pulseaudio --nowStill if you read the wiki(s) in the first place, you would not have this problem.
Also a user unit does not get masked by itself, so you did something (masked it yourself maybe) te get to this.
Are you sure your up for Arch and i3wm even?
Why did you not run
systemctl --user enable pulseaudio.service --nowtold you why this is easier to enable and start units in one command.
Last edited by Archlin (2021-01-16 22:01:12)
Offline
Did you fix your xinitrc in the mean time and relog? All of this reads like your session isn't quite properly set up still. Did you manually try to move pulseaudio service files around? What's your output of
systemctl status sudo fuser -v /dev/snd/* pacman -Qkk pulseaudio
I did fix my xinitrc I assume, since I copied over the default xinitrc as shown in the Arch wiki and added on exec i3 to it. I didn't manually move around the pulseaudio service files.
$ systemctl status
* edga
State: running
Jobs: 0 queued
Failed: 0 units
Since: Sat 2021-01-16 23:02:44 EET; 59min ago
CGroup: /
|-user.slice
| `-user-1000.slice
| |-user@1000.service
| | |-app.slice
| | | |-at-spi-dbus-bus.service
| | | | |-454 /usr/lib/at-spi-bus-launcher
| | | | |-691 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessi>
| | | | `-695 /usr/lib/at-spi2-registryd --use-gnome-session
| | | `-dbus.service
| | | `-393 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile>
| | `-init.scope
| | |-351 /usr/lib/systemd/systemd --user
| | `-352 (sd-pam)
| `-session-1.scope
| |- 278 login -- edga
| |- 358 -bash
| |- 363 /bin/sh /usr/bin/startx
| |- 381 xinit /home/edga/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -keeptty -a>
| |- 382 /usr/lib/Xorg -nolisten tcp :0 vt1 -keeptty -auth /tmp/serverauth.9l19QjE>
| |- 390 i3 -a --restart /run/user/1000/i3/restart-state.390
| |- 400 compton
| |- 417 kitty
| |- 421 /bin/bash
| |- 428 /usr/lib/firefox/firefox
| |- 477 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen >
| |- 528 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen >
| |- 552 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen >
| |- 609 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen >
| |- 782 /usr/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen >
| |- 842 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen >
| |-1037 i3bar --bar_id=bar-0 --socket=/run/user/1000/i3/ipc-socket.390
| |-1038 i3status
| |-2632 /usr/lib/firefox/firefox -contentproc -parentBuildID 20210107154745 -pref>
| |-8685 /usr/lib/firefox/firefox -contentproc -childID 11 -isForBrowser -prefsLen>
| |-8792 kitty
| |-8796 /bin/bash
| |-8797 systemctl status
| `-8798 less
|-init.scope
| `-1 /sbin/initsudo fuser -v /dev/snd/*returns absolutely nothing.
pacman -Qkk pulseaudio
error: error while reading file /var/lib/pacman/local/pulseaudio-14.1-2/mtree: Unrecognized archive format
pulseaudio: no mtree fileOffline
This is my bad, It is a user unit and I provided the "global" command.
You needed to run
systemctl --user daemon-reloadand then
systemctl --user enable pulseaudio --nowStill if you read the wiki(s) in the first place, you would not have this problem.
Also a user unit does not get masked by itself, so you did something (masked it yourself maybe) te get to this.Are you sure your up for Arch and i3wm even?
Why did you not run
systemctl --user enable pulseaudio.service --nowtold you why this is easier to enable and start units in one command.
systemctl --user daemon-reload
systemctl --user enable pulseaudio --now
Failed to enable unit: Unit file pulseaudio.service does not exist."Are you sure your up for Arch and i3wm even?"
What do you care? This is called newbie's corner for a reason, you know? Everyone has to start somewhere
Offline
Yes, we all started somewhere and there is no shame in mistakes since we all make them (except the moderators) .
The thing is (and that's is the reason I asked). I my first reply I pointed to the .xinitrc wiki and even pointed to a section in it.
Have you read it you would not replied with
It is the entire .xinitrc, should it look like this, then?
/etc/X11/xinit/xinitrc exec i3
One part is reading the wiki the community wrote and keeps up to date with care, specially when your new to Arch and/or someone points you in the right direction.
Offline
Reinstall pulseaudio it seems at least the extraction process got corrupted. And there's a chance the service file is actually not present, maybe since there was just an update and your mtree database being broken for at least pulse
sudo pacman -Syu pulseaudiomaybe check your pacman.log if any other packages were similarly affected.
Offline
my spectrwm
┌─┤lingruby at spectrwm├──┤17.01.2021, 062042├──┤~├─
└─┤1140├──┤0├─ % systemctl --user status pulseaudio.service
● pulseaudio.service - Sound Service
Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-01-16 15:59:22 CET; 14h ago
TriggeredBy: ● pulseaudio.socket
Main PID: 422 (pulseaudio)
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pulseaudio.service
├─422 /usr/bin/pulseaudio --daemonize=no --log-target=journal
└─560 /usr/lib/pulse/gsettings-helper
Warning: journal has been rotated since unit was started, output may be incomplete.
┌─┤lingruby at spectrwm├──┤17.01.2021, 062046├──┤~├─
└─┤1141├──┤0├─ % no problem
┌─┤root at spectrwm├──┤17.01.2021, 062923├──┤~├─
└─┤745├──┤0├─ # pacman -Qi pulseaudio
Nazwa : pulseaudio
Wersja : 14.2-1
Opis : A featureful, general-purpose sound server
Architektura : x86_64
Adres url : https://www.freedesktop.org/wiki/Software/PulseAudio/
Licencje : GPL
Grupy : Brak
Dostarcza : Brak
Zależy od : libpulse=14.2-1 alsa-card-profiles rtkit libltdl speexdsp tdb orc libsoxr webrtc-audio-processing libxtst
Opcjonalne zależności : pulseaudio-alsa: ALSA configuration (recommended) [zainstalowano]
pulseaudio-zeroconf: Zeroconf support
pulseaudio-lirc: IR (lirc) support
pulseaudio-jack: Jack support
pulseaudio-bluetooth: Bluetooth support
pulseaudio-equalizer: Graphical equalizer
pulseaudio-rtp: RTP and RAOP support
Wymagany przez : pulseaudio-alsa
Opcjonalny dla : kodi librewolf-bin pavucontrol phonon-qt5 phonon-qt5-gstreamer
Konfliktuje z : Brak
Zastępuje : pulseaudio-xen<=9.0 pulseaudio-gconf<=11.1
Rozmiar po instalacji : 6,06 MiB
Autor pakietu : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Data zbudowania : sob, 16 sty 2021, 22:53:30
Data zainstalowania : nie, 17 sty 2021, 05:59:56
Powód zainstalowania : Ręczny
Skrypt instalacyjny : Tak
Potwierdzone przez : Podpis
┌─┤root at spectrwm├──┤17.01.2021, 062935├──┤~├─
└─┤745├──┤0├─ # [( ͡° ͜ʖ ͡°) Linux User #592024 GitHub Discord - Polska Społeczność Linuksa
System: spectrwm Kernel: 5.x.x.llx-1-lingruby x86_64 (64 bit gcc: 11.x.x)
Desktop: twm Info: polybar Wm: spectrwm 3.4.1 Dm: lightdm Distro: Arch Linux
Offline
Pages: 1