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 site has been useful, please consider participating in the Fundraiser.

Other Points of Interest

  • No Related Post

Comments

13 Responses to “Enabling the Motion Sensor on the Macbook for Physical Neverball!”

  1. Renaud on October 31st, 2007 9:51 am

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

  2. Luke Hoersten on October 31st, 2007 10:01 am

    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 on October 31st, 2007 10:07 am

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

  4. Francis Irving on October 31st, 2007 10:56 am

    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 on October 31st, 2007 11:55 am

    Thinkpad users :

    $ sudo modprobe hpaps
    $ sudo modprobe joydev

    And enjoy the neverball game !

  6. nosrednaekim on October 31st, 2007 3:29 pm

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

  7. Chris on October 31st, 2007 3:41 pm

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

    sudo modprobe hdaps

    Then just install and run neverball.

  8. SirPing on October 31st, 2007 4:02 pm

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

    $ sudo modprobe hpaps
    $ sudo modprobe joydev

    Run neverball !

  9. om on November 5th, 2007 9:05 am

    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 on November 8th, 2007 4:01 pm

    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 on November 21st, 2007 8:02 am

    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 on December 27th, 2007 3:16 am

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

  13. Monchi on January 20th, 2008 5:38 am

    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

Leave a Comment




    Subscribe to the RSS feed!


    subscribe to the ubuntu tutorials RSS feed

    Ubuntu Tutorials Fundraiser


    Please Donate to
    Server Improvement

    Target amount: USD1,000.00
    Total Donations: USD255.00
    Amount Needed: USD745.00

    Thank you for your support!

    Click to Donate

    Polls



  • Blogroll

  • Ads by Google