From owner-freebsd-hardware@freebsd.org Thu Feb 23 00:13:58 2017 Return-Path: Delivered-To: freebsd-hardware@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E984CEAC9E for ; Thu, 23 Feb 2017 00:13:58 +0000 (UTC) (envelope-from large.hadron.collider@gmx.com) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95698FE7 for ; Thu, 23 Feb 2017 00:13:57 +0000 (UTC) (envelope-from large.hadron.collider@gmx.com) Received: from [192.168.0.12] ([50.69.17.158]) by mail.gmx.com (mrgmx002 [212.227.17.184]) with ESMTPSA (Nemesis) id 0Lt1S6-1cDi5Y3toA-012ZF8 for ; Thu, 23 Feb 2017 01:08:43 +0100 From: Large Hadron Collider Subject: (accidentally unicasted) Re: In which a touchscreen is rehabilitated, or: How I learned to stop being scared and just hack at /usr/src/sys/dev To: freebsd-hardware@freebsd.org References: <0c7ad294-86f0-a076-f337-83e17d58fdd0@gmx.com> <6503fcce-fa54-e449-d158-f77323bebfcb@kapsi.fi> Message-ID: Date: Wed, 22 Feb 2017 16:08:41 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <6503fcce-fa54-e449-d158-f77323bebfcb@kapsi.fi> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:UnG00i/z6z0ZWodXxPsMe+YcNhkltFzjsUJpksO8s8Bsj7/3vJP WWKBqJNxvIMXk2xe1TtyIhGgcdCx/JWGnPEMB83n9mTpwGHDvyEwVgtT72bCMZprQAqw1uW 6b5ehnpBnQW7INXJDsjYui+63W+9c/PhZB8S6pfad425D5zTL5xYn7Yqdds9ZTjKpCXLskd g+ZA+go+/LFirNNw6C6tw== X-UI-Out-Filterresults: notjunk:1;V01:K0:hPBjTsUEcCA=:S9sicsW9CvWnV8W3uFqt7l SdhSSJ7jybCWKt3M4e6vN2Vh+GAurDrtcDUhS3hIsl6EbGjBDLFbprHSTjlozP+JoztFsYEAA sDLiOD89BxMhP0BbRx3LQtjtjCzr/Ptja0oRaqUWb5NJgz0+JAaOpHjAnns4wa+wt+LR65mgS Ux8ZurI6Q4kxVe73mzbNdTWEZwotTm4nc6P2zt9v3jjhzGCS4gYweFbNS0CtvTusSDSYxi3vM 1LTmHGmsg9/6IRz88ZjbAXI03JDmO/iAG/lSxxVHSlTfyY606mfAgK++n65tD+H6Rapbggb+u UfYEBOgFRScE1vg3tEAZGv7GoknE3WOUytp+BLJ1TerFPnVIA4wA5u9Cr2h8XNrq2LoZyApy0 kAtdEGNCsAsl1MO5XT+BUU+wUxlmxGt1rQyiacNgrsIYzJe1xmAGfzLsSbyZPifX0w/7LY/Qj 2a4uOfXztg== X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 00:13:58 -0000 Hey, sorry to piss you off but I do not know how to do this. On 22/02/2017 13:11, Arto Pekkanen wrote: > 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) >> >> Good day subscribers to this list. >> >> I'm here with what could be described as a success story and a patch in >> the same e-mail. >> >> 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. >> >> 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. >> >> 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 is >> a WACF00E - not supported in 11.0-RELEASE-p1 by the driver that handles >> the UART. >> >> It showed >> >> unknown pnpinfo _HID=WACF00E _UID=0 at handle=\_SB_.PCI0.LPCB.SIO_.DIGI >> >> as the devinfo line. >> >> Intriguingly, there was this line in uart_bus_acpi.c:static struct >> isa_pnp_id acpi_ns8250_ids[]: >> >> {0x04f0235c, "Wacom Tablet PC Screen"}, /* WACF004 */ >> >> 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. >> >> Adding this: >> >> {0x0ef0235c, "Wacom Tablet PC Screen 00e"}, /* WACF00e */ >> >> to uart_bus_acpi.c and this: >> >> {0x0ef0235c, NULL}, /* WACF004 - Wacom Tablet PC Screen*/ >> >> (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 as >> a UART. >> >> So it detected it, and the dev file was /dev/cuau4, for uart4, the >> WACF00E (it was ttyS4 under Linux). >> >> Great. X didn't detect it on its own, but that let me debug it using >> Minicom, which I promptly installed. >> >> 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. >> >> 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): >> >> Section "InputDevice" >> Identifier "wacom stylus" >> Driver "wacom" >> Option "Type" "stylus" >> Option "Device" "/dev/cuau4" >> Option "ForceDevice" "ISDV4" >> Option "AutoServerLayout" "true" >> EndSection >> >> Section "InputDevice" >> Identifier "wacom eraser" >> Driver "wacom" >> Option "Type" "eraser" >> Option "Device" "/dev/cuau4" >> Option "ForceDevice" "ISDV4" >> Option "AutoServerLayout" "true" >> EndSection >> >> Section "InputDevice" >> Identifier "wacom touch" >> Driver "wacom" >> Option "Type" "touch" >> Option "Touch" "on" >> Option "Device" "/dev/cuau4" >> Option "ForceDevice" "ISDV4" >> Option "AutoServerLayout" "true" >> EndSection >> >> Restarted X, and after >> >> % xsetwacom set "wacom touch" Touch on >> >> (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. >> >> 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. >> >> _______________________________________________ >> 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"