You are not logged in.

#1 2021-01-16 17:46:47

Nevu
Member
Registered: 2020-11-15
Posts: 16

PulseAudio simply not working with i3 WM

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 i3

Commands like

pulseaudio --start

,

pulseaudio -D

,

pulseaudio --check

and 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 neutral

Offline

#2 2021-01-16 18:30:15

Archlin
Member
Registered: 2018-05-09
Posts: 67

Re: PulseAudio simply not working with i3 WM

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 pulseaudio

but

systemctl --user enable pulseaudio --now

note:
--now in combination with enable wil start and enable the service (unit) directly.

Last edited by Archlin (2021-01-16 19:09:19)

Offline

#3 2021-01-16 18:40:02

Nevu
Member
Registered: 2020-11-15
Posts: 16

Re: PulseAudio simply not working with i3 WM

It is the entire .xinitrc, should it look like this, then?

/etc/X11/xinit/xinitrc
exec i3

Rookie 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

#4 2021-01-16 18:43:58

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: PulseAudio simply not working with i3 WM

Your ~/.xinitrc is broken, please read the link that Archlin posted above.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2021-01-16 19:04:57

Archlin
Member
Registered: 2018-05-09
Posts: 67

Re: PulseAudio simply not working with i3 WM

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.service

So 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

#6 2021-01-16 19:16:31

Nevu
Member
Registered: 2020-11-15
Posts: 16

Re: PulseAudio simply not working with i3 WM

Archlin wrote:

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.service

So 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.

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

#7 2021-01-16 19:33:53

Archlin
Member
Registered: 2018-05-09
Posts: 67

Re: PulseAudio simply not working with i3 WM

Urm..

It is your user service that is masked so that command does not apply.

try

systemctl unmask --user pulseaudio.service

If it does not work you need to remove the symlink to /dev/null

file /usr/lib/systemd/user/pulseaudio.service

will return something like

                                                                    ~
/usr/lib/systemd/user/pulseaudio.service: symbolic link to /dev/null

If it does remove it

sudo rm /usr/lib/systemd/user/pulseaudio.service

next run

sudo systemctl daemon-reload

and check the status again.

Offline

#8 2021-01-16 19:59:11

Nevu
Member
Registered: 2020-11-15
Posts: 16

Re: PulseAudio simply not working with i3 WM

Archlin wrote:

Urm..

It is your user service that is masked so that command does not apply.

try

systemctl unmask --user pulseaudio.service

If it does not work you need to remove the symlink to /dev/null

file /usr/lib/systemd/user/pulseaudio.service

will return something like

                                                                    ~
/usr/lib/systemd/user/pulseaudio.service: symbolic link to /dev/null

If it does remove it

sudo rm /usr/lib/systemd/user/pulseaudio.service

next run

sudo systemctl daemon-reload

and check the status again.

After doing these steps, now both --user and normal status commands return

Unit pulseaudio.service could not be found.

Offline

#9 2021-01-16 20:04:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: PulseAudio simply not working with i3 WM

Don't run the --user commands as root/with sudo.

Offline

#10 2021-01-16 20:09:05

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: PulseAudio simply not working with i3 WM


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2021-01-16 20:55:30

Archlin
Member
Registered: 2018-05-09
Posts: 67

Re: PulseAudio simply not working with i3 WM

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 --now

and 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

#12 2021-01-16 21:27:36

Nevu
Member
Registered: 2020-11-15
Posts: 16

Re: PulseAudio simply not working with i3 WM

Archlin wrote:
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 --now

and 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

#13 2021-01-16 21:36:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: PulseAudio simply not working with i3 WM

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

Offline

#14 2021-01-16 21:46:51

Archlin
Member
Registered: 2018-05-09
Posts: 67

Re: PulseAudio simply not working with i3 WM

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 --now

Still 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 --now

told you why this is easier to enable and start units in one command.

Last edited by Archlin (2021-01-16 22:01:12)

Offline

#15 2021-01-16 22:08:54

Nevu
Member
Registered: 2020-11-15
Posts: 16

Re: PulseAudio simply not working with i3 WM

V1del wrote:

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/init
sudo 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 file

Offline

#16 2021-01-16 22:12:53

Nevu
Member
Registered: 2020-11-15
Posts: 16

Re: PulseAudio simply not working with i3 WM

Archlin wrote:

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 --now

Still 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 --now

told 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

#17 2021-01-16 23:05:11

Archlin
Member
Registered: 2018-05-09
Posts: 67

Re: PulseAudio simply not working with i3 WM

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

Nevu wrote:

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

#18 2021-01-16 23:44:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: PulseAudio simply not working with i3 WM

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 pulseaudio

maybe check your pacman.log if any other packages were similarly affected.

Offline

#19 2021-01-17 05:30:59

LinGruby
Member
From: 10.10.10.11 / VPN
Registered: 2017-03-28
Posts: 2
Website

Re: PulseAudio simply not working with i3 WM

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

Board footer

Powered by FluxBB