Usb and Bluetooth are periodically disabled until a reboot

Hi everyone, this is my first post here and my first time using Fedora for any real period of time.

I’m running Fedora 35 on a Hp envy x-360. I have run into an issue where periodically my USB ports and Bluetooth, if I am using it, gets disabled. It can happen within the span of hours or a couple of days. I have tried disabling TLP since that has caused USB issues for me in the past, but that hasn’t seemed to fix it. When my USB ports go out, I cannot access any devices that I plug in. This has happened with a USB C SSD, my Logitech mouse, and my game controller to name a few. It also disconnects my Bluetooth headphones and my Bluetooth game controller when the Bluetooth goes out at the same time. USB and Bluetooth seem to be the only things that go down. The only fix is a reboot.

This only started happening recently, so it could be a kernel update that caused it. I have tried using the oldest kernel shown in grub, but that doesn’t fix the issue. I also only recently got my mouse, which is a Logitech G305 Lightspeed, so maybe it’s related to that. Another thing of note is that I am dualbooting with Windows 10.

There was another similar thread with my same laptop, where someone was having issues with their USB ports and webcam, but their USB ports didn’t work almost immediately after boot and my webcam still works. The person also solved the issue by reinstalling the OS, which is something I’d rather not do.

Since I’m a new user on these forums, I cannot post links to all the outputs of the commands I have run. I have run lsusb, lspci, journalctl -rb, dmesg, inxi -Fxx, and I have a screenshot of my disk partitioning from gnome-disks. These logs and commands were all taken after my USB ports had been disabled, and were inoperable. If any of these outputs would be useful, I’ll provide links to their outputs.

Hi, maybe you want to try with:

# Bisable bluetooth powe saving
sudo grubby --args="btusb.enable_autosuspend=0" --update-kernel=ALL

# To remove above config in case it's not work
sudo grubby --remove-args="btusb.enable_autosuspend=0" --update-kernel=ALL

Alright, hopefully that helps. It’s really hard to test, though, since it happens so randomly. I just realized that Bluetooth seems to be on the USB bus, which would make sense that it goes out at the same time as the USB ports.

I just had my USB go out again, Bluetooth was turned off, but I could turn it back on in gnome settings and connect to a device. That leads me to believe that whatever service runs the USB ports just needs to be restarted. Not sure if that is possible, though. Here’s my journalctl -rb

This seems like a pretty janky workaround, since I still have random outages that disrupt my work, so I’m hesitant to mark it as a solution and would like to know why my problem is happening. Using the script at this link GitHub - mcarans/resetusb: List USB devices and reset a USB device from the command line is able to reset the pci device for my USB 3 ports (and the separate pci device for my bluetooth adapter, but that really messed it up). After reset, my USB 3 ports work as intended, and my bluetooth can be brought back up by turning it off and then back on again in gnome-settings, or with “sudo systemctl restart bluetooth”

about 20 minutes after reseting everything it went out again.

1 Like

It seems like gnome-shell reports issues in journalctl every time I have these issues, so as much as it pains me to do this, I’m going to disable all my extensions. Just lost caffeine, gsconnect, blur my shell, and access to nextcloud via topicons reloaded.

(post deleted by author)

:thinking: I just read again your post. It’s must be USB and not particularly to bluetooth dongle.

I found this from other distro. There a setting to make it sleep for 1 sec. To disable it, it should be -1. You can try by adding it directly to kernel boot parameter with sudo grubby --args="usbcore.autosuspend=-1" --update-kernel=ALL

Awesome, I’ll try it out.

No dice, it happened again
I looked through the logs a bit more and found this

xhci_hcd 0000:03:00.3: WARNING: Host System Error

xhci apparently runs USB 3 ports, which all of my ports are.

While googling this error I found that sometimes it can be caused by a voltage issue. I found a feature in my bios that allows devices to charge via usb while the computer is off, so I turned that off.

Happened again, same error message, only had my Bluetooth headphones connected this time, no USB devices.

My problem may be related to this bug 2030202 – usb issues with 5.15.6-200.fc35
I didn’t always have this problem, so it may be related to a kernel update, but I don’t have a kernel old enough in grub that works and haven’t pursued changing kernels further.

I tried to search the error message above and only get 2 links that look like related. The first one from here that advicing to uninstall tlp and the other one from here that advicing after disable tpl for usb, then disabling ASPM for battery and AC.

If I’m not missunderstanding:

# /etc/tlp.conf

:thinking: Btw, I tried also to find tlp kind of thing in my system and can’t find it. And btw Gnome already have a setting to set the power management.

One of the first things I did was disable tlp because it has caused me issues in the past with usb. I disabled its service with systemctl and just went into the config file and disabled tlp from there. I’m still having problems quite regularly, and I’m beggining to think it’s a kernel related issue. Is there a good way to downgrade to an older kernel?

Also gnome’s power settings don’t appear on my system, so I think there’s some hardware incompatability.

Would you like to try uninstall tlp first, then run sudo dnf distro-sync to find any missing dependency packages and install it. Reboot your system to see if Gnome Power management come back. With this we give another try to default configuration to manage your system and avoiding conflict.

If with Gnome power management (with complete uninstall tlp) the problem persist, you can select previous kernel from boot list (if boot list not shown, press and hold left shift when the display showing your device manufacture logo).

Sounds great, I followed your directions and the gnome power profiles did not appear. It never actually has for me on solus or fedora. There’s an asterisk on the gnome release notes about power profiles that says something like *on supported devices, so I think my laptop is one of those unsupported devices.

We’ll see if my usb goes out again, but if not I don’t have any kernels in grub older than when this problem started happening, so is there a way to manually regress my kernel with dnf?

I’m not sure with dnf, but we can use koji.

# Search kernel build
koji list-builds --package=kernel | grep "fc35"

# Download with: 
# koji download-build --arch=x86_64 <kernel-packages-from-above-result>
# for example as bellow:
koji download-build --arch=x86_64 kernel-5.14.0-60.fc35

# Above will download bunch of kernel packages. 
# We only need to install some of them as a basic installation
# For example:
- kernel-5.14.0-60.fc35
- kernel-core-5.14.0-60.fc35
- kernel-modules-5.14.0-60.fc35
- kernel-modules-extra-5.14.0-60.fc35
1 Like

About you Gnome power profile, please check with systemctl status power-profiles-daemon. If it currently disabled, enable it with systemctl enable power-profiles-daemon then systemctl start power-profiles-daemon to start it. Or just reboot it.

Most of the time, at least it will give balanced and power saver profile. For the performance only appear on supported devices.

1 Like

Holy crap, the power profiles work now. I’ve never gotten it to work before. It turns out power-profiles-daemon was uninstalled, so I reinstalled it and enabled the systemd module and now it works. It even has the performance profile.

Thank you so much for all your help so far, I really appreciate it :grin:

Now I’m just waiting to see if the usb ports go out again, and if so I’ll regress the kernel with your instructions.

1 Like

It’s been quite a bit since my ports have blacked out, so I think the problems solved. Thank you @oprizal for all your help and for even getting my gnome power profiles back up and running!

1 Like