Ubuntu

hdaps Y axis inverted

Reported by Dagfinn Ilmari Mannsåker on 2006-03-07
32
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Stefan Bader
linux-source-2.6.15 (Ubuntu)
Undecided
Kyle McMartin
linux-source-2.6.17 (Ubuntu)
Medium
Ben Collins
linux-source-2.6.20 (Ubuntu)
Medium
Kyle McMartin
linux-source-2.6.22 (Ubuntu)
Low
Unassigned

Bug Description

The Y axis (axis 1) of the hdaps joystick device is inverted on my ThinkPad X41. This makes playing neverball nigh-on impossible :-(

I also tested with jscalibrator, it shows the joystick going forward when I tilt the laptop towards me and backward when I tilt it away.

Ben Collins (ben-collins) wrote :

There is an "invert" module parameter for this module.

Try this:

echo options hdaps invert=1 >> /etc/modprobe.d/options

After rebooting it should load the module correctly.

I know of the module parameter, and tried that, but it inverts both axes, making the X axis wrong. It's only the Y axis that is inverted without the parameter, not both.

Ben Collins (ben-collins) wrote :

That's odd. I would just invert this, but I don't want to break things for everyone else if this is specific to a certain type of system. Have you looked to see if others experience the same problem?

Changed in linux-source-2.6.15:
status: Unconfirmed → Fix Committed
Changed in linux-source-2.6.15:
status: Fix Committed → Needs Info

Dagfinn, maybe this bug is fixed in the newest kernel version (linux-source-2.6.15-21).

Quote from the changelog:

> hdaps: Correct x/y inversions for IBM notebooks and others.

"apt-get update && apt-get dist-upgrade" and let us know!

Ben, you rock!!! It works great on my X40!!!

From 'dmesg' output:
[4295134.177000] hdaps: inverting y-axis readings.
[4295134.177000] hdaps: IBM ThinkPad X40 detected.
[4295134.179000] hdaps: initial latch check good (0x01).
[4295134.985000] hdaps: device successfully initialized.
[4295134.986000] input: hdaps as /class/input/input4
[4295134.987000] hdaps: driver successfully loaded.

Dagfinn, can you please confirm?
However I think it's safe to close this bug!

Changed in linux-source-2.6.15:
status: Needs Info → Confirmed

The patch only inverts the Y axis for the X40. X41 and possibly X41 tablet also need HDAPS_DMI_MATCH_INVERT_Y instead of _MATCH_NORMAL.

Here's the patch I'm running with now, and it works right on my X41. I'm guessing the X41 Tablet has the same inversion as the rest of the X4x series, so I changed that one too.

Changed in linux-source-2.6.17:
assignee: nobody → ben-collins
status: Confirmed → Fix Committed
Tollef Fog Heen (tfheen) wrote :

linux-source-2.6.17 (2.6.17-10.33) edgy; urgency=low

  * Fix build failure

  [2.6.17-10.32]

  * ia64: Fix merge error for CVE-2006-3741. Caused a FTBFS.
  * Re-add ipw2200 quiesce patch.
  * Revert "usb/unusual: Add Domain Tech as GO_SLOW".
  * general: Quieten some more messages.
  * prism2: Commented out devices from MODULE_DEV_TABLE that are supported by
    hostap.
    - Malone #62685
  * pcbios: Cherry pick fix for PCBIOS PCI probing:
    Upstream GIT-SHA: 954c0b7cd5b9aaa11fb67a0c011fcb5e5897385a
    - Malone #60231
  * sdhci: Cherry pick fix for some devices, avoid reset in certain cases.
    Upstream GIT-SHA: 8a4da1430f7f2a16df3be9c7b5d55ba4e75b708c
    - Malone #63553
  * ahci: Add Intel 2680 device.
    - Malone #64433
  * hdaps: Re-implement lost dapper patch for y-only axis swapping. Add X41 as
    y-only.
    - Malone #58742
  * Enable all V4L1 modules.
    - Malone #58742

 -- Ben Collins <email address hidden> Wed, 11 Oct 2006 17:05:07 -0400

(The bug number for the y-swap patch is wrong, though)

Changed in linux-source-2.6.17:
status: Fix Committed → Fix Released
Chuck Short (zulcss) wrote :

Looks like this will be backported to dapper as well.

Changed in linux-source-2.6.15:
status: Unconfirmed → Fix Committed

The hdaps driver in feisty seems to have been reverted to a version that does not support separate X/Y inversion at all, and the X41 is marked as "normal", giving the original, buggy behaviour reported in this bug.

Changed in linux-source-2.6.19:
assignee: nobody → kyle
importance: Undecided → Medium
status: Unconfirmed → In Progress

Reporting it's still a problem with the ThinkPad X60s running Edgy Eft Final.

Kyle McMartin (kyle) wrote :

Fixed in dapper-proposed.

Changed in linux-source-2.6.15:
assignee: nobody → kyle
status: Fix Committed → Fix Released

Now that the 7.10 Gutsy Gibbon release of Ubuntu is out, can someone verify if this issue still exists in the new release? If you could please download and try the new version of Ubuntu from http://www.ubuntu.com/getubuntu/download and report back your results. Thanks again and we appreciate your help and feedback.

Changed in linux-source-2.6.22:
importance: Undecided → Low
status: New → Incomplete

Ubuntu 7.10, 2.6.22-14-generic #1 SMP:

After "sudo modprobe hdaps" and making sure the module is loaded ("lsmod|grep hdaps"), I tested with "hdaps-gl", "hdaps-pivot" and "neverball": No movement was detected at all! Looks like the module isn't working anymore - although I did work on the same laptop before (see my bug report above).

Chris Jones (cmsj) wrote :

I can confirm Stefan's report that this is now entirely non-functional (thinkpad x40)

Confirming after another independent comment.

Changed in linux-source-2.6.22:
status: Incomplete → Confirmed

The Hardy Heron kernel was recently uploaded for testing. We'd really appreciate it if you could try testing with this newer kernel and verify if this issue still exists. Unfortunately, the Hardy Heron Alpha1 LiveCD was released with the older 2.6.22 kernel. You'll have to manually install the newer Hardy Heron kernel in order to test. This should not be the case for Alpha2. However, here are the instructions to install (if you choose to do so):

1) edit the file /etc/apt/sources.list and add the following line:

deb http://archive.ubuntu.com/ubuntu hardy main restricted

2) sudo apt-get update
3) sudo apt-get install linux-image-2.6.24-1-generic
4) reboot and select the new kernel from the grub menu

After you've tested, please feel free to revert back - ie boot into the old kernel, sudo apt-get remove linux-image-2.6.24-1-generic, and remove the line from /etc/apt/sources.list . Please update this report with your results. Thanks in advance!

Changed in linux:
importance: Undecided → Medium
status: New → Incomplete
Shem Multinymous (multinymous) wrote :

Try the modified hdaps in tp_smapi 0.33.

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. General information regarding the release can also be found here: http://www.ubuntu.com/testing/hardy/alpha2 . Thanks!

ksmits (p5ycho-p5ycho) wrote :

Encountering an inverted Y axis problem playing neverball on gutsy i ran into this bug. I've booted hardy alpha2, sudo modprobe hdaps, installed hdaps-utils, ran hdaps-pivot and encountered an inverted Y axis also. Tested on a Thinkpad X41 non-tablet. This confirms the bug is still present in hardy heron alpha 2.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
status: Incomplete → Triaged
Stefan Bader (smb) on 2008-02-05
Changed in linux:
assignee: ubuntu-kernel-team → stefan-bader-canonical
status: Triaged → In Progress
Shem Multinymous (multinymous) wrote :

The modified hdaps driver in tp_smapi (http://www.thinkwiki.org/wiki/tp_smapi) fixes the problem with stuck readouts, and extends the "invert" option to support the inverted Y axis. It also has a model whitelist which, in most cases, automatically sets the correct axis orientation.

Chris Jones (cmsj) wrote :

Leann: I'm running hardy fully updated to this morning's packages and there's still no movement at all from hdaps.

While I can't attest to its quality, having never used it - the tp_smapi driver brings significantly more useful features than an improved hdaps driver, ie battery charge thresholds.
So anything that can get tp_smapi included is probably a good thing. It's not in the vanilla kernel though for some reason. Shem is the upstream author aiui - perhaps he/she/it can shed some light on the driver's status.

Shem Multinymous (multinymous) wrote :

tp_smapi has been stable (with incremental improvements) for more than a year and supports all relevant ThinkPad models - see the table in http://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status. It's packaged by Debian (http://packages.debian.org/tp-smapi) and Gentoo (http://gentoo-portage.com/app-laptop/tp_smapi). Inclusion into mainline kernel probably won't happen soon due to procedural/maintainership issues. There's an active user community (mainly on the linux-thinkpad mailing list) and several 3rd party programs that use tp_smapi's battery control and improved accelerometer interface.

Stefan Bader (smb) wrote :

Added the tm_smapi drivers to linux-ubuntu-modules. In order to co-exist with the kernel driver, the hdaps driver has been renamed to hdaps_ec.

Changed in linux:
status: In Progress → Fix Committed
Stefan Bader (smb) wrote :

Fix released (committed on Fri Feb 8 09:32:28 2008 -0500)

Changed in linux:
status: Fix Committed → Fix Released

The fix is only almost right except that the DMI matches are wrong: The X40 and X41 are pre-Lenovo, so the following patch is needed:

 diff --git a/ubuntu/hwmon/hdaps_ec.c b/ubuntu/hwmon/hdaps_ec.c
index ce68a5a..9853562 100644
--- a/ubuntu/hwmon/hdaps_ec.c
+++ b/ubuntu/hwmon/hdaps_ec.c
@@ -791,8 +791,8 @@ struct dmi_system_id __initdata hdaps_whitelist[] = {
  HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p", HDAPS_ORIENT_INVERT_XY),
  HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60", HDAPS_ORIENT_INVERT_XY),
  HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61", HDAPS_ORIENT_INVERT_XY),
- HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X40", HDAPS_ORIENT_INVERT_Y),
- HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X41", HDAPS_ORIENT_INVERT_Y),
+ HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad X40", HDAPS_ORIENT_INVERT_Y),
+ HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad X41", HDAPS_ORIENT_INVERT_Y),
  HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60 Tablet", HDAPS_ORIENT_INVERT_Y),
  HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60s", HDAPS_ORIENT_INVERT_Y),
  HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),

Changed in linux:
status: Fix Released → In Progress
Stefan Bader (smb) wrote :

Vendor for X40 and X41 set to IBM.

Changed in linux:
status: In Progress → Fix Committed

This fix should make it into the final Hardy release. However, against 2.6.20 and 2.6.22 this will be closed as it does not qualify for a stable release update. Thanks.

Changed in linux-source-2.6.22:
status: Confirmed → Won't Fix
Changed in linux-source-2.6.20:
status: In Progress → Won't Fix

Fix should be available in the latest linux-ubuntu-modules-2.6.24-12 release. Thanks.

Changed in linux:
status: Fix Committed → Fix Released
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