RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    USB volume controll not working in retropie

    Scheduled Pinned Locked Moved Help and Support
    usbaudiovolume control
    15 Posts 3 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mituM
      mitu Global Moderator
      last edited by

      @jameth said in USB volume controll not working in retropie:

      but nothing is happing "on boot" would you mind helping me configure triggerhappy?

      As far as I recall, the triggerhappy service should be started on boot automatically, but I don't have a Pi available right now to confirm.

      Run

      systemctrl status triggerhappy.service
      

      and post the output.

      J 1 Reply Last reply Reply Quote 0
      • J
        jameth @mitu
        last edited by

        @mitu ah sorry, so, triggerhappy is up and running, but it's not "looking" at my config file, its not just a case of dropping in a correctly named file in an appropriate directory.

        ill do some more digging and reading up. if i get it working ill be sure to post my steps.

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @jameth
          last edited by

          @jameth said in USB volume controll not working in retropie:

          @mitu ah sorry, so, triggerhappy is up and running, but it's not "looking" at my config file, its not just a case of dropping in a correctly named file in an appropriate directory.

          See how the service is started, the systemctl command for status should tell you - may you need to add the lines to the main .conf file and not in a separate file.

          J 1 Reply Last reply Reply Quote 1
          • J
            jameth @mitu
            last edited by

            @mitu

            pi@retropie:~ $ systemctl status triggerhappy.service
            ● triggerhappy.service - triggerhappy global hotkey daemon
               Loaded: loaded (/lib/systemd/system/triggerhappy.service; enabled; vendor preset: enabled)
               Active: active (running) since Wed 2022-08-17 12:11:15 BST; 1min 20s ago
             Main PID: 355 (thd)
                Tasks: 1 (limit: 414)
               CGroup: /system.slice/triggerhappy.service
                       └─355 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user nobody --deviceglob /dev/input/event*
            
            Aug 17 12:11:14 retropie systemd[1]: Starting triggerhappy global hotkey daemon...
            Aug 17 12:11:14 retropie thd[355]: Found socket passed from systemd
            Aug 17 12:11:15 retropie systemd[1]: Started triggerhappy global hotkey daemon.
            

            so its all up and running, but I feel like my .conf isn't being "loaded in", theres a th-cmd --add command listed in the instructions, but the paths they use in the example don't make sense to me :s

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              Seems to be an issue with the user used by the service - see https://retropie.org.uk/forum/topic/18133/triggerhappy-daemon-thd-doesn-t-work-on-my-pi-running-retropie-help/31.

              You may be able to change it by running

              sudo systemctl edit triggerhappy.service
              

              an editor session will open, you need to add the following lines:

              [Service]
              ExecStart=
              ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user pi --deviceglob /dev/input/event*
              

              and then save and exit. Restart the service with:

              sudo systemctl restart triggerhappy
              

              and see if the commands are taking effect.

              J 1 Reply Last reply Reply Quote 1
              • J
                jameth @mitu
                last edited by

                @mitu

                you've done it.

                it works!

                I can now change the volume in a game, and this persists through power off/on.

                I cannot tell how much this means to me. thank you so much for your support.

                I will read up on the post you linked and post a conclusion before marking [solved]

                1 Reply Last reply Reply Quote 1
                • L
                  levis78
                  last edited by levis78

                  Hi, I know this is quite an old thread but I have followed all of the steps and I am still not able to get it to work as I get a permission denied error and I can't get passed it.
                  This is what I get I run the command:

                  pi@retrocade:~$ sudo /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --user pi --deviceglob /dev/input/event*
                  Executing trigger action: /usr/bin/amixer set Master 2%+
                  Executing trigger action: /usr/bin/amixer set Master 2%+
                  Home directory not accessible: Permission denied
                  W: [pulseaudio] core-util.c: Failed to open configuration file '/root/.config/pulse//daemon.conf': Permission denied
                  W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Permission denied
                  amixer: Unable to find simple control 'Master',0

                  Can you please help me @mitu ?

                  Thanks!

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    levis78 @levis78
                    last edited by levis78

                    @mitu for some reason, I only get the permission denied via ssh. If I execute: /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --user pi --deviceglob /dev/input/event* from the desktop (PIXEL) locally it works perfectly, however when I boot normally into retropie, I turn the knob and nothing happens.
                    If I go back to the pixel desktop, run the command and launch emulationstation from the terminal it also works.
                    However, when I reboot and goes back again into retropie, it doesn't work anymore. From retropie I have to go back to the pixel desktop, run the command in terminal and launch emlationstation.

                    For background information, I tried with the triggerhappy.service and it didn't work, so I disabled it and added: nohup /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --user pi --deviceglob /dev/input/event* & to rc.local as you suggested in your previous thread.

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      levis78 @levis78
                      last edited by

                      Hi @mitu,

                      While I wait for your help, I tried in to insert nohup /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --user pi --deviceglob /dev/input/event* & into autostart.sh, but checking ps -ef, the process is not running. I'm not sure I am doing it right.
                      When inserted into rc.local, checked ps -ef and it's listed there.

                      Thanks!

                      L 1 Reply Last reply Reply Quote 0
                      • L
                        levis78 @levis78
                        last edited by

                        Hi @mitu, I keep digging and find strange stuff, look at this...

                        pi@retrocade:~$ sudo amixer scontrols
                        Simple mixer control 'HDMI',0
                        pi@retrocade:~$ amixer scontrols
                        Simple mixer control 'Master',0
                        Simple mixer control 'Capture',0
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.