Skip to content

feedbackd: Configure haptic feedback per device

The default configuration of feedbackd is fine for the Librem5's vibrator but not for the PinePhone's vibrator. I wasn't aware of this problem until I tried out Arch Linux a while back. They use the following config: https://github.com/dreemurrs-embedded/Pine64-Arch/blob/master/PKGBUILDS/phosh/danctnix-phosh-ui-meta/danctnix_feedbackd.json

I ported the configuration over to pmOS and typing is really improved since you get haptic feedback when pressing a key.

As suggested by https://source.puri.sm/Librem5/feedbackd/-/issues/27 and @ollieparanoid, using the device tree to match the right profile is preferred. In case that fails, the environment variable FEEDBACK_THEME is read by feedbackd. This variable contains the patch to the feedback theme to use. If that also fails, the default.json config is used.

As requested by upstream, adding pine64,pinephone to the compatible list in the kernel DTS file. This allows us to use a single configuration file for all hardware revisions of the PinePhone. Furthermore, the device configurations are now packaged separately as feedbackd-device-themes to match upstream.

Upstreaming at https://source.puri.sm/Librem5/feedbackd/-/merge_requests/44 but providing this branch for testing purposes. If all goes well, upstreaming to Alpine!

Edited by Dylan Van Assche

Merge request reports