Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-pinebook-pro
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Tobias Schramm
  • linux-pinebook-pro
  • Issues
  • #5
Closed
Open
Issue created Feb 03, 2020 by Will Springer@Skirmisher

[patch] Split up lid switch & power button in device tree

So I was trying out s2idle (coincidentally!) while proper suspend support is still pending, and while s2idle itself works fine, a couple things bothered me about the wakeup experience:

  • The only way to wake the laptop is either via the power button or opening the lid, even though wakeup is enabled on the keyboard device. Probably has to do with USB power being cut. Not a big deal, but impacts the next two points.
  • The lid switch and power button are on the same device, which means if you want to disable wakeup on one of them in sysfs at runtime, you have to disable both. Combined with the first point, this means disabling gpio-keys removes your ability to wake up the system at all.
  • Closing the lid triggers wakeup. As someone who doesn't care for lid switch<=>suspend functionality, this takes the previous point from "bearable" to "annoying". Plus it's just counterintuitive behavior.

This patch rectifies this by splitting gpio-keys into power-key and lid-switch, and adds the wakeup-event-action property to the lid switch. I also removed autorepeat because it doesn't really make sense.

pbp-lid-switch-tweaks.patch

Anecdote regarding s2idle: resume happens so quickly that logind catches the power key press used to resume, and (by default) immediately initiates a shutdown. This only applies when logind power key handling isn't inhibited (e.g. in a VT). It can be configured to ignore the power key if necessary, and it's certainly a logind bug that should be reported upstream, but it affects us so I wanted to note it here.

Cheers!

Assignee
Assign to
Time tracking