btnx don't start if mouse is not present

Bug #200050 reported by n00ris
2
Affects Status Importance Assigned to Milestone
btnx
Fix Released
Wishlist
Olli Salonen

Bug Description

Hi,
I (try to) use btnx on a laptop. Thats the reason why I have two mice:
A touchpad and a separate mouse.
I created two config files with btnx-config-0.4.6. Now I have the problem, that btnx does not load with any config file (e.g. that one for my touchpad), if my separate mouse is not present.

(I don't know if it is important, but I'm using gentoo, not ubuntu)

The message:

Restarting btnx : Button Extension - mouse button rerouter daemon
No process in pidfile `/var/run/btnx.pid' found running; none killed.
btnx successfully stopped
 btnx: old btnx process was not killed: 15340: No such process
 btnx: uinput modprobed successfully.
 btnx: Opening config file: /etc/btnx/btnx_config_New config
 btnx: Opened handler: /dev/input/event0
 btnx: Opened handler: /dev/input/event1
 btnx: Opened handler: /dev/input/event2
 btnx: Opened handler: /dev/input/event3
 btnx: Opened handler: /dev/input/event4
 btnx: Error opening button event file descriptor: No such file or directory
btnx failed to start during restart

Greetings
Norris, alias Jan

Revision history for this message
n00ris (jb-faq) wrote :

Mmh,
with the newest svn I have this problem every time. With other words, I cannot start btnx any longer. A solution???

Revision history for this message
Olli Salonen (daou) wrote :

Just to clarify: you cannot start btnx at all anymore with the mouse plugged in? Or btnx cannot be started if the configured mouse is not plugged in (this is how it is supposed to work)?

Right now, there is no mechanism for trying different configurations if loading one fails (i.e. mouse is not plugged in). So if your main configuration, the one with priority=1, is configured for a mouse that is not plugged in, btnx fails during startup and stops. It does not try alternative configuration files at the moment. Perhaps this is what is causing the problem. Of course, if udev is in use and hotplugging is enabled, btnx should restart when the mouse is plugged in.

Revision history for this message
n00ris (jb-faq) wrote :

I cannot start btnx at all. I tried to delete all configurations and uninstalled the btnx and btnx-config and removed all files with btnx in their name by hand and installed it again.
I don't know if their exits any data which think that my external mouse is configured.
It is independent of the main configuration with priority=1.

Usually btnx should start if I select a configuration for my touchpad with btnx-config even if my external mouse is not present, I'm right? (That it aborts when I'm using a configuration for a mouse which is not plugged in, then it is ok, maybe the failure message could be more precisely...)

Jan

Revision history for this message
Olli Salonen (daou) wrote :

The newest version (0.4.9) in the SVN repository trunk should fix this bug. Let me know if it works and then I'll release it.

Changed in btnx:
assignee: nobody → daou
importance: Undecided → Wishlist
status: New → Fix Committed
Revision history for this message
n00ris (jb-faq) wrote :

Hi, I'm sorry, I'm don't know why, but I'm getting this:
I made a new config with the svn version of btnx-config:

USER# btnx-config
/usr/share/btnx-config/btnx-config.glade
Warning: dialog_btnd_empty_store could not get an iter.
Verlasse btnx-config...

Then I tried to start btnx:

USER# /etc/init.d/btnx start
Starting btnx : Button Extension - mouse button rerouter daemon
 btnx: uinput modprobed successfully.
 btnx: Opening config file: /etc/btnx/btnx_config_Default
 btnx: No configured mouse detected: No such file or directory
 btnx: Looped through all configurations. Stopping.
 btnx: Configuration file error.
btnx failed to start (error code 150)

But the mouse (touchpad) is present and it is configured! What does it means:
 btnx: No configured mouse detected: No such file or directory
???

Greetings
Jan
(To look up the config I attached it, but for me nothing seems to be wrong)

Revision history for this message
n00ris (jb-faq) wrote :

Can you tell me what file btnx looks for here?
"btnx: No configured mouse detected: No such file or directory"

Maybe there is a different path between gentoo and other distributions?

(@all who read this: exits there anybody who is running btnx with gentoo?)

Revision history for this message
Olli Salonen (daou) wrote :

It doesn't find the /dev/input/event# file for the device. It is the file that outputs data from the mouse.
Perhaps the output of your "cat /proc/bus/input/devices" would help. It says which event handler is related to the touchpad.

Revision history for this message
n00ris (jb-faq) wrote :

The output of "cat /proc/bus/input/devices" is attached

Revision history for this message
Olli Salonen (daou) wrote :

Ok I see the problem. It has to do with the way btnx attempts to distinguish between mouse and keyboard handlers. It looks for EV_REL (relative x,y,z axis movement) settings, but the touchpad uses EV_ABS (absolute x,y movement values). I will work on a fix this weekend.

Revision history for this message
Olli Salonen (daou) wrote :

I made some big changes to the way mouse device handlers are detected and listened to. This should help fix the problem (trunk in SVN). Let me know what happens.

Revision history for this message
n00ris (jb-faq) wrote :

Its working! I test it with the config file I posted above.
Good work!

Shout I test something special? What do you want to know?

Revision history for this message
Olli Salonen (daou) wrote :

Version 0.4.9 released with the fix. I think that is all that needs to be tested for this bug. Thanks Jan for helping spot and fix the bug.

Changed in btnx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.