Home > macbook > Enabling the Motion Sensor on the Macbook for Physical Neverball!

Enabling the Motion Sensor on the Macbook for Physical Neverball!

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!

If this article has been helpful, please consider linking to it.

Categories: macbook Tags: ,

Related Posts

  1. Renaud
    October 31st, 2007 at 09:51 | #1

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

  2. October 31st, 2007 at 10:01 | #2

    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
    October 31st, 2007 at 10:07 | #3

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

  4. October 31st, 2007 at 10:56 | #4

    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
    October 31st, 2007 at 11:55 | #5

    Thinkpad users :

    $ sudo modprobe hpaps
    $ sudo modprobe joydev

    And enjoy the neverball game !

  6. nosrednaekim
    October 31st, 2007 at 15:29 | #6

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

  7. Chris
    October 31st, 2007 at 15:41 | #7

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

    sudo modprobe hdaps

    Then just install and run neverball.

  8. SirPing
    October 31st, 2007 at 16:02 | #8

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

    $ sudo modprobe hpaps
    $ sudo modprobe joydev

    Run neverball !

  9. om
    November 5th, 2007 at 09:05 | #9

    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
    November 8th, 2007 at 16:01 | #10

    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. November 21st, 2007 at 08:02 | #11

    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
    December 27th, 2007 at 03:16 | #12

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

  13. Monchi
    January 20th, 2008 at 05:38 | #13

    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

  1. No trackbacks yet.