HDMI audio disabled after resuming from sleep

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












Whenever I resume my Ubuntu 17.04 from sleep the HDMI audio output is disabled, and audio has defaulted to the SP-DIF output. I always have to run pavucontrol or go into sound settings to re-select HDMI as the audio output.
As this is a Home Theatre PC running Kodi this is a pain in the neck, as it can't be done using the IR remote.
Is there any way that I can resolve this, either by disabling the SP-DIF output altogether or automatically selecting the HDMI audio device whenever resuming from sleep?










share|improve this question

























    up vote
    1
    down vote

    favorite












    Whenever I resume my Ubuntu 17.04 from sleep the HDMI audio output is disabled, and audio has defaulted to the SP-DIF output. I always have to run pavucontrol or go into sound settings to re-select HDMI as the audio output.
    As this is a Home Theatre PC running Kodi this is a pain in the neck, as it can't be done using the IR remote.
    Is there any way that I can resolve this, either by disabling the SP-DIF output altogether or automatically selecting the HDMI audio device whenever resuming from sleep?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Whenever I resume my Ubuntu 17.04 from sleep the HDMI audio output is disabled, and audio has defaulted to the SP-DIF output. I always have to run pavucontrol or go into sound settings to re-select HDMI as the audio output.
      As this is a Home Theatre PC running Kodi this is a pain in the neck, as it can't be done using the IR remote.
      Is there any way that I can resolve this, either by disabling the SP-DIF output altogether or automatically selecting the HDMI audio device whenever resuming from sleep?










      share|improve this question













      Whenever I resume my Ubuntu 17.04 from sleep the HDMI audio output is disabled, and audio has defaulted to the SP-DIF output. I always have to run pavucontrol or go into sound settings to re-select HDMI as the audio output.
      As this is a Home Theatre PC running Kodi this is a pain in the neck, as it can't be done using the IR remote.
      Is there any way that I can resolve this, either by disabling the SP-DIF output altogether or automatically selecting the HDMI audio device whenever resuming from sleep?







      sound pulseaudio hdmi spdif






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 18 at 15:37









      user1175461

      3416




      3416




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          There is a complicated way of accomplishing this with udev rules, systemd service and suspend/resume hooks.



          An easier way is to check this:



          $ cat /etc/pulse/default.pa | grep switch-on-port-available
          load-module module-switch-on-port-available


          If the second line doesn't begin with a # (commented out) then edit the file and insert a # in the beginning.



          Now all output will be controlled to what you manually set it to and stay there until you change it.






          share|improve this answer



























            up vote
            0
            down vote













            For the benefit of anyone who hits this problem....Following advice given on another forum I upgraded my kernel from 4.10 to 4.15 and it seems to have fixed the problem.






            share|improve this answer




















            • It is helpful to provide a link to the forum answer.
              – WinEunuuchs2Unix
              Mar 19 at 15:13










            • Ignore that - the problem has returned today :0(
              – Ian M
              Mar 20 at 10:11










            • FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
              – Ian M
              Mar 20 at 10:17










            • I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
              – Ian M
              Mar 20 at 15:50










            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017019%2fhdmi-audio-disabled-after-resuming-from-sleep%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            There is a complicated way of accomplishing this with udev rules, systemd service and suspend/resume hooks.



            An easier way is to check this:



            $ cat /etc/pulse/default.pa | grep switch-on-port-available
            load-module module-switch-on-port-available


            If the second line doesn't begin with a # (commented out) then edit the file and insert a # in the beginning.



            Now all output will be controlled to what you manually set it to and stay there until you change it.






            share|improve this answer
























              up vote
              1
              down vote













              There is a complicated way of accomplishing this with udev rules, systemd service and suspend/resume hooks.



              An easier way is to check this:



              $ cat /etc/pulse/default.pa | grep switch-on-port-available
              load-module module-switch-on-port-available


              If the second line doesn't begin with a # (commented out) then edit the file and insert a # in the beginning.



              Now all output will be controlled to what you manually set it to and stay there until you change it.






              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                There is a complicated way of accomplishing this with udev rules, systemd service and suspend/resume hooks.



                An easier way is to check this:



                $ cat /etc/pulse/default.pa | grep switch-on-port-available
                load-module module-switch-on-port-available


                If the second line doesn't begin with a # (commented out) then edit the file and insert a # in the beginning.



                Now all output will be controlled to what you manually set it to and stay there until you change it.






                share|improve this answer












                There is a complicated way of accomplishing this with udev rules, systemd service and suspend/resume hooks.



                An easier way is to check this:



                $ cat /etc/pulse/default.pa | grep switch-on-port-available
                load-module module-switch-on-port-available


                If the second line doesn't begin with a # (commented out) then edit the file and insert a # in the beginning.



                Now all output will be controlled to what you manually set it to and stay there until you change it.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 20 at 10:50









                WinEunuuchs2Unix

                35.9k759134




                35.9k759134






















                    up vote
                    0
                    down vote













                    For the benefit of anyone who hits this problem....Following advice given on another forum I upgraded my kernel from 4.10 to 4.15 and it seems to have fixed the problem.






                    share|improve this answer




















                    • It is helpful to provide a link to the forum answer.
                      – WinEunuuchs2Unix
                      Mar 19 at 15:13










                    • Ignore that - the problem has returned today :0(
                      – Ian M
                      Mar 20 at 10:11










                    • FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
                      – Ian M
                      Mar 20 at 10:17










                    • I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
                      – Ian M
                      Mar 20 at 15:50














                    up vote
                    0
                    down vote













                    For the benefit of anyone who hits this problem....Following advice given on another forum I upgraded my kernel from 4.10 to 4.15 and it seems to have fixed the problem.






                    share|improve this answer




















                    • It is helpful to provide a link to the forum answer.
                      – WinEunuuchs2Unix
                      Mar 19 at 15:13










                    • Ignore that - the problem has returned today :0(
                      – Ian M
                      Mar 20 at 10:11










                    • FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
                      – Ian M
                      Mar 20 at 10:17










                    • I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
                      – Ian M
                      Mar 20 at 15:50












                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    For the benefit of anyone who hits this problem....Following advice given on another forum I upgraded my kernel from 4.10 to 4.15 and it seems to have fixed the problem.






                    share|improve this answer












                    For the benefit of anyone who hits this problem....Following advice given on another forum I upgraded my kernel from 4.10 to 4.15 and it seems to have fixed the problem.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 19 at 14:28









                    Ian M

                    185




                    185











                    • It is helpful to provide a link to the forum answer.
                      – WinEunuuchs2Unix
                      Mar 19 at 15:13










                    • Ignore that - the problem has returned today :0(
                      – Ian M
                      Mar 20 at 10:11










                    • FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
                      – Ian M
                      Mar 20 at 10:17










                    • I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
                      – Ian M
                      Mar 20 at 15:50
















                    • It is helpful to provide a link to the forum answer.
                      – WinEunuuchs2Unix
                      Mar 19 at 15:13










                    • Ignore that - the problem has returned today :0(
                      – Ian M
                      Mar 20 at 10:11










                    • FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
                      – Ian M
                      Mar 20 at 10:17










                    • I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
                      – Ian M
                      Mar 20 at 15:50















                    It is helpful to provide a link to the forum answer.
                    – WinEunuuchs2Unix
                    Mar 19 at 15:13




                    It is helpful to provide a link to the forum answer.
                    – WinEunuuchs2Unix
                    Mar 19 at 15:13












                    Ignore that - the problem has returned today :0(
                    – Ian M
                    Mar 20 at 10:11




                    Ignore that - the problem has returned today :0(
                    – Ian M
                    Mar 20 at 10:11












                    FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
                    – Ian M
                    Mar 20 at 10:17




                    FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…
                    – Ian M
                    Mar 20 at 10:17












                    I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
                    – Ian M
                    Mar 20 at 15:50




                    I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???
                    – Ian M
                    Mar 20 at 15:50

















                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017019%2fhdmi-audio-disabled-after-resuming-from-sleep%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

                    What makes Checkinstall packages not suitable for distribution?

                    Running the scala interactive shell from the command line