Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I noticed my kernel has found an HP Accelerometer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Wed Mar 30, 2011 12:53 am    Post subject: I noticed my kernel has found an HP Accelerometer Reply with quote

My HP EliteBook 8540w has an accelerometer.
Code:

input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input8


I was wondering if there is any software that uses it?

Say, like HP do, hard drive protection - park the drives in an emergency situation, or maybe something cool like rotate the screen?
_________________
...Lyall
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Thu Mar 31, 2011 12:44 am    Post subject: Reply with quote

Well, it appears that I can sense the orientation and position of my laptop by
Code:
 watch -n 1 'cat /sys/devices/platform/lis3lv02d/position'


This requires me to enable the kernel driver for it
Code:
CONFIG_SENSORS_LIS3LV02D=m


It appears that games-puzzle/neverball uses this, but, for Gentoo, I am unsure how.

As an additional bonus, a nifty sample program
Code:
/{Kernel Source Root}/Documentation/hwmon/hpfall.c
is able to sense the laptop is in freefall and to park the hard drives for a short time, enough to prevent hard drive platter damage over your precious data, not to save the rest of the laptop, however.

I have yet to do an ebuild of this, but the program is trivial to compile and run. It is remarkably accurate, it senses my laptop going into freefall within about 10cm of being let go. Obviously, I have not tested it to the point of letting the laptop actually land. :)

Finally, I found that the Light Sensor in this model also is an option, by setting
Code:
CONFIG_HP_WMI=m
and then enabling
Code:
echo 1 > /sys/devices/platform/hp-wmi/als
in /etc/conf.d/local.start

Most of the feedback I have indicate that all this 'just works' in Ubuntu, but, at this stage, I have been unable to determine how to setup the light sensor to work in Gentoo. (I have only spent a few minutes on it).
_________________
...Lyall
Back to top
View user's profile Send private message
nikulinpi
n00b
n00b


Joined: 12 Jan 2007
Posts: 38

PostPosted: Thu Mar 31, 2011 5:24 am    Post subject: not a right sensor Reply with quote

to sense inclination, you will need a hall effect sensor, not accelerometer. BTW you are almost like my friend who has found that his sony laptop has a "secret" GPS gps receiver. The case was that sony just masked it in windows to pass FCC faster.
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Thu Mar 31, 2011 6:30 am    Post subject: Reply with quote

The accelerometer works, I found that I needed to enable joysticks in my kernel config, This will teach me to have a lean mean kernel. Stuff that others say 'just works', doesn't for me. :-(

Regardless, I now have a /dev/input/js0 which reacts when I jiggle the laptop.

I installed games-misc/sdljoytest and it works.

I don't seem to be able to get neverball to find it, however.
_________________
...Lyall
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum