# \[WORKAROUND INCLUDED\] Keyboard does not work in BIOS/BitLocker

**URL:** <https://forum.gl-inet.com/t/workaround-included-keyboard-does-not-work-in-bios-bitlocker/72227>\
**Category:** KVM\
**Created:** [October 21, 2026, 12:05pm UTC](https://forum.gl-inet.com/t/workaround-included-keyboard-does-not-work-in-bios-bitlocker/72227 "2026-10-21T12:05:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pilots\_pockets\_3z](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pilots\_pockets\_3z](https://forum.gl-inet.com/u/pilots_pockets_3z)\
**Post date:** [October 21, 2026, 12:05pm UTC](https://forum.gl-inet.com/t/workaround-included-keyboard-does-not-work-in-bios-bitlocker/72227/1 "2026-10-21T12:05:11Z")

</div>

**Device:** GL-RM1PE, firmware `1.10.0beta2-30-g265a7f2656` (latest stable)  
**Target:** Lenovo Legion 7i 2020

**Problem:** At the BitLocker PIN screen the Comet's keyboard is ignored (mouse works; a physical USB keyboard works; everything works after boot).

**Cause:** `kvmd-otg` hardcodes the USB device class to `0xEF/02/01`. The laptop's firmware reads the keyboard's reports but ignores them. With class `0/0/0` it works. Removing the mice, a spec boot-keyboard descriptor, longer key presses and full-speed USB made no difference. The camera still works in Windows 11 with class 0.

## Workaround

SSH in as root and paste:

```sh
mkdir -p /etc/kvmd/user/scripts
cat > /etc/kvmd/user/scripts/S90usb-class-fix.sh <<'EOF'
#!/bin/sh
case "$1" in
start)
    (
    G=/sys/kernel/config/usb_gadget/rockchip
    for n in $(seq 1 120); do [-n "$(cat $G/UDC 2>/dev/null)"] && break; sleep 1; done
    UDC=$(cat $G/UDC 2>/dev/null)
    [-n "$UDC"] || exit 0
    ["$(cat $G/bDeviceClass)" = "0x00"] && exit 0
    echo "" > $G/UDC
    echo 0 > $G/bDeviceClass
    echo 0 > $G/bDeviceSubClass
    echo 0 > $G/bDeviceProtocol
    echo "$UDC" > $G/UDC
    logger -t usb-class-fix "bDeviceClass set to 0 on $UDC"
    ) </dev/null >/dev/null 2>&1 &
    ;;
esac
EOF
chmod +x /etc/kvmd/user/scripts/S90usb-class-fix.sh
reboot

```

After reboot, `cat /sys/kernel/config/usb_gadget/rockchip/bDeviceClass` should print `0x00`.

**Note:** the filename must start with `S` + two digits (`S90...`), otherwise `S99custom` never runs it. Nothing needs to go in `override.yaml`. To undo: delete the file and reboot.

## Requests

1. Make the device class configurable or default to `0/0/0` (upstream PiKVM never sets it).
2. Kernel use-after-free when the target resets USB:

```auto
refcount_t: underflow; use-after-free.
Comm: kvmd/hid-mouse ... Call trace: refcount_warn_saturate <- kobject_put <- cdev_put <- __fput

```

3. Minor: Dropbear sometimes rejects the correct root password on the first try.

---

<div class="post-metadata">

**Author:** ![Thalia](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@Thalia](https://forum.gl-inet.com/u/Thalia)\
**Post date:** [October 22, 2026, 6:26am UTC](https://forum.gl-inet.com/t/workaround-included-keyboard-does-not-work-in-bios-bitlocker/72227/4 "2026-10-22T06:26:19Z")

</div>

Hi, thanks for the detailed report!

We've found that the IAD descriptor can cause keyboard and mouse enumeration issues on some systems. We've provided beta firmware without the IAD descriptor to some users for testing, but it hasn't resolved the issue for everyone. We're still looking into what else might be causing it.

We'll update the IAD descriptor in v1.11 firmware.

Thanks for sharing your findings with us.
