Thank-you for your replies and suggestions @MiscBits and @BigRedMailbox
1. Installed Bookworm x64 Lite with latest upgrades.
2. Set console autologin using raspi-config
3. In /boot/firmware/config.txt:4. In /etc/asound.conf:5. For Bluetooth audio receiver: Installed pipewire wireplumber libspa-0.2-bluetooth pipewire-alsa pipewire-audio
6a. Installed ir-keytable
6b. Base on scan codes, made a .toml file at: /lib/udev/rc_keymaps/mpr.toml and copied it to /etc/rc_keymaps/mpr.toml
6c Based on scan codes, created .keymaps file at: /etc/rc_keymaps/mpr.keymap
6d Added line to /etc/rc_maps.cfg:6e Added lines just before exit0 to /etc/rc.local:7. triggerhappy was installed by default. Changed at /etc/systemd/system/multi-user.target.wants/triggerhappy.service:
From:
to
8. Changed at /etc/default/triggerhappy to look like:
9. status triggerhappy.service looks like:
10. At /etc/triggerhappy/triggers.d/vctl.conf:11. When thd --triggers /etc/triggerhappy/triggers.d/ /dev/input/event0 is executed manually and when keys assigned to increase, decrease, mute to mute and mute again to un-mute the volume are pressed:I expect alsamixer volume to respond without having to manually execute any line of code, but that is not happening
I tried adding the following line to /etc/rc.local as the last agrument:There was no change even after reboot.
It seems like the ir-keytable part is working, when run manually, triggerhappy is also responding correctly.
The part that is not happening is that triggerhappy is not continuously listening, in the background, to the ir remote inputs and same after re-start/reboot
What else could it be? Any suggestions are welcome. Thanks in advance!!
Here is all what I have done on RPi Zero 2W:There is a guide to running commands automatically at start created by a forum member thagrol that can be found https://github.com/thagrol/Guides
Have a read and if you get stuck just pop what you have done on here so we can have a look.
1. Installed Bookworm x64 Lite with latest upgrades.
2. Set console autologin using raspi-config
3. In /boot/firmware/config.txt:
Code:
dtparam=i2s=on#dtparam=audio=ondtoverlay=hifiberry-dac#dtoverlay=vc4-kms-v3d#max_framebuffers=2gpio=4=op,dhdtoverlay=gpio-ir,gpio_pin=17dtoverlay=disable-wifihdmi_ignore_hotplug=1
Code:
defaults.pcm.card 0defaults.ctl.card 0
6a. Installed ir-keytable
6b. Base on scan codes, made a .toml file at: /lib/udev/rc_keymaps/mpr.toml and copied it to /etc/rc_keymaps/mpr.toml
6c Based on scan codes, created .keymaps file at: /etc/rc_keymaps/mpr.keymap
6d Added line to /etc/rc_maps.cfg:
Code:
* * mpr.toml
Code:
# Enable all IR protocols:sudo ir-keytable -p all# Define path to toml file:ir-keytable -a /etc/rc_maps.cfg -s rc0
From:
Code:
[Service]Type=notifyExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user nobody --deviceglob /dev/input/event*
Code:
[Service]Type=notifyExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user rmd --deviceglob /dev/input/event*
Code:
#DAEMON_OPTS=""DAEMON_OPTS="--user root"
Code:
rmd@rmd:~ $ sudo systemctl status triggerhappy.service● triggerhappy.service - triggerhappy global hotkey daemon Loaded: loaded (/lib/systemd/system/triggerhappy.service; enabled; preset: enabled) Active: active (running) since Fri 2024-07-05 13:24:18 BST; 3min 28s agoTriggeredBy: ● triggerhappy.socket Main PID: 419 (thd) Tasks: 1 (limit: 404) CPU: 23ms CGroup: /system.slice/triggerhappy.service └─419 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user rmd --deviceglob "/dev/input/event*"Jul 05 13:24:18 rmd systemd[1]: Starting triggerhappy.service - triggerhappy global hotkey daemon...Jul 05 13:24:18 rmd thd[419]: Found socket passed from systemdJul 05 13:24:18 rmd systemd[1]: Started triggerhappy.service - triggerhappy global hotkey daemon.
10. At /etc/triggerhappy/triggers.d/vctl.conf:
Code:
KEY_VOLUMEUP1amixer -D pipewire sset Master 5%+KEY_VOLUMEUP2amixer -D pipewire sset Master 5%+KEY_VOLUMEDOWN1amixer -D pipewire sset Master 5%-KEY_VOLUMEDOWN2amixer -D pipewire sset Master 5%-KEY_MUTE1amixer -D pipewire sset Master toggle
Code:
rmd@rmd:~ $ thd --triggers /etc/triggerhappy/triggers.d/ /dev/input/event0Executing trigger action: amixer -D pipewire sset Master 5%-Simple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 29500 [45%] [on] Front Right: Playback 29500 [45%] [on]Executing trigger action: amixer -D pipewire sset Master 5%+Simple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 32777 [50%] [on] Front Right: Playback 32777 [50%] [on]Executing trigger action: amixer -D pipewire sset Master toggleSimple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 32777 [50%] [off] Front Right: Playback 32777 [50%] [off]Executing trigger action: amixer -D pipewire sset Master toggleSimple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 32777 [50%] [on] Front Right: Playback 32777 [50%] [on]
I tried adding the following line to /etc/rc.local as the last agrument:
Code:
nohup /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --user rmd --deviceglob /dev/input/event* &
I tried removing and then re-installing triggerhappy but it has not helpedIt sounds like triggerhappy wasn't installed correctly, since it is not auto-starting - as it should (and does) if installed correctly.
Maybe uninstall it and then re-install it?
It seems like the ir-keytable part is working, when run manually, triggerhappy is also responding correctly.
The part that is not happening is that triggerhappy is not continuously listening, in the background, to the ir remote inputs and same after re-start/reboot
What else could it be? Any suggestions are welcome. Thanks in advance!!
Statistics: Posted by karagir — Fri Jul 05, 2024 12:43 pm