Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2017 23:11:12 +0200
From:      Arto Pekkanen <isoa@kapsi.fi>
To:        freebsd-hardware@freebsd.org
Subject:   Re: In which a touchscreen is rehabilitated, or: How I learned to stop being scared and just hack at /usr/src/sys/dev
Message-ID:  <6503fcce-fa54-e449-d158-f77323bebfcb@kapsi.fi>
In-Reply-To: <0c7ad294-86f0-a076-f337-83e17d58fdd0@gmx.com>
References:  <0c7ad294-86f0-a076-f337-83e17d58fdd0@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--jV12FLkip2oIbpc3ulPBgNGf45hCKsH4w
Content-Type: multipart/mixed; boundary="S7bCitMox3tUDSxh0bSr0h7IPI7B5H1Xh";
 protected-headers="v1"
From: Arto Pekkanen <isoa@kapsi.fi>
To: freebsd-hardware@freebsd.org
Message-ID: <6503fcce-fa54-e449-d158-f77323bebfcb@kapsi.fi>
Subject: Re: In which a touchscreen is rehabilitated, or: How I learned to
 stop being scared and just hack at /usr/src/sys/dev
References: <0c7ad294-86f0-a076-f337-83e17d58fdd0@gmx.com>
In-Reply-To: <0c7ad294-86f0-a076-f337-83e17d58fdd0@gmx.com>

--S7bCitMox3tUDSxh0bSr0h7IPI7B5H1Xh
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Please contribute your patch and get it approved and MFC'd by
maintainers so that other people who are not knowledgeable enough can
have the thing working without having to figure out how to hack and
patch the kernel. Thanks.

On 21.2.2017 2:49, Large Hadron Collider wrote:
> (Apologies if this doesn't line break at 79 chars - full formatting in
> HTML but this may be lost - shouldn't lose any info though)
>=20
> Good day subscribers to this list.
>=20
> I'm here with what could be described as a success story and a patch in=

> the same e-mail.
>=20
> Please do stop me if WACF00E has already been slated for the next major=

> release - but I would like to share how I got my HP Elitebook 2760p's
> touchscreen working.
>=20
> So I, a former and now again user of FreeBSD (I got hacked the first
> time... silly Ellie shouldn't give shells to strangers, should she now?=
)
> have a laptop whose screen is touch-capable, and whose touchscreen
> subsystem is based on a serial Wacom tablet.
>=20
> It worked under Linux and too I presume Windows (with which the laptop
> shipped), but not FreeBSD. I thought, what was going on? What was I
> doing wrong? So after some poking around I discovered that the screen i=
s
> a WACF00E - not supported in 11.0-RELEASE-p1 by the driver that handles=

> the UART.
>=20
> It showed
>=20
>     unknown pnpinfo _HID=3DWACF00E _UID=3D0 at handle=3D\_SB_.PCI0.LPCB=
=2ESIO_.DIGI
>=20
> as the devinfo line.
>=20
> Intriguingly, there was this line in uart_bus_acpi.c:static struct
> isa_pnp_id acpi_ns8250_ids[]:
>=20
>     {0x04f0235c, "Wacom Tablet PC Screen"},         /* WACF004 */
>=20
> So I thought what the hell, I'd copy that line under itself and change
> 04f0 (which is byte-swapped, counterintuitively) to 0ef0, representing
> WACF00E.
>=20
> Adding this:
>=20
>     {0x0ef0235c, "Wacom Tablet PC Screen 00e"}, /* WACF00e */
>=20
> to uart_bus_acpi.c and this:
>=20
>     {0x0ef0235c, NULL},     /* WACF004 - Wacom Tablet PC Screen*/
>=20
> (Yes it should read WACF00E in the comment) under the WACF004 entry in
> uart_bus_isa.c, then recompiling and installing in whatever way your
> configuration might demand seems to make the kernel detect the tablet a=
s
> a UART.
>=20
> So it detected it, and the dev file was /dev/cuau4, for uart4, the
> WACF00E (it was ttyS4 under Linux).
>=20
> Great. X didn't detect it on its own, but that let me debug it using
> Minicom, which I promptly installed.
>=20
> After telling Minicom to use /dev/cuau4 as the modem, and telling it to=

> use 38400 8N1, touches to the screen resulted in what can only be
> described as euphoric garbage, indicating that this ugly hack on top of=

> hack alert worked.
>=20
> So I set up /usr/local/etc/X11/xorg.conf.d/wacom.conf to include
> (slightly amended from my actual setup, which only has ISDV4 in the
> stylus but still works for touch, haven't tested for stylus):
>=20
> Section "InputDevice"
>     Identifier    "wacom stylus"
>     Driver        "wacom"
>     Option        "Type"            "stylus"
>     Option        "Device"        "/dev/cuau4"
>     Option        "ForceDevice"        "ISDV4"
>     Option          "AutoServerLayout"    "true"
> EndSection
>=20
> Section "InputDevice"
>     Identifier    "wacom eraser"
>     Driver        "wacom"
>     Option        "Type"            "eraser"
>     Option        "Device"        "/dev/cuau4"
>     Option        "ForceDevice"        "ISDV4"
>     Option          "AutoServerLayout"    "true"
> EndSection
>=20
> Section "InputDevice"
>     Identifier    "wacom touch"
>     Driver        "wacom"
>     Option        "Type"            "touch"
>     Option        "Touch"            "on"
>     Option        "Device"        "/dev/cuau4"
>     Option        "ForceDevice"        "ISDV4"
>     Option          "AutoServerLayout"    "true"
> EndSection
>=20
> Restarted X, and after
>=20
>     % xsetwacom set "wacom touch" Touch on
>=20
> (I didn't initially have Touch on in the options list for "wacom touch"=
)
> it was almost like striking platinum in a gold mine or something when
> the mouse just followed my finger the way I was used to it doing so
> under Linux.
>=20
> To those of you who say that FreeBSD will never be ready for the
> desktop, you're only right when you're talking to newbs. And this is
> living proof that if you know some C and you're intrepid enough,
> miracles really can happen.
>=20
> _______________________________________________
> freebsd-hardware@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hardware
> To unsubscribe, send any mail to "freebsd-hardware-unsubscribe@freebsd.=
org"

--=20
Arto Pekkanen


--S7bCitMox3tUDSxh0bSr0h7IPI7B5H1Xh--

--jV12FLkip2oIbpc3ulPBgNGf45hCKsH4w
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlit/nIACgkQTBivhqtJa25CfgD/XvGMsxkzwu+Jpnyhaty/Dqun
GERFgljRixdF0rl25zkA/2ZTv0IEgU0t6RKRSob/z+Q6bRmDoRIjUWFd4iLtcmF0
=J09D
-----END PGP SIGNATURE-----

--jV12FLkip2oIbpc3ulPBgNGf45hCKsH4w--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6503fcce-fa54-e449-d158-f77323bebfcb>