New/Old problem... not remapping...

Asked by Lighttitan

Ok this is a re-occurrence of an old problem. I just reinstalled Ubuntu after my last one's Gnome desktop stopped working and I couldn't find anyone to help me fix it because I was using the taboo version of "Ubuntu Ultimate" >.> but whatever...

So I downloaded the Beta of Ubuntu 8.10... ya I know I am not a developer and should wait for the official realize by I was dying to test out those 177.80 NVidia drivers for OpenGL 3.0! As far as the 177.80 drivers are concerned, they are great except an 1/2 second frame lag every 2-3 seconds... but this is not what I came here to talk about...

Ok so I said it was an old problem... here it is:

sudo ./pystromo-remap.py -m config/wow.map --v
Using output: <lib.devices.OutputDevice object at 0x7fcfddd0f450>
Loading mappings
Traceback (most recent call last):
  File "./pystromo-remap.py", line 170, in <module>
    inputs = getInputs(keymap, output)
  File "./pystromo-remap.py", line 98, in getInputs
    dev = devices.InputDevice(id=device, keymap=keymap, output=output, **params)
  File "/home/titan/.config/pystromo/lib/devices.py", line 99, in __init__
    node.grab()
  File "/home/titan/.config/pystromo/lib/ioctl.py", line 211, in grab
    fcntl.ioctl(self.fd, const.EVIOCGRAB, grab)
IOError: [Errno 16] Device or resource busy

I remember last time you told me this was actually a good sign as it had detected the device... and that was great last time because it started working with no further troubleshooting... but this time it just isn't.

Now I guess it could be this beta version of Ubuntu 8.10... but I don't think so. I think it's something simple. I follow your readme file and we both know my guide I wrote ain't gonna do me no good for fixing this problem.

It's gotta be something simple... something I am missing. Let me know if you have any ideas.

BTW I am thinking of picking up one of those new Nostromo n52te controllers... if I do I will do a "lsusb" and send you the vendor and product ID so you can include them in your test.map file for anyone who has the "n52te." It's the very least I could do for you helping me all the time with this.

Question information

Language:
English Edit question
Status:
Solved
For:
Pystromo Edit question
Assignee:
No assignee Edit question
Solved by:
Lighttitan
Solved:
Last query:
Last reply:
Revision history for this message
Raumkraut (raumkraut) said :
#1

Okay, let's see if we can get to the bottom of this.
In the /dev/input/by-id directory you should find a few files (symbolic links, actually) mentioning "Nostromo". Assuming they're named the same as mine, run the following command:

sudo fuser -av /dev/input/by-id/usb-Honey_Bee_Nostromo_SpeedPad2-event-kbd
(if you don't have this file then try either or both of the "SpeedPad2-event-" ones)

This should output something like the following:
                     USER PID ACCESS COMMAND
/dev/input/by-id/usb-Honey_Bee_Nostromo_SpeedPad2-event-kbd:
                     root 5502 f.... hald-addon-inpu
                     mel 12820 F.... python

This shows what processes are currently accessing the specified file/s.
As here, "hald-addon-input" (it truncated the name) will probably show up, and is likely not the cause of the problem.
To find out more precisely what the processes are ("python" isn't very exact):

ps ax | grep $PID
(replacing $PID with the numeric process ID, as above)

Let me know what processes have been listed, and we'll see what we can do.

Of course, if hald-addon-input is the *only* process accessing the device, then that would be annoying.

Revision history for this message
Lighttitan (dadicus) said :
#2

sudo fuser -av /dev/input/by-id/usb-Honey_Bee_Nostromo_SpeedPad2-event-kbd

Outputs the following.

                     USER PID ACCESS COMMAND
/dev/input/by-id/usb-Honey_Bee_Nostromo_SpeedPad2-event-kbd:
                     root 5992 f.... hald-addon-inpu
                     root 6153 F.... Xorg

ps ax | grep 6153 returns:

 6153 tty7 SLs+ 0:14 /usr/X11R6/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

Thanks for your help.

Revision history for this message
Raumkraut (raumkraut) said :
#3

Xorg? Hmm.
Could you post your /etc/X11/xorg.conf file?

In the mean time, I'll start downloading 8.10 and see if I can't get it virtualboxed...

Revision history for this message
Lighttitan (dadicus) said :
#4

Sure, I'll do that when I get home...

Revision history for this message
Lighttitan (dadicus) said :
#5

xorg.conf file as follows:

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
 Identifier "Configured Monitor"
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 DefaultDepth 24
EndSection

Section "Module"
 Load "glx"
 Disable "dri2"
EndSection

Section "Device"
 Identifier "Configured Video Device"
 Driver "nvidia"
EndSection

Revision history for this message
Lighttitan (dadicus) said :
#6

xorg.conf file as follows:

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
 Identifier "Configured Monitor"
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 DefaultDepth 24
EndSection

Section "Module"
 Load "glx"
 Disable "dri2"
EndSection

Section "Device"
 Identifier "Configured Video Device"
 Driver "nvidia"
EndSection

Revision history for this message
Lighttitan (dadicus) said :
#7

Yay double post... it told me there was an error and that it didn't post >.>

Revision history for this message
Raumkraut (raumkraut) said :
#8

Okay, this seems to be an issue when Xorg uses "evdev" as the input driver for all devices. This is the case with Intrepid, Fedora 10, and probably everyone else's new releases, too. At issue is the fact that evdev will "grab" the input event nodes in the name of Xorg. Unfortunately, this is precisely what Pystromo wants/needs to do. Xorg gets there first, and Pystromo is left out in the cold. :(

So the solution isn't immediately apparent, and is going to involve more research and experimentation. I'm going to open a bug for this one, and hopefully get some progress on it over the coming days.

Revision history for this message
Lighttitan (dadicus) said :
#9

Raumkraut has solved found a work around for the bug. I tested it on my system and it seems to work perfectly. Closing this ticket.

Thanks Raumkraut!

Revision history for this message
Jetmanjames (jbwestra) said :
#10

I have the same issue as Lighttitan! I updated to Intrepid and the old Nostromo setup quite working. Seems Pystromo is working for everyone else so I dove in. I have been tearing my hair out thinking I was screwing up something. I can now sleep knowing that it wasn't my errors that were causing the issue.
I would love to know the work around for the bug. Thank you for all you've done.

Revision history for this message
Jetmanjames (jbwestra) said :
#11

I apologize for the unnecessary post. I have found the 'bug' section that addresses the issue.
Thanks again!

Revision history for this message
Jetmanjames (jbwestra) said :
#12

I copied and pasted the changes to the xorg.conf and changed "gb" to "us" for the keyboard option. Then placed the attached file in the specified folder, restarted the hal and then logged out. Now my nostromo works (I think) but my mouse and keyboard no longer work. I'm running Ubuntu 8.10. I'm pretty new at all this so I will be searching the web looking for ways to edit/delete files while in root shell prompt. I guess this is probably the best way to get to know the system. Any help would be most appreciated. Thank you!

Revision history for this message
Jetmanjames (jbwestra) said :
#13

I went into the xorg.conf file in the root shell prompt via the nano command and found that the keyboard and mouse changes were not there. I typed them in, restarted the hal and all is well! And learned plenty in the process. Thank you again.

Revision history for this message
John Watson (bcch) said :
#14

OK everyone has fixed their problem but no one has actually posted the solution. Could someone actually post how to stop xorg from grabbing the device before my nostromo software has a chance. This has been working just fine up until Intrepid.

Note, I have tried the fdi file "solution" which locks the keyboard and mouse.

How do I stop xorg from grabbing the n52?

Revision history for this message
Raumkraut (raumkraut) said :
#15

If you haven't already Borat, check out question #58813 and see if anything in there helps you out.
I should be in a better position to research this directly in a week or so. Hopefully I'll be able to find out something useful.

Revision history for this message
John Watson (bcch) said :
#16

I've tried most things in the various threads already Raumkraut. :(

I hope you can come up with something to sort this "bug" or some kind of workaround. If something changed with the release of Intrepid that was going to affect peripherals, one would have thought it would have been announced somewhere. I have been using my n52 quite happily for years with the nostromo_n52 driver from sourceforge. Now I get this:

Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Removing stale pidfile.
Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Found 050d:0815 at dev 2
Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Failed to grab: Device or resource busy
Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Starting reader_thread with fd=10
Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Found 050d:0815 at dev 3
Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Failed to grab: Device or resource busy
Feb 22 21:41:15 jupiter nostromo_daemon[9401]: Starting reader_thread with fd=8

This is a similar message that pystromo gives. So whatever has changed, has put a halt to my gaming. I had "profiles" stored for all my games. None of which work now because the n52 is mapped to its "default" keys :(

I hope someone can help out with this. Otherwise I may have to seriously consider regressing to an earlier release.

Thank guys,

Revision history for this message
John Watson (bcch) said :
#17

Hi Raumkraut, just wondering if you've had a chance to investigate this any further?

Revision history for this message
Raumkraut (raumkraut) said :
#18

I've updated bug #287457 with a couple of solutions other people have found, which I've now been able to verify (at least on a VM).

Revision history for this message
Vanderhoth (upsonp) said :
#19

Just in case anyone was interested I lsusb the n52te.

I added the section:

# Nostromo n52te
[Device:n52te]
vendor=0x050d
product=0x0200

to the top of the test.map file and it seems to work.