Skip to content
Snippets Groups Projects

Draft: postmarketos-ui-sxmo-de-sway: add user to feedbackd group

Closed Imported Administrator requested to merge sxmo-de-sway_feedbackd into master

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?

Edited by Administrator

Merge request reports

Approval is optional

Closed by AdministratorAdministrator 11 months ago (Apr 21, 2024 2:29pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator changed the description · Imported

    changed the description

    By Adam Thiede on 2024-01-25T11:39:02

  • Administrator changed the description · Imported

    changed the description

    By Adam Thiede on 2024-01-25T11:44:07

  • Author Owner

    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

  • Author Owner

    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 Administrator
  • Administrator added ui-sxmo label · Imported

    added ui-sxmo label

  • Author Owner

    @adamthiede are you sill working on this?

    By Robert Eckelmann on 2024-04-21T12:52:16

  • Author Owner

    @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.

    1. I don't care too much if my LEDs aren't working, and
    2. 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 Administrator
  • Author Owner

    Om, then lets add this to the wiki and then close this.

    By Robert Eckelmann on 2024-04-21T14:26:09

  • Administrator closed · Imported

    closed

  • Author Owner

    Added 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
Please register or sign in to reply
Loading