You are not logged in.

#1 2024-03-29 11:40:41

teh_misteik
Member
From: Iran
Registered: 2024-03-12
Posts: 28

[SOLVED] pactl Connection failure: Connection refused

Hello, I am trying to control the volume in dwm window manager because there is currently no sound. And whenever I try:

pactl set-sink-volume @DEFAULT_SINK@ 50%

I get this error:

Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Please help me

Last edited by teh_misteik (2024-03-31 09:02:02)


Arch Linux newbie here

        Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!       

Offline

#2 2024-03-29 13:58:32

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

Re: [SOLVED] pactl Connection failure: Connection refused

How are you starting dwm? If via startx make sure you follow the notes in https://wiki.archlinux.org/title/Xinit#xinitrc to setup your systemd and dbus session properly

Offline

#3 2024-03-29 14:50:34

teh_misteik
Member
From: Iran
Registered: 2024-03-12
Posts: 28

Re: [SOLVED] pactl Connection failure: Connection refused

V1del wrote:

How are you starting dwm? If via startx make sure you follow the notes in https://wiki.archlinux.org/title/Xinit#xinitrc to setup your systemd and dbus session properly

Yes i am starting it with startx. but nothing useful there. can you explain a bit more about what i should do with my xinitrc file?


Arch Linux newbie here

        Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!       

Offline

#4 2024-03-29 19:17:18

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

Re: [SOLVED] pactl Connection failure: Connection refused

The wiki wrote:

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.

Is the part you have to pay attention to

Offline

#5 2024-03-30 07:07:41

teh_misteik
Member
From: Iran
Registered: 2024-03-12
Posts: 28

Re: [SOLVED] pactl Connection failure: Connection refused

V1del wrote:
The wiki wrote:

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.

Is the part you have to pay attention to

Yes, it is present. If you mean

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

then it is present.

Here is my .xinitrc file, if you would like to inspect it:

#!/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

xwallpaper --zoom ~/Pictures/wallpapers/wallpaper.jpg
xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
exec dwm

Arch Linux newbie here

        Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!       

Offline

#6 2024-03-30 07:55:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: [SOLVED] pactl Connection failure: Connection refused

because there is currently no sound

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Also the outputs of

pacman -Qs 'wire|pulse'
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Offline

#7 2024-03-30 10:26:19

teh_misteik
Member
From: Iran
Registered: 2024-03-12
Posts: 28

Re: [SOLVED] pactl Connection failure: Connection refused

seth wrote:

because there is currently no sound

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Also the outputs of

pacman -Qs 'wire|pulse'
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

My system journal:
http://0x0.st/XzKI.txt

pacman -Qs 'wire|pulse'

local/kpipewire 6.0.2-3 (plasma)
    Components relating to pipewire use in Plasma
local/libcanberra 1:0.30+r2+gc0620e4-3
    A small and lightweight implementation of the XDG Sound Theme Specification
local/libpipewire 1:1.0.4-3
    Low-latency audio/video router and processor - client library
local/libpulse 17.0-3
    A featureful, general-purpose sound server (client library)
local/libraw1394 2.1.2-3
    Provides an API to the Linux IEEE1394 (FireWire) driver
local/libwireplumber 0.5.0-2
    Session / policy manager implementation for PipeWire - client library
local/linux 6.8.2.arch2-1
    The Linux kernel and modules
local/pipewire 1:1.0.4-3
    Low-latency audio/video router and processor
local/pipewire-session-manager 1:1.0.4-3
    Session manager for PipeWire (default provider)
local/wireless_tools 30.pre9-3
    Tools allowing to manipulate the Wireless Extensions
local/wireplumber 0.5.0-2
    Session / policy manager implementation for PipeWire

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

dhcpcd@eno1.service                      | multi-user.target.wants
getty@tty1.service                       | getty.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire-session-manager.service         | user
pipewire.socket                          | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-userdbd.socket                   | sockets.target.wants
wireplumber.service                      | pipewire.service.wants

Arch Linux newbie here

        Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!       

Offline

#8 2024-03-30 11:15:54

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

Re: [SOLVED] pactl Connection failure: Connection refused

You need to install pipewire-pulse for pipewire's pulse integration to work

Offline

#9 2024-03-31 09:01:43

teh_misteik
Member
From: Iran
Registered: 2024-03-12
Posts: 28

Re: [SOLVED] pactl Connection failure: Connection refused

V1del wrote:

You need to install pipewire-pulse for pipewire's pulse integration to work

thanks! everythings ok now!


Arch Linux newbie here

        Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!       

Offline

Board footer

Powered by FluxBB