OpenBSD Journal

joshua stein: t2k13 Hackathon Report - ACPI, CVS, multitouch

Contributed by weerd on from the multi-touch-me dept.

We continue the hackathon reporting with this story from joshua stein (jcs@), who worked on A{HC,CP}I, trackpads, cvs and more during t2k13:

For the Toronto hackathon, my goals were to commit some M's that had been accumulating in my tree for months and to work on some new hardware drivers for better operation of OpenBSD on newer Apple MacBooks.

I sat at a table with Philip Guenther (guenther@), Ted Unangst (tedu@), and Matthew Dempsky (matthew@). Over the course of a week, I overheard more about threads, silly POSIX standards, and Chinese web hackers than I ever wanted to know.

I first resurrected claudio@'s "Jesus machine" diff to force AHCI controllers out of IDE mode, which was committed 4 months ago but backed out due to incompatibilities with non-Apple hardware. This hack is necessary for Apples since they don't have a BIOS configuration screen to toggle this setting and BootCamp leaves the controller in IDE mode. I sent claudio@ a diff that would only apply the hack when it determined it was running on Apple hardware, but this made kettenis@ yell in horror upon seeing it. I'm still trying to figure out how best to introduce this hack.

Next, I committed Elantech version 4 protocol support to pms(4) that was needed for my ASUS Zenbook UX21A. This allows the driver to track absolute coordinates of up to 5 fingers at a time, which it then feeds into wscons and ultimately to the xf86-input-synaptics X driver to enable it do things like two-finger scrolling and emulating 2nd- and 3rd-button clicks since the trackpad only has one physical button.

After fixing a bug in my xbanish utility, I finally imported a port of it to our ports tree.

Over the next couple days, I nagged kettenis@ and mlarkin@ about some diffs to our ACPI AML parser that were needed to prevent panics on my ASUS laptop and some others. These fixes went in on Saturday and my ASUS is now bug-free.

After a random discussion at our table about CVS, I remembered the "commitid" feature that GNU CVS added in 2005. This generates a random commit id string at commit time and adds it as a token in each RCS file of that whole commit. This makes it easy to locate which files were changed together when viewing one specific revision of a file, a feature which many other revision control systems have by now. I backported this feature to our old version of CVS and added it to our OpenCVS and RCS implementations. Once our AnonCVS and CVSweb mirrors are given time to update their binaries, this commitid feature will get enabled on cvs.openbsd.org and future commits will get commitid tokens. My (possibly overly-ambitious) goal is to generate commitid tokens for all historical changesets, giving one authoritative timeline of our CVS tree history.

I initially planned on writing a driver for the Apple SMC chip, giving fan status/control, keyboard backlight control, and ambient light sensor data, but the most of my time (and reboots) were spent working on a USB driver for the trackpad on my MacBook Air.

Similar to the Elantech trackpad on my ASUS, the MacBook's only has one physical button and since it otherwise operates in HID compatibility mode sending relative pointer coordinates, the xf86-input-synaptics driver can't do smart things like emulate a right-click or do two-finger scrolling. After struggling for a few days trying to figure out why my driver was not receiving any interrupts from the trackpad, I finally got it working and was able to write most of the driver before I left. It is currently able to independently track 15 (!) fingers of input and is doing two-finger scrolling and right-click emulation in X. Once I finish testing on some other MacBook models, I'll be able to commit it.

Thanks to Ken (krw@) for organizing the event, University of Toronto for hosting us, and a big thanks to Mark Uemura (mtu@) for driving so many us from and back to the airport.

Our gratitude goes to joshua for taking the time to write this report and, of course, for improving our favorite OS!

(Comments are closed)


Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]