Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been having this problem for a while now, and even though I found a half-patch at some point perhaps someone can tell me how to properly solve it once and for all.

Essentially, certain games and applications (Super Meat Boy, Braid, XBMC) will make the volume go crazy, going up and down more or less at random (although usually tending on the "more" side). After closing the application, if I switch to a console, I'll see the cursor flashing rapidly (something like 5 times per second or so) for a while (while the volume still goes crazy), until both problems stop at the same time (the cursor goes back to normal, and the volume stabilizes).

A patch I've been using is, essentially, running the following script before any app which I know triggers this problem:

xmodmap -e "keycode 122 = 0x0000"
xmodmap -e "keycode 123 = 0x0000"

This lines, essentially, are remapping the volume up/down keys to nothing, and that stops the problem from happening, but then again, it also causes my volume keys to stop working.

Can anyone help me understand what is going on here? The only common thread between the applications seems to be the fact that they all make intensive use of graphics. I'm running Ubuntu 12.04 on an HP Notebook, and even though this problem is now happening with Cinnamon, it used to happen already on Gnome 2.

share|improve this question

Answering my own question, hopefully it will be useful for someone else.

My HP notebook comes with an accelerometer, apparently to shut down the hard drives in case it falls from somewhere. This accelerometer is registered in /dev, and all this games are reading from this device as if it were a joystick. This is why it only happened when two conditions were met:

  • I was playing a game (happened in XBMC too)
  • The laptop was open (I discovered this problem didn't happen if I plugged an external monitor and closed the laptop - I'm guessing the accelerometer shuts down when the laptop is closed)

Plugging a real joystick and telling each game to use the correct file in /dev has solved the issue.

I know this is only a partial answer, because it does not explain why I'm getting volume changes instead of random movement, but that's the best I have. It also happens in Debian distros, btw.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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