OpenELEC / OpenELEC.tv

OpenELEC - The living room PC for everyone
http://openelec.tv
1.61k stars 883 forks source link

Xbox 360 wireless controller not working anymore (since OE 3.2) #2607

Closed bhabba closed 9 years ago

bhabba commented 11 years ago

Since I've upgraded from Openelec (ION x64 build) version 3.0.6 to 3.2 my Xbox 360 wireless controller doesn't work anymore. This is obviously a regression because there was a similar issue in the past which had been fixed in version 3.0 RC3 (see https://github.com/OpenELEC/OpenELEC.tv/issues/1580).

The controller is connected through the common USB receiver (third party replica of the official microsoft one): http://support.xbox.com/en-US/xbox-360/accessories/xbox-360-wireless-gaming-receiver-windows

jenkins101 commented 11 years ago

logs please!

bhabba commented 10 years ago

Here they come: https://googledrive.com/host/0Bx00vzt-gzADcWZpc2cwME1RLU0/log-2013-09-21-10.29.04.zip Sorry for the delay, I didn't manage to do it earlier...

juankb1024 commented 10 years ago

I'm new to openelec. But I am having the same issue.

https://dl.dropboxusercontent.com/u/11808190/log-2013-09-21-18.53.47.zip

Since I am new, I have no idea where to start looking and most forums say it was fixed by OC 3.0

Thanks!

jenkins101 commented 10 years ago

@juankb1024 you have not enabled joystick support in xbmc

@bhabba all seams good in the logs... could you enable debug in xbmc and push some buttons then pastebinit and post url here?

juankb1024 commented 10 years ago

I can't see the option to enable it.

I've looked at Settings > System > Input devices and there is no option to enable it.

I have also googled the topic and have defined a mapping.xml in userdata/keymaps but still no luck.

Where can I find this setting?

Thanks for the help!

jenkins101 commented 10 years ago

it should be there?

Enable Joystick support...

bhabba commented 10 years ago

@jenkins101 I've done and uploaded the log file you've requested under the following URL: http://nopaste.info/d7c940bf6a.html

To prevent confusions about input devices maybe I should mention that I use a Logitech USB Keyboard (K400) to actually being able to navigate through openelec. I hope I could help!

juankb1024 commented 10 years ago

@jenkins101 there is no visible option to do this. Just made a fresh install of Openelec and no cigar.

After a few searches I found this thread with a similar problem. http://forum.xbmc.org/showthread.php?tid=149302

But at least this person can see the option is grey. In my case it is just not visible.

They talk in the thread about using IMON but I haven't done any of such things or even know what IMON stands for.

Is the fact that I'm running it on Raspberry Pi have anything to do with it?

Just to be clear, I am using the xbox 360 wireless controller.

Any help, insight is greatly appreciated!

Thanks in advance! :D

jenkins101 commented 10 years ago

@bhabba try running this: cp /usr/share/xbmc/system/keymaps/joystick.Microsoft.Xbox.360.Controller.xml .xbmc/userdata/keymaps/joyst ick.xml then reboot and try again with debug and paste new log

@juankb1024 I dont know... I think it should work on RPi too... @sraue ?

bhabba commented 10 years ago

@jenkins101 Ok, I copied the keymap as specified, rebooted and pushed several buttons on my Xbox 360 Controller but nothing happened (except that after screen dimming the screen brightened up again). The new log file can be found under this URL: http://nopaste.info/68b485de10.html

Are you sure the problem isn't caused by the same principle as in https://github.com/OpenELEC/OpenELEC.tv/issues/1580 ? (excuse me if this is a stupid question...)

jenkins101 commented 10 years ago

no... its not the same... it seams to be loaded and you can see joystick button presses in xbmc,

but no functions seams to be mapped to them... if you press other buttons than up down?

is this a never xbox controller?

bhabba commented 10 years ago

Ok, understood. I've pressed almost every button, not only up/down... ?! No, I've bought the controller in 2009 and it used to work with OE 3.0.6 until I've updated to stable 3.2 (I've used the built-in auto-update method).

jenkins101 commented 10 years ago

ok. please try 3.2.1

bhabba commented 10 years ago

I've tried OE 3.2.1 today, but still the same issue! And in the xbmc debugging log file it still says for every button "up" or "down"... it can be found under: http://nopaste.info/e3b1e65f23.html

update: I've tried 3.2.2 as well, unsurprisingly the issue continues to exist.

jenkins101 commented 10 years ago

is it any one that has a working xbox controller that can provide logs?

or if they are using some custom keymaps?

juankb1024 commented 10 years ago

Just a follow-up, I have also updated to OE 3.2.2 and there is still no visible option to enable joystick support. Is there a way to enable it from a config file or something?

bleze commented 10 years ago

Intel NUC with wireless Xbox 360 controller and OpenElec 3.2.3 still does not work. Wireless dongle is not official from Microsoft, but has previously been confirmed to work with xboxdrv.

bhabba commented 10 years ago

I can confirm that this bug is still unsolved in OE 3.2.3 I've uploaded the corresponding debugging log file here: http://nopaste.info/ff31e1a260.html

Could I do anything else to help fix this issue?

jenkins101 commented 10 years ago

this is probably related to joystick.xml mappings being wrong... probably due to driver change but map needs to be updated any way...

please report to xbmc too.

bhabba commented 9 years ago

Hi, I'd like to update this bug report!

After upgrading to OE 4.2.1 I thought I should give my wireless xbox 360 controller another try – especially since some substantial improvements were made to the xpad kernel driver. Although the controller didn't work "out of the box" I could figure out that after disabling and re-enabling joystick and gampad support in the system settings it actually worked. But after every reboot and/or power off of the controller I have to do this again to get it to work.

I enabled debug logging and uploaded the corresponding xbmc.log file here.

I hope these explanations help to finally fix this annoying bug! Let me know if I can provide any other information :)

zzattack commented 9 years ago

Could you try with a more recent build? Ive prepared one at the link below, which contains some more joystick work. Http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141108154613-r19555-g13c534e37bbb.tar

bhabba commented 9 years ago

@zzattack Thank you very much for your build! I've installed it today and now the controller works immediately! Amazingly even the triggers and analog sticks work (more or less) now! I'm almost happy... :smiley:

A corresponding debugging log file can be found here.

But as always there's a drawback: A new problem I've encountered is that sometimes after a warm reboot the controller doesn't work properly anymore, i.e. it isn't possible to navigate left/right – the selection immediately rebounds to the one on the most left (weather on the home screen)... at this point the only cure seems a cold reboot. Unfortunately I couldn't figure out by what exactly this misbehaviour is triggered. If I should observe a pattern I'll post it here...

zzattack commented 9 years ago

Sounds like a trigger not resetting properly. I'll prep another build which logs axis values. When you see this behavior, do the normap abxy buttons work as expected?

Jolter commented 9 years ago

zzattack, thanks for the build! I tried it and it did solve the problem of not getting contact when powering up the controller, just as advertised. The axes work fine for me, after wiggling each stick.

However, it also re-introduced the "blinking circle" problem that was prevalent in versions previous to... 4 or so (I haven't been keeping track). That is, even after syncing, the controller blinks all 4 LEDs incessantly. Quite annoying in a home theater.

I had assumed what happened in 3.0 was that the recent improvements to xpad were incorporated in openelec, because the lights stopped blinking: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1272765 Maybe I've misunderstood. The current situation with your custom build is certainly better than losing contact, but ideally I'd want to see it work as well as it does under Valve's customized xpad (linked in the Ubuntu bug ticket).

zzattack commented 9 years ago

You're correct about the blinking LEDs. The valve rework patch needs to be rebased on the xpad driver since it got some updates to add support for Xbox one controllers in 3.17. I'll see if I can redo that or ask @lrusak if he's interested. I've put the build with additional debugging at http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141109203548-r19598-g7802e3bd4f5a.tar

zzattack commented 9 years ago

I've rebased the valve patches against the 3.18 xpad driver, will post a test build tomorrow. @mrdominuzq, @Jolter, @bhabba: would you be able to test

bhabba commented 9 years ago

@zzattack ok, thank you very much for your effort! I should be able to test it by tomorrow evening.

zzattack commented 9 years ago

Build with reworked xpad driver is available at http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141111164506-r19621-gde804e46472b.tar @Jolter: could you verify this fixes the blinking leds problem?

@bhabba: could you check your logs for axis movements when the behavior you described exhibits again (not being able to navigate menus etc)?

Jolter commented 9 years ago

Great job! Will be able to test on Thursday night, hopefully.

Jolter commented 9 years ago

I forgot to mention, I have an original Microsoft receiver.

Build 20141111164506-r19621 works great if I boot with the controller turned on. It blinks as expected when connecting, and then first LED lights up steady, and all works fine. Seems to behave similarly as in the standard build from what I can tell.

But when I turn the controller off and then on again, it again fails to reconnect. If I wait long enough that the screen saver kicks in, the controller can reconnect. I didn't check exactly how long, but more than one minute.

It doesn't seem to help if I toggle the "joystick and gampad support" setting.

I produced a log file with debug enabled. What I did was navigate to Debug and turn in on using the joystick, press a couple of buttons, then remove the battery, wait a couple of seconds, then reinsert and power on the joystick. When it failed to reconnect, I disabled debugging.

I did get "Stop joystick subsystem failed" which might be a clue: http://sprunge.us/MAKh

I did an "upgrade" installation from the USB stick, by the way, I don't know if that matters.

bhabba commented 9 years ago

Tonight I found some time to test zzattacks newest build. Here are my findings:

It seems to me that some kind of not resetting the controller properly

  1. after losing the connection to the controller and
  2. while shutting down the system

lies at the root of the above decribed problems.

@zzattack Let me know if I should provide any specific log files or other information. And thank you again very much for your commitment!

zzattack commented 9 years ago

Thanks for the reports, I'll debug and reply in more detail sometime this weekend!

zzattack commented 9 years ago

Thanks for the detailed reports guys. Sounds to me like there's an issue with the patched xpad for which I see no way to debug other than by replicating the situation locally. I'll probably have a wireless receiver within a few days. @bhabba: when the navigation problem occurs again, could you check the log file and see if any inputs from the controller are still logged? Last build should tell you even if there's movement on any of the axes.

Jolter commented 9 years ago

Update: I am unable to reproduce the situation where the controller is able to reconnect after being shut off for a while. It seems it is only able to connect once after each reboot of the system.

eberkund commented 9 years ago

I also am unable to use my Xbox 360 controller with OpenELEC 4.2.1. The controller connects fine to the wireless receiver but the system does not recognize any button presses (including waking the screensaver). I have also tried toggling enable joystick support on and off with no sucess.

zzattack commented 9 years ago

A little late, but I finally received a remote receiver so I'll be able to dig into the xpad driver soonish.

zzattack commented 9 years ago

I think I've managed to fix the xpad problems. I'll do a thorough check tomorrow and hopefully post another test build too

zzattack commented 9 years ago

@eberkund, @Jolter, @bhabba: I've prepared another build based on https://github.com/zzattack/OpenELEC.tv/tree/xpad-rework at http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141206005430-r19740-g5c6986095c2f.tar Could you check whether this finally addresses the issues?

almanzarj commented 9 years ago

@zzattack I did an update and controller seems to be working fine. I also did a test of turning off the controller and then turning on while XBMC was running and it connected no problem. nicely done!

Jolter commented 9 years ago

I can confirm that with that build, my wireless controller can now reconnect to OpenElec after being turned off. It also doesn't blink after connecting. Great job! If will give it a few more days of testing but so far it looks very promising.

zzattack commented 9 years ago

Awesome, thanks for your reports, I'll submit a PR for it and hopefully it can be included before helix final. On Dec 6, 2014 9:49 PM, "Jolter" notifications@github.com wrote:

I can confirm that with that build, my wireless controller can now reconnect to OpenElec after being turned off. It also doesn't blink after connecting. Great job! If will give it a few more days of testing but so far it looks very promising.

— Reply to this email directly or view it on GitHub https://github.com/OpenELEC/OpenELEC.tv/issues/2607#issuecomment-65913279 .

bhabba commented 9 years ago

@zzattack Thank you very much for your work!!!

I can confirm that the controller works almost perfectly :ok_hand: i.e. powering it off and on (manually) doesn't cause problems anymore and rebooting isn't a problem per se either.

A little remaining drop of bitterness is that the controller stays on after the HTPC is powered off (with the LED indicating it is still connected to the receiver).

And there's a freeze/kernel panic I've managed to run into during boot-up under very specific circumstances: When I power the controller on before I start up the HTPC the device freezes during boot-up displaying a log excerpt like one of the following (I took the pictures with my phone because I don't know how to get the log file itself):

img_20141208_155532 img_20141208_160712 img_20141208_161420 img_20141208_163002

I suppose this problem has something to do with the wireless receiver still getting power through USB while the HTPC itself is powered off. I think so because the kernel panic only occurs when I power the controller on at exactly the right time. It doesn't occur for example if I power it on before the HTPC (and therefore the wireless receiver, too) is connected to the current. It also doesn't occur if I wait some seconds after starting up the HTPC and then power the controller on (i.e. wait until the bootloader comes up). But it also occurs during warm reboots if I manually power the controller off and on at the right time (after openelec shut down but before/during BIOS POST).

Honestly spoken this freeze is no big deal for me since I normally don't run into it and I'm very pleased with zzattack's improvements and the current state of the Xbox controller support! :beers:

zzattack commented 9 years ago

Thanks guys for the testing and all your detailed reports, really appreciated! I'll see what I can reproduce and fix asap.

MrAoOs commented 9 years ago

Hey fellas, I've skimmed the thread and I have a few questions;

Cheers and thank you for the hard work.

Jolter commented 9 years ago

Hi @MrAoOs, The wireless controllers "work" with standard OpenElec since a long time back. I'm not sure what you mean by "natively", but yes, you don't need any addons or special builds. The issue we're discussing here is that the driver is a bit buggy, but it is already working pretty decently in the latest standard build, at least on my hardware.

I suppose that this branch will be merged into the mainline of openelec when @zzattack and the others devs have agreed that it's stable enough for release.

As for multiple controllers, I can verify that this custom build works well with my setup:

musyne commented 9 years ago

Hi, The wireless controller does not work for me on a Raspberry Pi B+. I tried with OpenElec 4.2.1 and 5.0 RC2. I'll try with RC3 tonight.

zzattack commented 9 years ago

Hey guys, I've prepared 2 more builds. Would be awesome if any of you guys @Jolter, @bhabba, @musyne could test them somewhat soon before they go into 5.0 final.

The dmesg thing that looks like a kernel panic appears to be more of a warning about sending an urb from a less than optimal place, but it shouldn't be too big an issue.

[1] http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141224023036-r19861-gf98fc9935f0b.tar

[2] http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141222221430-r19855-gd4509e50547a.tar

(for my own reference: the 1st is based on the original patches that were offered on the linux-input list, the 2nd is based on the xpad.c version from latest steamos kernel)

musyne commented 9 years ago

Hi. Thanks The builds are generic x86. Will they work on the Pi?

Sent from my Windows Phone


From: Frank Razenbergmailto:notifications@github.com Sent: ‎24/‎12/‎2014 03:07 To: OpenELEC/OpenELEC.tvmailto:OpenELEC.tv@noreply.github.com Cc: musynemailto:rokchair@hotmail.com Subject: Re: [OpenELEC.tv] Xbox 360 wireless controller not working anymore (since OE 3.2) (#2607)

Hey guys, I've prepared 2 more builds. Would be awesome if any of you guys @Jolter, @bhabba, @musyne could test them somewhat soon before they go into 5.0 final.

The dmesg thing that looks like a kernel panic appears to be more of a warning about sending an urb from a less than optimal place, but it shouldn't be too big an issue.

[1] http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141224023036-r19861-gf98fc9935f0b.tar

[2] http://files.zzattack.org/temp/OpenELEC-Generic.x86_64-devel-20141222221430-r19855-gd4509e50547a.tar


Reply to this email directly or view it on GitHub: https://github.com/OpenELEC/OpenELEC.tv/issues/2607#issuecomment-68019067

zzattack commented 9 years ago

I"ll add a build for ARM

zzattack commented 9 years ago

@musyne: http://files.zzattack.org/temp/OpenELEC-RPi.arm-devel-20141224125310-r19861-gf98fc9935f0b.tar