In 2024 Another Attempt To Get The Apple Touch Bar In Good Shape For Linux On x86 Macs
A set of nine patches were posted for review on Tuesday in aiming to get the Apple Touch Bar working well under Linux for the x86 T2-based Macs.
The patches are for the DRM driver code with a "appletbdrm" tiny driver and Apple Touch Bar HID driver support for input. These kernel drivers go along with a tiny daemon being developed for displaying function keys and media controls on the Touch Bar. That daemon is for both Apple Silicon and T2 Macs while these new kernel patches are focused just on the T2-equipped x86 Macs.
The patch series cover letter sums up the current state and support as:
Now this code awaits review in seeing the prospects for finally getting Apple Touch Bar support in the mainline Linux kernel support for x86 T2-based Macs all these years later. Over the year there have been various attempts with these Apple Macs with Touch Bar being around since 2016 but nothing successful yet in reaching the mainline kernel.
The patches are for the DRM driver code with a "appletbdrm" tiny driver and Apple Touch Bar HID driver support for input. These kernel drivers go along with a tiny daemon being developed for displaying function keys and media controls on the Touch Bar. That daemon is for both Apple Silicon and T2 Macs while these new kernel patches are focused just on the T2-equipped x86 Macs.
The patch series cover letter sums up the current state and support as:
"The Touch Bars found on x86 Macs support two USB configurations: one where the device presents itself as a HID keyboard and can display predefined sets of keys, and one where the operating system has full control over what is displayed.
This patch series adds support for both the configurations.
The hid-appletb-bl driver adds support for the backlight of the Touch Bar. This enables the user to control the brightness of the Touch Bar from userspace. The Touch Bar supports 3 modes here: Max brightness, Dim and Off. So, daemons, used to manage Touch Bar can easily manage these modes by writing to /sys/class/backlight/appletb_backlight/brightness. It is needed by both the configurations of the Touch Bar.
The hid-appletb-kbd adds support for the first (predefined keys) configuration. There are 4 modes here: Esc key only, Fn mode, Media keys and No keys. Mode can be changed by writing to /sys/bus/hid/drivers/hid-appletb-kbd//mode This configuration is what Windows uses with the official Apple Bootcamp drivers.
Rest patches support the second configuration, where the OS has full control on what's displayed on the Touch Bar. It is achieved by the patching the hid-multitouch driver to add support for touch feedback from the Touch Bar and the appletbdrm driver, that displays what we want to on the Touch Bar. This configuration is what macOS uses."
Now this code awaits review in seeing the prospects for finally getting Apple Touch Bar support in the mainline Linux kernel support for x86 T2-based Macs all these years later. Over the year there have been various attempts with these Apple Macs with Touch Bar being around since 2016 but nothing successful yet in reaching the mainline kernel.
3 Comments