BaReinhard / a2dp_bluetooth

Bluetooth Repo to setup your Raspberry Pi (Jessie) to connect to Bluetooth Speakers/Headset
GNU General Public License v3.0
27 stars 5 forks source link

[pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie #1

Open Siewert308SW opened 6 years ago

Siewert308SW commented 6 years ago

Hi,

Was struggling for a long time to get a BT speaker (Heos) working on my RPi3 Jessie Loaded. Until i found your script, thx a lot. Sound is working but the auto reconnect isn't. In my /var/log/message i found some error regarding Pulseaudio.

Dec 13 20:42:32 domoticz pulseaudio[548]: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set! Dec 13 20:42:32 domoticz pulseaudio[548]: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode! Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] main.c: If you do it nonetheless then it's your own fault if things don't work as expected. Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] main.c: Please read http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ for an explanation why system mode is usually a bad idea. Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] module.c: module-detect is deprecated: Please use module-udev-detect instead of module-detect! Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No such file or directory Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] authkey.c: Failed to load authentication key '/var/run/pulse/.config/pulse/cookie': No such file or directory Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory Dec 13 20:42:32 domoticz pulseaudio[811]: [pulseaudio] authkey.c: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No such file or directory

although /run/pulse.config/pulse/cookie exists it tells it can't find it. As for .pulse-cookie it doesn't exits at all. Also i have a /home/pi/.config/pulse/cookie, so two cookies What can i do to recover this.

BaReinhard commented 6 years ago

Does this error occur every time? I found this to be an issue the first run, but then it was generated on reboot.

what does your pulseaudio --version output and what does your /etc/pulse/system.pa look like?

Siewert308SW commented 6 years ago

Indeed, as far as i can see it only occurs on reboot. Does it also have a connection with not auto reconnecting?

system.pa https://pastebin.com/b0REdS68

pulseaudio --version pulseaudio 6.0

BaReinhard commented 6 years ago

Well that error seems to not be an issue with my experience.

Have you trusted the device?

sudo bluetoothctl
power on
agent on
default-agent
pair xx:xx:xx:xx:xx
trust xx:xx:xx:xx:xx
connect xx:xx:xx:xx:xx

Once this is done it should happen automatically, when the device turns on. It may also need to be a functionality of the bt device, as it has worked for my bt jbl headphones.