Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB ports don't work
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
BlueManCZ
n00b
n00b


Joined: 11 Mar 2017
Posts: 9

PostPosted: Sat Mar 11, 2017 1:28 pm    Post subject: USB ports don't work Reply with quote

I have a motherboard Gigabyte Z170-D3H with a fresh Gentoo Linux installed (self-compiled kernel 4.9.6-gentoo-r1) and few USB devices connected (Flashdrive, Keyboard and Mouse). But USB ports don't work.

When I type lsblk, there is only my system disk sda.

lspci | grep USB returns:
Code:
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)

lsusb returns:
Code:
libusb: debug [libusb_init] created default context
libusb: debug [libusb_init] libusb v1.0.19.10903
libusb: error [op_init] could not find usbfs
unable to initialize libusb: -99

dmesg | grep 'USB\|usb' returns:
Code:
[    0.293570] ACPI: bus type USB registered
[    0.293665] usbcore: registered new interface driver usbfs
[    0.293756] usbcore: registered new interface driver hub
[    0.293850] usbcore: registered new device driver usb
[    0.987392] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.987449] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.987487] uhci_hcd: USB Universal Host Controller Interface driver
[    0.987548] usbcore: registered new interface driver usblp
[    0.987592] usbcore: registered new interface driver usb-storage
[    0.992362] usbcore: registered new interface driver usbhid
[    0.992376] usbhid: USB HID core driver

And usb-devices returns nothing.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Mar 11, 2017 1:40 pm    Post subject: Reply with quote

BlueManCZ ...

I don't see XHCI in dmesg so it's probably not enabled, what does the following show:

Code:
% if [[ -f /proc/config.gz ]]; then zgrep XHCI /proc/config.gz || grep XHCI /usr/src/linux-$(uname -r)/.config ; fi

HTH & best ... khay
Back to top
View user's profile Send private message
BlueManCZ
n00b
n00b


Joined: 11 Mar 2017
Posts: 9

PostPosted: Sat Mar 11, 2017 3:55 pm    Post subject: Reply with quote

Thanks for reply khayyam.

It doesn't show anything, because file /proc/config.gz doesn't exist.

EDIT #1

This command:
Code:
grep XHCI /usr/src/linux-$(uname -r)/.config

shows:
Code:
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PLATFORM=y
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Mar 11, 2017 9:38 pm    Post subject: Reply with quote

BlueManCZ wrote:
It doesn't show anything, because file /proc/config.gz doesn't exist.

BlueManCZ ... yes, I should have used an 'else' rather than an '||' (or)

Code:
# if [[ -f /proc/config.gz ]]; then zgrep XHCI /proc/config.gz ; else grep XHCI /usr/src/linux-$(uname -r)/.config ; fi

BlueManCZ wrote:
grep XHCI /usr/src/linux-$(uname -r)/.config:
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PLATFORM=y

OK, it doesn't show in the above dmesg, which I would expect it would, try greping explictly for xhci

Code:
# dmesg | grep -i xhci

best ... khay
Back to top
View user's profile Send private message
BlueManCZ
n00b
n00b


Joined: 11 Mar 2017
Posts: 9

PostPosted: Sat Mar 11, 2017 9:58 pm    Post subject: Reply with quote

khayyam

dmesg | grep -i xhci shows nothing.

I exported entire dmesg log to .txt file so you can use search engine in your browser.
Here is it: dmesg_log.txt
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 564
Location: France

PostPosted: Mon Mar 13, 2017 10:04 am    Post subject: Reply with quote

If you can load the xhci modules manually after booting (via the modprobe command), perhaps you just need to add them into your /etc/conf.d/modules file.
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 705

PostPosted: Mon Mar 13, 2017 10:25 am    Post subject: Reply with quote

I note the date of the kernel in the dmesg output is 2nd Mar, but this thread started 11 Mar. So perhaps a kernel updated for XHCI didn't get copied to /boot?
_________________
Greybeard
Back to top
View user's profile Send private message
BlueManCZ
n00b
n00b


Joined: 11 Mar 2017
Posts: 9

PostPosted: Mon Mar 13, 2017 5:59 pm    Post subject: Reply with quote

Syl20 wrote:
If you can load the xhci modules manually after booting (via the modprobe command), perhaps you just need to add them into your /etc/conf.d/modules file.

When I try to load module manually with modprobe xhci_pci, it returns:
Code:
modprobe: ERROR: could not insert 'xhci_pci': Exec format error

Goverp wrote:
I note the date of the kernel in the dmesg output is 2nd Mar, but this thread started 11 Mar. So perhaps a kernel updated for XHCI didn't get copied to /boot?

That's a good point! But why is there old date? Today I compiled new kernel according to this manual, ls -al /boot shows:
Code:
-rw-r--r--  1 root root  147803 Mar 13 17:27 config-4.9.6-gentoo-r1
drwxr-xr-x  2 root root    1024 Mar 13 17:27 grub
drwx------  2 root root   12288 Mar  2 11:09 lost+found
-rw-r--r--  1 root root 3211001 Mar 13 17:27 System.map-4.9.6-gentoo-r1
-rw-r--r--  1 root root 5303088 Mar 13 17:27 vmlinuz-4.9.6-gentoo-r1

But first lines in dmesg are:
Code:
[    0.000000] Linux version 4.9.6-gentoo-r1 (root@livecd) (gcc version 4.9.4 (Gentoo 4.9.4 p1.0, pie-0.6.4) ) #1 SMP Thu Mar 2 12:43:04 -00 2017
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.9.6-gentoo-r1 root=/dev/sda4 ro

But ls -al /var/log/dmesg returns:
Code:
-rw-r----- 1 root root 51587 Mar 13 17:28 /var/log/dmesg
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43755
Location: 56N 3W

PostPosted: Mon Mar 13, 2017 7:06 pm    Post subject: Reply with quote

BlueManCZ,

You forgot to mount the /boot partition before you installed the kernel. It wan installed to the /boot directory on the root partition.
Grub won't find it there.

When /boot is not mounted, ls /boot should return nothing.
With /boot mounted, your kernels and /boot/grub will be there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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