Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • pmaports pmaports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 670
    • Issues 670
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 60
    • Merge requests 60
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • postmarketOSpostmarketOS
  • pmaportspmaports
  • Issues
  • #973
Closed
Open
Issue created Feb 14, 2021 by Oliver Smith@ollieparanoidOwner

Pinephone: reduce WiFi reconnection time after deep sleep

After suspending with crust, the PinePhone takes pretty long to reconnect to WiFi.

EDIT 7 months later: the approach below will probably not work (I think I tested wrong, it would only "fix" this if waking up right after suspend -> not relaly fix it). But fixing this somehow would be great.

original post:

I found that with power saving disabled, it reconnects almost instantly. I tested this by simply suspending while having the charger plugged, as of !1863 (merged) power saving is disabled then (and it does make SSH much more responsive).

There is also a downstream issue in Sxmo with a Sxmo specific solution: https://todo.sr.ht/~mil/sxmo-tickets/150

I suggest we implement the following ui-agnostic (and device-agnostic, though other devices typically don't have this problem) solution:

  • write a "wifi-power-manager" daemon (other name suggestions welcome)
  • let it disable power save if the device is charging
  • let it disable power save for ~5 seconds after suspend, so wifi can reconnect quickly (find a good value by experiment)

We could create a lightweight C program based on the eg25-manager source, because it already has code to:

  • connect to udev and trigger on events (it triggers when the modem unbinds, we would need to check if POWER_SUPPLY_ONLINE changes, see the udev rule in !1863 (merged).
  • connect to elogind and set up a callback for resume
  • starts a timer on resume (we'll need a similar timer to enable power save ~5 seconds after resume, unless the phone is charging)

TODO:

  • write wifi-power-manager based on eg25-manager source
    • strip down the eg25-manager code to only the suspend and udev code
    • let it print log messages when related events arrive
    • change the udev code to trigger on POWER_SUPPLY_ONLINE
    • let the code disable / enable wifi power management
    • implement the timer to enable it after a few seconds after resume (unless phone is charging)
  • put in git repo
  • package in pmOS
  • replace pine64-pinephone's udev rule with this daemon
Edited Sep 29, 2021 by Oliver Smith
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking