You are not logged in.

#1 2018-03-13 06:54:00

lignamorren
Member
Registered: 2018-03-05
Posts: 18

[SOLVED] Why isn't Arch using xhci?

I've got a Lenovo G50-30 that I first installed Arch Linux on as a normal laptop -- no external input or output devices. Not long after, I attached a monitor via HDMI and a USB keyboard and mouse. The laptop has two USB 2 ports and one USB 3 port. Looking at journalctl, I see that roughly speaking, prior to running the machine with external devices and lid closed, it was using xhci as the USB driver. Ever since then, it's been using ehci. I've made sure xhci was loaded with an /etc/modules-load.d/usb.conf file:

$ cat /etc/modules-load.d/usb.conf
xhci_hcd
xhci_pci

But ehci still runs USB. If I try blacklisting ehci:

$ cat /etc/modprobe.d/usb.conf
blacklist ehci-hcd
blacklist ehci-pci

then I get no USB functionality at all.

I'm running kernel 4.15.8 right now but this behavior has persisted through 4.15.6, 4.15.7, LTS 4.14.23, and LTS 4.14.24 as well.

The only other change I can think of around the time this started is that in order to see BIOS and GRUB output with the lid closed, I had to switch from using GRUB with EFI to GRUB with BIOS ("Legacy support").

Any ideas? Thanks!

Last edited by lignamorren (2018-03-14 05:16:49)

Offline

#2 2018-03-13 08:24:39

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: [SOLVED] Why isn't Arch using xhci?

lsusb -t

Offline

#3 2018-03-13 08:37:54

lignamorren
Member
Registered: 2018-03-05
Posts: 18

Re: [SOLVED] Why isn't Arch using xhci?

Good point, in fact that's one of the ways I know for sure that xhci isn't being used, that and journalctl output. The lsusb output is with keyboard attached to a USB 2.0 port, a mouse plugged into the keyboard's own port, and a USB 3.0 drive on the USB 3.0 port.

$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 92, If 0, Class=Hub, Driver=hub/3p, 480M
            |__ Port 3: Dev 94, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 2: Dev 93, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 2: Dev 93, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 9, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
            |__ Port 3: Dev 11, If 0, Class=Wireless, Driver=btusb, 12M
            |__ Port 3: Dev 11, If 1, Class=Wireless, Driver=btusb, 12M
            |__ Port 1: Dev 7, If 0, Class=Video, Driver=uvcvideo, 480M
            |__ Port 1: Dev 7, If 1, Class=Video, Driver=uvcvideo, 480M

journalctl output while running without external monitor, keyboard etc.:

Mar 03 02:54:03 phract kernel: ACPI: bus type USB registered
Mar 03 02:54:03 phract kernel: usbcore: registered new interface driver usbfs
Mar 03 02:54:03 phract kernel: usbcore: registered new interface driver hub
Mar 03 02:54:03 phract kernel: usbcore: registered new device driver usb
Mar 03 02:54:03 phract kernel: libata version 3.00 loaded.
Mar 03 02:54:03 phract kernel: xhci_hcd 0000:00:14.0: xHCI Host Controller
Mar 03 02:54:03 phract kernel: xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1


journalctl output with lid closed, external monitor, keyboard etc.:

Mar 12 14:12:44 phract kernel: ACPI: bus type USB registered
Mar 12 14:12:44 phract kernel: usbcore: registered new interface driver usbfs
Mar 12 14:12:44 phract kernel: usbcore: registered new interface driver hub
Mar 12 14:12:44 phract kernel: usbcore: registered new device driver usb
Mar 12 14:12:44 phract kernel: libata version 3.00 loaded.
Mar 12 14:12:44 phract kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Mar 12 14:12:44 phract kernel: ehci-pci: EHCI PCI platform driver
Mar 12 14:12:44 phract kernel: ehci-pci 0000:00:1d.0: EHCI Host Controller
Mar 12 14:12:44 phract kernel: ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1

Last edited by lignamorren (2018-03-13 08:39:59)

Offline

#4 2018-03-13 08:41:26

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: [SOLVED] Why isn't Arch using xhci?

Those show different busses - and there seems to be only one??
Just "lsusb" says?

Offline

#5 2018-03-13 08:58:49

lignamorren
Member
Registered: 2018-03-05
Posts: 18

Re: [SOLVED] Why isn't Arch using xhci?

Looks to me like just one bus, Bus 01.

As a check, I shut down, disconnected all the external USB devices, and booted with the lid up. No basic difference -- USB is still using ehci, not xhci.

Here's lsusb -t:

lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
            |__ Port 1: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
            |__ Port 2: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
            |__ Port 3: Dev 7, If 0, Class=Wireless, Driver=btusb, 12M
            |__ Port 3: Dev 7, If 1, Class=Wireless, Driver=btusb, 12M

And here's lsusb by itself. It looked much the same before, just with more devices listed.

lsusb
Bus 001 Device 007: ID 0cf3:3004 Qualcomm Atheros Communications AR3012 Bluetooth 4.0
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 004: ID 5986:014f Acer, Inc
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 002: ID 8087:07e6 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

After this I'm going to try booting with EFI again.

Offline

#6 2018-03-13 09:03:43

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: [SOLVED] Why isn't Arch using xhci?

xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1

Offline

#7 2018-03-13 09:16:26

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] Why isn't Arch using xhci?

seth wrote:

xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1

Is it normal that both are assigned to the same "bus number 1"


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2018-03-13 09:31:58

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: [SOLVED] Why isn't Arch using xhci?

They're (accordign to the OP) from different boots, ie. bus#1 (the only one) refers to different hardware in either boot.

Offline

#9 2018-03-13 10:05:11

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] Why isn't Arch using xhci?

Oh, right. Somehow I read it that the driver changes when plugging in devices... But that is obviously not right.

What happens if you unplug everything, boot into grub, connect your devices and then continue to boot arch linux? Maybe the the legacy bios is buggy if you boot with connected usb devices?

Last edited by progandy (2018-03-13 10:06:48)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#10 2018-03-13 10:36:13

lignamorren
Member
Registered: 2018-03-05
Posts: 18

Re: [SOLVED] Why isn't Arch using xhci?

When I boot via EFI, xhci does kick in:

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 2: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 11, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 3: Dev 11, If 1, Class=Wireless, Driver=btusb, 12M
        |__ Port 1: Dev 8, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 1: Dev 8, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 2: Dev 9, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M

But there are other problems with EFI boot on this machine. Booting with GRUB/BIOS, I see BIOS and GRUB only on the internal monitor, as well as early Linux messages; and when the external monitor finally does activate, it's at the internal display's 1366x768, not its native resolution of 1920x1080. I then have to use xrandr or something to fix that.

Progandy, I tried your experiment, booting into GRUB without USB devices, then connecting devices and booting Linux. Result: ehci only.

As far as I can tell, the only variable that has made a difference is whether I boot via BIOS or EFI.

Well, I'm going to just chalk it up to deficiencies in this machine's EFI and BIOS/legacy boot implementations, and live with USB 2.0 on all ports.

Offline

#11 2018-03-13 12:19:35

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: [SOLVED] Why isn't Arch using xhci?

Notice that you now have two busses of which #1 looks very much like USB2 and #2 looks like USB3 - it will be very most likely be in your BIOS emulation or settings which disable one bus.

Offline

#12 2018-03-13 15:23:48

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] Why isn't Arch using xhci?

This sounds like the laptop disables usb3 in bios mode.
Is there a usb legacy setting in the firmware ?
If so, try toggling it.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#13 2018-03-13 15:46:09

lignamorren
Member
Registered: 2018-03-05
Posts: 18

Re: [SOLVED] Why isn't Arch using xhci?

Seth and Lone_Wolf, my thoughts exactly. I've scoured the BIOS settings but haven't found anything yet. I don't suppose there are any open-source tools for peeking and poking at BIOS settings?

Offline

#14 2018-03-13 18:08:52

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] Why isn't Arch using xhci?

By the way, can you enable the hotkey mode? Then you should be able to press F10 / Fn-F10 to switch to the external monitor for EFI and GRUB

Page 6/7 in https://download.lenovo.com/consumer/mo … nglish.pdf

Last edited by progandy (2018-03-13 18:09:20)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#15 2018-03-14 05:15:57

lignamorren
Member
Registered: 2018-03-05
Posts: 18

Re: [SOLVED] Why isn't Arch using xhci?

Hotkey mode doesn't matter, it only changes whether you need to hold Fn while hitting a function key. That "use external monitor" function doesn't seem to work during BIOS setting or GRUB. I think it's only available in the full OS.

But I found it! On the last screen of BIOS settings, "Exit", there are two options: Load Default Settings, and OS Optimized Defaults. The choices for the latter are Win8 64bit, Win7 OS, and Other OS. In order to get EFI boot to work, I had to set this to Win8 64bit. But if I select Win7 OS, then do "Load Default Settings", then go back to the Configuration screen, I now have an item "USB Mode" with "USB 3.0" selected by default. And it works!

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 2: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 11, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 3: Dev 11, If 1, Class=Wireless, Driver=btusb, 12M
        |__ Port 1: Dev 8, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 1: Dev 8, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 2: Dev 9, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M

Thanks, seth, progandy and Lone_Wolf.

Offline

#16 2018-03-15 11:52:44

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] Why isn't Arch using xhci?

So the firmware changes it's options depending on what OS it thinks is installed.
Very confusing.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#17 2018-03-15 12:28:37

lignamorren
Member
Registered: 2018-03-05
Posts: 18

Re: [SOLVED] Why isn't Arch using xhci?

It's the idea that you have to choose the older OS compatibility to enable the newer USB protocol that blows my mind.

This BIOS/UEFI settings tool, InsydeH2O, is apparently an implementation of Intel's "Tiano" UEFI. I'll have to do some digging to see if I can't get it to handle HDMI and USB better.

Offline

Board footer

Powered by FluxBB