Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Trouble with pulseaudio, after migrating from arch (Read 7816 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Trouble with pulseaudio, after migrating from arch

I am running i3 with startx on Dell latitude e6230. I migrated my arch installation using steps given in the wiki guide. Some of the troubles I am facing are as below.

1. Not able to start X as regular user with modesetting driver. Solved temporarily by using xf86-video-intel.
2. I am running pulseaudio by making my own script,
Code: [Select]
#!/usr/bin/openrc-run
command="/usr/bin/pulseaudio"
command_args="--start --use-pid-file=true"
command_user="sharad"

This starts pulseaudio but I am not able to use bluetooth. I am getting this error on log
Code: [Select]
Jan 18 15:28:08 [pulseaudio] [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.21" (uid=1000 pid=2399 comm="/usr/bin/pulseaudio --start --use-pid-file=true ") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination="org.bluez" (bus)

I am running dbus  systemwide with provided init script, along with dbus session from .bash_profile like this
Code: [Select]
dbus-launch > /tmp/dbus && export $(cat /tmp/dbus | head -1)

Re: Trouble with pulseaudio, after migrating from arch

Reply #1
Don't start pulseaudio with rc script, just make sure elogind is running.
PA is patched to work with elogind on artix.

Please post your
Code: [Select]
rc-status --all
output.

Re: Trouble with pulseaudio, after migrating from arch

Reply #2
Thanks for reply.
Pulseaudio is not starting on my system automatically with elogind.

Here is the output of rc-status --all
Code: [Select]
Runlevel: sysinit
 sysfs                                                             [  started  ]
 cgroups                                                           [  started  ]
 devfs                                                             [  started  ]
 udev                                                              [  started  ]
 dmesg                                                             [  started  ]
 kmod-static-nodes                                                 [  started  ]
 opentmpfiles-dev                                                  [  started  ]
 udev-trigger                                                      [  started  ]
Runlevel: shutdown
 savecache                                                         [  stopped  ]
 killprocs                                                         [  stopped  ]
 mount-ro                                                          [  stopped  ]
Runlevel: default
 alsasound                                                         [  started  ]
 dbus                                                              [  started  ]
 metalog                                                           [  started  ]
 wpa_supplicant                                                    [  started  ]
 cronie                                                            [  started  ]
 cupsd                                                             [  started  ]
 fuseown                                                           [  started  ]
 netmount                                                          [  started  ]
 ntpd                                                              [  started  ]
 pulseaudio                                                        [  started  ]
 local                                                             [  started  ]
 agetty.tty2                                           [  started 00:03:39 (0) ]
 agetty.tty6                                           [  started 00:03:39 (0) ]
 agetty.tty1                                           [  started 00:03:39 (0) ]
 agetty.tty5                                           [  started 00:03:39 (0) ]
 agetty.tty3                                           [  started 00:03:39 (0) ]
 agetty.tty4                                           [  started 00:03:39 (0) ]
Runlevel: boot
 hwclock                                                           [  started  ]
 hostname                                                          [  started  ]
 modules                                                           [  started  ]
 fsck                                                              [  started  ]
 root                                                              [  started  ]
 mtab                                                              [  started  ]
 swap                                                              [  started  ]
 localmount                                                        [  started  ]
 sysctl                                                            [  started  ]
 bootmisc                                                          [  started  ]
 net.lo                                                            [  started  ]
 termencoding                                                      [  started  ]
 opentmpfiles-setup                                                [  started  ]
 procfs                                                            [  started  ]
 binfmt                                                            [  started  ]
 elogind                                                           [  started  ]
 urandom                                                           [  started  ]
 opensysusers                                                      [  started  ]
 loopback                                                          [  started  ]
 keymaps                                                           [  started  ]
 save-keymaps                                                      [  started  ]
 save-termencoding                                                 [  started  ]
Runlevel: nonetwork
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dhcpcd                                                            [  started  ]
 avahi-daemon                                                      [  started  ]
Dynamic Runlevel: manual


Re: Trouble with pulseaudio, after migrating from arch

Reply #4
I had enabled bluetooth but bluetoothctl was starting only as root, and even after that it was not able to connect with my bluetooth earphones. So I disabled it. I did try this again.

Code: [Select]
┌─[sharad] (06:45 AM)-(Sat Jan 19) [~]
└───▶ rc-service bluetooth status
 * status: started

┌─[sharad] (06:45 AM)-(Sat Jan 19) [~]
└───▶ bluetoothctl

[bluetooth]# scan on
No default controller available
[bluetooth]#
[bluetooth]# exit

┌─[sharad] (06:46 AM)-(Sat Jan 19) [~]
└───▶ sudo bluetoothctl
[sudo] password for sharad:
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller A4:DB:30:B8:2D:78 Discovering: yes
[CHG] Device 00:1E:7C:68:3F:45 RSSI: -70
[bluetooth]# connect 00:1E
Device 00:1E not available
[bluetooth]# connect 00:1E:7C:68:3F:45
Attempting to connect to 00:1E:7C:68:3F:45
Failed to connect: org.bluez.Error.Failed

I had also tried remove/trust/pair/connect sequence. The last step connect always fails.

Here are the logs

Code: [Select]
Jan 19 06:15:37 [pulseaudio] [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.20" (uid=1000 pid=2364 comm="/usr/bin/pulseaudio --start --use-pid-file=true ") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination="org.bluez" (bus)
Jan 19 06:45:42 [openrc-settingsd] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Jan 19 06:45:42 [openrc-settingsd] Failed to acquire dbus name org.freedesktop.hostname1
Jan 19 06:45:42 [pulseaudio] [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.22" (uid=1000 pid=2420 comm="/usr/bin/pulseaudio --start --use-pid-file=true ") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=2344 comm="/usr/lib/bluetooth/bluetoothd ")
Jan 19 06:45:47 [ntpd] bind(24) AF_INET6 fe80::522c:f733:fd7b:2966%4#123 flags 0x11 failed: Cannot assign requested address
Jan 19 06:45:47 [ntpd] unable to create socket on wlan0 (5) for fe80::522c:f733:fd7b:2966%4#123
Jan 19 06:47:08 [kernel] [   95.570998] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:47:24 [kernel] [  111.570693] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:47:40 [kernel] [  127.571366] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:47:56 [kernel] [  143.571158] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:48:12 [kernel] [  159.570818] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:48:16 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 19 06:48:28 [kernel] [  175.570506] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:48:44 [kernel] [  191.570238] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:49:00 [kernel] [  207.569954] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:49:06 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 19 06:49:30 [kernel] [  237.444363] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:49:46 [kernel] [  253.449081] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:49:56 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 19 06:50:02 [kernel] [  269.451788] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:50:18 [kernel] [  285.452519] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:50:25 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 19 06:50:34 [kernel] [  301.456165] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:50:58 [kernel] [  325.567021] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:51:14 [kernel] [  341.566829] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:51:30 [kernel] [  357.569501] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:51:46 [kernel] [  373.573881] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:52:02 [kernel] [  389.576538] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:52:18 [kernel] [  405.578980] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:52:34 [kernel] [  421.578025] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:52:50 [kernel] [  437.568882] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:53:06 [kernel] [  453.561887] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:53:22 [kernel] [  469.559090] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:53:38 [kernel] [  485.556699] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:53:54 [kernel] [  501.552703] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:54:10 [kernel] [  517.553935] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:54:26 [kernel] [  533.549637] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:54:42 [kernel] [  549.550493] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:54:58 [kernel] [  565.549277] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:55:14 [kernel] [  581.548947] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:55:30 [kernel] [  597.550702] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:55:46 [kernel] [  613.550226] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:55:52 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 19 06:56:02 [kernel] [  629.335990] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:56:18 [kernel] [  645.548785] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:56:34 [kernel] [  661.552324] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:56:50 [kernel] [  677.548468] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:57:06 [kernel] [  693.551820] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:57:22 [kernel] [  709.547480] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:57:38 [kernel] [  725.547126] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:57:54 [kernel] [  741.547806] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:58:10 [kernel] [  757.547626] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:58:26 [kernel] [  773.547297] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:58:42 [kernel] [  789.546869] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:58:58 [kernel] [  805.546794] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:59:14 [kernel] [  821.546969] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:59:30 [kernel] [  837.546194] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 06:59:46 [kernel] [  853.545899] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:00:02 [kernel] [  869.546015] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:00:18 [kernel] [  885.546223] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:00:34 [kernel] [  901.545979] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:00:50 [kernel] [  917.545496] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:01:06 [kernel] [  933.544275] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:01:22 [kernel] [  949.545079] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:01:38 [kernel] [  965.545466] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:01:54 [kernel] [  981.547466] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:02:10 [kernel] [  997.544260] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:02:26 [kernel] [ 1013.544702] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:02:42 [kernel] [ 1029.546475] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:02:58 [kernel] [ 1045.544312] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:03:14 [kernel] [ 1061.544054] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:03:30 [kernel] [ 1077.542614] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:03:46 [kernel] [ 1093.539605] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:04:02 [kernel] [ 1109.538160] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 19 07:04:18 [kernel] [ 1125.536481] Bluetooth: hci0: last event is not cmd complete (0x0f)

Generated by metalog, with minimum=3 level

Re: Trouble with pulseaudio, after migrating from arch

Reply #5
Sorry i am not writing here as linux administrator, nor IT expert or somebody that can help but as somebody who is into sound ;)
i would advise you to not use or buy bluetooth headphones ;). they're never gonna be more powerful than cable ones.
I believe bluetooth headphones are designed for smartphones, laptops, youtube, mp3s in mind, but they never gonna be good enough.
what am i saying don't kill your ears by using bluetooth headphones.

no bluetooth headphones = no problem.

Re: Trouble with pulseaudio, after migrating from arch

Reply #6
Sorry i am not writing here as linux administrator, nor IT expert or somebody that can help but as somebody who is into sound ;)
i would advise you to not use or buy bluetooth headphones ;). they're never gonna be more powerful than cable ones.
I believe bluetooth headphones are designed for smartphones, laptops, youtube, mp3s in mind, but they never gonna be good enough.
what am i saying don't kill your ears by using bluetooth headphones.

no bluetooth headphones = no problem.
This is a bad attitude to have.
If a device suddenly doesn't work after migrating from systemd systems (after enabling the required services like Bluetooth), it should be treated as bug and should be fixed asap.

Re: Trouble with pulseaudio, after migrating from arch

Reply #7
bluetooth headphones and bluetooth speakers is a bug. i don't understand why people like to kill their hearing by listening to music from streaming services like spotify, audio files like .mp3 or flac or go on youtube while using bluetooth speakers.

get proper cd-player and cable headphones and throw your bluetooth devices to the bin, they're garbage.

Re: Trouble with pulseaudio, after migrating from arch

Reply #8
bluetooth headphones and bluetooth speakers is a bug. i don't understand why people like to kill their hearing by listening to music from streaming services like spotify, audio files like .mp3 or flac or go on youtube while using bluetooth speakers.

get proper cd-player and cable headphones and throw your bluetooth devices to the bin, they're garbage.
I agree that wired gives better audio output, however bluetooth is not always about music only, and as profix said not working device should be treated as bug.

Re: Trouble with pulseaudio, after migrating from arch

Reply #9
sorry for being such an arrogant prick.
well what i can say is first thing i'm not sure if this bug is related to Artix or to pulseaudio, but it may be pulseaudio, because i think it's designed for systemd in mind.
second thing is that i heard that it's good to not use pulseaudio and stick to pure ALSA instead. however configuring everything is an effort.

as i have one pair of bluetooth earphones from philips, i remember how i tried to connect them to my laptop or even to playstation 3... no success. so i decided i'm never gonna try again, usually when something is irritation and too much effort it's not worth it to me.
well, i dont know if its possible to.
i think if you stick to pure alsa there's package bluez-alsa. but how to configure it i have no idea.

Re: Trouble with pulseaudio, after migrating from arch

Reply #10
bluez-alsa is not there anymore, as bluez >5 has no support for it. But there is fork in aur bluez-alsa-git which I tried while removing pulse audio. Still I am having trouble using bluetoothctl.

I think this is error in artix kernel as I am getting same errors in the log which I was getting with pulseaudio

Code: [Select]
Jan 23 21:00:00 [kernel] [  145.489793] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:00:16 [kernel] [  161.489738] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:00:23 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 23 21:00:32 [kernel] [  177.489531] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:00:48 [kernel] [  193.489663] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:00:58 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available
Jan 23 21:01:04 [kernel] [  209.146218] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:01:20 [kernel] [  225.490141] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:01:36 [kernel] [  241.490000] Bluetooth: hci0: last event is not cmd complete (0x0f)
Jan 23 21:01:39 [bluetoothd] a2dp-sink profile connect failed for 00:1E:7C:68:3F:45: Protocol not available


I did search this on google and found solution. It was permission issue which was solved after adding user to group "lp" I am using bluez-alsa-git from aur, pulseaudio is removed. In addition to that I am running bluez-alsa with this init script

Code: [Select]
#!/usr/bin/openrc-run

pidfile="/run/bluealsa.pid"
command="/usr/bin/bluealsa"
command_background=1
command_args="
    -p a2dp-source
    -p a2dp-sink
    -p hsp-hs
    -p hsp-ag
    -p hfp-hf
    -p hfp-ag
"

depend() {
after bluetooth
need dbus localmount hostname
}

EDIT: Pulseaudio is also working now. Only bluez-alsa was cumbersome to use with bluetooth devices.



Re: [SOLVED] Trouble with pulseaudio, after migrating from arch

Reply #11
So the solution was simple, wasn't it :). Adding yourself to the group.

it's nice that you got it now :D

Re: [SOLVED] Trouble with pulseaudio, after migrating from arch

Reply #12
Glad your problem is resolved.

While I'm not familiar with elogind, since this is a permission problem, shouldn't elogind handle it? (Which is the reason we don't need video, audio group to access certain devices and we don't need root to run startx)

I think we'll need to look further into this problem. I'll get a bluetooth audio device to test this one day.
now only the dinit guy in artix

Re: [SOLVED] Trouble with pulseaudio, after migrating from arch

Reply #13
While I'm not familiar with elogind, since this is a permission problem, shouldn't elogind handle it? (Which is the reason we don't need video, audio group to access certain devices and we don't need root to run startx)
When I was running arch, this "lp" group was not needed. I think elogind alone may not be able to handle all use cases handled by logind+systemd.
With artix, I am able to start X if I use xf86-video-intel driver. If I use modesetting driver, I can start X as root only, even though I am in both video and audio group. With arch+systemd I was able to start X with modesetting driver also.
Anyway I am happy migrating to artix, open-rc is much simpler and easy to understand.
So the solution was simple, wasn't it :). Adding yourself to the group.

it's nice that you got it now :D
Thanks.

Re: [SOLVED] Trouble with pulseaudio, after migrating from arch

Reply #14
I did search this on google and found solution. It was permission issue which was solved after adding user to group "lp"
I now have bluetooth audio working with Artix/OpenRC (UE BOOM speaker) and this was my issue too.

I believe I also installed:
pulseaudio-bluetooth
qt5-connectivity
bluetooth-openrc
pulseaudio-alsa

Although they may not all be necessary?

Necro, but just wanted to say thanks for posting this!