You are not logged in.

#1 2019-03-04 20:15:15

utsh
Member
Registered: 2019-03-04
Posts: 8

[SOLVED] Can't get PulseAudio to work

I installed arch yesterday with the Deepin environment and encountered a problem, I can't get the sound to work.
When I noticed it wasn't working I went to the 'Sound System' Wiki page and from there to the Alsa page. I proceeded to install the alsa-utils package and unmuted everything using the amixer command, I then tested the changes using speaker-test -c 2 which worked fine. I then decided to install PulseAudio and proceeded to hit a brick wall. I can't get it to work, I neither can get it to autostart nor I can start it manually, it's just sitting on my machine being useless and I can't figure out why. Would appreciate any help you can give me since the wiki pages are proving insufficient, probably thanks to my incompetence.

Kind regard,
Desperate noob

EDIT:

Turns out the problem was running "Startx" as root instead of normal user. So, just do:

 cp ~/.xinitrc /home/{user}/.xinitrc
su {user}
startx

Big thanks to everyone who helped me solve this

Last edited by utsh (2019-03-15 13:33:57)

Offline

#2 2019-03-04 23:00:50

Vizitor
Member
Registered: 2015-01-05
Posts: 83

Re: [SOLVED] Can't get PulseAudio to work

Installing package pavucontrol can provide some help, maybe.

Offline

#3 2019-03-04 23:28:55

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

Re: [SOLVED] Can't get PulseAudio to work

How are you starting Deepin?


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

#4 2019-03-05 08:46:17

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

Re: [SOLVED] Can't get PulseAudio to work

Output of

sudo fuser -v /dev/snd/*

might also provide some insight. Also if you apparently went through the wiki, post the exact commands used and relevant error messages you've received, otherwise no one can say anything on what you actually tried: https://bbs.archlinux.org/viewtopic.php?id=57855

Online

#5 2019-03-05 09:24:16

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

Slithery wrote:

How are you starting Deepin?

via xinitrc file, I commented out the standard stuff and added

 
setxkbmap -layout pt  
exec startdde

Last edited by utsh (2019-03-05 09:32:22)

Offline

#6 2019-03-05 09:31:20

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

V1del wrote:

Output of

sudo fuser -v /dev/snd/*

might also provide some insight. Also if you apparently went through the wiki, post the exact commands used and relevant error messages you've received, otherwise no one can say anything on what you actually tried: https://bbs.archlinux.org/viewtopic.php?id=57855

pacman -S alsa-utils
amixer sset Master unmute
amixer sset Speaker unmute
amixer sset Headphone unmute
speaker-test -c 2 (everything great)
pacman -S pulseaudio pulseaudio-alsa

supposedly it should be good, but the sound doesn't work.

 fuser -v /dev/snd/* 

returns nothing. Do you know any other command that might help me figure out what's wrong?

Offline

#7 2019-03-05 09:38:04

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

Re: [SOLVED] Can't get PulseAudio to work

That installs pulseaudio and will by itself not magically start pulseaudio (if you haven't rebooted yet, the socket will not yet be active) . As already mentioned, how are you starting deepin? What's the output of

systemctl --user status pulseaudio
pacmd list-cards
pacmd list-sinks

Online

#8 2019-03-05 09:38:44

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

Vizitor wrote:

Installing package pavucontrol can provide some help, maybe.

Running pavucontrol opens a window called volume control. The windows says "Establishing connection to Pulseaudio. Please wait..." and never changes. I assume this has something to do with the fact that when I try to run pulseaudio (as a non-root user) I get the message

DG_RUNTIME_DIR (/run/user/0) is not owned by us (uid 1000), but by uid 0! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)

Offline

#9 2019-03-05 09:45:16

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

V1del wrote:

That installs pulseaudio and will by itself not magically start pulseaudio (if you haven't rebooted yet, the socket will not yet be active) . As already mentioned, how are you starting deepin? What's the output of

systemctl --user pulseaudio
pacmd list-cards
pacmd list-sinks

As I said above, I start deepin via xinitrc file with the startx command.

systemctl --user pulse audio 

Returns "Unknown operation pulseaudio."

pacmd list-cards

Returns:

"XDG_RUNTIME_DIR (/run/user/0) is not owned by us (uid 1000), but by uid 0! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.) No PulseAudio daemon running, or not running as session daemon."

pacmd list-sinks returns the exatct same thing

Offline

#10 2019-03-05 09:50:03

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

Re: [SOLVED] Can't get PulseAudio to work

Ah sorry I missed that, in general, please don't double post if no one has responded in between and edit your posts instead.

That .xinitrc is wrong, it should at the very least contain the session initialization scripts: Note the second blue box.

Last edited by V1del (2019-03-05 09:50:39)

Online

#11 2019-03-05 10:13:09

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

V1del wrote:

Ah sorry I missed that, in general, please don't double post if no one has responded in between and edit your posts instead.

That .xinitrc is wrong, it should at the very least contain the session initialization scripts: Note the second blue box.

I'm not sure I understand, so I'll just copy the whole file in here

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
setxkbmap -layout pt
exec startdde

what exactly should I change?

Offline

#12 2019-03-05 10:19:03

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

Re: [SOLVED] Can't get PulseAudio to work

That should be correct... You aren't running startx as root, are you? And you aren't manually mucking about with XDG_RUNTIME_DIR ? Don't do either, FWIW can you rule out deepin doing something weird? If you instead start the default session with xterm, do the systemctl --user status pulseaudio commands work and can you start pavucontrol etc?

Online

#13 2019-03-05 10:36:17

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

V1del wrote:

That should be correct... You aren't running startx as root, are you? And you aren't manually mucking about with XDG_RUNTIME_DIR ? Don't do either, FWIW can you rule out deepin doing something weird? If you instead start the default session with xterm, do the systemctl --user status pulseaudio commands work and can you start pavucontrol etc?

I am running startx as root, didn't read anywhere I wasn't supposed too. Besides, running it as a non-root user return Xauth: file /home/user/.Xauthority does not exit" followed by a bunch of other stuff and deepin doesn't start.

I don't even know what XDG_RUNTIME_DIR is so I assume I'm not mucking about with it.

Since I can't start deepin outside of root I suppose I can't rule it out as the cause of this problem.

systemctl --user status pulseaudio returns

● pulseaudio.service - Sound Service
   Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

pavucontrol behaves as I stated above, a window pops saying "Establishing connection to pulseaudio" but since pulseaudio is disabled it won't leave that state.

Last edited by utsh (2019-03-05 11:06:55)

Offline

#14 2019-03-05 13:18:38

Vizitor
Member
Registered: 2015-01-05
Posts: 83

Re: [SOLVED] Can't get PulseAudio to work

I don't have pulseaudio on this box (don't know how, but firefox has sound, and I didn't touch it), but on my spare box, there is pulseaudio (because there, I can't got firefox to run sound without pulseaudio), so (on this system WITH pulseaudio) when I log in as root, there is no sound.

AND:

# pulseaudio
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).

It seems that Your priority is to figure out how run that DE as normal user. Of course, You'll do what You will ...

EDIT: grammar

Last edited by Vizitor (2019-03-05 13:25:44)

Offline

#15 2019-03-05 17:50:17

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

Re: [SOLVED] Can't get PulseAudio to work

Please post the exact error you receive when attempting to startx as your user, also (from your user)

stat $HOME
stat $HOME/.Xauthority
sudo journalctl -b #If you don't have sudo set up, you can post that one from root

Online

#16 2019-03-09 13:21:25

utsh
Member
Registered: 2019-03-04
Posts: 8

Re: [SOLVED] Can't get PulseAudio to work

Vizitor wrote:

I don't have pulseaudio on this box (don't know how, but firefox has sound, and I didn't touch it), but on my spare box, there is pulseaudio (because there, I can't got firefox to run sound without pulseaudio), so (on this system WITH pulseaudio) when I log in as root, there is no sound.

AND:

# pulseaudio
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).

It seems that Your priority is to figure out how run that DE as normal user. Of course, You'll do what You will ...

EDIT: grammar

Yhep, I had to run startx as a normal user so pulseaudio would function. I'll edit the post with the solution, thank you very much.

Offline

#17 2019-03-09 14:38:18

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Can't get PulseAudio to work

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB