Opened 19 years ago

Last modified 16 years ago

#155 closed bug

keyboard doesn't always work — at Version 15

Reported by: marcusoverhagen Owned by: korli
Priority: critical Milestone: R1
Component: - General Version:
Keywords: Cc: diver, jonas.kirilla, siarzhuk
Blocked By: Blocking:
Platform: All

Description (last modified by marcusoverhagen)

The keyboard driver is not always opened by the input_server.

The ps2 bus manager does a devfs_publish_device "input/keyboard/at/0" with result B_OK, but input_server does ignore the device sometimes, and then the driver open hook is not called, and it doesn't work.

I added enough debug output to the normal (as in: not compiled as DEBUG=1) ps2 driver to make this visible, search for "keyboard_open" and "mouse_open".

Change History (15)

comment:1 by diver, 19 years ago

Same here under vmware. Sometimes when haiku boots up, keyboard doesn't work. I think it's related. Tested with rev16392.

comment:2 by marcusoverhagen, 19 years ago

Might be a race condition between input_server scanning the add-on directories, and node monitoring them. I haven't checked how it's implemented, but it should first start node monitoring, and then scan the directory (ignoring duplicates).

comment:3 by korli, 19 years ago

/dev/input/keyboard is scanned one time at keyboard addon load. only /dev/input/ keyboard/usb is monitored. I suppose this can be changed.

comment:4 by marcusoverhagen, 19 years ago

The ps2 keyboard driver works different in haiku than in BeOS R5. It will publish devices after hotplug or shortly after the initial scanning of the /dev/input directory. This should for example fix the loss of key repeat settings when you unplug and replug the keyboard. Although the driver is not 100% finished, input_server really needs to node monitor all directories.

comment:5 by jackburton, 19 years ago

We should do the same for mouse, then. Also the mouse input add-on currently monitors only /dev/input/mouse/usb. Changing mouse and keyboard addons to monitor the parent directory should be a matter of seconds.

comment:6 by axeld, 19 years ago

Scanning the parent directory doesn't help (much), as new entries in the sub directories could be published and removed at any time.

comment:7 by korli, 19 years ago

Status: newclosed

comment:8 by korli, 19 years ago

Resolution: fixed

comment:9 by korli, 19 years ago

Added monitoring on input/keyboard/at in revision 16468. Hope this helps ...

comment:10 by marcusoverhagen, 19 years ago

sometimes input_server still doesn't open the keyboard driver

comment:11 by marcusoverhagen, 19 years ago

Resolution: fixed

comment:12 by marcusoverhagen, 19 years ago

Status: closedreopened

comment:13 by diver, 19 years ago

Cc: diver added

comment:14 by jonas.kirilla, 18 years ago

Platform: All

Haiku revision 20387.

Testing 4 input devices:

  • PS2 keyboard -- Microsoft Natural MultiMedia Keyboard 1.0A
  • PS2 mouse -- Logitech, Wired, optical, scrolling works.
  • USB keyboard -- Mac G3 Blue&White original USB keyboard.
  • USB mouse -- Microsoft Wireless Optical Mouse Blue, scrolling works.

All four plugged in - All four work.

Only the PS2 keyboard plugged in -- No keyboard. Only the USB keyboard, plugged in at boot -- USB keyboard works PS2 keyboard + USB keyboard -- Only the USB keyboard works

The PS2 keyboard works if the PS2 mouse is plugged in. The USB keyboard works if plugged in at boot.

PS2 keyboard + PS2 mouse -> both mouse and keyboard work

The PS2 mouse appears to be working under any and all circumstances. The USB mouse works if plugged in at boot. The PS2 and USB mice work okay together.

USB mouse sometimes produces spurious mouse button presses and always at least one on startup. A block gets selected in Terminal the first time I move the USB mouse.

Neither USB Mouse nor USB Keyboard seem to be found when hotplugging. PS2 hotplugging (FWIW) doesn't appear to be working.

I think I've seen the PS2 keyboard start working when hotplugging a USB keyboard or mouse. At least if you end up in KDL, where the PS2 keyboard works. <:)

(PANIC: vm_page_fault: unhandled page fault in kernel space at 0xdeadbef3, ip 0x8032e810)

comment:15 by marcusoverhagen, 18 years ago

Cc: jonas.kirilla added
Description: modified (diff)
Note: See TracTickets for help on using tickets.