Page MenuHomeSolus

XOW - Linux driver for the Xbox One wireless dongle
Open, WishlistPublic

Description

Name of the software

XOW

Project/product Homepage
Homepage , GitHub

Why we should include this into the repository
XPAD doesnt support the XBOX ONE wireless dongle, this is the only reliable driver that I found to use it in linux.

Is it open source?
Yes, Source

Details

Event Timeline

Detox created this task.May 14 2020, 2:57 PM
kaktuspalme added a comment.EditedMay 14 2020, 4:27 PM

@Solus Devs If you like, you can assign that to me. I'm already using xow on my machine and already did some work on my machine to make a package.
It would be my first package though.

DataDrake triaged this task as Wishlist priority.May 14 2020, 6:16 PM
DataDrake moved this task from Backlog to Accepted For Inclusion on the Package Requests board.
ermo added a subscriber: ermo.EditedMay 20 2020, 2:26 PM

@kaktuspalme

Have you played around with socket activation at all?

In your current version (D8890) , you use udev to start a simple service. Would it be possible to enable (instead of starting) the socket-activated service and let systemd itself start the service once the controller tries to initialise a connection by connecting to the socket?

As a side effect, perhaps this might also solve the wake-from-sleep issue (where you currently force the service to start)?

If you can get this to work, I'm sure upstream will happily accept a (set of) patch(es) in a PR.

EDIT: Of course, if it turns out that it is better/more reliable to just start the service, then by all means feel free to do that.

kaktuspalme added a comment.EditedMay 20 2020, 2:33 PM

@ermo I don't know how that could be possible. A Xbox controller can only connect with the dongle if the dongle is initialized. The dongle gets initialized by xow/service. The connection between the dongle and the controller is over wifi but that's just between the dongle and the controller. There's no network traffic or anything. So I can't listen on a socket.

Edit: Regarding the wake-on-sleep issue. As I understand, xow looses connection to the dongle / it gets an error from libusb. Therefore it shuts itself down. That's why a restart is needed. I think it could be solved using this: https://www.freedesktop.org/wiki/Software/systemd/inhibit/. But I didn't ever write C++ so that's something I try to avoid.

See my upstream discussion: https://github.com/medusalix/xow/pull/69

ermo added a comment.May 20 2020, 2:37 PM

@ermo I don't know how that could be possible. A Xbox controller can only connect with the dongle if the dongle is initialized. The dongle gets initialized by xow/service. The connection between the dongle and the controller is over wifi but that's just between the dongle and the controller. There's no network traffic or anything. So I can't listen on a socket.

I see. Carry on then. =)

medusalix added a subscriber: medusalix.EditedMay 20 2020, 2:55 PM

Hi, maintainer here.
I'd like to remind you that I still haven't received a permission from MediaTek and/or Microsoft to redistribute their firmware files.
See this issue on xow's GitHub page. Therefore, I'd advise you to wait for their official approval to avoid any legal issues for Solus.

@medusalix Thank you for reaching out to us. I will hold off on inclusion until this issue is sorted out. In the meantime, can I ask that you add that to the README somewhere? Your current license disclosure makes it seem like you have permission already and I could easily see other distributions making the same mistake. Thanks!

medusalix added a comment.EditedMay 20 2020, 3:32 PM

@DataDrake Done. I'll have to admit that it was a bad idea to include the firmware without permission in the first place, but here we are.
I hope Microsoft will let me know of their decision before taking down the whole repository. It might be a better idea to completely remove the firmware.bin from the repository right now.

ermo added a comment.May 20 2020, 3:41 PM

Done. I'll have to admit that it was a bad idea to include the firmware without permission in the first place, but here we are.
I hope Microsoft will let me know of their decision before taking down the whole repository. It might be a better idea to completely remove the firmware.bin from the repository right now.

Is there a way to download the firmware after-the-fact?

I.e. write a bit of code for xow that looks for the firmware and if it isn't found, shows the user how to fetch it and install it themselves (via said one-liner) and quits? Then all the distro would have to do would be to put e.g. curl in the (equivalent of) rundeps until the firmware situation is cleared up?

I mean, the whole point here is to get the XBox controller working with Linux with as little fuss as possible, right?

Licencing obstacle courses are so dull.

medusalix added a comment.EditedMay 20 2020, 3:47 PM

Yes, the entire driver package can be downloaded from the Microsoft Update Catalog (search for xbox net).
A direct link to the appropriate download also exists: http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab
I would have already implemented the firmware download and extraction process in the Makefile, but the maintainer of the Debian package told me it wouldn't solve the licensing issues (not sure if that's true).

@medusalix Thank you very much. I hope you get the permissions. It would be a pity for all the work you have already done.

@Devs Sorry I didn't see that problem when making the diff.

ermo added a comment.EditedMay 20 2020, 4:16 PM

Yes, the entire driver package can be downloaded from the Microsoft Update Catalog (search for xbox net).
A direct link to the appropriate download also exists: http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab
I would have already implemented the firmware download and extraction process in the Makefile, but the maintainer of the Debian package told me it wouldn't solve the licensing issues (not sure if that's true).

My suggestion was more about that you gate the action of downloading and placing the firmware in the correct place in the filesystem on a post-install user action and not one second before?

In theory, handling it like I suggest ought to be no different than the user downloading the code artifact directly via a web-browser.

Something like:

Due to licencing constraints, the xow project is not legally allowed to distribute Microsoft XBox Controller firmware to end users.

To acquire and install the necessary firmware files on your system, execute the following commands in a terminal:

# Fetch the firmware from the Microsoft Download site
<appropriate fetch command>

# Unpack and copy the relevant firmware files to your system (requires super user rights)
sudo <appropriate unpack + copy command>

# Have xow check that the firmware was correctly installed
<appropriate xow check-for-firmware command>

My suggestion was more about that you gate the action of downloading and placing the firmware in the correct place in the filesystem on a post-install user action and not one second before?

I'm currently embedding the firmware in the resulting binary file, so I'd have to make sure the firmware is downloaded before the compilation begins.
I think I'll go with the automatic download though, because that's exactly what scripts like winetricks are doing too. The Update Catalog links to Microsoft's terms of use which - at least to my understanding - explicitly allow end-user use.

ermo added a comment.May 20 2020, 7:28 PM

My suggestion was more about that you gate the action of downloading and placing the firmware in the correct place in the filesystem on a post-install user action and not one second before?

I'm currently embedding the firmware in the resulting binary file, so I'd have to make sure the firmware is downloaded before the compilation begins.
I think I'll go with the automatic download though, because that's exactly what scripts like winetricks are doing too. The Update Catalog links to Microsoft's terms of use which - at least to my understanding - explicitly allow end-user use.

Looking forward to whatever solution you end up implementing that doesn't involve legal landmines. =)

FTR, I think it's really cool that you're providing a way for XBox controller owners to use them with Linux. Hat tip to you, Sir.