Bug#943551: trace-cmd in debian is very old compared to upstream

2019-10-28 Thread Seth Forshee
On Sat, Oct 26, 2019 at 10:31:52AM +0100, Sudip Mukherjee wrote:
> Package: trace-cmd
> Version: 2.6.1-0.1
> Severity: important
> 
> The trace-cmd package in debian seems to be very old. The upstream
> available version is v2.8.3 and the version used in debian is v2.5.3.
> There had been major improvements in trace-cmd and kernelshark recently.
> 
> I can help in updating it if the ubuntu kernel team is busy.

Yes, I had been keeping it up to date for some time, but it's not really
something I have time for anymore. If you or someone else is interested
in taking over the package, please feel free.

Thanks,
Seth



Bug#758419: trace-cmd: Plugin function_graph missing

2014-08-18 Thread Seth Forshee
On Sun, Aug 17, 2014 at 02:02:39PM +0200, Vincent Bernat wrote:
  ❦ 17 août 2014 13:54 +0200, Vincent Bernat ber...@debian.org :
 
  trace-cmd should come with a function_graph plugins (mentioned in
  the manual pages, for example in trace-cmd-record). However, it seems
  absent.
 
 It seems that other plugins do not work either:
 
 $ sudo trace-cmd record -p function -e sched_switch ls
 /sys/kernel/debug/tracing/events/sched_switch/filter
 /sys/kernel/debug/tracing/events/*/sched_switch/filter
 trace-cmd: No such file or directory
   Plugin 'function' does not exist
 
 Despite the presence of /usr/lib/trace-cmd/plugins/plugin_function.so.

That's working fine here. I suspect your problem is either that you
don't have debugfs mounted or that your kernel is missing something it
needs to do what trace-cmd is asking. First check that /sys/kernel/debug
is mounted, then that /sys/kernel/debug/tracing exists. If both those
are true run 'cat /sys/kernel/debug/tracing/available_tracers' and make
sure that function and function_graph are both in the list.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679750: Lenovo G360: ALPS Touchpad Recognized as PS/2 Generic Mouse(with newly dmesg information)

2012-07-19 Thread Seth Forshee
On Sun, Jul 15, 2012 at 10:15:57AM +0800, littlebat wrote:
 In the Windows 7 guest OS, the touchpad Lenovo pointing device
 disappeared from the hardwares list. And, the log file in Ubuntu 11.10
 has the content below: 
 y@y-PC:~$ cat ./psmouse-reverse/reverse.log 
 S ff
 R fe
 S ff
 R fe
 S ff
 R fe
 S ed
 R fe

From the outset this doesn't look right. When reset is sent (0xff) the
touchpad should respond with and acknowledge (0xfa) and a couple more
bytes. Something obviously isn't working right, but I'm not sure what.

The only suggestion I have is to start debugging and try to see what's
going wrong. Is the data from the guest OS getting to the hardware okay,
and vice versa? Are you sure you've got the correct device?

Seth


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679750: Lenovo G360: ALPS Touchpad Recognized as PS/2 Generic Mouse(with newly dmesg information)

2012-07-09 Thread Seth Forshee
On Sat, Jul 07, 2012 at 01:35:19PM +0800, littlebat wrote:
 Briefly, proto_version V4 with command_mode_resp 0x00, 0x01, 0x73,
 0x0d and V3 with 0x0d, 0x73, show the almost same symptoms:
 1, dmesg output:
 [   19.105550] psmouse serio4: alps: E6 report: 00 00 64
 [   19.130028] psmouse serio4: alps: E7 report: 73 03 50
 [   19.149304] psmouse serio4: alps: unknown response while entering
 command mode: 73 01 0d 
 mode

Okay, I don't suspect the v3/v4 protocol support is likely to work then.

 And, V2 or V1 with 0x8a or 0x00, show the almost same symptoms below:
 1, dmesg output:
 [   19.935069] psmouse serio4: alps: E6 report: 00 00 64
 [   19.960457] psmouse serio4: alps: E7 report: 73 03 50
 [   20.000732] psmouse serio4: alps: Status: 10 00 0a

...

 4, There is touchpad tab in gnome mouse setting dialog, but the
 functions of edge scrolling and disable touchpad when typing still
 can't work even if I can setup them in touchpad tab in gnome mouse
 setting dialog.

The alps driver will detect and handle raw PS/2 mouse data, so what it
sounds like to me is that the alps driver manages to attach to your
device but doesn't get it sending absolute data packets. As a result the
driver is only passing relative motion data instead of absolute position
data, which means the touchpad is usable but still can't support any
touchpad features like edge scrolling.

So it sounds like we don't know how to talk to your touchpad, and
there's no trivial way to add support for it to the driver. There's
not really anything more I can do to help since I don't have access to
the hardware.

Seth



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679750: Lenovo G360: ALPS Touchpad Recognized as PS/2 Generic Mouse(with newly dmesg information)

2012-07-09 Thread Seth Forshee
On Tue, Jul 10, 2012 at 12:16:27PM +0800, littlebat wrote:
 1, Can you provide a simple tutorial (or web page address) of how to
 reverse-engineer a Linux ALPS driver if possible? I have very basic
 programming knowledge(shell script, read basic C code except hardware
 driver). Maybe, I can provide more detail hardware information about
 this ALPS touchpad in this way?

I did a write-up a while back about how I did it.

http://swapspace.forshee.me/2011/11/touchpad-protocol-reverse-engineering.html

 2, Is there a tool, it can show the message when I operate on touchpad
 edge scrolling? So, according to the output, it is able to get a dirty
 solution about edge scrolling function of Lenovo G360 touchpad.
 The funciton of disable touchpad when typing has a solution using
 python script I have mentioned in the previous posts.

I'm sorry, I can't quite tell what you're asking. If you're asking for a
way to enable edge scrolling without having a functioning touchpad
driver, I don't know of any. I doubt it's even possible to detect that
you're near the edge of the touchpad with only relative motion events.

 3, If you are interest in this and have time and it is helpful, I can
 provide a root password for this laptop to you and run ssh service for
 you all the time. Then you can operate this laptop via ssh connection
 in this way. You can do anything on this machine even format the
 disk :-)

I'm afraid it's just not practical to do this remotely. Being able to
physically interact with the touchpad is pretty crucial.

Seth



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679750: Lenovo G360: ALPS Touchpad Recognized as PS/2 Generic Mouse

2012-07-05 Thread Seth Forshee
On Thu, Jul 05, 2012 at 03:45:45PM +0800, littlebat wrote:
  Is the following summary correct?
  
   - 2.6.32.y (Debian squeeze) works well, using xinput or synclient to
 configure
   - 3.2.y (Ubuntu 12.04 LTS) sees a generic mouse, unconfigurable
   - 3.2.y (Debian squeeze-backports) is likewise unconfigurable
   - 3.4.4 (Debian experimental) is also unconfigurable
 
 No, none of these four kernels can configure a full functional ALPS
 touchpad. Under all of these four kernels:
 1, synclient -l shows Couldn't find synaptics properties. No
 synaptics driver loaded? 
 2, xinput --list shows it is a PS/2 Generic Mouse
 3, cat /proc/bus/input/devices shows it is N: Name=PS/2 Generic
 Mouse
 4, Can't find any string like touchpad, synaptics in
 /var/log/Xorg.0.log 
 5, There isn't touchpad tab in gnome mouse setting dialog, so I
 can't setup edge scrolling and disable touchpad on typing.

ALPS refuses to provide information about their touchpad protocols, so
any support we have for ALPS touchpads is based on reverse engineering
the protocol. It's likely that yours uses some version of the protocol
that isn't supported, in which case someone with access to the hardware
will need to do the reverse engineering work.

There's a slight chance that it uses a known protocol but just has an
unknown model signature. In that case the fix is easy, but it will
require some trial and error to see if that's the case.

  Could you provide full dmesg output from booting a working and
  non-working kernel?
 
 The laptop isn't here, I will post full dmesg output under 3.4.4
 (Debian experimental) kernel later.

When you send dmesg it would help if you could use a build with the
following line added to the top of drivers/input/mouse/alps.c, before
the includes.

 #define DEBUG

This will cause the model signature for your touchpad to be included in
the log.

Thanks,
Seth




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679750: Lenovo G360: ALPS Touchpad Recognized as PS/2 Generic Mouse(with newly dmesg information)

2012-07-05 Thread Seth Forshee
On Fri, Jul 06, 2012 at 11:39:42AM +0800, littlebat wrote:
 I found these lines in my dmesg information:
 [   19.995850] psmouse serio4: alps: E6 report: 00 00 64
 [   20.021288] psmouse serio4: alps: E7 report: 73 03 50
 [   20.623609] input: PS/2 Generic Mouse
 as /devices/platform/i8042/serio4/input/input9

Thanks, this is the information we need to check whether or not your
touchpad uses any of the known ALPS protocols.

I'm attaching a patch to use as a starting point. Basically we're just
going to try each protocol version until either we find one that works
or run out of options. You should have an external mouse available,
because it's likely that your touchpad will not be usable. I've also
heard that some of the workarounds that people use to get the disable
touchpad while typing behavior can cause the touchpad to no longer
function once it starts behaving as a touchpad, so you should look out
for that as well.

I won't be able to respond further until next Monday, but it's pretty
simple to modify the driver to try different protocol versions so I'll
give you some instructions. The patch adds the following line. I've
identified the two fields you'll need to change.

{ { 0x73, 0x03, 0x50 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 },
  ^ ^
  | |
command_mode_resp   |
  proto_version

Not surprisingly, to try different protocol versions you just need to
change the proto_version field. Try ALPS_PROTO_V4 first, if that doesn't
work try ALPS_PROTO_V3, etc., until you've tried them all or found one
that works.

The first time you run the patch though you need to be on the lookout
for a message in dmesg that says Unknown command mode response
followed by two hex digits. If you see this then you need to change
command_mode_resp to match the response printed in the message. Be sure
to leave the 0x characters in place; only replace the 8a characters.
Then try the same protocol version again.

The basic test procedure after booting with a test version of the driver
is:

 1. Check dmesg for any errors from the alps driver. If you see anything
other than the Unknown command mode response message then it
probably means your touchpad doesn't use that protocol version, so
you should move on to the next one. If the device name isn't showing
up as something with ALPS in it, that also indicates your device
isn't using that version.

 2. Thoroughly test the touchpad. You may see erratic behavior -- the
pointer jumping around, random clicks, etc -- which means it's using
a different protocol.

If you find a protocol version that works, let me know and I'll help get
it added to the driver. If you don't then there's not much more I can do
to help without hardware.

Seth
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 4c6a72d..979339c 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -15,6 +15,8 @@
  * the Free Software Foundation.
  */
 
+#define DEBUG
+
 #include linux/slab.h
 #include linux/input.h
 #include linux/input/mt.h
@@ -112,6 +114,7 @@ static const struct alps_model_info alps_model_data[] = {
 	{ { 0x73, 0x02, 0x64 },	0x9b, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT },
 	{ { 0x73, 0x02, 0x64 },	0x9d, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT },
 	{ { 0x73, 0x02, 0x64 },	0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 },
+	{ { 0x73, 0x03, 0x50 },	0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 },
 };
 
 /*


Bug#633595: elantech mouse v3 support

2011-08-29 Thread Seth Forshee
On Mon, Aug 29, 2011 at 04:22:36PM +0100, Ben Hutchings wrote:
 On Mon, 2011-08-29 at 16:06 +0200, Julien Valroff wrote:
  Hi Ben,
  
  Le lundi 29 août 2011 à 14:07:44 (+0200 CEST), Ben Hutchings a écrit :
   On Mon, 2011-08-29 at 00:35 +0200, Eloi COUTANT wrote:
Hi.

I confirm that Julien's patch is efficient on Samsung RC510.
I have no problems anymore : one, two and three fingers are working,
wheels too !
   [...]
   
   Julien, please can you provide a list of *upstream* changes.  We will
   not apply a large patch with no such references.
  
  I have not written that patch at all, just made available the original
  DKMS tree so that people can test it easily.
  
  The patch was written by Seth Forshee seth.fors...@canonical.com and is
  available on LaunchPad bug #681904 [0].
  
  All the patches, Ubuntu builts and dkms .deb are available at:
  http://people.canonical.com/~sforshee/lp681904/
 
 OK, so I see this patch:
 http://people.canonical.com/~sforshee/lp681904/linux-3.0.0-8.10~lp681904v201108052055/0001-Input-elantech-Add-v3-hardware-support.patch
 which looks like something that could go upstream.  But it hasn't, or at
 least it's not visible in linux-next.

That patch will not be going upstream. Elantech has submitted more
comprehensive updates to the driver that were developed in parallel (see
https://lkml.org/lkml/2011/8/29/63 for the most recent revision).

We are carrying an updated version of the above patch temporarily until
Elantech's solution makes it upstream. In practice that probably means
we'll use my patch for Ubuntu 11.10 and switch to Elantech's solution in
12.04. The advantage to the patch we're carrying now versus Elantech's
is that it doesn't functionally modify the v1 or v2 touchpad support,
and thus shouldn't carry any risk of regression for those devices.  I've
attached a copy of the updated patch.

Cheers,
Seth
From bae4a3ddeb12cbaa31740d9d36dfaa281a02534c Mon Sep 17 00:00:00 2001
From: Seth Forshee seth.fors...@canonical.com
Date: Fri, 5 Aug 2011 15:54:54 -0500
Subject: [PATCH] UBUNTU: SAUCE: (no-up) Input: elantech - Add v3 hardware support

BugLink: https://bugs.launchpad.net/bugs/681904

Adds basic v3 hardware support for newer devices not currently
supported by the driver.

Thanks to JJ Ding jj_d...@emc.com.tw, Tom Lin tom_...@emc.com.tw,
and Mark A. Stratman strat...@gmail.com, whose work on other
patcesh revealed the workings of the v3 protocol.

Signed-off-by: Seth Forshee seth.fors...@canonical.com
---
 drivers/input/mouse/elantech.c |  181 +---
 drivers/input/mouse/elantech.h |5 +
 2 files changed, 157 insertions(+), 29 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 3250356..642cde0 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -82,6 +82,7 @@ static int elantech_read_reg(struct psmouse *psmouse, unsigned char reg,
 {
 	struct elantech_data *etd = psmouse-private;
 	unsigned char param[3];
+	unsigned char command;
 	int rc = 0;
 
 	if (reg  0x10 || reg  0x26)
@@ -90,9 +91,11 @@ static int elantech_read_reg(struct psmouse *psmouse, unsigned char reg,
 	if (reg  0x11  reg  0x20)
 		return -1;
 
+	command = (etd-hw_version == 3) ? ETP_REGISTER_RW : ETP_REGISTER_READ;
+
 	switch (etd-hw_version) {
 	case 1:
-		if (psmouse_sliced_command(psmouse, ETP_REGISTER_READ) ||
+		if (psmouse_sliced_command(psmouse, command) ||
 		psmouse_sliced_command(psmouse, reg) ||
 		ps2_command(psmouse-ps2dev, param, PSMOUSE_CMD_GETINFO)) {
 			rc = -1;
@@ -100,8 +103,9 @@ static int elantech_read_reg(struct psmouse *psmouse, unsigned char reg,
 		break;
 
 	case 2:
+	case 3:
 		if (elantech_ps2_command(psmouse,  NULL, ETP_PS2_CUSTOM_COMMAND) ||
-		elantech_ps2_command(psmouse,  NULL, ETP_REGISTER_READ) ||
+		elantech_ps2_command(psmouse,  NULL, command) ||
 		elantech_ps2_command(psmouse,  NULL, ETP_PS2_CUSTOM_COMMAND) ||
 		elantech_ps2_command(psmouse,  NULL, reg) ||
 		elantech_ps2_command(psmouse, param, PSMOUSE_CMD_GETINFO)) {
@@ -125,6 +129,7 @@ static int elantech_write_reg(struct psmouse *psmouse, unsigned char reg,
 unsigned char val)
 {
 	struct elantech_data *etd = psmouse-private;
+	unsigned char command;
 	int rc = 0;
 
 	if (reg  0x10 || reg  0x26)
@@ -133,9 +138,11 @@ static int elantech_write_reg(struct psmouse *psmouse, unsigned char reg,
 	if (reg  0x11  reg  0x20)
 		return -1;
 
+	command = (etd-hw_version == 3) ? ETP_REGISTER_RW : ETP_REGISTER_WRITE;
+
 	switch (etd-hw_version) {
 	case 1:
-		if (psmouse_sliced_command(psmouse, ETP_REGISTER_WRITE) ||
+		if (psmouse_sliced_command(psmouse, command) ||
 		psmouse_sliced_command(psmouse, reg) ||
 		psmouse_sliced_command(psmouse, val) ||
 		ps2_command(psmouse-ps2dev, NULL, PSMOUSE_CMD_SETSCALE11)) {
@@ -144,8 +151,9 @@ static int elantech_write_reg(struct psmouse *psmouse, unsigned char reg,
 		break;
 
 	case 2:
+	case 3