Accelerometer not working

Bug #116045 reported by Wladston Viana on 2007-05-21
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Undecided
Unassigned

Bug Description

When I type

cat /sys/devices/platform/hdaps/position

I get nothing, meaning that the accelerometer for my laptop isn't being used.

The expected would be Ubuntu using the accelerometer data to protect hard disks, and also tell the user that the Hard Disk protection is enabled.

Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in recently. We were wondering if this is still an issue for you? Thanks in advance.

Wladston Viana (wladston) wrote :

Yes, it's still an issue for me.

drdrewusaf (drdrewusaf) wrote :

The problem is that Toshibas and others don't have the same accelerometer as IBM. Thus, the drivers (HDAPS) for the IBM accel. will not work on the Toshiba systems. On the windows side, IBM uses "sensor.dll" as the driver; Toshiba uses thpevm.sys as the driver. I have no idea how to program and that severely limits my options for reverse engineering. I can, however, understand code enough to get by and edit it to my needs (I've compiled stuff that wasn't able to compiled w/o being edited.) My purpose in this is to get the accel. to work w/ the Compiz cube - imagine how cool it would be to jar the laptop and the cube spin to the next desktop! I have had no luck finding the source or some one w/ the source. I have "disassembled" most of the files used in Toshiba's "HDD Protection" system w/ LDasm, but, again, I don't program so I do not understand assembly.

Drew

drdrewusaf (drdrewusaf) wrote :

BTW, I am using Kernel 2.6.22-14-generic and my laptop is a Toshiba R15. R15 and R20 are pretty much the same series.

Drew

Wladston Viana (wladston) wrote :

drdrewusaf,

Yes, you are correct. Some of the cool features I wanted to have are hard disk protection, alarm - lock your computer, and if someone moves it, it starts to beep loudly. I'm a bit afraid to use my laptop with Ubuntu, because of the lack of the hard disk protection ...when I'm on the move, I load windows to be safe.

I'm not a programmer, but you can count me in for testing :)

drdrewusaf (drdrewusaf) wrote :

I opened my laptop this weekend to find the manufacturer of the accelerometer in my Toshiba and found this:

ST Microelectronics LIS3L02AQ

http://www.st.com/stonline/products/literature/od/9321.htm

I'm looking for some source code for linux (if the chip even has an interface available like through HID). Looks like I'm going to have to learn to program as I go...

Drew

The Hardy Heron Alpha2 release will be coming out soon (around Dec 20). It will have an updated version of the kernel. It would be great if you could test with this new release if this issue still exists. I'll be sure to update this report when Alpha2 is available. Thanks!

Changed in linux:
status: New → Incomplete

I'm opened a new task ('linux') against the actively developed kernel. However, I'm closing the report against linux-source-2.6.20 as it does not meet the criteria for a stable release update. You can learn more about the stable release update process at https://wiki.ubuntu.com/StableReleaseUpdates . Thanks!

Changed in linux-source-2.6.20:
status: Confirmed → Won't Fix
Wladston Viana (wladston) wrote :

huh... why is the report marked as incomplete ?

Wladston Viana (wladston) wrote :

oh, I got it, we have to grab and burn the alpha, see if it works (I'm wondering how I'll be able to test it) and report back.

drdrewusaf (drdrewusaf) wrote :

I can set aside a partition for it. How much space will I need? Also, just to add, I am self teaching myself C and assembly. We'll see what progress I can make w/ the disassembled .dll and .exe, provided the Hardy Alpha doesn't fix the problem. *crossing fingers for it to be fixed* Should I attach the Win32 files associated with the Toshiba driver and software?

Drew

Michael Doube (michael-doube) wrote :

This is also an issue on the Sony Vaio SZ650 - no accelerometer is detected by either Gutsy or Hardy alpha-2. I suspect that Sony have used an entirely different approach to both IBM and Toshiba...

Just an FYI for anyone else interested. . .Hardy Heron Alpha2 was recently released. It contains an updated version of the kernel. You can download and try the new Hardy Heron Alpha2 release from http://cdimage.ubuntu.com/releases/hardy/alpha-2/ . You should be able to then test the new kernel via the LiveCD. If you can, please verify if this bug still exists or not and report back your results. Wladston, I'd particularly appreciate your feedback since you are the original bug reporter. General information regarding the release can also be found here: http://www.ubuntu.com/testing/hardy/alpha2 . Thanks!

drdrewusaf (drdrewusaf) wrote :

About running the LiveCD, it's not possible to test HDAPS using it. You have to restart the computer for HDAPS to start... As a side note to those in this bug trying the Hardy Alpha2 LiveCD, wireless networking w/ WPA will not work, and there isn't a "Hardware Information" option in the System>Prefrences menu. So you have to install it no matter what to confirm the bug in the new kernel. I'm going to cut into my FAT32 partition and install it by the end of tomorrow. Will have an updat then.

drdrewusaf (drdrewusaf) wrote :

I can't get HDAPS to work properly in the Hardy Alpha. I get the following error when "modprobe"ing:

"FATAL: Error inserting hdaps (/lib/modules/2.6.24-2-generic/kernel/drivers/hwmon/hdaps.ko): No such device"

The problem still exists. We need another way to test the accelerometer other than to use HDAPS, since it's IBM specific.

Drew

Wladston Viana (wladston) wrote :

Leann,

I would really appreciate to test it also, to confirm drdrewusaf, but I'm not a linux expert, and I only have this specific production machine available to work .. (I've been trough some terrible situations while trying new systems on alpha :/ ). Let's home drdrewusaf's system is enought for testing, at least until hardy is released.

Wladston Viana (wladston) wrote :

I have made a clean instalation of Ubuntu 8.04, and have tried it :
wladston@escuna:~$ sudo modprobe hdaps
FATAL: Error inserting hdaps (/lib/modules/2.6.24-16-generic/kernel/drivers/hwmon/hdaps.ko): No such device
wladston@escuna:~$

since there is no other missing information, I'm going to re-mark it as new.

Also, why is the bug marked as "Won't fix" ? They are telling me that unless the manufacturer provides the driver for linux, I can forget about using the acelerometer on Ubuntu ?

Changed in linux:
status: Incomplete → New

Per the kernel team's bug policy, can you please attach the following information. Please be sure to attach each file as a separate attachment.

* uname -a > uname-a.log
* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . Thanks again and we appreciate your help and feedback.

Changed in linux:
status: New → Confirmed
Wladston Viana (wladston) wrote :

here is mine

Wladston Viana (wladston) wrote :
Wladston Viana (wladston) wrote :
Wladston Viana (wladston) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Wladston Viana (wladston) wrote :

still an issue in intrepid.

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Dana Goyette (danagoyette) wrote :

Some input on the Toshiba accelerometer: the LIS3L02AQ may (ideally) be similar to the HP laptops' STMicro accelerometer; the accelerometer has a driver lis3lv02d in the 2.6.28 kernel; in the 2.6.29 kernel and beyond, the HP-specific portions have been broken out to a separate hp-accel module, leaving the lis3lv02d driver available to perhaps apply to other devices. The HP driver uses ACPI calls, I believe; the Toshiba one may use SPI. So, it may take some reverse-engineering to figure out exactly where the SPI controller sits.

Wladston Viana, thank you for reporting this and helping make Ubuntu better. Hardy desktop reached EOL on May 12, 2011.
Please see this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We were wondering if this is still an issue on a supported release? If so, can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command in a supported release from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux <replace-with-bug-number>

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

tags: added: hardy needs-upstream-testing
tags: added: intrepid
no longer affects: linux-source-2.6.20 (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Davide Depau (depau) on 2012-11-29
Changed in linux (Ubuntu):
status: Expired → Confirmed

David Depau, if you have a bug in Ubuntu, could you please file a new report by executing the following in a terminal:
ubuntu-bug linux

For more on this, please see the Ubuntu Kernel team article:
https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Filing_Kernel_Bug_reports

the Ubuntu Bug Control team and Ubuntu Bug Squad team article:
https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue

and Ubuntu Community article:
https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Please note, not filing a new report may delay your problem being addressed as quickly as possible.

Thank you for your understanding.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
technophant (technophant) wrote :

A developer has recently released "Toshiba HDAPS Support Kernel Patch" and claims to be working on a park/unpark daemon to accompany this: http://nathanielmnelson.com/node/24

Changed in linux (Ubuntu):
status: Expired → Confirmed
tags: added: patch
LTSmash (lord-ltsmash) wrote :

Great, now I'm wondering if it could be possible for somebody to simply add this patch to the distro kernel and then use on of the daemons they use with the IBM devices or if we have to wait until NATHANIELMNELSON releases his daemon.

Nathaniel Nelson (nmn-j) wrote :

Hello all, I've posted an update of my findings about the user space daemon to my blog, but I'll share here the basics of what is involved. Basically there's no need for a daemon anymore, we can just use acpid and the sysfs file system.

To make this work, create the following two files in /etc/acpi/events (could vary based on installation):

hdaps_unload (filename can be anything you want)

event=HAPS 00000080
action=echo 30000 > /sys/block/sd?/device/unload_heads

Replace the '?' with the block device that you want to protect. (i.e, sda, sdb)

hdaps_load (filename can be anything you want)

event=HAPS 00000081
action=echo 0 > /sys/block/sd?/device/unload_heads

The unload event file basically tells us the drives to unload its heads immediately. The max time is 30 seconds. The load file will immediately reload the hard drive heads by sending 0 to the 'unload_heads' file.

I'm also attaching the latest version of the patch, which adds two new sysfs files so you can view status and change the protection level on the fly. Please do let me know if it works for you! See the updated blog post for more info if needed. Thanks

LTSmash (lord-ltsmash) wrote :

AH, that's great news!

I will wait until somebody else patches and compilers the kernel and upload it to test it and then report it here to check if the issue has been resolved.

Nathaniel Nelson (nmn-j) wrote :

Fixed an issue with suspend / resume.

technophant (technophant) wrote :

Since the patch is available and seems to be finished, a fix is available.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
LTSmash (lord-ltsmash) wrote :

https://bugzilla.kernel.org/show_bug.cgi?id=58681

Reported to upstream so they can implement this.

LTSmash (lord-ltsmash) wrote :

They have not responded to this bug from upstream, would this still be applied to Ubuntu's kernel?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.