Repository navigation
Handle the lid on ChromeOS EC laptops like Googlebooks and Chromebooks - #18777
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge. SummaryAdds lid-close and lid-open bindings for
Reviews (1) · Last reviewed commit: "Handle the lid on ChromeOS EC laptops li..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Laptops with a ChromeOS embedded controller (Googlebooks, Chromebooks) report their lid through the
cros_ec_buttonsinput device instead of ACPI'sLid Switch. The Hyprland lid binds match by device name, so on these machines closing the lid never runsomarchy-system-lid-close(no lock, no clamshell reconcile), and opening it never runsomarchy-hyprland-monitor-clamshell.This adds the same pair of binds under
cros_ec_buttons, following the Apple SMC entry. Lid detection already works on these machines without changes:omarchy-hw-laptopandomarchy-hw-laptop-closedread theSW_LIDcapability bit rather than the device name.On convertibles,
cros_ec_buttonsmay also report tablet mode. Both bound commands check the real lid state first (omarchy-system-lid-closeonly locks whenomarchy-hw-laptop-closedsays the lid is closed), so a stray switch event shouldn't lock the session. I haven't tested this on a convertible.Verification
google,mica, Omarchy 4.5.0 ARM64),/proc/bus/input/devicesshowscros_ec_buttonswithB: SW=1:SW_LIDonly. Itscros_eckeyboard device carries no switches.luac -p default/hypr/bindings/utilities.lua: OK.test/shell.d/hw-laptop-test.sh(16 ok),i18n-test.sh(401 ok),default-agent-test.sh(47 ok),capture-picker-binds-test.sh(1 ok): all pass, 0 failures.Screenshots
No visible change: adds lid-switch binds for another input device name; nothing on screen changes on existing hardware.