You are not logged in.

#1 2023-11-21 00:49:00

akino512
Member
Registered: 2023-11-20
Posts: 17

[SOLVED] USB ports didn't work until turned Bluetooth on/off.

I am not very good at English but want help.
My USB stick could have been recognized correctly by my laptop before. But recently when I plugged my USB stick into my laptop, nothing happened.
The USB device didn't show in "lsusb" or "fdisk -l".I already installed udisks2 and udiskie and ran "udiskie" as a deamon.
The weird thing is that when I turned Bluetooth on(or off), the USB stick was recognized immediately.
It seems that these USB ports were on suspension and the action of turning Bluetooth on/off resumed these ports.

1. If keeping the USB stick plugged in, it could be recognized after rebooting.
2. This also happens to other USB devices like mouse.
3. Everything is ok on Windows(same device with dual-boot).

journalctl -b :http://ix.io/4M1m
I'm not very sure,but the most likely reason may be this:

[    0.473827] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [SAC1] at bit offset/length 64/64 exceeds size of target Buffer (64 bits) (20230628/dsopcode-198)

Last edited by akino512 (2023-12-02 21:41:46)

Offline

#2 2023-11-26 19:18:57

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Hi,
please post 3x "journalctl -b":
- fresh boot, without usb stick, wait a minute, then insert usb stick   (you say: here it won't work ?)
- then: after turning Bluetooth on/off  (you say: now it works ok ?)
- insert stick before boot, then boot  (you say: here it works ok ?)

To keep the log clean, please do nothing else.

Offline

#3 2023-11-26 20:54:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Do you dual boot with other operating systems, like Microsoft Windows?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2023-11-26 22:18:25

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

3. Everything is ok on Windows(same device with dual-boot).

3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

Offline

#5 2023-11-27 00:19:42

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

ua4000 wrote:

Hi,
please post 3x "journalctl -b":
- fresh boot, without usb stick, wait a minute, then insert usb stick   (you say: here it won't work ?)
- then: after turning Bluetooth on/off  (you say: now it works ok ?)
- insert stick before boot, then boot  (you say: here it works ok ?)

To keep the log clean, please do nothing else.

I did the following step-by-step.
  1. Startup my laptop and log into Archlinux -> get log A
  2. Insert USB stick -> get log B
  3. Turn on Bluetooth -> get log C
  4. Reboot my laptop and log into Archlinux -> get log D
logA : http://ix.io/4Mz6
logB : http://ix.io/4Mz7
logC : http://ix.io/4Mz8
logD : http://ix.io/4Mz9

Offline

#6 2023-11-27 00:33:41

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

ewaller wrote:

Do you dual boot with other operating systems, like Microsoft Windows?

Yes, I installed grub on my laptop for dual-booting(Archlinux and Windows10). I also have a desktop with dual-booting, but this problem only happens to my laptop.
I think the difference between my desktop and laptop is that a proprietary nvidia driver was installed on my laptop.
So I uninstalled that driver(package nvidia and nvidia-utils) and found that installing(or uninstalling) nvidia-utils also makes the USB port work as same as turning on/off Bluetooth.
But I don't want to turn on/off Bluetooth every time I use my USB stick. I want it to be recognized once it is plugged in.

Offline

#7 2023-11-27 00:35:36

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

seth wrote:

3. Everything is ok on Windows(same device with dual-boot).

3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

I had already disabled Win10 fast startup, but it does not help.

Offline

#8 2023-11-27 07:30:19

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Did you check it's still disabled (because windows re-enables it with updates)?

found that installing(or uninstalling) nvidia-utils also makes the USB port work as same as turning on/off Bluetooth

This sounds as if it is some sort of PSU issue => do you get the same behavior on battery and external power?
Do you get the same behavior in a graphical session and just the multi-user.target?

Hasee Computer PF4WN2F/PF4WN2F, BIOS N.1.07 07/24/2019

What kind of laptop is this? Are there BIOS updates avialable?

From your journal it has hybrid graphics, please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General

Offline

#9 2023-11-27 20:21:39

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Did you check it's still disabled (because windows re-enables it with updates)?.

I checked my Windows10 today, and the fast startup is disabled.

This sounds as if it is some sort of PSU issue => do you get the same behavior on battery and external power?

Same behavior on battery and external power.

Do you get the same behavior in a graphical session and just the multi-user.target?

My working environment: xserver(with xinit) and Xmonad as a window manager.
Same behavior on my window manager and multi-user.target?(is that the console where I run "startx"?)

What kind of laptop is this? Are there BIOS updates avialable?

A normal laptop that was bought in 2019. Hasee is its vendor name. I have searched the internet and can't find any new Bios updates.

---
I did some new testing Today. I installed gdm(gnome display manager) and found that as long as gdm is installed, USB ports always work on my window manager, even when launched from xinit.
  1. gdm installed, launched from gdm -> USB ports work
  2. gdm installed, launched from xinit -> USB ports work
  3. gdm installed, on console where run "startx" -> USB ports don't work
  4. gdm uninstalled,  launched from xinit -> USB ports don't work
This is weird because my desktop never installed gdm but its USB ports work.

logs(journalctl and Xorg.0.log):
launched from xinit with gdm uninstalled : http://ix.io/4MDN http://ix.io/4MDO
launched from xinit with gdm installed : http://ix.io/4MDP http://ix.io/4MDQ

Last edited by akino512 (2023-11-27 20:27:44)

Offline

#10 2023-11-27 20:58:46

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

(is that the console where I run "startx"?)

Yes. Importantly /before/ running startx.

According to that journal, GDM isn't even running.
Are you suggesting that merely installing GDM, but not even starting it but normally start the server via xinit/startx allows you to get the usb devices show up?
That sounds nuts.

This is weird because my desktop never installed gdm but its USB ports work.

I'm fairly sure this is down to some undercurrent/voltage and very specific to the very hardware in front of you.
The trick is to figure a way to get it provide more current/voltage to the bus.

Doesn't look like you're using TLP, are you?
What if you install and configure that to save power as much as possible and hopefully have some spare for the usb?

Offline

#11 2023-11-27 23:11:10

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Are you suggesting that merely installing GDM, but not even starting it but normally start the server via xinit/startx allows you to get the usb devices show up?

That's right.After GDM is installed, the file "/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh" is generated.

#!/bin/sh

case "${DESKTOP_SESSION-}" in
  gnome*) # Done by gnome-settings-daemon
  ;;
  *)
    # Extra check in case DESKTOP_SESSION is not set correctly
    if [ -z "${GNOME_DESKTOP_SESSION_ID-}" ]; then
      GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module"
      export GTK_MODULES
    fi
  ;;
esac

We know that startx will scan these files and execute them according to the .xinit default configuration.
I am sure the key is `GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module"`.
That's because I just added this line(with 'export') to my .bash_profile and ran startx with a single line command "exec xmonad" and then the USB port worked.

Doesn't look like you're using TLP, are you?
What if you install and configure that to save power as much as possible and hopefully have some spare for the usb?

I had installed some power managers before, but I removed them all.
I just use "light" for the backlight, "xss-lock" and "xset" for the lock and auto lock.
I tried 3 different USB sticks and 1 mouse. Their behavior is the same.

Last edited by akino512 (2023-11-27 23:31:36)

Offline

#12 2023-11-28 08:58:44

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

That's because I just added this line(with 'export') to my .bash_profile and ran startx with a single line command "exec xmonad" and then the USB port worked.

That. Is. Nuts.

https://archlinux.org/packages/extra/x8 … bcanberra/ is a dependency of GDM, though and draws a bunch of other sound related dependencies.
So this has something to do w/ your sound configuration?
Do you use some usb soundcard or headphones?

Also check your pacman log what other packages got installed w/ GDM itr.

Offline

#13 2023-11-28 17:02:12

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Maybe a shot worth: try booting from a clean arch installation medium, and then retest. Or maybe with an live Ubuntu DVD with GUI...

Offline

#14 2023-11-28 18:35:09

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

thank you guys.

When I purchased this laptop I knew very little about Linux.Now I know Nvidia doesn't fully support Linux, and dual graphics cards are harder to handle.
Hasse is a vendor from China that only makes cheap devices and does not have enough technology to fix hardware/firmware errors.
As it could be caused by an unknown hardware error or driver compatibility, there is no value in spending time on a defective device.
If this doesn't happen widely, I'd like to ignore it since it's not a critical issue.

Should I close this topic (add [closed] in the title?), or just leave it alone. Sorry, I'm new here.

Last edited by akino512 (2023-11-28 18:38:25)

Offline

#15 2023-11-28 21:16:40

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

"[hardware bug]", though you "solved" it by installing GDM.
I'm still kinda curious what the effective part of that was/is and it might help you to narrow the issue down.
You most likely can however remove GDM again, just keep canberra…

Offline

#16 2023-11-29 00:39:39

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

You most likely can however remove GDM again, just keep canberra…

I removed GDM but kept libcanberra. Yes, it works only with canberra.
But why I need an extra package to make my USB ports work properly.
Why does this package solve my problem.
I got the solution just because I happened to have GDM installed.
---
I saw another topic created recently about USB. If anyone else has a similar problem, does that mean it's a bug in the kernel?
https://bbs.archlinux.org/viewtopic.php?id=290627

Offline

#17 2023-11-29 07:41:54

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

The other thread is a known and longstanding issue w/ the lenovo system.
Does the LTS kernel work as expected for you?

Why does this package solve my problem.

I'm not even convinced that it's canberra.

seth wrote:

[canberra] … draws a bunch of other sound related dependencies.
So this has something to do w/ your sound configuration?
Do you use some usb soundcard or headphones?

Also check your pacman log what other packages got installed w/ GDM itr.

The latter would be your /var/log/pacman.log and the initial GDM installation part might be interesting.

Offline

#18 2023-11-29 18:06:12

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

The latter would be your /var/log/pacman.log and the initial GDM installation part might be interesting.

I removed libcanberra and downgrade linux from linux-6.6.2.arch1-1 to linux-6.5.9.arch2-1.
On this release, these USB ports work properly without libcanberra.
pacman.log https://0x0.st/HxKJ.log

---
When I just installed arch linux on my laptop, the audio didn't work.
I installed PulseAudio and PipeWire separately, but still no sound.
This can only be fixed after installing proprietary Nvidia driver.
But I've never heard of this.Is there a sepcial architecture in my laptop?

Offline

#19 2023-11-29 19:46:21

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Did you test 6.6.2 w/o libcanberra? Because I severely doubt that canberra is the critical element - it'll be rather one of its dependencies down the road (or sth. entirely different you installed along GDM.

Offline

#20 2023-11-29 20:35:37

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

Did you test 6.6.2 w/o libcanberra? Because I severely doubt that canberra is the critical element - it'll be rather one of its dependencies down the road (or sth. entirely different you installed along GDM.

Yes, I completely removed GDM (pacman -Rs gdm) and installed libcanberra manually (pacman -S libcanberra).

The result is as follows (6.6.1 behaves the same as 6.6.2):
6.6.2:
libcanberra installed  -> USB working
libcanberra removed -> USB not working
6.5.9:
libcanberra installed  -> USB working
libcanberra removed -> USB working

Offline

#21 2023-11-29 20:44:18

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

/only/ libcanberra removed? (*not* "pacman -Rs libcanberra")

Wrt the other thread: does TLP help you as well?

Offline

#22 2023-11-30 14:21:21

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

/only/ libcanberra removed? (*not* "pacman -Rs libcanberra")

On version 6.6.2, if I remove libcanberra but keep its dependencies, the USB port does not work.
But I found something new that suggests libcanberra might not be the critical point.

On version 6.6.2 without libcanberra or its dependencies :
1. Start fresh and insert the USB memory stick. The USB stick is not recognized(as expected).
2. Play a video file or browsing some websites.The USB stick get recognized.
3. Remove the USB memory stick and reinsert it. The USB could always be recognized.

It seems that the real key point is not libcanberra but emm..CPU usage?
Low CPU usage, like opening a terminal and switching to a directory -> doing nothing on the USB port
Mid CPU usage, such as turning Bluetooth on/off -> makes the USB port only work until you unplug it.
High CPU usage, such as playing videos -> keep USB port always working until next boot.
Is it just libcanberra ran sth causing high CPU usage, leading us to believe it fixed the bug?

Wrt the other thread: does TLP help you as well?

Maybe a power manager is necessary, I'll try it later

Offline

#23 2023-11-30 18:59:34

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

libcanberra is used to play sound notifications, no idea how its mere presence would cause higher power states.
Can you make the USB appear w/

echo "scale=5000; a(1)*4" | bc -l # calculates a lot of digits of Pi

Offline

#24 2023-12-01 15:27:00

akino512
Member
Registered: 2023-11-20
Posts: 17

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

seth wrote:

libcanberra is used to play sound notifications, no idea how its mere presence would cause higher power states.
Can you make the USB appear w/

echo "scale=5000; a(1)*4" | bc -l # calculates a lot of digits of Pi

Running this command results in higher CPU usage and I can hear the fan spinning faster.
But nothing happened with the unrecognized USB stick.
Maybe it's not CPU usage but GPU usage or something else.

Offline

#25 2023-12-01 17:25:25

seth
Member
Registered: 2012-09-03
Posts: 51,721

Re: [SOLVED] USB ports didn't work until turned Bluetooth on/off.

seth wrote:

[canberra] is a dependency of GDM, though and draws a bunch of other sound related dependencies.
So this has something to do w/ your sound configuration?
Do you use some usb soundcard or headphones?

Play a video file or browsing some websites.The USB stick get recognized.

Does

speaker-test

trigger the USB?

Offline

Board footer

Powered by FluxBB