5

While running XBMC, I can adjust the volume of the XBMC application itself. However, this volume is limited by the current system volume. For example, if the system volume is at 80% and XBMC is at 100%, I am effectively at 80% and cannot go higher. Or if the sound is too soft and needs a boost, I would normally increase the system volume beyond 100%.

XBMC takes over the whole screen, so the system volume is not accessible. Pressing the Super key brings up the dash and top menu, but clicking on it is difficult and inconsistent, and very quickly XBMC takes over the screen again.

How can I adjust the system volume without having to quit XBMC?

0

7 Answers 7

3

I had the same problem, that's why I wrote a little script to start xbmc that first gets the current volume, then sets the system volume to 100%, starts xbmc, and after exiting, resets the volume to the original level. That way controlling the volume in xbmc is the same as controlling the system volume since the system volume is on max.
Here is the script:

device=1
volume=$(pacmd list-sinks | sed "1,/index: ${device}/d" | grep volume | head -1 | awk ' {print $3}')
mute=$(pacmd list-sinks | sed "1,/index: ${device}/d" | grep muted | awk ' {print $2}')
pactl set-sink-mute $device 0
pactl set-sink-volume   $device 100%
xbmc 
pactl set-sink-volume   $device $volume
if [[ $mute == "yes" ]]
then
pactl set-sink-mute $device 1
fi
exit;

The first line sets your audio device id. I have hdmi (device 0) and analog (device 1), you can check this with alsamixer or pacmd list-sinks. It also automatically unmutes your system, and when you exit xbmc it mutes it again if it was previously muted.

Note: you can also boost your volume to 150 instead if you find the volume too low, however you can also do this in xbmc in the audio osd settings.

2

When searching for "XBMC change system volume" this question pops up as the first result. The current answers are not bad, but with the newer versions of XBMC it can be solved differently with script execution.

By editing the keyboard.xml file you can change the keybindings to execute scripts. Location of keyboard.xml on all systems

I created a new keyboard.xml file in /home/USER/.xbmc/userdata/keymaps/ with the following content:

<keymap>
  <global>
    <keyboard>
      <volume_mute>RunScript(/home/USER/Scripts/mute.py)</volume_mute>
      <volume_down>RunScript(/home/USER/Scripts/lower_volume.py)</volume_down>
      <volume_up>RunScript(/home/USER/Scripts/raise_volume.py)</volume_up>
    </keyboard>
  </global>
</keymap>

This overrides the default behaviour of changing the XBMC sound levels with executing a script. For Ubuntu, I created a directory with various scripts in my home directory (scripts).

Contents of the files:

mute.py

#!/usr/bin/python
import subprocess
subprocess.call( "amixer -D pulse set Master 1+ toggle", shell=True )

lower_volume.py

#!/usr/bin/python
import subprocess
subprocess.call( "amixer -D pulse sset Master 5%-", shell=True )

raise_volume.py

#!/usr/bin/python
import subprocess
subprocess.call( "amixer -D pulse sset Master 5%+", shell=True )

Then make the files executable with chmod +x Scripts/* . The minus and plus button on the numpad can still lower/raise the volume of XBMC, but those can also be disabled with changing the keyboard.xml.

1

You can assign shortcuts in you keyboard to control the system volume.

Go to System Settings -> Keyboard -> Sound and Media. There you can assign a key combination to increase or decrease the system volume.

enter image description here

1
  • 1
    thanks - this confirmed that my system shortcuts are already exactly as I want them, so the problem is that xbmc is using the same shortcuts, and I'll need find out how to change them
    – lofidevops
    Dec 12, 2012 at 13:40
1

From http://forum.xbmc.org/showthread.php?tid=148210

  • From within XBMC, install the XBMC Audio Mixer add-on.
  • Open the Audio Mixer.
  • Increase the Master volume to 100%. (Can't go beyond 100%, so if you want to boost the volume, you'll still need to do this before launching XBMC.)

(Though it would be nice to be able to map the appropriate keys to adjust the Master volume.)

1
  • doesn't work yet in Frodo RC Jan 7, 2013 at 10:10
1

You could switch the "enable system keys in fullscreen" option on. That stops XBMC from capturing certain keypresses, including the volume keys.

System -> settings -> system -> input devices -> enable system keys in fullscreen

Sadly, as far as I can tell there is no way to choose which keys are passed through and which are not, but this may fit the bill for some users.

1
  • This doesn't appear to exist any more with recent Kodi versions.
    – tremby
    May 24, 2015 at 1:21
1

In XMBC/Kodi:

  • go to PROGRAMS
  • get more
  • install: Keymap Editor
  • change keys for volume up and down (and mute)

. I used keypad +, -, * (mute)

works

0

Switch to a different TTY and use aslamixer, e.g. ctrl-alt-f1 into TTY1, login, run alsamixer, adjust levels, logout and the ctrl-alt-f7 to go back to your X session running XBMC.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .