Macbook Air 2017 (7,2) Support

Patrick McDonough ~patrick/dfly at awk.is
Sun Jul 5 03:48:01 PDT 2020


On 2020-06-29 17:31, Patrick McDonough wrote:
> Howdy. I'm working on getting Dragonfly 5.8 running on a reasonably 
> recent Macbook Air (2017), with the intent to update the 
> DragonFlyOnLaptops page with something a touch newer. The only real 
> issues I've faced are audio and trackpad related, as I've skirted around 
> dealing with Broadocm wifi using a cheap adapter board.
> 
> Audio mostly works with snd_hda_load="YES" in loader.conf without 
> further configuration. However this is only on pcm2, which is the 
> headphone output. For speakers (pcm1) to work, I had to fiddle with the 
> gpio configuration.
> 
> sysctl dev.hdaa.1.gpio_config=0=set
> 
> Dandy. The trackpad less so.
> 
> I'm seeing seemingly random middle and right clicks when using the 
> trackpad. It only happens when the trackpad is in use - so using a USB 
> mouse alleviates the problem entirely. However within seconds of moving 
> the cursor using the trackpad, I'm accosted by either middle or right 
> click events.
> 
> My configuration is a default XFCE4 desktop on Xorg, with everything 
> installed through pkg. dbus, moused, and hald are the only additional 
> services enabled in my rc.conf.
> 
> If anyone has a clue, that would be great. Failing that - a link to the 
> man/code for the relevant subsystem handling the trackpad 
> (xorg-input-something? moused?) would be welcome.
> 
> Patrick
> 

I thought I'd make an update, as I'm at the point where I have a working 
trackpad.

I spent some time yesterday trying to pinpoint where the problem was 
occurring. I work almost exclusively in Xfce on this laptop, so I 
naturally saw the problem there most of the time. Wanting to either pin 
it on Xfce, Xorg, or something lower, I fired up moused with debug 
output on the console. Pretty consistently, I'd see button presses in 
the output while only moving the cursor. So I put Xorg aside and started 
looking at drivers.

FreeBSD has two drivers for Macbook trackpads, atp and wsp, and I was 
curious if there had been any work done to bring them over. A few 
searches later I found 
https://www.dragonflybsd.org/~swildner/0001-WIP-atp-4-wsp-4.patch - work 
done by Sascha Wildner a few years ago. Unfortunately, but reasonably 
given the age, the patch didn't apply cleanly. So I pulled out the wsp 
code, slipped it in by hand, and ran a make nativekernel.

After a reboot, I pointed moused at /dev/wsp0, and was delighted to see
a working trackpad, including two-finger-right-click and 
two-finger-scrolling.

I'd be curious why the patch never made it into the tree. While I can't 
vouch for the atp code as I didn't touch it, the wsp module built 
without changes and worked first time.

Patrick


More information about the Users mailing list