Using built-in accelerometer to play Tux Racer

From ThinkWiki:

The Active Protection System

With the new series of ThinkPads IBM introduced the Active Protection System (APS) in 2003. The APS is a protection system for the ThinkPad’s internal harddrive. A sensor inside the ThinkPad recognizes when the notebook is accelerated. A software applet then is triggered to park the harddisk. This way the risk of data loss in case of when the notebook is dropped is significantly reduced since the read/write head of the harddrive is parked and hence can’t crash onto the platter when the notebook drops onto the floor.

The hardware sensor is capable of not only recognizing acceleration of the notebook, but also (to a certain degree) of its whole orientation in space, relative to gravity’s axis. Furthermore, having the actual control put into software, its functionality is extendable and it gives chance to implement features like the “ignore minor shocks” feature which is present in the Windows based control applet. (This feature prevents the harddrive from parking in case of minor regular shocks such as occur when in a train or car.)

The measurements are physically performed by an Analog Devices ADXL320 accelerometer chip, managed by the embedded controller.

It would be a shame not to use it for other creative purposes ūüôā

  1. Install Lenovo Active Protection System.
  2. Download and extract Tux Racer.
  3. Download SDL Patch by Mark A. Smith (IBM) – Author’s page (not available anymore) and extract SDL.dll and SDL_events.c.patch into Tux Racer’s folder (overwriting the previous SDL.dll).
  4. Play!

Lenovo S205 Driver Repository (Google Drive)

I’ve created a public Google Drive folder for the Lenovo S205 Drivers. The main advantage is that now you will be able download all the drivers as a single .zip archive.¬† Also, the download speed should be better than the official Lenovo site’s.

I can’t garantee that I’ll update the drivers as soon as they are released (I don’t have enough time and bandwith) but I’d be glad to give edit rights to anyone willing to contribute to this project.

– The first drivers are still being uploaded. –

Driver Update – Ralink RT3090 WiFi Driver v5.0.2.0 with Windows 8 (!) Support

The new Ralink WiFi Driver is now available. Download it directly from Ralink Support.
Follow this tutorial to install the drivers properly.

(more…)

Dual-Boot Windows & Ubuntu on Lenovo S205

Dual-Boot

Important: If you follow this tutorial you wont’t be able to use Lenovo OneKey Recovery anymore (but on the other hand, you will get a fully-functional secondary OS and a more secure partition structure instead :)).

Recommendations / Guidelines:

  • ¬†There’s a difference between advertised and actual capacity of an HDD. You can use this calculator to get the actual size of you drive. My 320 GB hard drive has the capacity of only 298.02 GB.
  • According to the official requirements Windows 7 needs at least 16 GB (32-bit) / 20 GB (64-bit) hard disk space. Keep in mind that Windows tends to grow¬†over time and don’t forget to add the the sofwares/games you are going to install to the final size as well. For someone who wants Windows as primary OS, I recommend an at least 80 GB partition.
  • Ubuntu’s documentation says it’s going to need at least¬†5 GB hard disk space. For a general user (who just wants to have a secondary/backup OS or simply wants to try Ubuntu) I recommend a 10 GB partition. In this tutorial you don’t have to create any Linux partition as Ubuntu will automatically create them for you on the empty space. Linux experts will probably set the partition types and sizes manually anyway ūüėČ
  • People tend to use the standard Documents folder (or even worse: Desktop) for file storage. THIS IS WRONG AND IRRESPONSIBLE. Your OS can die anytime/virus can hit and I don’t think you would like to spend your time with recovery. It’s a lot easier and safer to just create a partition for your stuff. Besides, this partition can be used under both Windows and Ubuntu without any conflict. WORK or PERSONAL partition size should equal HDD capacity – Win7 partition – Ubuntu partition. In my case 300-80-10 = 210 GB.
  • Don’t expect partition sizes to be exactly the same you’ve entered. Windows will subtract a small 100/200 MB partition from your System drive and there will be differences due to rounding as well.
  • You have to enter partition sizes in MB (1 GB = 1024 MB surprised).

Scenario #1: You’ve bought your netbook with pre-installed Windows.
Your partitions should look similar to this:
Preinstalled Partitions

  • No drive letter | 100 MB / 200 MB | SYSTEM_DRV / No label
    This is a Windows System Reserved space. DO NOT MESS WITH IT.
  • C: | Windows_system / Windows7_OS / any other Win related label
    This is your Windows partition. DO NOT DELETE IT.
  • D: | LENOVO
    Partition containing your Lenovo Drivers & Softwares.
  • No drive letter | LENOVO_PART / No label
    OneKey Recovery backup partition.

You have two options:

  1. Use Wubi¬†(Ubuntu Installer for Windows) – Recommended (this is the only method which won’t disable OneKey Recovery)
    Installs Ubuntu on your Windows drive without messing with the partition table. You can install/uninstall it like any other Windows software. Keep in mind, that Wubi won’t be as fast as the standard Ubuntu (see pros/cons here).
  2. Re-partition your hard drive.
    • If you’ve stored files on your D: (Lenovo) drive, back them all up to your C: partition. You might want to back up the Lenovo stuff as well.
    • Type in diskmgmt.msc in Start menu and Disk Management will pop-up.
    • Delete Lenovo’s partitions: LENOVO and LENOVO_PART (it’s the last one with “OEM Partition” attribute, not necessarily have a label). Be careful not to remove any Windows-related or personal volume.
    • Right click on your C: drive and choose Shrink. Enter the desired size in MB (see my recommendation above, I’ve set it to 81 920 MB).
    • You should see two partitions and an unallocated space.
    • Right click on the unallocated space and select New Partition. In New Parition Wizard select Primary partition > Enter the desired size in MB (see my recommendation above, I’ve set it to 215 040 MB). > Assign the letter ‘D’ > Select Format, choose NTFS as file system and enter a Volume label. I named it WORK.
    • The Windows part is over. If everything went well, you should have your computer ready for Ubuntu. Proceed with the Ubuntu installation tutorial below.

Scenario #2: You’ve bought your netbook without pre-installed Windows.

Installing Windows

Important: You have to install Windows in Legacy/BIOS mode instead of the default UEFI mode (otherwise WiFi/Sleep/Hibernation won’t work due to their incompatibility with UEFI).

  1. You have three ways to install Windows on your device:
    • via External (USB) DVD drive
    • via Pendrive
    • and via Network (PXE)
  2. If you want to install Windows via DVD, do these extra steps to start Windows installer in Legacy mode:
    • Enter BIOS (press F2 when you see the Lenovo logo) and set SATA Controller working mode to ‘AHCI’ under the Configuration tab. Switch to Exit and select Exit Saving Changes. Reboot.
    • Enter Boot menu (press FN+F11 when you see the Lenovo logo). Select your DVD drive.
    • Windows installer’s “Press any key to boot from CD/DVD…” message will appear but DO NOT PRESS ANY KEY – WAIT.
    • It will then either boot straight from the DVD or it will once again say¬†“Press any key to boot from CD/DVD…”, but in a slightly different (DOS-like, low-resolution) font. ¬†This is when you need to press a key.
    • If everything went well, Windows installer will now start in legacy mode.
  3. Windows Installer
    • Set your localization > Install now > Accept the licence terms > Choose Custom (advanced) installation
    • You will see some default FreeDOS / Lenovo partitions. We are going to delete all of them. biggrin
    • Click on Drive options (advanced) and delete the partitions one-by-one until you have a single Unallocated Space on your drive.
    • Click on New, enter the desired partition size for the System volume (see my recommendation above, I’ve set it to 81 920 MB) and click Apply. Windows will automatically create an additional partition (System Reserved) along with the new partition.

    Important: If it creates three partitions, it means that Windows installer is still in UEFI mode. Delete these partitions and do the steps again.

    • Create your work/personal partition the same way (this partition is going to be accessible by booth Windows and Ubuntu). As for the partition size, see my recommendation above. I’ve set it to¬† 215 040 MB.
    • Now, you should see three partitions and some unallocated space.
    • Select Partition 2 and click next.
    • That’s it. The rest is self-explanatory. After the Windows installation is done, you can proceed with the Ubuntu installation tutorial below.

Installing Ubuntu

  1. You have three ways to install Ubuntu on your device:
    • via External (USB) DVD drive
    • via Pendrive
    • and via Network (PXE)
  2. In Ubuntu’s Boot Menu choose “Try Ubuntu without installing”. This will start Ubuntu in Live mode.
  3. Click on the “Install Ubuntu 12.04” icon on your desktop.
  4. Ubuntu Installer
    • Set localization
    • Check “Download updates while installing” and “Install this third-party software” if you have a working internet connection. Ubuntu live may have trouble setting up wifi and ethernet, in this case you can either try to fix the network devices (see my tutorials) or install the updates later.
    • Select “Install Ubuntu alongside Windows 7”. Ubuntu Installer
    • That’s it. The rest is self-explanatory.
    • If you want to customize your boot loader (change default operating system, waiting time, etc.), read my GRUB customization tutorial.

The result:

GRUB

GRUB 1.99 – This is what you are going to see when the computer starts.

diskmgmt result

Partitions under Windows 7 (Disk Management)

gparted result

Partitions under Ubuntu 12.04 (GParted)

%d bloggers like this: