medusalix / xow

Linux driver for the Xbox One wireless dongle
https://medusalix.github.io/xow
GNU General Public License v2.0
1.42k stars 91 forks source link

Cant get it work with 5.8.3-xanmod1 kernel #115

Open XionErazer opened 4 years ago

XionErazer commented 4 years ago

well, then title should say everything, i rebuild it after upgrading my kernel and so on

Its on Linux Mint 20.04 before that i was on the latest LTS kernel there it worked

[28142.005012] usb 3-9.1: new high-speed USB device number 19 using xhci_hcd [28142.088059] usb 3-9.1: New USB device found, idVendor=045e, idProduct=02fe, bcdDevice= 1.00 [28142.088061] usb 3-9.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [28142.088062] usb 3-9.1: Product: XBOX ACC [28142.088063] usb 3-9.1: Manufacturer: Microsoft Inc. [28142.088063] usb 3-9.1: SerialNumber: 231339 [28142.159321] usb 3-9.1: reset high-speed USB device number 19 using xhci_hcd [28142.242365] mt76x2u 3-9.1:1.0: ASIC revision: 76320044 [28142.264549] mt76x2u 3-9.1:1.0: ROM patch build: 20141115060606a [28142.424113] mt76x2u 3-9.1:1.0: Firmware Version: 0.0.00 [28142.424114] mt76x2u 3-9.1:1.0: Build: 1 [28142.424115] mt76x2u 3-9.1:1.0: Build Time: 201507311614____ [28142.579043] mt76x2u 3-9.1:1.0: error: MCU resp evt:9 seq:1-0 [28142.579081] mt76x2u 3-9.1:1.0: error: MCU resp evt:9 seq:1-0 [28142.579120] mt76x2u 3-9.1:1.0: error: MCU resp evt:9 seq:1-0

thats the output of my kernel

XionErazer commented 4 years ago

A fully delete and reinstall brought me

mt76x2u 3-9.2:1.0: ASIC revision: 76320044 [ 9.459452] input: Xbox Gamepad (userspace driver) as /devices/virtual/input/input46 [ 9.471052] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null) [ 10.460721] mt76x2u 3-9.2:1.0: could not get hardware semaphore for ROM PATCH [ 13.272890] usb 3-9.4: reset high-speed USB device number 12 using xhci_hcd [ 21.438533] mt76x2u: probe of 3-9.2:1.0 failed with error -110 [ 21.438684] usbcore: registered new interface driver mt76x2u

NoXPhasma commented 4 years ago

The kernel module mt76x2u needs to be blacklisted. Make sure the file /etc/modprobe.d/xow-blacklist.conf exists on your system and it contains this:

# Bind dongle to non-existent module to prevent the mt76x2u driver from loading
alias usb:v045Ep02E6d*dc*dsc*dp*ic*isc*ip* xow_blacklist
alias usb:v045Ep02FEd*dc*dsc*dp*ic*isc*ip* xow_blacklist

If both is true, you might need to rebuild the initial ramdisk, so it will read the that file: sudo update-initramfs -u -k all

Then reboot.

Walnut-dev commented 4 years ago

Hi kernel 5.8.6-1 here. The dongle seems to work on boot up and my controller connects automatically, however the connection does not last long for not more then 3 seconds at most. The xbox controller start blinking and the wireless adapter is not responding anymore. Regarding your solution with running the command sudo update-initramfs -u -k all, i do not seem to have update-initramfs on my system is it a requirement?

EDIT:

2020-09-19 00:20:02 INFO - xow v0.5-16-ga3d2b01 ©Severin v. W. 2020-09-19 00:20:02 INFO - Waiting for device... 2020-09-19 00:20:03 INFO - Wireless address: 62:45:b5:01:88:bb 2020-09-19 00:20:03 INFO - Dongle initialized 2020-09-19 00:20:12 INFO - Controller '1' connected 2020-09-19 00:20:13 INFO - Device announced, product id: 02ea 2020-09-19 00:20:13 INFO - Device announced, product id: 02f6 terminate called after throwing an instance of 'InputException' what(): Error adding key code: Invalid argument [1] 2396 abort (core dumped) xow

kakra commented 4 years ago

The latest kernels contain a patch that returns EINVAL on out-of-bounds access during ioctl(), maybe that's the cause? https://github.com/kakra/linux/commit/851d0813ab80b47d3d85617d81836891bfb59094

Also, maybe some initialization is missing? Because there's another commit that rejects usages that do not fit into the bitmap: https://github.com/kakra/linux/commit/4bae1afed43212ee3ec64f2bdc9e39e800974e7e

Note: The links point into my 5.4 devel branches of the kernel but those commits are actually commits in the stable branches of the kernel backported from Linux master and/or 5.8.

Walnut-dev commented 4 years ago

So I need to install the https://github.com/kakra/linux/commit/4bae1afed43212ee3ec64f2bdc9e39e800974e7e branch to get it to work?

kakra commented 4 years ago

No, those links do not point to anything to "install". You'd probably need build the xanmod kernel yourself. There should be a source package available for it for your distribution. Then, before building, try to revert one of those commits I linked above. If that fixes there issue, something is broken in xow which should be fixed (and was hidden previously by the kernel being more relaxed about this bug). I was just pointing out what kernel commits might affect xow to get an easier clue of where to look for the problem.

Walnut-dev commented 4 years ago

Yeah I've noticed that thanks for the info, i will definitely try to fix this with the above information and i''ll let you know!

EDIT:

I have no clue what to do now actually, do i have to get the source package edit the same that you have changed, and then build the kernel?

kakra commented 4 years ago

I didn't change anything about those commits. You should clone the xanmod kernel locally, then use git revert <commitid> to revert one of the changes that I think may introduce that behavior. You can then use make oldconfig to get your currently running configuration into the local clone, then use make && make modules to build that kernel. You may want to use tig or Sublime Merge to revert or drops commits more easily. Both applications provide a GUI to browser commits and select some for revert graphically.