Troubleshooting - mcaple/tmk_keyboard GitHub Wiki

USB cable

First, check if your cable is all right or just try other cable.

Believe me. Not negligible number of people had trouble with bad USB cable and they tend to suspect their cable at the last for some reason.

Be cautious of especially Micro USB cables these days, some are for charge only without data lines and others are just crappy and they often come with cheap gadgets.

USB port

Try other posts.

USB VID/PID

TMK firmware uses 0xFEED as USB Vendor id(VID) by default. It is not registered with official USB.org or other usb device databases.

Product id(PID)s are assigned arbitrarily by project authors.

Ids are defined with VENDOR_ID and PRODUCT_ID macros in config.h.

How TMK device should be recognized

TMK device can have some USB HID interfaces(keyboard, mouse, consumer/media keys and system keys), its number varies according to you configuration.

Windows

You should find some devices under "Human Interface Devices" tree in Device Manager and their names are "USB Input Device" and "USB Compliant ...".

Windows Device Manager

Programming mode(bootloader)

When placing the device into programming mode(bootloader) by pressing program button Device Manager shows as follows.

If you don't have driver it is located under 'Other devices'.

before install

After proper driver is installed it should look this.

after install

See Driver-install-on-Windows for driver installation.

Linux

You can find TMK devices with command lsusb -dFEED:,

Bus 005 Device 007: ID feed:caaa  
Bus 005 Device 008: ID feed:4707 

and lsusb -dFEED: -v shows more details of the devices.

To see HID report descriptor check this wiki page.

USB Troubles

Linux: "device descriptor read/64, error -62"

-62 means "Timer expired" according to errno.h.

You will see this error in /var/log/kern.log when slow startup prevents USB enumeration process. It is important to make control endpoint responsive to packets form host in early stage.

LUFA solution

  1. if INTERRUPT_CONTROL_ENDPOINT is defined you have to enable interrupt by sei() earlier as possible
  2. otherwise USB_USBTask() should be called earlier and more frequently

Strange Keymapping

You have unexpected keymapping like: swap of Alt and Gui, disabled Gui, Grave instead of Esc?

Hold Space and Backspace down and then plug into USB port to clear Boot Magic configuration stored on eeprom.

https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch

Mac

Mac Power Saving

mode RAM powered Data stored hibernatemode Desc
sleep yes no 0 default for desktop
hibernation no yes 1 default for portable before 2005(not used anymore)
safe sleep yes yes 3 default for portable after 2005
hibernation no yes 25 new hibernation

Safe sleep

Some Mac notebook computers have a feature called safe sleep. With safe sleep, each time the Mac goes to sleep, the current state of the Mac is saved

https://support.apple.com/guide/mac-help/what-is-safe-sleep-mh10328/mac

standby

availble for Mac released in 2013 and later. standby only works if hibernation is turned on to hibernatemode 3 or 25.

Standby is refered as DEEPSLEEP in source code. https://opensource.apple.com/source/PowerManagement/PowerManagement-1132.141.1/pmset/pmset.c.auto.html

To exit standby mode do any of the following things:

  • Open the MacBook lid and press any button
  • Click a mouse or trackpad button
  • Plug in a display

https://mackeeper.com/blog/mac-sleep-modes-explained/

https://support.apple.com/en-us/HT202124

pmset

$ pmset -g
System-wide power settings:
Currently in use:
 standby              1
 standbydelaylow      10800
 womp                 1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 proximitywake        1
 powernap             1
 gpuswitch            2
 networkoversleep     0
 disksleep            10
 standbydelayhigh     86400
 sleep                30 (sleep prevented by coreaudiod)
 hibernatemode        3
 ttyskeepawake        1
 displaysleep         30
 tcpkeepalive         1
 highstandbythreshold 50
 acwake               0
 lidwake              1