Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › [Linux] USB issue - I'm at my wit's end
New Posts  All Forums:Forum Nav:

[Linux] USB issue - I'm at my wit's end

post #1 of 5
Thread Starter 
Okay - I have a weird USB issue with a pretty specific device, and I'm not sure what to try next.

First off, some information:

Computer Specs:
P8Z77-I Deluxe motherboard
Low Profile Zotac GT 630
4gb DDR3-1600 memory
Core i3-3220
128gb Crucial M4 SSD

Peripherals:
1x MiniMaid JAMMA IO USB Adapter

Quick overview:

The MiniMaid is the device with the problem, it is the ONLY peripheral normally connected to the machine and is both an Input and an Output device. It is capable of converting 60hz input signals from a VGA cable to a proper 15khz signal for the arcade display, as well as handling JAMMA interface input and output, as well as Konami System 573 outputs. This is a USB 2.0 device and should be close to the limit of a 5v USB port's amperage. This device has NO PROBLEMS working under Windows. Windows, unfortunately isn't really an option as the game software wasn't really designed with Windows as it's target platform - Linux is. Anyways, the device doesn't use normal drivers (It does normally detect as a USB HID keyboard, but that's it) and is attached to the game directly using LibUSB; first we call to detach it from the Linux kernel, and then we attach it to the game's input and lights driving logic directly, passing appropriate commands to the card's SoC. Everything works perfectly on Linux - we get proper lights output, pad and cabinet buttons, switches and sensors are all completely functional. The game starts in about one minute on Linux, vise the 30 minutes it took on Windows - and we aren't pushing the memory envelope anymore!

The problem:

The device detaches from the game if left idle, and randomly has a delay (the delay is probably due to the game's logic, not a hardware/software misconfiguration, but I don't recall it being present on Windows). This seems like it is probably a USB autosuspend issue, or something similar... So, to effectively rule that out I passed "usbcore.autosuspend=-1" to the kernel by editing /etc/default/grub and grub-mkconfig -o /boot/grub/grub.cfg followed by rebooting the machine. I left it idle, and sure enough, about 10 minutes later I come back and the device has detached entirely. As if the device itself had come unplugged, it doesn't even show up in lsusb or sudo lshw -C... The lights stayed exactly illuminated as they were when the device detached (they normally cycle around in patterns and such to the music). What's the next step? What should I be looking at trying to disable?

I tried enabling extremely verbose logging of the game with
LIBUSB_DEBUG=4 ./openitg > logging.txt 2>&1
But that resulted in a 2.5gb text file in 120 seconds - which isn't long enough for the issue to arise... I was able to cut down about 450mb of that by disabling the "logcheckpoints" option in the game's configuration files, but that's still 2gb/minute and I need at least 15 minutes for the issue to show up, and then I have to somehow read that log information...

(in before some random Windows junkie tl;dr's the thread and suggests switching back to Windows)
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
post #2 of 5
TL;DR ... use windows (joke joke dnt hurt me!)

Have you tried blacklisting the usb device power saver rather than turning power saving off?

or fource it using
/sys/bus/usb/devices/usb{X}/power/control
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
post #3 of 5
Thread Starter 
1.) Usbcore is compiled into the kernel rather than a module; furthermore disabling it entirely would disable all usb functionality.
2.) Nope haven't given that a shot; I'll attempt to probably this weekend if I end up with enough free time to fiddle again.

Any other suggestions? I'm REALLY lost on things to try...
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
post #4 of 5
Any chance you could cron something to check if its attached / reattach OR poll it so it doesnt goto sleep? but apart from that no idea


unless you just play 24X7 wink.gif
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
post #5 of 5
Thread Starter 
I may have figured something out. Need time to fiddle with it but I think it's just a outdated documentation issue on usb powersaving. I think usbcore.autosuspend is boolean (0 or 1) and they added usbcore.autosuspend_delay_ms for the timer.
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › [Linux] USB issue - I'm at my wit's end