he1per / psmouse-dkms-alpsv7

Linux kernel driver for newer ALPS touchpads (as of Mar 2014)
26 stars 26 forks source link

ALPSv7: trackstick support #4

Closed vencik closed 10 years ago

vencik commented 10 years ago

Hello everyone,

I've taken the liberty to merge in support for the trackstick found on Toshiba Portege Z30-A models. See below.

If anyone has such a device with the trackstick, please could you test it? I already know of one guy (Hi Drejc!), but the more the better. Also, it would be great if someone without the TS could re-test the patch...

Btw, I've noticed that the tree is behind time; Elaine's latest patch adds more (finger rest zone I think, at the very least); does anyone know how active this project is (or is supposed to be)?

Thanks,

vencik

From 8ffaa4eee8c2803a54618ffe77639b873be31a9e Mon Sep 17 00:00:00 2001
From: vencik <vencik@razdva.cz>
Date: Tue, 29 Apr 2014 09:24:50 +0200
Subject: [PATCH] Added support for trackstick

Piggybacking: fixed a few glitches in dkms.conf and th install.sh script.

---
 dkms.conf  |  4 ++--
 install.sh |  6 +++---
 src/alps.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 src/alps.h |  1 +
 4 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/dkms.conf b/dkms.conf
index b4a1183..e1361af 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -2,12 +2,12 @@
 # Modified by helper

 PACKAGE_NAME="psmouse-dkms-alpsv7"
-PACKAGE_VERSION="1.0"
+PACKAGE_VERSION="1.1"
 CLEAN="rm -f *.*o"

 BUILT_MODULE_NAME[0]="psmouse"
 MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/src psmouse.ko"
 BUILT_MODULE_LOCATION[0]="src"
-DEST_MODULE_LOCATION[0]="/updates"
+DEST_MODULE_LOCATION[0]="/updates/dkms"

 AUTOINSTALL="yes"
diff --git a/install.sh b/install.sh
index 19555cb..ed17c4b 100755
--- a/install.sh
+++ b/install.sh
@@ -1,15 +1,15 @@
-#!/bin/sh
+#!/bin/bash

 source ./dkms.conf

-MDIR="/usr/lib/modules/$(uname -r)"
+MDIR="/lib/modules/$(uname -r)"
 NEWMDIR="$MDIR/${DEST_MODULE_LOCATION[0]}"

 MFILE="$MDIR/kernel/drivers/input/mouse/${BUILT_MODULE_NAME[0]}.ko"
 NEWMFILE="$NEWMDIR/${BUILT_MODULE_NAME[0]}.ko"

 M=psmouse-dkms-alpsv7
-V=1.0
+V=1.1

 #Print error message and exit
 abort()
diff --git a/src/alps.c b/src/alps.c
index 3e8e8f7..63ba243 100644
--- a/src/alps.c
+++ b/src/alps.c
@@ -1003,6 +1003,8 @@ static unsigned char alps_get_packet_id_v7(char *byte)
        packet_id = V7_PACKET_ID_MULTI;
    else if ((byte[0] & 0x10) && !(byte[4] & 0x43))
        packet_id = V7_PACKET_ID_NEW;
+   else if (byte[1] & 0x08)
+       packet_id = V7_PACKET_ID_TRACKSTICK;
    else
        packet_id = V7_PACKET_ID_IDLE;

@@ -1056,8 +1058,6 @@ static void alps_decode_packet_v7(struct alps_fields *f,
 {
    struct alps_data *priv = psmouse->private;

-   priv->r.v7.pkt_id = alps_get_packet_id_v7(p);
-
    alps_get_finger_coordinate_v7(f->pt_img, p, priv->r.v7.pkt_id);

    priv->r.v7.rest_left = 0;
@@ -1236,12 +1236,60 @@ static void alps_assign_buttons_v7(struct psmouse *psmouse,
    priv->prev_phy_btn = priv->phy_btn;
 }

+static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
+{
+   unsigned char    *packet = psmouse->packet;
+   struct alps_data *priv   = psmouse->private;
+   struct input_dev *dev    = priv->dev2;
+
+   int x, y;  /* trackstick vector */
+
+   /* Buttons status is reported for any packet */
+   input_report_key(dev, BTN_LEFT,  !!(0x01 & packet[1]));
+   input_report_key(dev, BTN_RIGHT, !!(0x02 & packet[1]));
+
+   /*
+    * AlpsPS/2 v7 trackstick produces 2D relative coorinates
+    * as signed integers (normal binary complement +1 encoding)
+    */
+
+   x  = (0x3f & packet[2]);       /* low 6 bits */
+   x |= (0x10 & packet[3]) << 2;  /* bit 7      */
+   x |= (0x80 & packet[2]);       /* bit 8      */
+
+   /* x sign */
+   if (0x10 & packet[1])
+       x |= -1 << 8;
+
+   y  = (0x07 & packet[3]);       /* low 3 bits */
+   y |= (0x20 & packet[3]) >> 2;  /* bit 4      */
+   y |= (0x38 & packet[4]) << 1;  /* bits 5 - 7 */
+   y |= (0x80 & packet[4]);       /* bit 8      */
+
+   /* y sign */
+   if (0x20 & packet[1])
+       y |= -1 << 8;
+
+   /* Report trackstick vector */
+   input_report_rel(dev, REL_X,  x / 6);
+   input_report_rel(dev, REL_Y, -y / 8);
+
+   input_sync(dev);
+}
+
 static void alps_process_packet_v7(struct psmouse *psmouse)
 {
    struct alps_data *priv = psmouse->private;
    struct alps_fields f = {0};
    unsigned char *packet = psmouse->packet;

+   /* Resolve packet ID */
+   priv->r.v7.pkt_id = alps_get_packet_id_v7(packet);
+
+   /* Process trackstick packet separately */
+   if (priv->r.v7.pkt_id == V7_PACKET_ID_TRACKSTICK)
+       return alps_process_trackstick_packet_v7(psmouse);
+
    priv->decode_fields(&f, packet, psmouse);

    if (alps_drop_unsupported_packet_v7(psmouse))
diff --git a/src/alps.h b/src/alps.h
index 5d2f9ea..c2ba260 100644
--- a/src/alps.h
+++ b/src/alps.h
@@ -46,6 +46,7 @@ enum V7_PACKET_ID {
     V7_PACKET_ID_TWO,
     V7_PACKET_ID_MULTI,
     V7_PACKET_ID_NEW,
+    V7_PACKET_ID_TRACKSTICK,
 };

 /**
-- 
1.9.2
double-thinker commented 10 years ago

When I apply the patch I get this errors:

File to patch: src/alps.c
patching file src/alps.c
Hunk #1 FAILED at 1003.
Hunk #2 FAILED at 1056.
Hunk #3 FAILED at 1236.
3 out of 3 hunks FAILED -- saving rejects to file src/alps.c.rej

File to patch: src/alps.h
patching file src/alps.h
Hunk #1 FAILED at 46.
1 out of 1 hunk FAILED -- saving rejects to file src/alps.h.rej

But when i add the rejections manually it works for me in Toshiba Z30-A-12N in 3.13.0-24-generic :+1: I get this rejections:

alps.h.rej:
--- alps.h
+++ alps.h
@@ -46,6 +46,7 @@
     V7_PACKET_ID_TWO,
     V7_PACKET_ID_MULTI,
     V7_PACKET_ID_NEW,
+    V7_PACKET_ID_TRACKSTICK,
 };

alps.c.rej:
--- alps.c
+++ alps.c
@@ -1003,6 +1003,8 @@
        packet_id = V7_PACKET_ID_MULTI;
    else if ((byte[0] & 0x10) && !(byte[4] & 0x43))
        packet_id = V7_PACKET_ID_NEW;
+   else if (byte[1] & 0x08)
+       packet_id = V7_PACKET_ID_TRACKSTICK;
    else
        packet_id = V7_PACKET_ID_IDLE;

@@ -1056,8 +1058,6 @@
 {
    struct alps_data *priv = psmouse->private;

-   priv->r.v7.pkt_id = alps_get_packet_id_v7(p);
-
    alps_get_finger_coordinate_v7(f->pt_img, p, priv->r.v7.pkt_id);

    priv->r.v7.rest_left = 0;
@@ -1236,12 +1236,60 @@
    priv->prev_phy_btn = priv->phy_btn;
 }

+static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
+{
+   unsigned char    *packet = psmouse->packet;
+   struct alps_data *priv   = psmouse->private;
+   struct input_dev *dev    = priv->dev2;
+
+   int x, y;  /* trackstick vector */
+
+   /* Buttons status is reported for any packet */
+   input_report_key(dev, BTN_LEFT,  !!(0x01 & packet[1]));
+   input_report_key(dev, BTN_RIGHT, !!(0x02 & packet[1]));
+
+   /*
+    * AlpsPS/2 v7 trackstick produces 2D relative coorinates
+    * as signed integers (normal binary complement +1 encoding)
+    */
+
+   x  = (0x3f & packet[2]);       /* low 6 bits */
+   x |= (0x10 & packet[3]) << 2;  /* bit 7      */
+   x |= (0x80 & packet[2]);       /* bit 8      */
+
+   /* x sign */
+   if (0x10 & packet[1])
+       x |= -1 << 8;
+
+   y  = (0x07 & packet[3]);       /* low 3 bits */
+   y |= (0x20 & packet[3]) >> 2;  /* bit 4      */
+   y |= (0x38 & packet[4]) << 1;  /* bits 5 - 7 */
+   y |= (0x80 & packet[4]);       /* bit 8      */
+
+   /* y sign */
+   if (0x20 & packet[1])
+       y |= -1 << 8;
+
+   /* Report trackstick vector */
+   input_report_rel(dev, REL_X,  x / 6);
+   input_report_rel(dev, REL_Y, -y / 8);
+
+   input_sync(dev);
+}
+
 static void alps_process_packet_v7(struct psmouse *psmouse)
 {
    struct alps_data *priv = psmouse->private;
    struct alps_fields f = {0};
    unsigned char *packet = psmouse->packet;

+   /* Resolve packet ID */
+   priv->r.v7.pkt_id = alps_get_packet_id_v7(packet);
+
+   /* Process trackstick packet separately */
+   if (priv->r.v7.pkt_id == V7_PACKET_ID_TRACKSTICK)
+       return alps_process_trackstick_packet_v7(psmouse);
+
    priv->decode_fields(&f, packet, psmouse);

    if (alps_drop_unsupported_packet_v7(psmouse))
vencik commented 10 years ago

Hi,

I bet it's because tabs get converted to spaces using copy-pasting on the issues page...

Could you try again with the attachment, please? (The rejections are actually the changes... ;-)

I might clone the repo, but it seems a bit useless since hopefully, we'll get the latest (and probably better) code from Elaine in kernel quite soon...

Thanks,

vencik

On Tue, 2014-05-13 at 13:40 -0700, suidasin wrote:

File to patch: src/alps.c patching file src/alps.c Hunk #1 FAILED at 1003. Hunk #2 FAILED at 1056. Hunk #3 FAILED at 1236. 3 out of 3 hunks FAILED -- saving rejects to file src/alps.c.rej

File to patch: src/alps.h patching file src/alps.h Hunk #1 FAILED at 46. 1 out of 1 hunk FAILED -- saving rejects to file src/alps.h.rej

But when i add the rejections manually it works for me in Toshiba Z30-A-12N :) I get this rejections:

alps.h.rej: --- alps.h +++ alps.h

wvidana commented 10 years ago

Hi!, i also have the Toshiba Z-30-A-12N with kernel 3.13.11.1-1-MANJARO I'm not sure if the patch for the trackpoint is already in the repo or i have to add it manually... The touchpad works perfectly but the trackpoint doesn't

vencik commented 10 years ago

Hi Wilfrido,

it's not there; use the attached version to avoid problems with whitespace conversions (causing rejections).

Cheers,

vencik

On Thu, 2014-05-22 at 02:49 -0700, Wilfrido Vidaña Sayegh wrote:

Hi!, i also have the Toshiba Z-30-A-12N with kernel 3.13.11.1-1-MANJARO I'm not sure if the patch for the trackpoint is already in the repo or i have to add it manually... The touchpad works perfectly but the trackpoint doesn't

— Reply to this email directly or view it on GitHub.

double-thinker commented 10 years ago

Sorry, but how i should get the attachment?

vencik commented 10 years ago

Right, there doesn't seem to be way how to attach it without expansion...

Let me fork the repo; that'll be the simplest solution. I still have 1 free repo available for my account.

I'll post link to it, soon.

To be continued...

vencik

On Thu, 2014-05-22 at 15:16 -0700, suidasin wrote:

Sorry, but how i should get the attachment?

— Reply to this email directly or view it on GitHub.

vencik commented 10 years ago

OK guys, here it goes:

https://github.com/vencik/psmouse-dkms-alpsv7

The patch is already applied and pushed; just clone and install.

Cheers,

vencik

On Thu, 2014-05-22 at 15:16 -0700, suidasin wrote:

Sorry, but how i should get the attachment?

— Reply to this email directly or view it on GitHub.

wvidana commented 10 years ago

Thank you for this patch! and for the cloning of the repository of course, i didn't know how to get the attach neither!

It's installed and working on my Toshiba Z-30-A-12N with kernel 3.13.11.1-1-MANJARO, both the touchpad and trackpoint. Know i have to look how to adjust the sensibility of the trackpoint.

Thanks again, to vencik and he1per (and all the people that made it posible) :+1:

vencik commented 10 years ago

We should perhaps think about a comment by Po-Shen Loh; he noted that it's best to leave the sensitivity at the highest possible level (i.e. not to do any corrections in the driver itself) and to use e.g. xinput or xorg.conf etc as user to fine-tune it.

I think it's probably for the best; what do you think?

wvidana commented 10 years ago

Absolutely. Before aplying this driver (kernel default, with trackpoint and touchpad detected as regular ps/2 mouse), the sensitivity was really high, but know is a bit low.

So yes, the way to go is keeping it high an let the users customize the sensitivity with other tools, so this tools may have the full sensibility range to manage.

vencik commented 10 years ago

Very well then, I've pushed a change to my fork.

vencik commented 10 years ago

Sorry, didn't mean to close the issue...

wvidana commented 10 years ago

I tried your new change in sensitivity but i don't notice any change... the trackpoint feels "slow". I even changed the versions in install.sh and dmks.conf https://github.com/woqer/psmouse-dkms-alpsv7/commit/1542d857bb28a3f779bd832eb6c3118707ddbaa5

vencik commented 10 years ago

Weird, could you check that the coords. reports at alps.c, lines 1274 and 1275 propagate the coords without alterations (divisions)?

And btw, was the driver indeed re-built? I mean, the install.sh script doesn't do it for you; did you removed the driver first with

sudo dkms remove psmouse-dkms-alpsv7/1.1 --all

before re-installing? Mine is now moving quite fast...

vencik

On Sun, 2014-05-25 at 05:05 -0700, Wilfrido Vidaña Sayegh wrote:

I tried your new change in sensitivity but i don't notice any change... the trackpoint feels "slow". I even changed the versions in install.sh and dmks.conf woqer@1542d85

— Reply to this email directly or view it on GitHub.

wvidana commented 10 years ago

Haha! thanks for the advice. I changed the version because i didn't know hoy to remove the old one, but with your advice know i actually reinstalled (this time for real) and its working quite fast as well :+1:

agren commented 10 years ago

Had the same issue with the trackpoint not working on a Z30-A-15M. I have confirmed that the github.com/vencik/psmouse-dkms-alpsv7 repo works on this model. Tested in Xubuntu 14.04.

koroki commented 10 years ago

I have problems with vencik version in my Z30-A-12N with Arch Linux, kernel 3.15.7-1-ARCH.

My mousepad is frozen when it is instaled.

koroki commented 10 years ago

The dmesg is

psmouse serio1: alps: Unknown ALPS touchpad: E7=73 03 0a, EC=88 b3 22

vencik commented 10 years ago

@koroki your device model/firmware identification matches mine. It may be possible that kernel 3.15.7 brought some change in the input iface; also note that 3.15.7 is not the last 3.15 stable version (it's 3.15.8). I'll try to upgrade to 3.15.8 later and check whether the driver still works...

koroki commented 10 years ago

This Friday I tried with 3.13 kernel (1st March in ARM) and I had the same problem.

It's possible that I did something bad. I used your git and I used install program. The results is a frozen mouse. Furthermore, the system don't recognise the mouse as a multitactil.

vencik commented 10 years ago

Very odd indeed.

Are you sure that the psmouse kernel module was really compiled and installed? I mean, if the build failed yet the original psmouse module was uninstalled anyway (leaving no mouse driver there), it would explain your problem; i.e. no TP/TS control at all.

After you install the driver, what does

$ dmesg | grep ALPS

show?

You should see 2 ALPS PS/2 devices...

vencik

On Mon, 2014-08-04 at 02:10 -0700, koroki wrote:

This Friday I tried with 3.13 kernel (1st March in ARM) and I had the same problem.

It's possible that I did something bad. I used your git and I used install program. The results is a frozen mouse. Furthermore, the system don't recognise the mouse as a multitactil.

— Reply to this email directly or view it on GitHub.

koroki commented 10 years ago

After install, dmesg shows:

[ 803.362698] input: ALPS PS/2 Device as /devices/platform/i8042/serio1/input/input19 [ 803.381669] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input18

The Trackstick works correctly, but the mousepad is completly frozen.

xiput: xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ALPS PS/2 Device id=13 [slave pointer (2)] ⎜ ↳ AlpsPS/2 ALPS GlidePoint id=15 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)] ↳ Toshiba input device id=14 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ TOSHIBA Web Camera - FHD id=11 [slave keyboard (3)]

koroki commented 10 years ago

Yes, I'm really, really stupid...

I didn't install xf86-input-synaptics. Without it, the Xorg doesn't recognise the mousepad correctly.

Thanks for the help and for the impressive git!

vencik commented 10 years ago

No problem, glad you've figured that out. Perhaps you might add a note about the problem cause to your issue #7 and close it, then.

koroki commented 10 years ago

Vencik, do you use commonly the touchpad?

I'm using Arch Linux with gnome 3.12 and I think that it is very sensible. For example, when I do the displacement with two fingers, it also detects one finger click and it selects things when I'm displasment.

Is it a bug?

On the other hand, in windows, the two and three fingers clicks is done with the "click". Is it possible to change?

Thanks.

vencik commented 10 years ago

Hi koroki,

I've experienced certain amount of unwanted clicks with tap-to-click on, that's true. I'm not sure how to get rid of those; there's no special handling of tap in the driver code; that's up to the X11 driver.

However, I think there's not much use to debug the code any further; with Linux kernel 3.17, the official driver from ALPS should be available, obsoleting the DKMS driver anyway.

I'd wait for that one before trying to fix things. (And you may get it even now if you please.)

Cheers

vencik

On Sun, 2014-08-31 at 01:35 -0700, koroki wrote:

Vencik, do you use commonly the touchpad?

I'm using Arch Linux with gnome 3.12 and I think that it is very sensible. For example, when I do the displacement with two fingers, it also detects one finger click and it selects things when I'm displasment.

Is it a bug?

On the other hand, in windows, the two and three fingers clicks is done with the "click". Is it possible to change?

Thanks.

— Reply to this email directly or view it on GitHub.

koroki commented 10 years ago

Okey, I wait.

Thanks

alehandrof commented 10 years ago

This fork looks promising, but I haven't been able to get it to work. (Nor the main branch, actually.)

I am testing on a Toshiba Portege Z30t-A (which includes touchpad, trackpoint and touscreen) on Ubuntu 14.04.1 with kernel 3.13.0-35-generic

This fork installs without errors, except for this one at the end:

▶▶▶▶ Error: dkms install failed:\n    '/lib/modules/3.13.0-35-generic//updates/psmouse.ko' not found.

After this botched installation and a restart, dmesg reports (as it did before):

[    2.313814] psmouse serio1: alps: Unknown ALPS touchpad: E7=73 03 0a, EC=88 b3 22

Any ideas?

alehandrof commented 10 years ago

Got it! I upgraded to kernel 3.14.17-031417-generic, the latest non-rc mainline build for 14.0, following these instructions: https://wiki.ubuntu.com/Kernel/MainlineBuilds

Incidentally, the trackpoint was working just fine before installing this driver. It was the absence of scrollling on the touchpad that drove me half-mad.

vencik commented 10 years ago

Hi Alex,

good for you. Yes, the trackpoint worked in the PS/2 mouse compatibility mode even before; it however didn't work with the original DKMS repo driver.

Just a note (if you haven't seen that, already); it seems that starting with kernel 3.17, there should be a genuine ALPS driver included with support for our devices. That's why maintenance of these repos is on hold.

Cheers

vencik

On Wed, 2014-09-03 at 21:59 -0700, Alex Armstrong wrote:

Got it! I upgraded to kernel [3.14.17-031417-generic]((http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.17-utopic/), the latest non-rc mainline build for 14.04, following these instructions: https://wiki.ubuntu.com/Kernel/MainlineBuilds

Incidentally, the trackpoint was working just fine. It was the absence of scrollling on the touchpad that drove me half-mad.

— Reply to this email directly or view it on GitHub.

alehandrof commented 10 years ago

I hadn't heard and that's great news. Patching the kernel was not what I had envisioned as the first thing I did after installing Ubuntu on my new laptop :)

Although looking at Ubuntu's mainline ppa, kernel 3.17 is an RC for Oneiric. So it will likely be awhile until it's backported to Trusty, which is the LTS edition.

Are any of these issues related to touchpads? When I try to scroll in Firefox, I end up selecting the text. Is this a bug or feature? Or should I go bark up another tree?

vencik commented 10 years ago

The driver in 3.17 seems to be much more advanced; including palm rest detection and whoknowswhat. And for your scrolling problem, yes, I sometimes get that too, it seems to be some issue with the tap-to-click functionality X11 driver provides. Unless you specifically need tap-to-click, disable it in X. I don't know how to fix that; the kernel driver doesn't seem to handle tap in any special way (perhaps it should). And, as noted previously, the new code is coming, so until then it seems a waste of energy to try to fine-tune this kind of temporary solution...

On Thu, 2014-09-04 at 00:56 -0700, Alex Armstrong wrote:

I hadn't heard and that's great news. Patching the kernel was not what I had envisioned as the first thing I did after installing Ubuntu on my new laptop :)

Although looking at Ubuntu's mainline ppa, kernel 3.17 is an RC for Oneiric. So it will likely be awhile until it's backported to Trusty, which is the LTS edition.

Are any of these issues related to touchpads? When I try to scroll in Firefox, I end up selecting the text. Is this a bug or feature? Or should I go bark up another tree?

— Reply to this email directly or view it on GitHub.

alehandrof commented 10 years ago

You're right, of course. I may try out the RC kernel and see what blows up :)

BTW, the issue about scrolling/selecting does happen on the touchpad but I meant to write touchscreen. Presumably my touchscreen woes are a different driver's issue? (And maybe one more reason to try out the RC.)

vencik commented 10 years ago

Yep, it's indeed a bit risky :-) But you can always roll back. I use Debian with pristine kernel (3.16 now) and it works OK; Ubuntu is a Debian derivative, on the other hand, AFAIK Canonical has the habit to patch things quite a lot, so it would be a leap of faith, anyway...

And yes, if the problem concerns touchscreen, it's a different driver (wacom perhaps? I don't know what touchscreen the A model uses...)

Good luck

vencik

On Thu, 2014-09-04 at 03:01 -0700, Alex Armstrong wrote:

You're right, of course. I may try out the RC kernel and see what blows up :)

BTW, the issue about scrolling/selecting does happen on the touchpad but I meant to write touchscreen. Presumably my touchscreen woes are a different driver's issue? (And maybe one more reason to try out the RC.)

— Reply to this email directly or view it on GitHub.

vencik commented 10 years ago

Oh, and there's actually another possibility---to persuade Ubuntu developers to back-port the driver to LTS kernel.

I'd say that it might actually work, since Ubuntu wants to have itself installable on new HW; perhaps such an argument might be considered.

On Thu, 2014-09-04 at 03:01 -0700, Alex Armstrong wrote:

You're right, of course. I may try out the RC kernel and see what blows up :)

BTW, the issue about scrolling/selecting does happen on the touchpad but I meant to write touchscreen. Presumably my touchscreen woes are a different driver's issue? (And maybe one more reason to try out the RC.)

— Reply to this email directly or view it on GitHub.

alehandrof commented 10 years ago

I switched to 3.17-rc3-utopic and the touchpad works great out of the box. The kernels I've been linking to are not patched by the Ubuntu devs. They're just packaged for easy installation.

The only adverse effect I've noticed on 3.17 is that my touchscreen is not working at all. But that may even be an improvement :)

vencik commented 10 years ago

Good to know :-)

And to your 2nd point, I completely agree, I never ever touch my screen and I hate it when people have to actually touch it when trying to point something out. I don't have a touchscreen, of course, but even if I had it, I wouldn't touch it.

On Fri, 2014-09-05 at 01:11 -0700, Alex Armstrong wrote:

I switched to 3.17-rc3-utopic and the touchpad works great out of the box. The kernels I've been linking to are not patched by the Ubuntu devs. They're just packaged for easy installation.

The only adverse effect I've noticed on 3.17 is that my touchscreen is not working at all. But that may even be an improvement :)

— Reply to this email directly or view it on GitHub.

chatox commented 10 years ago

This works for me (both trackpoint and touchpad work) on a Toshiba Tecra Z50, using Ubuntu 14.04 with Kernel 3.18.0:

cd /tmp/
git clone https://github.com/vencik/psmouse-dkms-alpsv7
cd psmouse-dkms-alpsv7
sudo ./install.sh

Output of xinput before:

% xinput
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
....

Output of dmesg before:

% dmesg | grep -i alps
[ ... ] psmouse serio1: alps: Unknown ALPS touchpad: E7=73 03 0a, EC=88 b3 22

Output of xinput after:

% xinput
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ALPS PS/2 Device                          id=12   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
....

Output of dmesg after:

% dmesg | grep -i alps
[...] input: ALPS PS/2 Device as /devices/platform/i8042/serio1/input/input18
[...] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input17
jpffitch commented 10 years ago

This looks like what I need but... it does not compile Without a working middle button I cannot cut/paste the output but it says that the build fails and I should consuklt make.log, which says it compiled 7 files and linked psmouse.o Last line is MODPOST 0 modules

This is openSuSE13.2rc1 3.16 kernel; Toshiba Protege Z30-A

vencik commented 10 years ago

@jpffitch could you redirect STDOUT and STDERR to a file and paste it here, together with make.log? I didn't make the install script but I'll take a look at it...

jpffitch commented 10 years ago

Just realise that I can ftp files to the old laptop (with breaking keyboard) and poste/paste here

output ────── Building with dkms ───────

Error! DKMS tree already contains: psmouse-dkms-alpsv7-1.1 You cannot add the same module/version combo more than once.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make KERNELRELEASE=3.16.3-1.gd2bbe7f-desktop -C /lib/modules/3.16.3-1.gd2bbe7f-d esktop/build M=/var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src psmouse.ko.... Error! Build of psmouse.ko failed for: 3.16.3-1.gd2bbe7f-desktop (x86_64) Consult the make.log in the build directory /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/ for more information. ▶▶▶▶ Error: Build failed

make.log: make: Entering directory '/usr/src/linux-3.16.3-1.gd2bbe7f-obj/x86_64/desktop' make[1]: Entering directory `/usr/src/linux-3.16.3-1.gd2bbe7f-obj/x86_64/desktop ' CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/psmouse-base.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/synaptics.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/alps.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/elantech.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/logips2pp.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/lifebook.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/sentelic.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/trackpoint.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/touchkit_ps2.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/cypress_ps2.o LD /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/psmouse.o MODPOST 0 modules make: Leaving directory '/usr/src/linux-3.16.3-1.gd2bbe7f-obj/x86_64/desktop'

vencik commented 10 years ago

@jpffitch this seems familiar; take a look at https://github.com/he1per/psmouse-dkms-alpsv7/issues/2

and see if that helps (note that the 1st thing to do is to remove the previous build; see @alehandrof's comment at the bottom).

vencik commented 10 years ago

:-) GitHub's abbreviations are funny sometimes; "take a look at number two"...

alehandrof commented 10 years ago

Quick question: on kernel 3.17 everything seems to work fine on my device (the same as @jpffitch). My understanding was that there is no reason to use this patch on the later kernels, or am I mistaken?

vencik commented 10 years ago

@alehandrof That's right. I'm on 3.17 now, too.

jpffitch commented 10 years ago

Unfortunately OpenSuSE 13.2 seems to be on 3.16. I wonder if it is possible to upgrade without upsetting the rest? I would be happy to sitch the pad off totally dislike thhe things) and use the trackpoint as long as I can have emulate3buttons set. I tried to get that but have failed so far

jpffitch commented 10 years ago

and I tried "dkms remove.... " and the rebuld was identical

vencik commented 10 years ago

@jpffitch Are you sure? In that case, the removal didn't go through well (I can see the following in your log:

Error! DKMS tree already contains: psmouse-dkms-alpsv7-1.1 You cannot add the same module/version combo more than once.

That wouldn't show up if dkms remove went through. Otherwise, there's nothing looking suspiciously; so I'd like to get rid of this to see if we couldn't get any more interesting error messages...

alehandrof commented 10 years ago

@vencik I know it's not your repo, but maybe @he1per will accept a PR to the readme about this.

@jpffitch A quick googling revealed the 3.17.1 kernel here under "stable": http://download.opensuse.org/repositories/Kernel:/

I don't know OpenSuSE well enough to advise further.

jpffitch commented 10 years ago

I did remove old version with dkms remove and it does not build

────── Building with dkms ───────

Creating symlink /var/lib/dkms/psmouse-dkms-alpsv7/1.1/source -> /usr/src/psmouse-dkms-alpsv7-1.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make KERNELRELEASE=3.16.3-1.gd2bbe7f-desktop -C /lib/modules/3.16.3-1.gd2bbe7f-desktop/build M=/var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src psmouse.ko... Error! Build of psmouse.ko failed for: 3.16.3-1.gd2bbe7f-desktop (x86_64) Consult the make.log in the build directory /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/ for more information. ▶▶▶▶ Error: Build failed

make.log says

DKMS make.log for psmouse-dkms-alpsv7-1.1 for kernel 3.16.3-1.gd2bbe7f-desktop ( x86_64) Thu 30 Oct 17:27:36 GMT 2014 make: Entering directory '/usr/src/linux-3.16.3-1.gd2bbe7f-obj/x86_64/desktop' make[1]: Entering directory `/usr/src/linux-3.16.3-1.gd2bbe7f-obj/x86_64/desktop ' CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/psmouse-base.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/synaptics.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/alps.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/elantech.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/logips2pp.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/lifebook.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/sentelic.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/trackpoint.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/touchkit_ps2.o CC /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/cypress_ps2.o LD /var/lib/dkms/psmouse-dkms-alpsv7/1.1/build/src/psmouse.o MODPOST 0 modules make: Leaving directory '/usr/src/linux-3.16.3-1.gd2bbe7f-obj/x86_64/desktop'

On the other hand emulation of middle button has just started to work (sometimes) so if I could switch the pad off I would be oK. I keep touching the pad which causes the cursor to jump