Enable the gyro-sensor for auto display rotation on Acer 1825

By Christopher, October 30, 2010

In this post I will describe how you could enable the gyro-sensor for automatic display rotation under Ubuntu 10.10 (Should also work under all debian based os)

This post and delivered scripts are based on the work of arobase40 from http://ubuntuforums.org/

http://ubuntuforums.org/showthread.php?t=1486671&page=5

and Imarune from the french ubuntu forum.

Thanks for your nice job!

first step

1
2
3
4
5
6
7
#become root

sudo su -

#add new startup modules

echo -e "i2c-i801\ni2c-dev\nlis3lv02d_i2c" >> /etc/modules

Info:

arobase40 describes in the mentioned forum post two more ways to access the gyro-sensor. I choose this way because, you do not need to compile the kernel or anything else, also the suspend modes works fine.

https://www.ceh-photo.de/blog/wp-content/plugins/downloads-manager/img/icons/winrar.gif download: i2c-gsensor (5.06KB)
added: 30/10/2010
clicks: 4027
description: A small application and a corresponding script for enabling the gyro-sensor autorotation feature of the Acer 1825 series.

Download this file and extract it.

The application i2c-gsensor is based on http://pof.eslack.org/blog/2008/06/03/i2c-gsensor-lis3lv02dl-accelerometer-on-htc-shift-g-sensor/

Change with the  terminal into the extracted directory and run make!

You got the application i2c-gsensor. Copy the application and the script to /usr/bin/ and

set script and application execution rights with:

1
2
3
4
5
sudo cp gyro-auto-rotate.run i2c-gsensor /usr/bin/

sudo chmod +x /usr/bin/i2c-gsensor

sudo chmod +x /usr/bin/gyro-auto-rotate.run

Now you could check if everything works:

1
2
3
4
5
6
7
i2c-gsensor 0 [loop] #loop is optional if you want output in endless loop //0 specifies the i2c-bus, should be correct

#if this works fine, you should see some xyz coordinates corresponding to the current notebook position

#now check the auto rotation script:

gyro-auto-rotate.run

Turn around your notebook and the display should switch in the correct position (left and right correct for tablet mode).

If everything works fine you could add the script to System->Start programs

i2c-gsensor