Opened 6 years ago
Last modified 6 years ago
#781 accepted defect
PS/2 mouse on HW can break due to early activity
Reported by: | Jiri Svoboda | Owned by: | Jiri Svoboda |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | helenos/unspecified | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
If I move the mouse cursor while the OS is booting on Lenovo X250 leads to the mouse not working - the ps2mouse driver reports failure to initialize mouse reporting (the answer is not 0xfa).
Change History (5)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Milestone: | 0.8.0 |
---|
comment:3 by , 6 years ago
As I thought the problem is caused by Grub enabling mouse reporting. The ps2mouse driver thus gets a mouse report instead of the expected acknowledgement byte. The problem can be reproduced on qemu as well. You need to start HelenOS without a USB mouse (tools/ew.py provides a usb mouse by default) and you need to capture the mouse while in Grub menu so that the guest starts receiving mouse reports.
comment:4 by , 6 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:5 by , 6 years ago
It seems that this should be fixed by:
- disabling mouse reporting first
- then draining the input buffer
- then initializing the mouse as usual
I think the problem might be resolved by draining the mouse buffer at the beginning of mouse driver initialization. The problem is there is no way to do that - chardev only supports blocking read (must read at least one byte).