[SOLVED] PS/2 Keyboard interrupts not firing on new laptop
Posted: Tue Jan 07, 2025 12:25 am
Hi. I am testing my operating system on real computers, and found that on a new Lenovo AMD laptop, PS/2 keyboard interrupts are not being fired. My operating system works on other real computers ( https://github.com/rouseabout/os ). I am seeking suggestions beyond those already on the forums for this kind of problem.
So far:
* I have tested other established osdev projects (Sortix, Redox OS) on the laptop and they suffer the same problem: tapping the keyboard produces no interrupts. So I feel this is a new problem, and not something simple like masked interrupts or forgetting to acknowledge EOI.
* If I poll the keyboard, I do so correct scan codes. Resetting the keyboard with 0xFF command doesn't make any difference. Toggling bit 0 (first port interrupt bit) of the PS/2 controller configuration byte doesn't make any difference.
* Other interrupts, such as the PIT timer, fire correctly. Upgrading my operating system to use APIC and X2APIC instead of legacy PIC also made no difference.
* The keyboard works fine on Linux and Windows... So to explore the issue, I have built a custom Linux kernel, stripping out the i8042/libps2/atkbd components, and then wrote my own minimal PS/2 keyboard driver. I found PS/2 keyboard interrupts do work with this custom kernel, so Linux is doing something else to make them work.
Thanks for reading!
So far:
* I have tested other established osdev projects (Sortix, Redox OS) on the laptop and they suffer the same problem: tapping the keyboard produces no interrupts. So I feel this is a new problem, and not something simple like masked interrupts or forgetting to acknowledge EOI.
* If I poll the keyboard, I do so correct scan codes. Resetting the keyboard with 0xFF command doesn't make any difference. Toggling bit 0 (first port interrupt bit) of the PS/2 controller configuration byte doesn't make any difference.
* Other interrupts, such as the PIT timer, fire correctly. Upgrading my operating system to use APIC and X2APIC instead of legacy PIC also made no difference.
* The keyboard works fine on Linux and Windows... So to explore the issue, I have built a custom Linux kernel, stripping out the i8042/libps2/atkbd components, and then wrote my own minimal PS/2 keyboard driver. I found PS/2 keyboard interrupts do work with this custom kernel, so Linux is doing something else to make them work.
Thanks for reading!