Draft: postmarketos-ui-sxmo-de-sway: add user to feedbackd group
A new install of sxmo-de-sway on an a64 pinephone didn't let the LEDs blink. postmarketos-default-camera pulls in feedbackd, and feedbackd owns the LED devices, not the 'video' group, like sxmo expects. Adding the user to feedbackd gets the LEDsb linking again.
There may be a better way to do this. I just copied the post-install useradd from the phosh ui package. It's possible that feedbackd isn't present on every device?
Merge request reports
Activity
IMO this is completely not the Sxmo responsibility to solve this. If installing feedback breaks other programs that rely on the fact the device nodes got default permissions, then maybe this feedback group ownership stealing was wrong in the first place.
This is a known limitation of Linux file ownership, and I'm still unsure of the best way to beats it.
By Willow on 2024-01-25T11:57:30
I experimented with some udev rules for LEDs, and it seems the following is sufficient to "steal" back the LEDs from feedbackd:
ACTION=="add|change", SUBSYSTEM=="leds", DEVPATH=="*/*:status", RUN+="/bin/chgrp input /sys$devpath/brightness /sys$devpath/pattern /sys$devpath/repeat" ACTION=="add|change", SUBSYSTEM=="leds", DEVPATH=="*/*:indicator", RUN+="/bin/chgrp input /sys$devpath/brightness /sys$devpath/pattern /sys$devpath/repeat"
As long as it's a larger number than 90: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/feedbackd/APKBUILD#L41
But again, stealing it back doesn't seem like a good long-term solution.
By Adam Thiede on 2024-01-28T22:53:14
Edited by Administratoradded ui-sxmo label
@adamthiede are you sill working on this?
By Robert Eckelmann on 2024-04-21T12:52:16
@longnoserob no; not really. feedbackd appears to need the rules. Another solution is the udev rule, but fighting over LEDs with higher-numbered udev rules doesn't seem like good architecture.
- I don't care too much if my LEDs aren't working, and
- If I want them to work, adding my user to the
feedbackd
group is really simple and only needs to happen once per install.
Unless you have other suggestions about where/how to implement this (maybe in the postmarketos-default-camera package?), I think we can close it and just add something to the wiki to note that this is a known issue.
By Adam Thiede on 2024-04-21T14:25:40
Edited by AdministratorAdded section to wiki here https://wiki.postmarketos.org/wiki/Sxmo/Tips_and_Tricks#LED_blinking_not_working_with_feedbackd
By Adam Thiede on 2024-04-21T14:50:25
Edited by Ghost User