I have an issue and I've tried a lot of solutions and as such I'm looking for a custom one.

I've set up my Raspberry Pi running XBian. The video is being displayed on my television but not the audio, however when I unplug the HDMI cable and then plug it back in a second later, the sound will work.

The unplug/plug back in of the HDMI cable has to be done at the start of every single video played within XBMC to get the sound working.

What I am wondering is that if it is at all possible to make this process automatic within the Pi, so that when a new video is played, the Pi detects this and runs a piece of code to automatically disable and then enable the HDMI connection, rather than having to do it manually each time?

Thank you in advance for any help received.

  • Try running sudo amixer cset numid=3 1 and then (maybe after some delay) sudo amixer cset numid=3 0. This will make the audio go through the audio jack, and then back thought the hdmi connection again.
    – Gerben
    Commented Feb 22, 2014 at 12:05

1 Answer 1


I found this while I was looking. http://glframebuffer.wordpress.com/2013/08/28/raspberrypi-how-to-turn-off-hdmi-from-raspberry-pi/

  • 3
    Welcome to Raspberry Pi Stack Exchange! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. This helps protect against "link rot", where the information linked to is no longer where it was when the link was originally posted. Commented Jun 17, 2014 at 23:42
  • ok, will do in future
    – Mart
    Commented May 12, 2017 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.