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

xow.service does not alway launch properly at boot, LIBUSB_ERROR_ACCESS #153

Open
StefanLobbenmeier opened this issue Jan 16, 2021 · 15 comments

Comments

@StefanLobbenmeier
Copy link

I use the xow.service so that I do not have to worry about having to launch xow in the terminal everytime before I start a game.

Anyway, once or twice a week the xow service does not boot up. I checked the logs and I found this:

-- Boot 44fb83db6cd84e0cbc8ca6983ee735d0 --
Jan 16 07:40:06 stefan-manjaro systemd[1]: Started Xbox One Wireless Dongle Driver.
Jan 16 07:40:07 stefan-manjaro xow[421]: 2021-01-16 07:40:07 INFO  - xow  ©Severin v. W.
Jan 16 07:40:07 stefan-manjaro xow[421]: 2021-01-16 07:40:07 INFO  - Waiting for device...
Jan 16 07:40:07 stefan-manjaro xow[421]: terminate called after throwing an instance of 'UsbException'
Jan 16 07:40:07 stefan-manjaro xow[421]:   what():  Error opening device: LIBUSB_ERROR_ACCESS
Jan 16 07:40:07 stefan-manjaro systemd[1]: xow.service: Main process exited, code=dumped, status=6/ABRT
Jan 16 07:40:07 stefan-manjaro systemd[1]: xow.service: Failed with result 'core-dump'.

@StefanLobbenmeier
Copy link
Author

Is there a way to get further logs than this? I used journalctl -u xow.service to get those logs

@StefanLobbenmeier StefanLobbenmeier changed the title xow.service does not alway launch properly at boot xow.service does not alway launch properly at boot, LIBUSB_ERROR_ACCESS Jan 16, 2021
@medusalix
Copy link
Owner

medusalix commented Jan 22, 2021

Is there a way to get further logs than this? I used journalctl -u xow.service to get those logs

@StefanLobbenmeier Probably not. That error code is coming directly from libusb.
I wonder if this problem could be avoided by starting the service after the dongle is plugged in (there are two PRs for that).

@StefanLobbenmeier
Copy link
Author

I see, do you mean physically plugged in or „plugged in“ by the kernel~

Because it would be really nice if I could always leave the adapter plugged in. I am doing that at the moment.

@Hedronmx
Copy link

I noticed this issue too, I have to unplug and then plug the dongle to make it work

@StefanLobbenmeier
Copy link
Author

@Hedronmx you have to plug out and plugin the dongle in addition to restarting the service?

@Hedronmx
Copy link

Nevermind!! I had some issues with usb hub bandwidth! Seems to be working fine just now

@mundifex
Copy link

Happening for me with latest source on Linux 5.11.7-arch1-1 x86_64.

With dongle already inserted in PC, service fails to start at boot on a regular basis. Manually starting service after failure is always successful. Same log output as OP.

I have tried the dongle on various USB buses and the issue still occurs. libusb version 1.0.24-21

@kakra
Copy link
Contributor

kakra commented Mar 23, 2021

@mundifex Could you try if #156 solves the problem for you? If it does, one of the PRs should be merged that activate the xow service on udev event.

@mundifex
Copy link

@mundifex Could you try if #156 solves the problem for you? If it does, one of the PRs should be merged that activate the xow service on udev event.

Your PR has resolved the issue for me. I performed 10 reboots and the xow service started automatically and successfully each and every time. The controller was in varying states of off, connecting, and connected. I verified connection with sdl2-jstest a few times and everything works like I'd expect.

Thanks so much for your PR and your advice!

@StefanLobbenmeier
Copy link
Author

Thanks! I cannot reproduce for some time so I will close it and try #156 in a few weeks, since the issue of @mundifex match my issue.

@mundifex
Copy link

mundifex commented Mar 24, 2021

Is closing this issue the best decision? Until #156 gets merged, the error persists and I'd rather close this issue only if and when the PR gets merged.

@kakra
Copy link
Contributor

kakra commented Mar 24, 2021

No it's not. It's better if the commit that fixes it has a "Closes" github tag.

kakra pushed a commit to kakra/xow that referenced this issue Mar 24, 2021
I encountered the `Mt76Exception: Failed to load firmware` error quite a few times. xow.service is stopped and needs a restart as stated in the Troubleshooting section of the README.md. To make my life easier i added a udev rule to do just that for me when i plugged the dongle back in after uplugging it.
Should start/restart the xow.service if the service is not running or is in a `failed` state due to previous ABRT signal.
I think it would be a simple change to the udev.rules to make that the default behaviour but maybe a manual restart is desired?

Anyways, thanks a lot for your work! I'm quite happy with xow!

Closes: medusalix#153
Signed-off-by: Kai Krakow <[email protected]>
@StefanLobbenmeier
Copy link
Author

Oh Sorry, will wait for the merge

@alkazar
Copy link

alkazar commented May 1, 2021

I am also experiencing the same error on kernel 5.11.16. #156 doesn't appear to fix this issue in my case although I only modified my current install with the udev and service file changes.

EDIT: Looks like the patch does work. I forgot to run systemctl disable xow to prevent the service from starting at boot up and failing.

alkazar added a commit to ChimeraOS/chimeraos that referenced this issue May 2, 2021
@StefanLobbenmeier
Copy link
Author

Today I had a different issue:

Jun 13 21:01:22 stefan-manjaro systemd[1]: Started Xbox One Wireless Dongle Driver.
Jun 13 21:01:28 stefan-manjaro xow[488]: 2021-06-13 21:01:28 INFO  - xow  ©Severin v. W.
Jun 13 21:01:28 stefan-manjaro xow[488]: 2021-06-13 21:01:28 INFO  - Waiting for device...
Jun 13 21:01:29 stefan-manjaro xow[488]: 2021-06-13 21:01:29 ERROR - Error in control transfer: LIBUSB_ERROR_TIMEOUT
Jun 13 21:01:29 stefan-manjaro xow[488]: 2021-06-13 21:01:29 ERROR - Firmware part loading timed out
Jun 13 21:01:29 stefan-manjaro xow[488]: 2021-06-13 21:01:29 ERROR - Failed to write ILM
Jun 13 21:01:29 stefan-manjaro xow[488]: terminate called after throwing an instance of 'Mt76Exception'
Jun 13 21:01:29 stefan-manjaro xow[488]:   what():  Failed to load firmware
Jun 13 21:01:29 stefan-manjaro systemd[1]: xow.service: Main process exited, code=dumped, status=6/ABRT

Is it related or should I open a new issue?

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

No branches or pull requests

6 participants