Re: pbbuttonsd not loading every dev event
Brought to you by:
matthiasgrimm
From: Kristian B. <kb...@op...> - 2006-03-19 17:40:33
|
On Sun, 2006-03-19 at 12:08 -0500, Kristian Benoit wrote: > On Sat, 2006-03-18 at 12:51 +0100, Matthias Grimm wrote: > > On Sat, 18 Mar 2006 05:34:27 -0500 > > Kristian Benoit <kb...@op...> wrote: > > > > > I had this problem a few times, pbbuttonsd does not recognize the eject > > > button. Plus the appletouch (absolute coordinate) events does not reset > > > the sleep timeout so I must press a key. > > > > > > Some devices have the same vendor/product id. For example, the keyboard > > > (/dev/input/event3) has the same vendor/product as the eject key > > > (/dev/input/event4). > > > > > > The appletouch also have the same ids as another event device too with a > > > lower number. So those where ignored by pbbuttonsd. > > > > Oh no. :-( You can't rely on nothing nowadays. Why do we define > > standards when nobody follows them anyway? :-/ > > > > > I quikfixed my version, but I still have a strange behavior: > > > > Could you please tell me how you did this? We need a good workaround > > for this quirk. > > As my appletouch is represented by the device /dev/input/event6 and the > other with the same number is lower, I tried openning the device in > reverse order, but then the fn button did not work and the screen was > not dimming anymore. So I hardcoded the device numbers I need: > > for (n = 0; n < EVDEVCOUNT; n++) { > sprintf(filename, "/dev/input/event%d", n); > if ((fd = open(filename, O_RDONLY)) >= 0) { > ioctl(fd, EVIOCGID, id); > venprod = (gpointer) (id[ID_VENDOR]<<16 | id[ID_PRODUCT]); > if ((g_list_find_custom (base->inputsources, venprod, cbEventDevices)) == NULL || n == 3 || n == 4 || n == 6) > addInputSource (fd, event_handler, venprod, TRUE); > else > close(fd); > } else > fcnt++; /* count number of event devices that could not be opened */ > } > > > A real solution would be to configure the event devs we want to use in > the config file... > > I digged a a bit more and made this patch. It add a sub MODULE INPUT in > inputmanager.c. Its purpose is to be able to configure the input file > used by the inputmanager. So a new configuration as been added: > > EventDevices = "/dev/input/event2 /dev/input/event8" > > The default is the old behavior but without checking if some are the > same vendor_id/product_id. > > ---------------------- > > I fixed the bug with the appletouch not reporting it's event. The > problem is with the synaptics driver doiing a EVIOCGRAB on the event > device. This prevent the event to be propagated to /dev/input/mice which > is what one usually wants. If you configure a generic usbmouse and a > touch pad, you dont want the mouse to move while you scroll with the > touchpad. As a side effect, no one else can get those events. > > So the solution is to patch the synaptics driver to no more grab the > event device and configure the usbmouse to use /dev/input/mouse?. > > There is still a little problem, if your mouse is not pluged in when you > boot, you wont be able to use it without restarting X. A solution is to > always have the mouse? node. A better solution is to create a new > mouse/event aggregator like /dev/input/mice and be able to tell each > mouse/event which aggregator must receive it's events, but this is a > longer task... > > Kristian Damn, I forgot the patches... Here it is... Kristian |