[openbeos] problems with the input_server

  • From: Philipp Schmid <schmidp-lists@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Thu, 14 Apr 2005 00:33:51 +0200

Hi,

with the recent changes the input_server stopped working for me.
I spent the whole afternoon to find out why, but I couldn't.

When I compile for consoled, the input_server doesn't do anything when I
press keys (F12 doesn't work as well).
When I compile for app_server and start the app_server I get lots of
"unhandled io interrupt 39" messages over the serial line.

Once out of 20 boots with the app_server the mouse worked but the
keyboard didn't and another time the keyboard worked once until I moved
the mouse, then it stopped.

Here is what I found out while trying to get the input_server working
with consoled:

First I enabled debug output for the ps2_hid driver in
src/add-ons/kernel/drivers/input/ps2_hid).

After doing this, the last text which came over the serial line was:

mouse_open(): mouse succesfully enabled
MS_SET_MAP (set mouse mapping) not implemented
MS_SETCLICK (set click speed)
MS_GET_ACCEL (get mouse acceleration) not implemented
MS_SET_ACCEL (set mouse acceleration) not implemented
MS_SET_TYPE not implemented
MS_READ
ps2_mouse_read()

so obviously the ps2_hid loaded successfully and the input_server addon
"mouse" (located in src/add-ons/input_server/devices/mouse) called
ps2_mouse_read() by using the ioctrl MS_READ (in
MouseInputDevice::DeviceWatcher()).

since "ps2_mouse_read()" (in mouse.c ps2_hid) was the last output on the
serial line, I looked at the function itself.
after adding some further debugging output I found out that
ps2_mouse_read() blocks at status = acquire_sem_etc(sMouseSem, 1,
B_CAN_INTERRUPT, 0);.

this lock should be released by the handle_mouse_interrupt(), but the
function handle_mouse_interrupt() never get's called on my system.

so it lookes like the lock in ps2_mouse_read() stopps the whole
input_server from working
if I press any keyboard keys there is no debug output, but there should
be (scancode and so on)

another thing I noticed was when I played with the mouse detection code
in mouse_open() (mouse.c ps2_hid).

if I tell mouse_open() to always act like if there was no mouse found
(put_module(B_ISA_MODULE_NAME); return B_ERROR;) and having a mouse
actually connected to the ps2 port, the keyboard workes perfect (but
only with consoled - I still get the unhandled interrupt messages with
app_server).

to make this a bit more clear:

                          | mouse connected | no mouse on ps2 |      
---------------------------------------------------------------
modified mouse detection  | is works        | is dosn't work  |
---------------------------------------------------------------
original mouse.c          | is dosn't work  | is dosn't work  |

is...input_server


hopefully this makes any sense and helps to find the problem.

greets philipp

-- 
Philipp Schmid <schmidp@xxxxxxxxxxx>
OpenResearch


Other related posts:

  • » [openbeos] problems with the input_server