![]() |
triggerhappy and volume - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: triggerhappy and volume (/showthread.php?tid=5691) |
triggerhappy and volume - mezcal - 07-11-2023 Hello, I use triggerhappy daemon for buttons, infrared remote controls and a rotary encoder. I have rpi3 with hifiberry dac+ and use hardware volume. I have a problem with volume. The commad is /var/www/vol.sh -dn 2. Triggerhappy daemon is started as nobody user. Code: sudo -u nobody /var/www/vol.sh -dn 2 I think triggerhappy.service should be overridden in /etc to starts as pi user. Maybe rewrite vol.sh or add rights for nobody user. Code: for example /etc/systemd/system/triggerhappy.d/customexec.conf: RE: triggerhappy and volume - Tim Curtis - 07-11-2023 We ship a default drop file for triggerhappy that uses vol.sh. I just ran a quick test with a USB volume control and no issues. Code: pi@moode:~ $ cat /etc/triggerhappy/triggers.d/media.conf Keep in mind that any userid can be created during image prep and so the userid "pi" cannot be assumed.There are no dependencies on the user "pi" in the codebase. RE: triggerhappy and volume - mezcal - 07-11-2023 I have installed moode 8.3.3. If I set Volume type: software it works. If I set Volume type: hardware it does not. The problem is that user nobody has not access to the hardware mixer. I have hifiberry dac+. I don't know if it also applies to other dacs. Code: pi@moode:~/t $ sudo -u nobody amixer The command amixer is in /var/www/vol.sh. Solution is adding nobody to the audio group. Code: sudo usermod -a -G audio nobody It is also possible to start the triggerhappy as another user from the audio group. For example mpd user. RE: triggerhappy and volume - Tim Curtis - 07-11-2023 (07-11-2023, 06:00 PM)mezcal Wrote: I have installed moode 8.3.3. I'm able to repro the issue when configuring Hardware volume. My earlier test was using Software volume. I'll ad to the TODO list to investigate but your suggestion to add userid "nobody" to the audio group looks promising. |