Pulseaudio help
So for a while i was starting X11 with just $startx. It worked most of the time, but sometimes there was a weird race condition and it refused to work. Then it became everytime.
So I started X using lightdm and that problem was fixed. But now pulseaudio doesn't work. and just shows dummy output when killed and restarted.
I tried:
aplay -l (no devices)
sudo aplay -l (shows all cards)
playing music w/ cmus and mpd on user account before starting X11 (works with or without pulse. audio dies when X starts)
uninstalling pulse (everything works but can only play 1 audio stream)
starting X11 w/ xdm (same problem w/ lightdm)
starting mpd w/ sudo (audio works)
starting cmus w/ sudo (cmus: Error: an error occured while initializing MPRIS: No such file or directory. MPRIS will be disabled.
In app: No device detected
)
SOLVED: sudo setfacl -m u:username:rw /dev/snd/*
SOLVED PT2: Like a dummy I deleted a block from the default .xinitrc when putting in exec lightdm & i3
Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your ~/.xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.
Edited 3 Jan 2020. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 37 · 100% up
- Kind
- Text
- ID
- ej24ms
11 comments
If aplay -l shows you no devices but sudo aplay -l does that means ALSA config is broken in ways unrelated to pulseaudio.
Post
I think this is some sort of session permission thing or because of how xinit runs. Because audio only dies when x starts. after login and before xinit, i can run cmus just fine and it shows up in pulsemixer.
What kernel are you on? Try the linux-lts package if you haven't already.
See the wiki under PulseAudio/Troubleshooting. The dummy output problem is discussed there.
Should users be in the "audio" group?
There are three kind of distributions: 1) those who control access to the sound card by adding users to the "audio" group, 2) those who use udev (or HAL) and ConsoleKit to dynamically give access to the currently "active" user, but allow overriding that using the "audio" group and 3) those who don't use the "audio" group at all, but rely solely on HAL+ConsoleKit to grant access to the sound card.
From FreeDesktop: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/
You can add yourself to the `audio` group (`sudo gpasswd -a <username> audio`), but your user should automatically be granted access to the `/dev/snd/*` devices upon login (`getfacl /dev/snd/*`).
Additionally, I would not advice running e.g. cmus or mpd as root (unless that is really necessary). The mpd package ships a systemd user service. Unfortunately it also adds the mpd user to the audio group (see the aforementioned link to the pulseaudio setup), which means it's (currently) advisable to add your own user to the audio group as well.
Seeing both of your [solveds] you are doing absolutely weird things here. Why are you starting lightdm from your xinitrc? Enable it's systemd service. That should both not care about what's in your .xinitrc and properly set up your session which wasn't correct in your previous outputs.
Probably not the answer you're looking for but I cured my pulseaudio woes by removing it and using ALSA directly.
I'm fine with that, but i don't have a hardware mixer (guessing) and can't play from Firefox while another source is going
Is your user in all the correct groups? Seems like you can't list the devices as user. This seems like a systemd/udev issue and not pulseaudio.