Picade X HAT sound volume too high

Ok, we have a manual hack. I ran ‘amixer’ on its own per the detail mentioned above:

pi@picade4:~ $ amixer
Simple mixer control 'PCM',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]

Did some googling, and found you can change it with this:

pi@picade4:~ $ amixer set PCM -- 40%
Simple mixer control 'PCM',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 102 [40%]
  Front Right: 102 [40%]

And confirmed it took:

pi@picade4:~ $ amixer
Simple mixer control 'PCM',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 102 [40%]
  Front Right: 102 [40%]

I did this in a shell while Retropie was running, and kicked off a game of pacman, and the volume was lower. Not looked into how to script this a booting yet, but at least we can play without waking the dead now!

Just received my Picade 10", build went OK BUT
I get exactly the same issue:
Error on loading games: Volume control::init() - Failed to find mixer elements!
Volume way too loud
Makes it unusable
Official Fix Please!.
.

Hi everyone, am also having the same issue with uncontrollable volume and “Volume control::init() - Failed to find mixer elements!” but having tested @newtonheath’s amixer command can confirm it’s working, so at least there is a workaround so thankyou for sharing!

Okay it’s very crude and no doubt someone with some real Linux experience will do a much better job but I’ve done a crontab to set the volume to 40% using @newtonheath’s code

So just to recap I created a new directory called /scripts

sudo mkdir /scripts

and in there created a script called volume.sh

sudo nano /scripts/volume.sh

Which contained
#!/bin/bash

amixer set PCM – 40%

I then set that to an executable (with far too many permissions, but like I said, it’s only a fudge)

sudo chmod 777 /scripts/volume.sh

Then created a crontab as root
sudo crontab -e

And added the following to it
@reboot /bin/bash /scripts/volume.sh

And after rebooting can confirm that the volume is now a low 40% - obviously you can tweak the percentages to whatever you wish in the volume.sh script

@roundy - that is what I would have done while we wait for an official fix - glad its worked out for others - mind you, I didnt check if ithe setting persisted between boots when i tested originally 😬

Yes, it looks like the original one line fix does persist between boots, but I hope the official fix will allow us to dynamically adjust volume

Confirmed @maxchess, and apologies @roundy :/

In fairness I should have really checked that out first! D’oh! Still, it only took 10 minutes or so, so no real loss and someone may have learned a bit about crontab in case they have their own needs or uses for that

I must be the odd one out on my 4.7.1 build, as (also shown in my first post), when I run amixer, I am just returned to the command prompt -

root@retropie:~# amixer
root@retropie:~#

So, when I try to force the volume, I am greeted with this -

root@retropie:~# amixer set PCM -- 40%
amixer: Unable to find simple control 'PCM',0

Try this:

sudo apt remove pulseaudio

Then reboot.

I recently ran into this same problem again after running a full-upgrade on my picade. Having both pulseaudio and alsamixer installed causes too much conflict. Just get rid of pulseaudio, and the problem is fixed. You don’t need it.

2 Likes

Do we know if pimoroni is aware of this issue? While its nice to not have things full volume I’d love the non-technical users of my picade to be able to adjust the volume!

Cheers, I had already tried that after looking at the other post -

root@retropie:~# sudo apt remove pulseaudio
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'pulseaudio' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
root@retropie:~#

I just saw your reply above about amixer not returning any output for you. I missed it earlier. That’s one giant reason you don’t have the ability to properly adjust the volume. Something went wrong with your installation it seems. Try removing amixer and reinstalling it. Without amixer you will not be able to adjust your volume in emulation station, or at all I think. The fact that you do have sound seems to suggest that the picade setup script did configure asound.conf correctly, so I think you just need to figure out how to repair your alsa mixer. Sorry I can’t provide any real solution, since I have no idea what happened with your setup, but I hope I was able to help in some way. Good luck.

Thanks for all the tips and suggestions, everyone.

The output to aplay -l and amixer scontrols -D sndrpihifiberry commands on my Picade were the same as @mrfootlong’s but then amixer and alsamixer worked on mine. I think the proposed amixer fix would’ve worked on mine too, but instead i just opted to use the more convenient ASCII-GUI of the alsamixer to do it. We can now play without waking the neighbours!

Still getting the “Volume control::init() - Failed to find mixer elements” errors of course, and can’t actually control the volume through emulationstation audio settings or the little hardware buttons, so there’s definitely a more fundamental fix required here…

Ditto!

I was emailing Support anyway as the power button on our Picade is faulty and needs replacing, so I’ve mentioned this thread too, in case nobody else had already.

Thanks for that. amixer is part of alsa-utils, so I uninstalled and reinstalled that, rebooted, ran amixer and it still dumps straight to the command line -

root@retropie:~# sudo apt remove alsa-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfftw3-single3 pi-language-support triggerhappy
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  alsa-utils lxplug-cputemp lxplug-network lxplug-ptbatt piwiz raspi-config
  rc-gui rp-prefapps
0 upgraded, 0 newly installed, 8 to remove and 59 not upgraded.
After this operation, 3,361 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 193821 files and directories currently installed.)
Removing lxplug-cputemp (0.5) ...
Removing lxplug-network (0.22) ...
Removing rc-gui (1.43) ...
Removing piwiz (0.18) ...
Removing lxplug-ptbatt (0.12) ...
Removing rp-prefapps (0.27) ...
Removing raspi-config (20201027) ...
Removing alsa-utils (1.1.8-2) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for desktop-file-utils (0.23-4) ...

root@retropie:~# sudo apt-get install alsa-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  pi-language-support triggerhappy
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  alsa-utils
0 upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
Need to get 1,011 kB of archives.
After this operation, 2,088 kB of additional disk space will be used.
Get:1 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf alsa-uti                                     ls armhf 1.1.8-2 [1,011 kB]
Fetched 1,011 kB in 0s (2,382 kB/s)
Selecting previously unselected package alsa-utils.
(Reading database ... 193651 files and directories currently installed.)
Preparing to unpack .../alsa-utils_1.1.8-2_armhf.deb ...
Unpacking alsa-utils (1.1.8-2) ...
Setting up alsa-utils (1.1.8-2) ...
alsa-restore.service is a disabled or a static unit not running, not starting it                                     .
alsa-state.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
root@retropie:~#

Hey folks,

Tweaking the Retropie sound settings (accessible via whatever button you’ve got mapped to Start) got the software volume control working properly for me. Once I’d changed the audio card to PCM and the OMX PLAYER AUDIO DEVICE to ALSA, adjusting the volume slider worked properly (and it also got rid of the volume control errors).

Let me know if this solution works for others, and if it does I’ll add it to the tutorial :)

Hel x

2 Likes

Hi @hel - many thanks for that. Working for me now from a very quick test!

Thought I did just see the volume control error briefly but not sure. Will let you know here with more testing.

Should the volume control with little hardware buttons (that bring up the OSD) have any effect, btw?

Excellent!

The keypad controls are just for the screen panel, so the volume control on the screen OSD won’t do anything to change the volume of the Pi (I think it’s a standard menu that is used on lots of different screens, some of which will have built in speakers).

OK, thanks for confirming hel!