Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • phosh phosh
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 235
    • Issues 235
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • World
  • Phosh
  • phoshphosh
  • Merge requests
  • !1197

Add inhibtor when wifi hotspot is active

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Guido Günther requested to merge guidog/phosh:hotspot-inhibit into main Jan 22, 2023
  • Overview 6
  • Commits 4
  • Pipelines 4
  • Changes 6

Introduce a manager object that can track different systems and add/remove inhibitors as needed. As a first action add an inhibitor when we're acting as a wifi hotspot as both are common on mobile: quick suspend and use as hotspot:

$ systemd-inhibit 
WHO                          UID  USER PID    COMM            WHAT    WHY                                       
NetworkManager               0    root 917    NetworkManager  sleep   NetworkManager needs to turn off networks 
...
foo                          1000 foo  472926 phosh           sleep   WiFi hotspot active     

The new class is also a good seed for adding device dependent policy e.g.: when on device a that lacks feature b during suspend then add an inhibitor (see https://source.puri.sm/Librem5/OS-issues/-/issues/272). The feature list could live in gmobile.

Marked as draft as only mildly tested. It would be nice to only inhibit if there's also devices connected to the hotspot.

@Jarrah this could be a base for !1173 (comment 1630959)

Edited Jan 22, 2023 by Guido Günther
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: hotspot-inhibit