question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fresh install on RaspberryPi has sound issues (PA system-wide mode)

See original GitHub issue

Hi all,

what a great project which I can’t wait to get my hands on! 😃 I still havent managed to make it work on a Raspberry PI Model B+.

  1. Fresh install of Jessie
  2. Went straight to clone the latest repo and installed it (that happened yesterday). Today I checked again to see I am on the latest changes

pi@raspberrypi:/opt/AlexaPi $ git status

On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

Yup!

So I installed PA in system-wide as some other posts suggested. What happens now is that I get:

alsa audio output error: cannot estimate delay: Input/output error

when querying the AlexaPi service.

pi@raspberrypi:/opt/AlexaPi $ sudo systemctl status AlexaPi.service -l

● AlexaPi.service - Alexa client for all your devices
   Loaded: loaded (/usr/lib/systemd/system/AlexaPi.service; enabled)
  Drop-In: /etc/systemd/system/AlexaPi.service.d
           └─restart.conf
   Active: active (running) since Sun 2016-12-04 20:44:34 GMT+2; 4min 11s ago
     Docs: https://github.com/alexa-pi/AlexaPi/wiki
 Main PID: 1733 (python)
   CGroup: /system.slice/AlexaPi.service
           └─1733 /usr/bin/python /opt/AlexaPi/src/main.py

Dec 04 20:44:34 raspberrypi systemd[1]: Started Alexa client for all your devices.
Dec 04 20:44:41 raspberrypi python[1733]: [02097cf8] alsa audio output error: cannot estimate delay: Input/output error

and I also get the following when querying the PA service

pi@raspberrypi:~ $ sudo systemctl status pulseaudio.service -l

● pulseaudio.service - PulseAudio Daemon
   Loaded: loaded (/etc/systemd/system/pulseaudio.service; enabled)
   Active: active (running) since Sun 2016-12-04 20:54:45 GMT+2; 1min 8s ago
 Main PID: 432 (pulseaudio)
   CGroup: /system.slice/pulseaudio.service
           └─432 /usr/bin/pulseaudio --system --realtime --disallow-exit --no-cpu-limit

Dec 04 20:54:45 raspberrypi pulseaudio[432]: W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set!
Dec 04 20:54:45 raspberrypi pulseaudio[432]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode!
Dec 04 20:54:45 raspberrypi pulseaudio[432]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time!
Dec 04 20:54:45 raspberrypi pulseaudio[432]: W: [pulseaudio] main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.
Dec 04 20:54:45 raspberrypi pulseaudio[432]: W: [pulseaudio] main.c: If you do it nonetheless then it's your own fault if things don't work as expected.
Dec 04 20:54:45 raspberrypi pulseaudio[432]: W: [pulseaudio] main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea.
Dec 04 20:54:46 raspberrypi pulseaudio[432]: W: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No such file or directory
Dec 04 20:54:46 raspberrypi pulseaudio[432]: W: [pulseaudio] authkey.c: Failed to load authorization key '/var/run/pulse/.config/pulse/cookie': No such file or directory
Dec 04 20:54:46 raspberrypi pulseaudio[432]: W: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory
Dec 04 20:54:46 raspberrypi pulseaudio[432]: W: [pulseaudio] authkey.c: Failed to load authorization key '/var/run/pulse/.pulse-cookie': No such file or directory

Alexa doesnt respond to my calling its name. I have searched lots of similar tickets in this project but to no avail. Any ideas?

p.s. not sure if this helps but it also stopped saying Hello on launch

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
shreyasubalecommented, Dec 24, 2016

I was getting choppy audio with PA ( initially i thought it wasn’t working at all, but when i played some music i found out that the audio is actualy very choppy ) until i installed vlc manually with apt-get install vlc

1reaction
revere521commented, Dec 7, 2016

@spo0n you will need to elevate permissions with sudo to create a directory outside the home dir (/home/pi) - so that command should be sudo mkdir -p /var/lib/AlexaPi/.config/pulse then run sudo cp /etc/pulse/client.conf /var/lib/AlexaPi/.config/pulse/ that copies the pulseaudio config files to that new directory.
then you may need to set the permissions of the AlexaPi as a home folder if its still complaining - like this: chown -R alexapi:alexapi /var/lib/AlexaPi/ usermod --home /var/lib/AlexaPi alexapi

@idimitrakopoulos the PS3 Eye seems to work really well as an array mic - and its cheap enough that if its too much of a hassle to get it working - no big deal. You may have to do some additional playing around with it - but I have had it running for a few weeks now and AlexaPi has no issues hearing me from pretty good distances.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Guide] Pulseaudio 5 on Wheezy - Raspberry Pi Forums
I: [pulseaudio] main.c: Running in system mode: no I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
Read more >
Using a Raspberry Pi as a Sound Server - raw sewage
Here's the overview from the PulseAudio documentation: Running PulseAudio as System-Wide Daemon. But at the same time, they discourage using this mode, see...
Read more >
Pulseaudio / A2DP Bluetooth don't work in system mode, but ...
I'm trying to install Pulseaudio 8 from the source, but having problems running it in system mode with Bluez5 with A2DP support. On...
Read more >
Connect Bluetooth Headset To Raspberry Pi 3 - Youness
This is a step-by-step post that will show you how to connect a Bluetooth headset (microphone/speakers) to your Raspberry Pi 3.
Read more >
Raspberry Pi Power Issues, Audio Server project with VolumIO
When I disconnected all those extra RPi cables, the audio noise went way up from barely-noticable to pretty-awful. It is caused by a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found