How to enable touchscreen/pen on Thinkpad x201t?

Hello! There was a topic discussing the new driver API, and people there have managed to make some of the devices (namely touchscreens!) working: Using new driver API - #67 by X512
I didn’t feel like bumping an old thread would be a great idea, so i’ve made a new one…
As the header says, i’m running haiku (hrev57294) on a Thinkpad x201t. It has what’s called a “Wacom Penabled” Touchscreen with pressure sensitive stylus. from what I can gather from inside the Devices app it’s an ACPI device.

Screenshot

Any help is highly appreciated! Thank you.

1 Like

Not all Wacoms are supported!

The surface pro 2 uses WACOM for touchscreen and that works, if it helps.

After a bit of digging I think I can say that on this laptop the digitizer is a serial input device.
I remember that on Linux you could get the touchscreen to be connected like so:

sudo inputattach --daemon -w8001 /dev/ttyS4

Uh, I realize that Haiku is very likely to be a lot different from Linux, but yeah, I’ve tried looking at /dev/ and found that my /dev/ports directory is empty (where the serial/parralel ports could be, I guessed). /dev/tt directory has more stuff though…

/dev/tt> ls -a
.   p2  p6  pa  pe  q2  q6  qa  qe  r2  r6  ra  re  s2  s6  sa  se
..  p3  p7  pb  pf  q3  q7  qb  qf  r3  r7  rb  rf  s3  s7  sb  sf
p0  p4  p8  pc  q0  q4  q8  qc  r0  r4  r8  rc  s0  s4  s8  sc
p1  p5  p9  pd  q1  q5  q9  qd  r1  r5  r9  rd  s1  s5  s9  sd

p0 can only be written to by group, and everything else can only be read by group.
owner can r/w all of these files.

I thought I could’ve tried to somehow read something from the serial port…
SerialConnect app has no serial ports available, and i’m not sure where to go next.

I thought that it could’ve been made so that the serial device was pointed to the right driver and it all would magically work lol. But it seems that serial devices need to have different drivers for them. (Found this thread: Serial mouse driver)
So It seems this means that while there’s no support for my device, nothing can be done except waiting for a driver to be ported or written for Haiku?

If there is nothing in /dev/ports, it means it is not recognized by any of our existing serial port drivers (we have drivers for the 16c550 legacy UART on PCs, as well as a selection of USB to UART chips, but not all of them).

So, you will have to determine which driver is used on Linux and/or FreeBSD to provide that serial interface.

1 Like

Alright after searching a bit I now can say that Linux detects the tty corresponding to the touchscreen as an UART, NS16550A at port 00000200 irq 5, It seems to be a part of standard linux serial driver from what I can see…
I guess I should also say that it looks like it is an internal ACPI serial port designed specifically for the touchscreen to work. BTW that touchscreen is also known as Wacom w8001 digitizer.
Linux has a kernel module called thinkpad_acpi that enables some functionality of fn-key combinations on thinkpads along with some more acpi functionality i think. Turning the module off (i tried with modprobe -r) didn’t make that tty disappear though.
Does Haiku support that UART? If it does, shouldn’t it appear in /dev/ports? What can I try to do if it should appear?

If you can’t see it in /dev/ports/, it’s not supported. We will need some changes to the UART driver to find UARTs declared in ACPI tables, rather than being exposed from the PCI bus.

This should not be too hard to do, but I think we will need a copy of the ACPI information for that UART, to see how it looks like, and adjust our driver to know about it.

I think this means adding a scan_acpi() here: Driver.cpp « pc_serial « ports « drivers « kernel « add-ons « src - haiku - Haiku's main repository and of course writing that function. If that’s possible at all, I’m not sure if ACPI is available this way to “legacy” drivers, if not, this will have to be converted to a “new style” driver instead.

I was very surprised to notice that the touchscreen on my Lenovo Yoga 15 is working in Haiku :wink:

Unfortunatly wlan is not on that device :frowning: