Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB ports don't work after boot.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
oddman621
n00b
n00b


Joined: 31 Aug 2016
Posts: 5

PostPosted: Mon Apr 24, 2017 2:14 am    Post subject: USB ports don't work after boot. Reply with quote

This is weird. My system successfully cognizes USB hardware:

Code:
$ dmesg | grep -i usb
[    0.363599] ACPI: Power Resource [USBC] (on)
[    0.464757] ACPI: bus type USB registered
[    0.464812] usbcore: registered new interface driver usbfs
[    0.464843] usbcore: registered new interface driver hub
[    0.464877] usbcore: registered new device driver usb
[    0.873326] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.873649] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    0.874864] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.874873] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.874884] usb usb1: Product: xHCI Host Controller
[    0.874891] usb usb1: Manufacturer: Linux 4.10.9-gentoo xhci-hcd
[    0.874898] usb usb1: SerialNumber: 0000:00:14.0
[    0.875161] hub 1-0:1.0: USB hub found
[    0.876269] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    0.876363] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    0.876372] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.876383] usb usb2: Product: xHCI Host Controller
[    0.876390] usb usb2: Manufacturer: Linux 4.10.9-gentoo xhci-hcd
[    0.876397] usb usb2: SerialNumber: 0000:00:14.0
[    0.876671] hub 2-0:1.0: USB hub found
[    0.876961] usbcore: registered new interface driver usb-storage
[    0.903546] usbcore: registered new interface driver usbhid
[    0.903547] usbhid: USB HID core driver
[    1.369960] usb 1-2: new full-speed USB device number 2 using xhci_hcd
[    1.624660] usb 1-2: New USB device found, idVendor=0bda, idProduct=b723
[    1.624666] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.624670] usb 1-2: Product: Bluetooth Radio
[    1.624674] usb 1-2: Manufacturer: Realtek
[    1.624678] usb 1-2: SerialNumber: 00e04c000001
[    1.848718] usb 1-4: new high-speed USB device number 3 using xhci_hcd
[    2.103974] usb 1-4: New USB device found, idVendor=058f, idProduct=6254
[    2.103981] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.105111] hub 1-4:1.0: USB hub found
[    2.390445] usb 1-4.3: new high-speed USB device number 4 using xhci_hcd
[    2.551246] usb 1-4.3: New USB device found, idVendor=04f2, idProduct=b43b
[    2.551249] usb 1-4.3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    2.551252] usb 1-4.3: Product: Chicony USB 2.0 Camera
[    2.551254] usb 1-4.3: Manufacturer: Chicony Electronics Co.,Ltd.
[    2.551256] usb 1-4.3: SerialNumber: 0x0001


But when I connect some USB devices, It responses nothing, and doesn't recognize the connected devices. Not even debug or error message.
Code:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04f2:b43b Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 002: ID 0bda:b723 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


The weird thing is, when I connect USB devices before boot(before power on a computer), then turn on, the system recognizes the devices, and works successfully. (on this case, I connected Sandisk Cruzer Blade 64GB before boot)
Code:
$ dmesg | grep -i usb
[    0.364626] ACPI: Power Resource [USBC] (on)
[    0.465731] ACPI: bus type USB registered
[    0.465783] usbcore: registered new interface driver usbfs
[    0.465818] usbcore: registered new interface driver hub
[    0.465854] usbcore: registered new device driver usb
[    0.875160] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.875485] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    0.876749] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.876759] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.876769] usb usb1: Product: xHCI Host Controller
[    0.876776] usb usb1: Manufacturer: Linux 4.10.9-gentoo xhci-hcd
[    0.876783] usb usb1: SerialNumber: 0000:00:14.0
[    0.877082] hub 1-0:1.0: USB hub found
[    0.878024] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    0.878097] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    0.878106] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.878117] usb usb2: Product: xHCI Host Controller
[    0.878124] usb usb2: Manufacturer: Linux 4.10.9-gentoo xhci-hcd
[    0.878131] usb usb2: SerialNumber: 0000:00:14.0
[    0.878385] hub 2-0:1.0: USB hub found
[    0.878761] usbcore: registered new interface driver usb-storage
[    0.906413] usbcore: registered new interface driver usbhid
[    0.906414] usbhid: USB HID core driver
[    1.364299] usb 1-2: new full-speed USB device number 2 using xhci_hcd
[    1.618446] usb 1-2: New USB device found, idVendor=0bda, idProduct=b723
[    1.618453] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.618457] usb 1-2: Product: Bluetooth Radio
[    1.618462] usb 1-2: Manufacturer: Realtek
[    1.618466] usb 1-2: SerialNumber: 00e04c000001
[    1.841259] usb 1-4: new high-speed USB device number 3 using xhci_hcd
[    2.096389] usb 1-4: New USB device found, idVendor=058f, idProduct=6254
[    2.096400] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.097246] hub 1-4:1.0: USB hub found
[    2.384960] usb 1-4.3: new high-speed USB device number 4 using xhci_hcd
[    2.545779] usb 1-4.3: New USB device found, idVendor=04f2, idProduct=b43b
[    2.545781] usb 1-4.3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    2.545782] usb 1-4.3: Product: Chicony USB 2.0 Camera
[    2.545784] usb 1-4.3: Manufacturer: Chicony Electronics Co.,Ltd.
[    2.545786] usb 1-4.3: SerialNumber: 0x0001
[    2.625522] usb 1-4.4: new high-speed USB device number 5 using xhci_hcd
[    2.726752] usb 1-4.4: New USB device found, idVendor=0781, idProduct=5567
[    2.733294] usb 1-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.739839] usb 1-4.4: Product: Cruzer Blade
[    2.742044] usb 1-4.4: Manufacturer: SanDisk
[    2.744082] usb 1-4.4: SerialNumber: 4C530001291219111125
[    2.746717] usb-storage 1-4.4:1.0: USB Mass Storage device detected
[    2.751972] scsi host2: usb-storage 1-4.4:1.0


Code:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 004: ID 04f2:b43b Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 002: ID 0bda:b723 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



I googled every day during weekend, but didn't found the solution.. :(


Here's what I tried:

1. Modify kernel (checked USB devices setting such as xhci, ehci, hostsideusb, etc. Also I tried turn on/off IOMMU but doesn't work.)
2. Check groups (Make sure my account is on usb group.)
3. Booting other Live Medium (Linux Mint 18.1 recognizes connected USB devices after boot, so this is not UEFI/BIOS problem)
4. Trying Genkernel (Kernel Panic. :?)



Here's my pc spec:

CPU - Bay-trail N2840(2.16Ghz)
RAM - PC3-12800 4GB * 2
SSD - 128GB
HDD - 500GB

Gentoo 64bit UEFI, Kernel version: 4.10.9



Here's current kernel config(/proc/config.gz):

https://pastebin.com/9isdHRfe




Here's entire dmesg:

https://pastebin.com/qg5KYPQb



EDIT:
One more thing I just found, when I connect USB memory after boot, few minutes later the USB memory gets hot.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Apr 24, 2017 8:51 pm    Post subject: Reply with quote

Quote:
3. Booting other Live Medium (Linux Mint 18.1 recognizes connected USB devices after boot, so this is not UEFI/BIOS problem)


I suggest that you compare that kernel with your current kernel. Than apply those changes.
Back to top
View user's profile Send private message
oddman621
n00b
n00b


Joined: 31 Aug 2016
Posts: 5

PostPosted: Wed May 03, 2017 2:24 am    Post subject: Reply with quote

Roman_Gruber wrote:
I suggest that you compare that kernel with your current kernel. Than apply those changes.

The live medium doesn't have any kernel config file, neither "/proc/config.gz" or "/boot/config".

I finally found a reason why. It was 'laptop_mode'. I don't know exactly how this affects to usb, I think this service modulates the usb power so the devices couldn't be recognized because of lack of power, maybe?

So I am trying to modify some laptop_mode files. I'll edit this post when I find a solution.
Back to top
View user's profile Send private message
oddman621
n00b
n00b


Joined: 31 Aug 2016
Posts: 5

PostPosted: Wed May 03, 2017 5:16 am    Post subject: Reply with quote

Found. laptop_mode autosuspends usb.

Add this to runtime-pm.conf

Code:
CONTROL_USB_AUTOSUSPEND="0"




But still I have a question.

In my config file there is a blacklist that makes USB(usbhid and usb-storage) be no autosuspended.

Code:
# Enable Runtime autosuspend feature?
# Set to 0 to disable
CONTROL_RUNTIME_AUTOSUSPEND=1

# Set this to use opt-in/whitelist instead of opt-out/blacklist for deciding
# which devices should be autosuspended.
# AUTOSUSPEND_USE_WHITELIST=0 means AUTOSUSPEND_*_BLACKLIST will be used.
# AUTOSUSPEND_USE_WHITELIST=1 means AUTOSUSPEND_*_WHITELIST will be used.
AUTOSUSPEND_USE_WHITELIST=0

# The list of Device IDs that should not use autosuspend. Use system commands or
# look into sysfs to find out the IDs of your devices.
# Example: AUTOSUSPEND_DEVID_BLACKLIST="046d:c025 0123:abcd"
AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST=""

# The list of device driver types that should not use autosuspend.  The driver
# type is given by "DRIVER=..." in a device's uevent file.
# Example: AUTOSUSPEND_DEVID_BLACKLIST="usbhid usb-storage"
AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST="hub usbhid usb-storage"

# The list of Device IDs that should use autosuspend. Use system commands or
# look into sysfs to find out the IDs of your devices.
# Example: AUTOSUSPEND_DEVID_WHITELIST="046d:c025 0123:abcd"
AUTOSUSPEND_RUNTIME_DEVID_WHITELIST=""

# The list of device driver types that should use autosuspend.  The driver
# type is given by "DRIVER=..." in a device's uevent file.
# Example: AUTOSUSPEND_DEVTYPE_WHITELIST="usbhid usb-storage"
AUTOSUSPEND_RUNTIME_DEVTYPE_WHITELIST=""



But for all that, my system still doesn't recognize usb devices without "CONTROL_USB_AUTOSUSPEND=0" options, so all above these don't work, I think.



Any suggestion?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum