Skip to content
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

Develop multiple instances 3 #37

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

BurninTurtles
Copy link
Contributor

i believe it to be done. instances work, sleep resume should work, config to proper controller works, hotplugging works if its not done too quick (possibly an artifact of my hardware), and code is at least i think clearly documented. if you like it and it works on your end, we can work on that team repo. im more concerned with getting this out there and tested though.

@raelgc
Copy link
Owner

raelgc commented Apr 10, 2015

I'll test (hopefully) during my weekend. I wish we have more people to test this. This package is installed by more than 3k users.

@BurninTurtles
Copy link
Contributor Author

ive tested on 2 laptops and a desktop, but who does that really help lol. again worst bug i found is with other applications now. if ive only played fofix with js0 and the guitar is curently js1, i need to create another controller profile. after that, back to no problems.

@raelgc
Copy link
Owner

raelgc commented Apr 10, 2015

How you've create another controller profile? In the game?

@BurninTurtles
Copy link
Contributor Author

yes. i cant see that being a problem of this though. its more like first use configuration of games problem

@raelgc
Copy link
Owner

raelgc commented Apr 10, 2015

Cool!

@BurninTurtles
Copy link
Contributor Author

yeah man, ive tried everything i can think of to break this and it just works so far. im sure some user will find a way but ill embrace the challange. when this package is installed, even if its not running, if a controller is plugged in that the user wants this service to respond to, it will do exactly that, catch the controller and make a unique instance of xboxdrv for it. I ironed out any problems of options mismatch pre PR2. it really simply works. kinda disapointed the cat n mouse game ended actually lol

@BurninTurtles
Copy link
Contributor Author

actually, resume on sleep is broken (again xD), however replugging the controller does the trick. log files say that everything runs but at the end xboxdrv reports it never found the usb device. a little research leads me to believe this is a kernel issue with sleep/resume and the binding of usb ports. thats kinda good news though, that the worst problem ive found is either fixed simply by the user, or out of the scope of this project.

always works on reboot, sometimes works on fresh from cold bot. if the controllers didnt connect, simply unplug and replug them for now.
@BurninTurtles
Copy link
Contributor Author

Thought of yet another way to simplify this, however I do believe this PR to be release quality. up to you, I don't know if you've played with it yet

@raelgc
Copy link
Owner

raelgc commented Apr 15, 2015

Not yet. But if you have plans to simplify it, I'm always a big fan of simple stuff :D

@BurninTurtles
Copy link
Contributor Author

sort of simplified, sort of made more ... robust? :) If you dont have time, please encourage a friend to try this out. One with multiple different controllers to test with would be ideal.

fixed start dude to filename change.
@raelgc
Copy link
Owner

raelgc commented Apr 19, 2015

@gyates100895 Do you think you can port this to run in 15.04 with systemd? My idea is basically, start first publish this for 15.04.

@BurninTurtles
Copy link
Contributor Author

Already reading up on it but so far yes. If you know of a resource similar to the upstart cookbook for systemd i would really appreciate it though.

@BurninTurtles
Copy link
Contributor Author

Will probably work on just the core job with hotplugging before I try handling multiple controllers though. Its so different but I see the potential lol

@raelgc
Copy link
Owner

raelgc commented Apr 19, 2015

@gyates100895 I have in my notes a systemd cookbook for upstart users. Let me find it.

@raelgc
Copy link
Owner

raelgc commented Apr 19, 2015

@BurninTurtles
Copy link
Contributor Author

Thoroughly familiar with that page but it is helping after multiple read throughs. Seems that I relied too much on scripting. Oh well, the challenge is good. If and when @Grumbel addresses issue 35 related to unregistering a disconnected controller within the daemon, I could eliminate the need for instances, and avoid the work of determining what arguments to use per instance

@Grumbel
Copy link

Grumbel commented Apr 19, 2015

Just a random aside: Has anybody looked at the xpad driver that Valve ships with SteamOS? From what I heard that fixes most of the issues with the old xpad driver, but I haven't looked at it myself.

xboxdrv itself was never really meant for all that hotplug stuff, as the main point of it was to have custom controls per game, which doesn't really work that well with hotpluging or multiple controllers. The daemon mode sort of addresses that, but I never had any use for it myself, so it never really was more then a half done proof of concept. I'll look into it one day, but I can't promise anything quick.

For most people the xpad driver is probably the better choice at this point.

@BurninTurtles
Copy link
Contributor Author

All understandable. Hey half done is working so far lol I've always preferred your driver for the exact reason you stated, customizability coupled with clarity and extendability. While this is visible to you though, thank you for the work you've done :)

@raelgc
Copy link
Owner

raelgc commented Apr 19, 2015

Oh @Grumbel, what a honour! 🙇

Last time I tried Valve xpad, it had 2 problems with wireless: the position light of the gamepad never stop blinking, and basically no ability to turn off the gamepad other than remove the batteries. Need to check again.

@raelgc
Copy link
Owner

raelgc commented Apr 19, 2015

And just to clarify: basically the @gyates100895 idea (what is amazing and if I correctly understood) is to watch dbus for new gamepads and then start xboxdrv accordingly.

@BurninTurtles
Copy link
Contributor Author

Yes. Although I never considered dbus, most likely from reverent ignorance. I will look into an implementation of this with dbus for the systemd version. For this package though I think simplifying the shell scripts would be suffice. Rael thank you but actually My idea was to just match every USB event against the existence of a file. In hindsight sounds not ideal but seems to work quickly lol and for the record, I'm not even 20 yet, so I hope that any merit this establishes is at the very least impressive enough to inspire patience xD

@BurninTurtles
Copy link
Contributor Author

Oh, @Grumbel, to address your comment further, I'm a bit confused on using daemon mode possibly for the reason you mentioned, that is was just for proof of concept . I think that that is in part why I wanted to modify this. In my mind, I've framed xboxdrv as a sort of standalone controller interpreter, and that this projects purpose is to determine if and when to start the driver for present controllers, appending specific arguments based on type if need be.

@raelgc
Copy link
Owner

raelgc commented Apr 20, 2015

@gyates100895 Fine to watch usb files too. The whole idea (from you) of watch for connected devices and then start xboxdrv for each one is great :)

@BurninTurtles
Copy link
Contributor Author

@raelgc thank you :) always helpful to know I'm both on a good track and not doing it entirely wrong lol today is read day and the morning most likely I'll start the systemd version. I'll start a new project for it for now, both to further learn git and keep the work seperated. Once it's mature we can go forward with that team repo if you like. Teams usually work better lol

@raelgc
Copy link
Owner

raelgc commented Apr 20, 2015

@gyates100895 If you want to create the team repo and add me, go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants