-
Notifications
You must be signed in to change notification settings - Fork 90
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
High CPU load with libusb-1.0.24 #141
Comments
I have the same issue here on gentoo and found that the problem is only present with libusb-1.0.24. going back to libusb-1.0.23 does not have this problem. |
Same issue on debian bullseye, also with libusb-1.0.24; I'm trying to roll back to a different libusb version to test if that solves the cpu load for me too, but it's proving to be a bit tricky. |
Confirmed with libusb 1.0.24. Nothing suspicious in debug logs (no difference between running with 1.0.23). |
I'm seeing the same on Arch. High CPU with libusb-1.0.24, downgrading to libusb-1.0.23 resolves it. |
Same with libusb 1.0.24 on Arch. And downgrade to 1.0.23 resovle it. |
Also had this issue with arch after updating my system today. Here's the command to downgrade libusb: sudo pacman -U /var/cache/pacman/pkg/libusb-1.0.23-3-x86_64.pkg.tar.zst also edit /etc/pacman.conf to have |
Confirming the issue on Arch with 5.10.7-xanmod1-1. Downgrading libusb also fixed it for me, but I didn't have the old version in my cache. Installing directly from archive.archlinux.org worked perfectly for me however, just restart the xow service or replug the adapter after you're downgraded. Here's the command if your cache doesn't have the old version.
|
You should just use downgrade to downgrade packages, it's much easier when you do not have it in cache. As for the rest, I am not convinced the dev needs people confirming this again and again, the first couple times were probably enough. |
So we've got two options:
Just to give you an idea if someone wants to go ahead and track this down. |
Apologies for the previous stupid reply, since I don't use my dongle, I didn't notice the software did not use CPU because it died with that line... I believe this is it: libusb/libusb@d67eb5b Alas this is a big change, not so easy where the issue is from. If you want this commit to not crash you need to remove the assert as in: libusb/libusb@4b64ecc I hope that's better. |
i have this same issue, and it appears to be libusb_bulk_transfer taking up most of the time |
Seeing this on opensuse TW as well, haven't yet found a way to downgrade libusb to 1.0.23 like others here have suggested |
Ok, so after literally hours of debugging I think I've found the culprit: xow reads USB packets from the dongle using EDIT: See libusb/libusb#858. I should've checked the issue tracker... |
I was having a strange high cpu load and high cpu temperatures.... i took almost a week to find out that it was xow (actually libusb) that was causing the issue. I'm subscribing to the issue. |
Thank you very much for the command, I can confirm the same issue on Manjaro with libusb-1.0.24 |
I have the same on OpenSuSE Tubmbleweed with libusb 1.0.24-2.1. Unfortunatly I can't seem to find a 1.0.23 version. I have gone over to enabling/disabling xow on a need-to-play basis as a temp workaround. Update 2021-03-29: Managed to find a 1.0.23 version and downgrade. Runs smoothly now. |
Workaround for Fedora 34With fedora 34 libusbx is also updated to 1.0.24. Since this is the lowest release in f34 there is no easy downgrade just via dnf first you need to download the RPM files I got mine here and downloaded these RPMs for my system (x64) run the downgrade of the installed versions to lock the version, so it will not be upgraded by dnf upgrade, I versionlocked them with the dnf-versionlock plugin
|
Exact same issue here with xow and latest libusb master libusb/libusb#913 |
libusb #856 should fix this issue as it fixes libusb/libusb#858. The pull request has been reviewed, just pending the merge for 1.0.25 release. |
I can confirm, the pending PR fixes the issue for me 👍 |
libusb gets only one release a year and they have no rush. This will take many more months until it gets released. |
I'm not quiet sure, on their roadmap it is planned for end of June, this means in a bit more than one month: |
Oh, I didn't knew about that. Was only looking for the past releases and those were mostly annual. |
We do not have enough developers in libusb so the release is taking a bit of time. The date indicated in the milestone is more like an estimate so no guarantee. Hopefully we will get libusb 1.0.25 released soon. |
I replaced |
Hi, I did not really want to downgrade libusbx system wide, so used LD_LIBRARY_PATH/LD_PRELOAD
|
Had the same issue. Installing libusb from source fixed it. |
This might help someone else on Debian (Bullseye for me, but should apply to others). I built and installed the latest libusb straight from github, but xow wouldn't use it - it kept using the buggy version (installed in /usr/lib/x86_64-linux-gnu) instead of the one I'd just built and installed (/usr/local/lib), despite pkg-config picking up the new one. Rather than doing something messy like copying/moving the files from /usr/local/lib to /usr/lib/x86_64-linux-gnu or changing some symlinks, I built xow with: |
If anyone wants a slightly more elegant (though longer) Debian solution, here's what I did to cleanly package the lastest git as a Debian package, and installed it as an upgrade. First, clone the git repo as usual:
Then install the build scripts, build dependencies for libusb and fetch the source package:
Next, copy the
By default it will add a .1 to the latest version (at the time of writing is 2:1.0.24-3... so 2:1.0.24-3.1. I opted to change -3 to -7, so it will skip the next couple security updates to 0.24, but should be replaced automatically by the real 1.0.25 when that comes out. The top of my file ended up as:
Save and close the file. At this point, you can build the package:
If you only have one architecture, you are done here and can go ahead and install the generated .deb files in the parent folder (exact list may vary depending on what you already have installed):
However, if you have the i386 version of the package installed too (which is common if you use wine), you need to build both and install them at the same time. That requires a bit more effort, because you'll need the i386 dependencies too. What worked for me was to use
It will print out missing i386 dependencies, which you can then install:
It's not perfect though. I was also missing objcopy, so I also installed it as follows:
Then you can build the i386 package:
If all goes well, you should have all the packages you need. If you find yourself missing a tool or package, install it (possibly using Then, you can install both the amd64 and i386 packages at the same time:
|
high cpu usage still occurs with libusb1.0.24-2 |
@unholyN1 The fix for the high cpu issue is planned to be included in libusb 1.0.25 which is still undergoing their pre-release review process: libusb/libusb#777 |
|
FYI libusb-1.0.25 has just been released today. Hopefully various Linux distro will be able to catch up soon. |
Just got 1.0.25 on Arch and it seems to have fixed the issue. |
I have xow installed on two machines running Debian bullseye (testing) and it used to worked nicely without causing any trouble.
Now since a few days, I was wondering why two CPU cores were always pretty busy and found out that xow was at ~160% CPU load. I see this behaviour on both machines running Debian bullseye independently, so it is probably caused by a recent package update. Both machines are running kernel 5.9.0-4-amd64 #1 SMP Debian 5.9.11-1 (2020-11-27) x86_64 GNU/Linux.
The cpu load drops to virtually nothing as soon as I unplug the wireless dongle, but rises again to 160% after reinserting the dongle.
Any ideas on this?
The text was updated successfully, but these errors were encountered: