Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework 16 keyboard-wake fix #1024

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

betalars
Copy link

@betalars betalars commented Jul 1, 2024

Description of changes

Due to a firmware issue, the framework 16 will wake up with its lid closed when the display flexes upon the keyboard. This is a suggested workaround.

These questions should be answered before merging:

  1. Are these device IDs consistent across different framework 16 notebooks and different keyboard modules?
    • I have tested this on one more fw16, and it worked there. I think we used the same layout tho.
  2. Do we want to also disable the Trackpad, and if so: how?
    • will create a review for that ...
  3. This might be unexpected behavior, as it also prevents the device form waking up from keyboard input when the lid is open. Is that a worthwhile trade-off, and if not so: is there another way?
    • The framework will become very hot inside a backpack, to the point where I am concerned about battery and storage health. Users on the forum reported the 82 degree warning being exceeded on the SSD. And as I pretty much never use wake by keyboard anyways, I would strongly support this workaround, while Framework figures out a firmware patch.
Things done
  • Tested the changes in your own NixOS Configuration
  • Tested the changes end-to-end by using your fork of nixos-hardware and
    importing it via <nixos-hardware> or Flake input

@xeniarose
Copy link
Contributor

xeniarose commented Jul 2, 2024

i'm a FW16 user, so for my input on the questions:

  1. i have the same device ID for my keyboard module (the US ANSI keyboad with generic super key). maybe a more robust match could be anything that exposes an HID keyboard interface that has the framework device ID, but i'm not sure off the top of my head how to do that in udev edit: see update below
  2. the trackpad appears to be i2c, present at /sys/bus/i2c/devices/i2c-PIXA3854:00/ and has a wakeup node that can be set to disabled. on my machine, this causes the touchpad to no longer wake
  3. personally i don't intentionally use the keyboard/trackpad to wake, i only use the power button and imo that's the intuitive behavior. i don't think it's a huge deal to disable the keyboard/trackpad wake

@xeniarose
Copy link
Contributor

these two udev rules cover all official keyboard variants, with product IDs mined from info.json, and the trackpad

ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0012|0013|0014|0018|0019", ATTR{power/wakeup}="disabled"
ACTION=="add", SUBSYSTEM=="i2c", DRIVER=="i2c_hid_acpi", ATTR{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"

one issue is that sometimes the keyboard backlight will not turn off during sleep if its disabled for wakeup. i'm not sure how big of a deal this is besides wasting a little bit of power, and maybe it's completely a firmware thing that we can't do anything about, but i'm hoping there's some workaround possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants