Lafite 13.3 Touchpad

arvis

Member
Did you use 32bit or 64bit version of openSUSE 13.2?
Tried fedora with latest kernel, still same, screen is flickering.
 

raedwulf

Member
I recently got a Lafite and have void linux running on it. I fixed my flickering screen by forcing the acceleration mode to UXA as I posted in the flickering screen thread.

As for the touchpad, I have been doing some investigation and it does not seem promising that there's any drivers to be had soon - the manufacturer for the touchpad is completely unknown... as in I've looked into the window's driver folder and there's no indication except it being TP Touchpad? In which case I'll invest some time in clean room reverse engineering the protocol.

This might take some significant time (depending on the complexity of the protocol) and I'm a busy PhD student .... so any help would be appreciated. My approach would be to use a custom Qemu build which passes the ps/2 touchpad from Linux straight through to a virtualised Windows and I'd be investigating what the communication between the windows driver and the hardware is.
 

raedwulf

Member
Update: I've made dumps of the mouse... from inspection the protocol looks reasonably straight forward, I will try and get a prototype driver written today/tomorrow.
Update2: I've identified the mouse as being a variant of the cypress trackpad which does have support in the Linux kernel.
Update3: I made a mistake and it's not cypress, but I've worked out how to decode this protocol.



Update4:

The driver is WORKING. I'll be posting the source code and instructions on how to build once I've tidied the code up and tested it a bit more.
 
Last edited:

rzolv

Bronze Level Poster
Update: I've made dumps of the mouse... from inspection the protocol looks reasonably straight forward, I will try and get a prototype driver written today/tomorrow.
Update2: I've identified the mouse as being a variant of the cypress trackpad which does have support in the Linux kernel.
Update3: I made a mistake and it's not cypress, but I've worked out how to decode this protocol.



Update4:

The driver is WORKING. I'll be posting the source code and instructions on how to build once I've tidied the code up and tested it a bit more.

Awesome work dude. I rarely check the forums, but when this laptop was originally announced I asked PCS who manufactured the trackpad, so that I could decide whether or not it was supported. PCS responded that it was made by BYD.

http://bydit.com/doce/products/microelectronics/2474.html

There are data sheets available on there, but seem to be focused around the hardware rather than software. Don't know how useful they will prove. Although will allow contact should you wish to get in contact with them directly and get required data.
 

raedwulf

Member
Thank you for the info! - I'll update the driver so that I can detect the touchpad properly (I currently use a different sequence of commands to identify the touchpad). Unfortunately, the datasheet doesn't give much detail about the parameters you can set on the mouse so that you can get into the right mode - I currrently copy the bytes sent by the windows driver verbatim to the touchpad - I deciphered only one command so far, the "enable/disable" command mode. The rest I could probably work out with trial and error but it seems that the datasheet suggests that it doesn't support "true" driver-based multitouch (like ALPS, synaptics etc.) so little will be gained except for enabling/disabling features. The firmware seems to be doing all the multitouch calculations itself, hence why people noticed the two-finger tap being so unreliable... this unfortunately can't be fixed and windows suffers the same problem.

The datasheet says there's rotate... but I've not been able to get rotate to work/send different codes on my touchpad...

Update: I was trying to rotate wrongly - identified and implemented the codes now. It's now feature complete with respect to the window's driver!

My implementation is based off the current linux HEAD
https://github.com/raedwulf/linux/tree/byd
 
Last edited:

rzolv

Bronze Level Poster
My implementation is based off the current linux HEAD
https://github.com/raedwulf/linux/tree/byd

Just tried this Kernel. Compiled and installed fine. lspci and lsusb don't return any results for detecting the trackpad, but it shows up under xinput list and /proc/bus/input/devices. Also on reboot after logging in, it takes a while for my wireless to load now. But it does load up eventually. What are you using to enable / configure functionality for the trackpad? I'm using Fedora 22 right now and the Gnome Settings configuration tool is absolutely useless unless all you want to do is manipulate cursor and click speed.
 
Last edited:

raedwulf

Member
Just tried this Kernel. Compiled and installed fine. lspci and lsusb don't return any results for detecting the trackpad, but it shows up under xinput list and /proc/bus/input/devices
Thanks for testing! I suspect that the identification code that the datasheet provides is erroneous... but can you print the output of dmesg if/when it detects the trackpad correctly (search for BYDPS)? One of the main issues with the trackpad is that it doesn't support absolute position reporting/pressure - even on windows - all multitouch detection is done within the firmware. I can, however, expose some features, such as enabling/disabling tapping - which hasn't been implemented yet.
lspci and lsusb won't return anything special because it's a PS/2 device.

What are you using to enable / configure functionality for the trackpad? I'm using Fedora 22 right now and the Gnome Settings configuration tool is absolutely useless unless all you want to do is manipulate cursor and click speed
Does two-finger scroll work?

If nothing works, can you also edit drivers/input/mouse/byd.c and uncomment #define DEBUG 1 - this will make very verbose output for dmesg by reporting everything.

it takes a while for my wireless to load now
As to the wireless... I can only guess that the mainline kernel has some changes that may affect it?
 

rzolv

Bronze Level Poster
Thanks for testing! I suspect that the identification code that the datasheet provides is erroneous... but can you print the output of dmesg if/when it detects the trackpad correctly (search for BYDPS)? One of the main issues with the trackpad is that it doesn't support absolute position reporting/pressure - even on windows - all multitouch detection is done within the firmware. I can, however, expose some features, such as enabling/disabling tapping - which hasn't been implemented yet.
lspci and lsusb won't return anything special because it's a PS/2 device.

Fedora uses systemd and journalctl (I still have no idea how to use journalctl since I was formerly on Debian). I get the following when searching for byd.

JCK8UuZ.png


Does two-finger scroll work?

Currently nothing seems to.

If nothing works, can you also edit drivers/input/mouse/byd.c and uncomment #define DEBUG 1 - this will make very verbose output for dmesg by reporting everything.

Will do that later as I'm heading out in a bit.

As to the wireless... I can only guess that the mainline kernel has some changes that may affect it?

Probably something in 4.2.
 

raedwulf

Member
Currently nothing seems to.

Thanks - there is progress though - byd: unknown code detected 32
is from my driver - and the fact that it's loading my driver suggests that it has identified it.

However, it is puzzling you do get a 0x32 code - it sounds like I need some more detailed logs from your touchpad with #define DEBUG 1. Perhaps there's slight variations on different builds from BYD (probably they have different versions of firmware).

I'll post my build script later which simply builds the psmouse.ko so you can use your fedora stock kernel (provided it's reasonably recent), and just insert/overwrite the psmouse.ko. Thankfully nothing has changed much with the psmouse driver for a very long time so there's no issues afaik with running it on an earlier kernel.

'dmesg' command should still work with systemd. Although admittedly I run most my systems without systemd.
 

raedwulf

Member
If you are around this evening, you can find me on irc.freenode.net as raedwulf. Alternatively, you can contact me on other details that I'll send you in a PM.
 

raedwulf

Member
Put this script into drivers/input/mouse and run it. This automatically builds and installs psmouse.ko into your current running kernel. Feel free to modify if necessary as it is quite straight forward - for instance to not install automatically.
I did a bad commit earlier - so please update the repo before using the script.

https://gist.github.com/137d4797f63236ed27bd
 
Last edited:

clidx

New member
I'm seriously thinking about getting a Lafite but am getting put off by what I'm reading about the touch pad.

Can someone give me the lowdown of the situation on Linux? raedwulf, does your kernel patch enable simple gestures like two finger scroll?

It's a shame that none of the other models have 5th gen Intel CPUs (yet) and also that PCS chose to put such a bargain bin part in an otherwise very nice laptop.
 

raedwulf

Member
clidx, yeah it does all the supported firmware reported gestures - the two finger scroll works as does two,three,four finger tap, three finger swipe gestures and four finger swipe gestures.... rotate + zoom & pinch.

However, you'll need to map them appropriately - the driver reports them but many aren't handled by anything in X11 apart from the two finger scroll and three finger tap - and the three finger swipe for backwards & forwards in the browser.
 

dpm

New member
However, you'll need to map them appropriately - the driver reports them but many aren't handled by anything in X11 apart from the two finger scroll and three finger tap - and the three finger swipe for backwards & forwards in the browser.

Hi raedwulf, thank you for your work. I'm not very practical with linux, can you explain me what does it means "you'll need to map them appropriately"? how to do this thing? does the driver work with every ubuntu kernel?

thank you again!
 

SnakeJayd

New member
Thanks for the script raedwulf.

Like dpm, I am a bit new to ubuntu.

Thanks for the script. Could you do a quick run down of what it is doing and how we can reverse the changes if we need to?
Thanks again.
 

SnakeJayd

New member
Put this script into drivers/input/mouse and run it. This automatically builds and installs psmouse.ko into your current running kernel. Feel free to modify if necessary as it is quite straight forward - for instance to not install automatically.
I did a bad commit earlier - so please update the repo before using the script.

https://gist.github.com/137d4797f63236ed27bd

Ha ha. I tried running that script in /lib/modules/3.19.0-26-generic/kernel/drivers/input/mouse. It didn't have a makefile, so the script failed and wrecked my mouse driver.
Luckily I made a backup of psmouse.ko and restored that and rebooted and it started working again.

I am really keen to get this working, but I need a bit of help to understand what I am doing. :D
 

raedwulf

Member
Hey dpm and SnakeJayd! I've been a busy over the last few days but you need to run that script from within the linux source tree from my git... i posted it in a much earlier post: https://github.com/raedwulf/linux/tree/byd

If you wait a bit, I'll write a script that does all the magic automatically, but I've always frowned on those scripts because it's not technically safe haha :p.
 

dsank

Member
Hi Raedwulf, any news on the script you mentioned in your last post?

I am unfortunately not able to set the following options
- 2 finger scroll
- no touch when typing

I have basic terminal and git knowledge but wasnt able to figure out how to: "run that script from within the linux source tree from my git"

** Edit I am using Linux Mint (ubuntu base)


Cheers
 
Last edited:

Frag

New member
Does Lafite touchpad work properly with Linux yet?

I have been 'making do' on Ubuntu with basic mouse emulation for a few months, hoping that it would get fixed in time.

Has anyone had any success with this?

Thanks.
 
Top