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

[Bug] Tofu60 unable to wake from sleep on Linux #23347

Open
2 tasks
Limero opened this issue Mar 25, 2024 · 4 comments
Open
2 tasks

[Bug] Tofu60 unable to wake from sleep on Linux #23347

Limero opened this issue Mar 25, 2024 · 4 comments
Assignees

Comments

@Limero
Copy link

Limero commented Mar 25, 2024

Describe the Bug

I recently purchased a Tofu60 2.0 and with the stock QMK firmware I had trouble that the keyboard would wake the computer from sleep, but then stop functioning until it was unplugged and plugged in again.

In an attempt to resolve this I built QMK from scratch (the product id changed from OG60 to TOFU60, so stock firmware must've been built with an old version). The problem now is that the keyboard is unable to wake the computer from sleep, but once woken with the computer power button, the keyboard functions as intended.

This issue is possibly only affecting Linux, as I'm able to wake a Mac from sleep. I'm not able to test with Windows.

Same issue happens with the pre-built via firmware

Keyboard Used

dztech/tofu60

Link to product page (if applicable)

No response

Operating System

Fedora 39. Linux 6.7.9

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

@KarlK90
Copy link
Member

KarlK90 commented Mar 26, 2024

Hello @Limero PR #21656 landed in the develop branch some weeks ago that addresses wake-up issues on ChibiOS based boards (tofu60 is based on the rp2040 it seems, so it uses ChibiOS under the hood). Please compile a firmware from the develop branch and see if this solves the issues for you.

@Limero
Copy link
Author

Limero commented Mar 26, 2024

@KarlK90 Thanks! Using develop did fix this particular issue but caused another. The key used to wake the computer goes directly to my lock screen (swaylock), meaning that if I unlock the computer with a letter key, it has to be the first letter of my password or I will need to backspace. This issue doesn't seem to happen on macOS nor on any of my other keyboards.

Edit: Tested again with a non-QMK keyboard and the first character goes to the lockscreen as well, so it seems to be unrelated to QMK :)

@Limero Limero closed this as completed Mar 26, 2024
@KarlK90
Copy link
Member

KarlK90 commented Apr 1, 2024

@KarlK90 Thanks! Using develop did fix this particular issue

@Limero Great that it solved your issue.

but caused another. The key used to wake the computer goes directly to my lock screen (swaylock), meaning that if I unlock the computer with a letter key, it has to be the first letter of my password or I will need to backspace. This issue doesn't seem to happen on macOS nor on any of my other keyboards.

This is actually a bug in QMK as the key presses used to wake up the host are not suppressed.

Before the new async usb endpoints it was a bit of a gamble depending on keyboard MCU and OS if the key press used to wake the host actually reached the host. For the new async USB handling, which should guarantee the delivery, I just implemented #23389 which suppresses all wakeup key presses. Please try if this fixes the issue.

@KarlK90 KarlK90 reopened this Apr 1, 2024
@KarlK90 KarlK90 self-assigned this Apr 1, 2024
@Limero
Copy link
Author

Limero commented Apr 1, 2024

@KarlK90 Just tried out your branch, that works perfectly! 🎉

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

No branches or pull requests

2 participants