Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

I noticed my kernel has found an HP Accelerometer

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
lyallp
Veteran
Veteran
User avatar
Posts: 1655
Joined: Thu Jul 15, 2004 12:07 am
Location: Adelaide/Australia
Contact:
Contact lyallp
Website

I noticed my kernel has found an HP Accelerometer

  • Quote

Post by lyallp » Wed Mar 30, 2011 12:53 am

My HP EliteBook 8540w has an accelerometer.

Code: Select all

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
Top
lyallp
Veteran
Veteran
User avatar
Posts: 1655
Joined: Thu Jul 15, 2004 12:07 am
Location: Adelaide/Australia
Contact:
Contact lyallp
Website

  • Quote

Post by lyallp » Thu Mar 31, 2011 12:44 am

Well, it appears that I can sense the orientation and position of my laptop by

Code: Select all

 watch -n 1 'cat /sys/devices/platform/lis3lv02d/position'
This requires me to enable the kernel driver for it

Code: Select all

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: Select all

/{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: Select all

CONFIG_HP_WMI=m
and then enabling

Code: Select all

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
Top
nikulinpi
n00b
n00b
Posts: 39
Joined: Fri Jan 12, 2007 3:12 am

not a right sensor

  • Quote

Post by nikulinpi » Thu Mar 31, 2011 5:24 am

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.
Top
lyallp
Veteran
Veteran
User avatar
Posts: 1655
Joined: Thu Jul 15, 2004 12:07 am
Location: Adelaide/Australia
Contact:
Contact lyallp
Website

  • Quote

Post by lyallp » Thu Mar 31, 2011 6:30 am

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
Top
Post Reply

4 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic