-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB controller devices don't hotplug #70
Comments
Yes, sure, Our current file would look something like this: http://slexy.org/view/s21lD6XxSq |
Ok I can make those changes tonight. I'm confident enough with that code there I can do that and fell like i'm smart :) hahaha. I will write in the code for x360 usb. I have to make a change or two to prevent the "double profile" occuring with PS3/USB, since the sony kernal module interferes a bit on reconnection. I'm sure I can fix that. |
I got this working for the "wireless" xbox 360 device that uses a usb/wireless hub. If I disconnect the hub after shutting for the x360 controller, I can now reconnect the hub, power on the controller and continue on. However, true wired devices for Sony / Xbox controllers, I am still having a lot of trouble with. The least of these is the sony_hid module for wired PS3 controllers. If I reconnect the controller, the hid_sony module takes over, and xboxdrv just sits there in jstest. Removing the sony module, and restart xboxdrv doesn't work among other things. I am not sure how on bootup, xboxdrv loads without issue, and I hit the PS buttin in RetroRig, and it's fine. However, in the OS, I can't seem to replicate this bootup action set. I likely need a helping hand to get that one working. As for Xbox 360 wired, it's a similar issue, but instead of the sony module, its the xpad module (although I load xpad just to get the USB connection). In the end, what I really need, is a module, or the ability to load the USB connection cleanly, so that xboxdrv can then take over. Again, this process works fine on bootup of Ubuntu. Current work: |
Looks very good! Did you try to blacklist the distracting kernel modules? |
But wait, on a second glance I'm not so sure if this works. You should either determine the controller type from the RetroRig settings or check for all of them in parallel with different actual/old variables. Your script checks during start-up for the type, that's when possibly no controller is online. |
Yeah, this version looks better: http://slexy.org/view/s2RzZftJtV |
I like this option. I could actively re-copy down gp_autodetect_xbmc.sh and do a sed replace of the "controller type" rather than check for it on startup. For now, I am just trying to get it all working. At least I got the wireless x360 one working (using the wireless hub). Just need ps3/x360 wired. I think this is low to medium priority, since almost all users will plug in controllers at bootup, but it would be useful for when folks add more controllers for additional players. |
Good idea! |
For now, I have renamed the "testing" versiong of
But translating that to a looped script function is harder than I thought. What entails a manual "hotplug" is this.
Maybe I shouldn't worry so much about USB hot plugging, but it would be nice for the future. I will pretty intend on holding this work until 0.9.5 is out and has passed. It would be nice for 1.0, but will take some work to get it properly working. The problem really lies I believe in properly handling all the stages of disconnect/PS button press/unloading/reloading modules. Complicated haha. |
Yes, indeed, complicated. You are really tenacious for this issue, I like that! |
That's how I work on things I am really interested in, especially if it's Linux to begin with hahah. Now hopefully someone sees this work ethic, determination, and love for that area someday, and I get the job I've always wanted. I have incredible drive for attacking issues that make my mind "wake up" and make me happy. Maybe with the next release we both can attack this issue. For the most part, users shouldn't have a huge issue with rebooting if they connect USB controllers I think, but it would be nice to fix this for them at some point. For now, it's a line item in future development features on the wiki. |
I found out why PS3 USB doesn't hotplug right. This is the right way to go about it. Check out the current:
What isn't happening is the kernel driver being properly detached. If you run You can reference this issue I put in under the retropie project, since that is what I am modeling this after |
I made hotplug support for PS3 / USB basically work tonight, see here: https://github.com/beaumanvienna/RetroRig/blob/beta/XBMC-cfgs/extra/gp_autodetect_xbmc.sh Two oddities I haven't figured out though. First thing is, it only works for the second time after being plugged in. For all further connects or if directly booted with a connected controller hotplugging is fine. And secondly, sometimes after unplugging the controller it connects via BT... |
Works now 100%. To be observed. |
Wooo!!! Thank you for your help JC On Sat, Nov 1, 2014 at 6:15 AM, Jens-Christian [email protected]
Michael DeGuzis |
I will close this once I analyze the Xbox 360 controller side of things. |
@beaumanvienna , JC, at some point I want to see if we can implement similar hotplugging like the PS3 bluetooth controller. Should be easy enough to scan /proc for ps3/x360 usb devices and restart rescan/related services.
The text was updated successfully, but these errors were encountered: