USB Keyboard Stops Responding Randomly when Dual-Booting Debian 12 and Windows 11
Dual-booting can sometimes lead to unexpected issues, such as a USB keyboard that stops responding randomly when switching between Debian 12 and Windows 11. This article will cover the possible causes and solutions for this problem. We will assume that you have a relatively fresh Debian 12 (6.1.0-16-amd64 kernel) and Windows 11 installation, and you have fast boot enabled.
Identifying the Problem
You might notice that your USB keyboard does not work after restarting and selecting the Debian 12 operating system. This issue can occur intermittently, making it difficult to pinpoint. It's also possible that the keyboard works as expected when booted directly into Windows 11 after a cold start.
Possible Causes
The primary cause of this issue can be attributed to the fast boot feature that is automatically enabled in Windows 11 by default. Fast boot essentially skips the usual POST (Power-On Self-Test) stages of a boot cycle, resulting in an unclean shutdown. This behavior can confuse the Debian 12 system, causing it to behave unpredictably when it resumes from hibernation. In turn, the USB keyboard may stop responding.
Solutions
To solve this issue, you can either disable the fast boot feature in Windows 11 or modify the kernel parameters in Debian 12 to enable early KMS support. Both options will be explained below.
Option 1: Disable Fast Boot in Windows 11
Follow these steps to disable fast boot in Windows 11:
- Click on the
Windows Startbutton and go toSettings. - In
Settings, head toSystemand thenPower & Sleep. - Click on the
Additional power settingsoption.|-----Additional power settings-----| - In the new window, click on
Choose what the power button doesand chooseChange settings that are currently unavailable. - Uncheck the box for
Fast startupunderShutdown settingsand clickSave changes.
After disabling fast boot, try booting into Debian 12 again and check if the USB keyboard behaves as expected.
Option 2: Modify Kernel Parameters in Debian 12
If disabling fast boot doesn't work or is not preferred, you can change the kernel parameters in Debian 12 to enable early KMS support, which is a potential workaround for this issue.
- Edit the
/etc/default/grubfile: - Search for the line starting with
GRUB_CMDLINE_LINUXand addi915.preliminary_hw_init=1to it. It should look like this: - Save the file and update Grub:
|-----$ sudo nano /etc/default/grub-----|
|----GRUB_CMDLINE_LINUX="quiet splash i915.preliminary_hw_init=1"-----|
|-----$ sudo update-grub-----|
After changing the kernel parameters, reboot into Debian 12 and check if the USB keyboard issue is resolved.
References
-
Linux Bible Eleventh Edition -
Keyboard not working after installing dual boot with Windows