# Speaker pHat running under phatbeat software. How to get pivumeter alive?

**URL:** https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489
**Category:** Support
**Created:** [November 29, 2017, 8:36pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489 "2017-11-29T20:36:15Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [November 29, 2017, 8:36pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/1 "2017-11-29T20:36:15Z")

</div>

Hi,

I have tested Speakerphat with phatbeat software ( Stretch Lite version ) to listen to my internet radio streams. I connected FF REW PAUSE VOL+ VOL- buttons directly to GPIO-pins and it works. The only drawback the PivuMeter is dark. How can I get pivumeter alive? Is there a simple modification for this ?

Thanks  
calleblyh

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [November 30, 2017, 12:01am UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/2 "2017-11-30T00:01:08Z")

</div>

You need to edit `/etc/asound.conf` and replace `phat-beat` with `speaker-phat`.

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 7:36am UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/3 "2017-12-12T07:36:29Z")

</div>

This worked as expected based on Stretch Lite 2017-09-07, I got the pivumeter alive. Yesterday I tried the same but using Stretch Lite 2017-10-29. Audio comes out from loadspeaker, pushbuttons wired to gpio-pins works but pivumeter is dark athou change made to /etc/asound.conf according to above instruction. So to summerize: StretchLite october-29, OneLineInstaller vlcradio and RPiZeroW + Speakerphat and pushbuttons wired to gpio-pins. I have looked at client.conf settings and they seem to be ok, but still pivumeter is dark. What else to check ?

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [December 12, 2017, 12:49pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/4 "2017-12-12T12:49:48Z")

</div>

Have flashed a fresh Stretch Lite 2017-11-29 SD card. I’ll see what happens!

Edit: Up and running after what seemed like forever and a day of installing. The VU meter is working out of the box.

It’s possible you could have missed my change last week to the install script, but unlikely.

Could you post the contents of:

`/etc/asound.conf`  
`/etc/pulse/default.pa`  
`/etc/pulse/client.conf`

And:

`sudo systemctl status pulseaudio`

The latest `default.pa` should have a section in it that looks like this:

```auto
### Try to load pivumeter if it exists
.nofail
load-module module-alsa-sink device=pivumeter
.fail

```

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 1:36pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/5 "2017-12-12T13:36:44Z")

</div>

Here my asound.conf and client.conf. [default.pa](http://default.pa) contains the .nofail —.fail

my\_asound.conf

pcm.!default {  
type plug  
slave.pcm “softvol\_and\_pivumeter”  
}

ctl.!default {  
type hw  
card 0  
}

pcm.pivumeter {  
type meter  
slave.pcm "hw:0,0"  
scopes.0 pivumeter  
}

pcm.softvol\_and\_pivumeter {  
type softvol  
slave.pcm "pivumeter"  
control {  
name "PCM"  
card 0  
}  
}

pcm\_scope.pivumeter {  
type pivumeter  
decay\_ms 500  
peak\_ms 400  
brightness 128  
output\_device speaker-phat  
}

pcm\_scope\_type.pivumeter {  
lib /usr/local/lib/libpivumeter.so  
}

pcm.dsp0 pivumeter

my client.conf

# This file is part of PulseAudio.

# 

# PulseAudio is free software; you can redistribute it and/or modify

# it under the terms of the GNU Lesser General Public License as published by

# the Free Software Foundation; either version 2 of the License, or

# (at your option) any later version.

# 

# PulseAudio is distributed in the hope that it will be useful, but

# WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

# General Public License for more details.

# 

# You should have received a copy of the GNU Lesser General Public License

# along with PulseAudio; if not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).

## Configuration file for PulseAudio clients. See pulse-client.conf(5) for

## more information. Default values are commented out. Use either ; or # for

## commenting.

; default-sink =  
; default-source =  
; default-server =  
; default-dbus-server =

; autospawn = yes  
; daemon-binary = /usr/bin/pulseaudio  
; extra-arguments = --log-target=syslog

; cookie-file =

; enable-shm = yes  
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB

; auto-connect-localhost = no  
; auto-connect-display = no  
autospawn = no  
default-server = unix:/tmp/pulseaudio.socket

* * *

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 1:39pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/6 "2017-12-12T13:39:23Z")

</div>

Whoops, hopefully you get it …

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 1:47pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/7 "2017-12-12T13:47:07Z")

</div>

and finally systemctl status

pi@SD30:~ $ sudo systemctl status pulseaudio  
● pulseaudio.service - PulseAudio Daemon  
Loaded: loaded (/etc/systemd/system/pulseaudio.service; enabled; vendor preset: enabled)  
Active: active (running) since Tue 2017-12-12 13:40:45 UTC; 3min 37s ago  
Process: 681 ExecStop=/usr/bin/pulseaudio --kill (code=exited, status=1/FAILURE)  
Main PID: 684 (pulseaudio)  
CGroup: /system.slice/pulseaudio.service  
└─684 /usr/bin/pulseaudio --realtime --disallow-exit --no-cpu-limit --log-target=syslog

Dec 12 13:40:45 SD30 systemd[1]: Started PulseAudio Daemon.  
Dec 12 13:40:45 SD30 pulseaudio[684]: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is  
Dec 12 13:40:45 SD30 pulseaudio[684]: Using device: speaker-phat  
Dec 12 13:40:45 SD30 pulseaudio[684]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSup  
Dec 12 13:40:45 SD30 pulseaudio[684]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: U  
lines 1-13/13 (END)

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [December 12, 2017, 2:32pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/8 "2017-12-12T14:32:53Z")

</div>

I can’t see anything amiss.

Try a simple sound file:

```auto
wget http://www.kozco.com/tech/LRMonoPhase4.wav
aplay LRMonoPhase4.wav

```

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 2:46pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/9 "2017-12-12T14:46:43Z")

</div>

Played the file… No VU-meter…

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 2:52pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/10 "2017-12-12T14:52:35Z")

</div>

In the meanwhile, I will do a fresh LiteStretch 2017-11-29 download/install and a new Pirateradio OLI installation. I think thats what you did ? Or what do you mean by “It’s possible you could have missed my change last week to the install script, but unlikely.”

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [December 12, 2017, 3:30pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/11 "2017-12-12T15:30:04Z")

</div>

That’s what I did. Yes. It looks like nothing was missed, however, your configuration seems as expected.

Could you possibly post a picture of your soldering on the Pi Zero and pHAT BEAT side? This might not necessarily be a software problem. It could be a dry joint or similar.

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 12, 2017, 4:18pm UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/12 "2017-12-12T16:18:33Z")

</div>

hi, and thanks for your support.  
I hope you mean picture of speakerphat pin soldering. I will do the pictures tomorrow. But honestly I doubt bad soldering, because earlier installation was working with speakerphat Also using another microSD card with speakerphat installation works properly running [test.py](http://test.py) using the same PIZW. I also did remember to change asound.conf output\_device to speaker-phat instead of phat-beat. Very confusing situation indeed…

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 13, 2017, 10:32am UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/13 "2017-12-13T10:32:12Z")

</div>

This is the situation from this morning:

- Using the same hardware RPiZeroW, phatbeat, speakerphat in all tests.

- Fresh RaspBian Lite 2017-11-29 installed on 2 microSD-cards. Localisation for Finnish keyboard done on both cards

- vlcradio installed on one of the SD-card , VU-meter works with RPiZW-phatbeat running tests and internet radio

- Speakerphat installed on the other SD-card, VU-meter works with same RPiZW-speakerphat running speaker-test wav files

- Using SD-card with vlcradio, RPiZW-speakerphat, audio is ok on loudspeaker, pushbuttons wired tp gpio-pins works, asound.conf modified for output\_device speaker-phat , BUT NO VU-meter. @gadgetiod What did you do ???  
Conclusion: Based on these tests I feel convinced it is not a bad-soldering problem. However I feel there is something in /etc/ asound.conf or /etc/pulse/default.pa or /etc/pulse/client.conf I do miss…but cannot find it

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [December 13, 2017, 10:56am UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/14 "2017-12-13T10:56:08Z")

</div>

Ooooooh, I wonder if it’s because i2c has not been enabled.

Do you see anything if you `ls /dev/i2c*`

Try running `raspi-config` and enabling the i2c interface.

---

<div class="post-metadata">

### Author: ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)
#### Post date: [December 13, 2017, 11:10am UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/15 "2017-12-13T11:10:04Z")

</div>

Thnx, You found it. No further questions…

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [December 13, 2017, 11:11am UTC](https://forums.pimoroni.com/t/speaker-phat-running-under-phatbeat-software-how-to-get-pivumeter-alive/6489/16 "2017-12-13T11:11:38Z")

</div>

It was your bulleted list that made it click- “steps to reproduce” made me realise you hadn’t run the Speaker pHAT installer which enables i2c automatically. D’oh! Glad you’re up and running!
