Enabling the Motion Sensor on the Macbook for Physical Neverball!

By | 2007/10/31

How many of you have played Neverball raise your hands? If you actually raised your hand you get a cookie. If you haven’t played Neverball and you have a Macbook you’re going to start playing because this tutorial makes it *so* much more fun! We can make use of the motion sensors built into the Macbook hardware to allow us to play physical neverball.

Activating the driver

We’ll need to load the proper module into the kernel for this to work. We can do that using this command:

sudo modprobe applesmc

If you want this module to automagically load at boot time you can also use this command:

echo applesmc | sudo tee -a /etc/modules

Launching Neverball

You’ll now want to pick up a copy of the game Neverball which is available in the repositories.

sudo aptitude install neverball

Now launch the game (you’ll find it in your Games menu, or via the command neverball). Select “Play”, select your difficulty level and start the game. Now, here’s the best part, pick up your Macbook to play. Trust me, pick up the macbook and tilt the actual laptop to control tilting the floor within the game. Now that’s playing games with your laptop!

For the rest of you that want to play but don’t have the motion sensors you can just use your boring old mouse to play. Enjoy!

13 thoughts on “Enabling the Motion Sensor on the Macbook for Physical Neverball!

  1. Renaud

    Will it work with a Thinkpad motion sensor as well? I’ll have to try, it would be SO nice!

  2. Luke Hoersten

    Do you know how to enable the “slapbook” functionality? Where you slap the sides of your macbook to flip the desktop cube in compiz.

  3. hardran3

    Is this possible on Thinkpads as well? I know my R50p has a sensor, but is there a driver for it?

  4. Francis Irving

    Wow! This is amazing. Now Linux works with even pieces of hardware I didn’t know I had 🙂

    Compiz desktop switching by tapping howto *would* be great…

  5. SirPing

    Thinkpad users :

    $ sudo modprobe hpaps
    $ sudo modprobe joydev

    And enjoy the neverball game !

  6. nosrednaekim

    Now THAT is seriously sweet. Wish I had a MAC now 😉

  7. Chris

    Yes, it will work with Thinkpads as well, provided you have a sensor.

    sudo modprobe hdaps

    Then just install and run neverball.

  8. SirPing

    Thinkpad users can try loading the modules for the motion sensor and joystick:

    $ sudo modprobe hpaps
    $ sudo modprobe joydev

    Run neverball !

  9. om

    I cannot load neither hdaps, neither hpaps module on my ThinkPad under Ubuntu Gutsy:

    I also installed the hdaps packages,

    sudo modprobe hdaps
    FATAL: Error inserting hdaps (/lib/modules/2.6.22-14-generic/kernel/drivers/hwmon/hdaps.ko): No such device

    sudo modprobe hpaps
    FATAL: Module hpaps not found.

  10. Lars

    For KDE/Thinkpad users: After the two modporbe commands, go to KDE “System settings” -> “KEYBOARD AND MOUSE” -> JOYSTICK”, and calibrate:
    first: Left
    second: Right
    Third: Tilt forward
    Foutrh: Tilt backward

  11. ian

    This does not work on the November 2007 or later Santa Rosa based macbooks.

    dmesg shows a lot of output errors from applesmc, so I guess this module’s code will need updating for the new platform.

  12. Mathew

    I have 3rd generation macbook (Santa Rosa) and running 64bit Ubuntu 7.10. Followed your instruction, but does not seem to work.

  13. Monchi

    I’ve developed a little application to use the Motion Sensor of Macbooks to execute different keyboard shortcuts or system commands. It allows you, for example, to switch tabs on firefox or switch desktops on compiz slapping your macbook, similar to smackbook, but works better on macbooks. You can download it at:
    http://magarto.com/blog/archivo/2008/01/04/mactap-ejecutar-acciones-mediante-toques-en-la-pantalla-en-el-macbook-en-gnulinux/

    With Santa Rosa doesn’t work, because of applesmc is not even updated, but I hope the problem will be solved quickly

Comments are closed.