Bug 10998 (applesmc_MBP4.1)
Summary: | applesmc - Sudden motion sensor not recognized on newer versions of MacBook Pro | ||
---|---|---|---|
Product: | Drivers | Reporter: | Harald Psaier (h_psaier) |
Component: | Hardware Monitoring | Assignee: | Nicolas Boichat (nicolas) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | bunk, h_psaier, jdelvare, nicolas |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.25.9 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
applesmc-accel-create-check.patch
test suite |
Description
Harald Psaier
2008-06-28 01:43:55 UTC
Created attachment 16885 [details]
applesmc-accel-create-check.patch
This patch should fix the problem. It disables the accelerometer input device if the accelerometer cannot be calibrated during initialization (if it fails the first time it is read, it is likely to fail again later). I am not so clear about why it froze your system though (I guess it is related to input-polldev somehow...). And it is obviously not an optimal fix since we would like to have support for the accelerometer on newer Apple devices, but there isn't much I can do with having one of these Macs... Created attachment 16889 [details]
test suite
In order to contribute some information from a MacBook Pro 4.1 I c&p this c-file with code from applesmc module. The while (__wait_status(0x0c)) hack works great, but doesn't solve the problem. The coordinates remain "0,0" despite moving or swinging around the macbook. So... I am still convinced there is a "secret" initalization sequence on start up of the MacOs which hasn't been reverse engineered yet. I know of this page by Johannes Berg about the Apple Motion Sensor Specification. But it doesn't say much about how he did reverse engineere the driver. If someone could point me in the right direction, maybe I would be able to do it myself and commit the results. Have you tried the patch I attached here? There are 2 issues in this bug report: 1. The system freezes when applesmc is loaded. 2. The accelerometer is not recognized. 1. is a severe issue, which we need to fix ASAP, if my patch works, I will send it upstream (since the system freezes I think it is a candidate for 2.6.26.x). 2. is a potential improvement, and I would be glad to talk with you about it, but I think it is better to do it on mactel-linux devel list (or privately) rather than on this bug tracking system... Just realised you never stated your system freezes (don't know where I got that idea from...). Anyway, sending tons of messages to the kernel log is not great either .-) Nicolas, any progress on this? I can confirm that the problem is solved for MBP4.1 with newer Kernels (probably >=2.6.28) |