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

Keyboard must be unplugged and reconnected each time my Mac wakes from sleep #1

Closed
arrowtype opened this issue Jan 10, 2024 · 6 comments

Comments

@arrowtype
Copy link
Owner

When I have my 80forty plugged in, then wake my Mac from sleep, the keyboard glitches out after a moment and starts repeating the last keystroke until it gets unplugged and reconnected. This hasn’t occurred to me on other QMK keyboards, so it seems like a syntax error or similar on this specific firmware.

This possibly related error message pops up in vial:

  File "main_window.py", line 279, in on_devices_updated
  File "main_window.py", line 294, in on_device_selected
  File "main_window.py", line 314, in rebuild
  File "editor/qmk_settings.py", line 208, in rebuild
  File "editor/qmk_settings.py", line 181, in reload_settings
  File "editor/qmk_settings.py", line 55, in reload

TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'
image
@arrowtype
Copy link
Owner Author

arrowtype commented Jan 11, 2024

To best honest, I’m not sure if that Vial error message IS tied to the keyboard glitch. After more observation, I don’t think it is.

As a slightly silly test, I’ll sleep/wake my computer multiple times, and test whether this is a factor of hitting a certain key, or a certain number of keys, or more of a time-based thing. Here goes:

qwertyuio'l
qwertyuio';lkj
qwertyuio';l
poiuytrewq;lkjhgfd
poiuqwer;lkhjasd,/.mnxzcv;kjhasdpfguioyqwerk;jhnasdf,.mnzxvc;kjhasdfpouioyqwer;kljklhsadf/,m,nzxcv;kjhjasdfpoiyuqwer;kljkhasdf/,m,.nvvs;lkhjasdfpoiuqwerr;lkhjasdf/.,nzxcv;lkjasdfpoiuqwer;lkjasdf/,.nzvxc;lkjasdoiuqwer;lkjasdf.,nmzxv;lkjasdoiuqwer;lkjsadf/.,nmzxcv;lkjasdfgpiuqwer;lkjhasdf/.,nmzxcv;lkj;lkjfhdskals;dlfkgjnvmc,x.z/xldkffowieurpqoeijsldkfjowieurl. ;as;lkjsdfsdffsadf. lkjas'alskdhfhg;apoiuqwerjdlsa;oiuer;lkjasdf;asgha;lksjfoiusldkfhjghas;kljasfpoiuqwerr;llkhpoiuqwerr;lkjasdf;/.,mzxvcpoiuqwerr;lkjasd/.,mxxcv
poiuytyqklasd

Observations:

  1. One time, I woke my Mac and mashed the keyboard quickly. In that instance, it didn’t freeze up at all. That is the long line above.
  2. There was no specific number of key presses or specific order of key presses that caused the crash.
  3. Basically, after maybe 3–4 seconds, whatever key is pressed gets “stuck” or “held down.” If that key is “space” it repeats space characters. If it is the l key, Mac shows the diacritic options under that key (the default Mac behavior, whereas my vial configuration usually has a homerow mod on that key hold).
  4. When the error does happen, I notice that it is also harder to put my Mac into Sleep mode again. When I click “Sleep,” it acts like it will, but then wakes instantly. I have to hit “Sleep” two or three times.
  5. The vial error message doesn’t seem to correlate to this keyboard glitch. It hasn’t presented that error again, so it was probably something unrelated.

@arrowtype
Copy link
Owner Author

Seems potentially related:
qmk/qmk_firmware#5585

Maybe this firmware is using a somewhat outdated version of QMK? @NCKiser, do you happen to have any experience with this issue? Do you happen to know how old the QMK firmware is on this board?

@arrowtype
Copy link
Owner Author

arrowtype commented Jan 13, 2024

Potential solution:
qmk/qmk_firmware#17316

Will try this next.

@arrowtype
Copy link
Owner Author

Hmm, I’m trying to recompile in my vial-qmk repo, but getting blocked on this error:

▶ qmk compile -kb 80forty -km vial
Ψ Compiling keymap with make --jobs=1 80forty:vial


Making 80forty with keymap vial


 * RGB_MATRIX_DRIVER=ws2812 is not a valid matrix type                                                 [ERRORS]

builddefs/common_features.mk:425: *** Invalid RGB_MATRIX_DRIVER.  Stop.
make: *** [80forty:vial] Error 1
Make finished with errors
image

@arrowtype
Copy link
Owner Author

Oh, hmm. Making ws2812 all-caps got me past that error, and I’m onto a new one: sh: arm-none-eabi-gcc: command not found

▶ qmk compile -kb 80forty -km vial
Ψ Compiling keymap with make --jobs=1 80forty:vial


Making 80forty with keymap vial

/bin/sh: arm-none-eabi-gcc: command not found
Generating: .build/obj_80forty_vial/src/info_deps.d                                                 [OK]
/bin/sh: arm-none-eabi-gcc: command not found
Generating: .build/obj_80forty/src/default_keyboard.c                                               [OK]
sh: arm-none-eabi-gcc: command not found
sh: arm-none-eabi-gcc: command not found
make[1]: *** [gccversion] Error 127
make: *** [80forty:vial] Error 1
Make finished with errors

@arrowtype
Copy link
Owner Author

Nice, this is fixed in a more recent version of vial-qmk! I just had to:

  1. brew uninstall and reinstall qmk
  2. clone the latest from https://github.com/NCKiser/vial-nckiser/tree/arrowtype
  3. build that with qmk compile -kb kiserdesigns/eightyforty -km vial
  4. reset the keyboard (I added a layer option to my keyboard for this, in vial)
  5. move the compiled kiserdesigns_eightyforty_vial.uf2 file into the disk RPI-RP2(?) drive that shows up in Finder

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

1 participant