No USB device detected

I don’t see anything too troubling, although I don’t know whether this is significant at all


sept. 16 11:22:54 FlyosFlip kernel: xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
sept. 16 11:22:54 FlyosFlip kernel: xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI

  1. What boot parameters are you currently using? (Just in case something unusual impacting here)
cat /proc/cmdline
  1. The following command should show more info about the host controllers, including whether an IRQ was assigned
/sbin/lspci -nnv|grep '\0c' -A3

This can really only be progressed further with a bug report.

A good article on xHCI interrupts (shared only to help increase the understanding of how it all works)…

https://burzalodowa.wordpress.com/2013/08/31/xhci-interrupts/

It does suggest to me that the xhci_hcd driver may not be setting up MSI or MS-X interrupts properly, but I’m at the limits of my knowledge here, and way off target. Hopefully, a kernel developer will be able to identify the problem via a bug report.

Hi!

My boot setup is is fairly default:


~> cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.7.2-2-default root=UUID=83d1803d-f689-4f8e-9e5a-9dafb7e922bd quiet splash=silent resume=/dev/sda2 splash=silent quiet showopts

And the other command:


~> /sbin/lspci -nnv|grep '\[0c' -A3
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21) (prog-if 30 [XHCI])
        Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
        Flags: bus master, medium devsel, latency 0, IRQ 128
        Memory at df110000 (64-bit, non-prefetchable) [size=64]
--
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)
        Subsystem: ASUSTeK Computer Inc. Device [1043:1020]
        Flags: medium devsel, IRQ 16
        Memory at df132000 (64-bit, non-prefetchable) [size=256]

I’ll submit a bug report during the week-end (but kernel devs are scary!!! ^^).[/size][/size]

That looks ok.

And the other command:

~> /sbin/lspci -nnv|grep ‘[0c’ -A3
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21) (prog-if 30 [XHCI])
Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
Flags: bus master, medium devsel, latency 0, IRQ 128
Memory at df110000 (64-bit, non-prefetchable) [size=64]

00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)
Subsystem: ASUSTeK Computer Inc. Device [1043:1020]
Flags: medium devsel, IRQ 16
Memory at df132000 (64-bit, non-prefetchable) [size=256]

That looks as ok as well.

I’ll submit a bug report during the week-end (but kernel devs are scary!!! ^^).

Good luck with this. Keep us posted. :)[/size][/size]

A quick update: it seems the problem stems from the power control of the xhci-hcd driver, which, on battery, puts the USB on “suspend” and waits for ACPI to wake them up. It appears that ACPI does not do so, so the USB ports stay suspended for ever (until AC is plugged and USB starts working properly).

A temporary workaround is:


echo on > /sys/bus/pci/devices/0000\:00\:14.0/power/control

but it gets overridden every time the AC is plugged on/off.

If a more permanent workaround is find or a proper fix is released, I’ll try to remember and mention it there.

If a more permanent workaround is find or a proper fix is released, I’ll try to remember and mention it there.

The kernel power management for USB documentation might be relevant here. In particular

power/autosuspend_delay_ms

  This file contains an integer value, which is the
  number of milliseconds the device should remain idle
  before the kernel will autosuspend it (the idle-delay
  time).  The default is 2000.  0 means to autosuspend
  as soon as the device becomes idle, and negative
  values mean never to autosuspend.  You can write a
  number to the file to change the autosuspend
  idle-delay time.

Writing “-1” to power/autosuspend_delay_ms and writing “on” to
power/control do essentially the same thing – they both prevent the
device from being autosuspended. Yes, this is a redundancy in the
API.

So, I wonder if disabling autosuspend might do the trick here? Either by adding the following boot parameter to grub

usbcore.autosuspend=-1

or by using a custom file in /etc/modprobe.d/ eg /etc/modprobe.d/30-autosuspend.conf with

options usbcore autosuspend=-1

Thanks!! Adding

usbcore.autosuspend=-1

to GRUB did the trick! :slight_smile:

That’s great news! I had hoped that this might do the trick. :slight_smile:

Hi!

The kernel devs want me to rebuild the kernel with a patch to test whether it fixes my issue, but I don’t know how to do that. Could someone guide me though it? Would it be possible on OBS?

You might want consider providing a link to your bug report, so that others can advise further.

True. Here it is (not exactly a bug report, this all happened on the mailing list):
http://patchwork.ozlabs.org/patch/680785/

I have branched the kernel package to my home:
https://build.opensuse.org/package/show/home:flyos:branches:Kernel:stable/kernel-default

Do you think I could upload the patch in there and apply it in the spec file?

Hm… The kernel compiled, with the patch, but I can’t, for the hell of me manage to download the package. The publish flags are ON and build succeeded, but when I click on “Download package” I get “No data for kernel-default”. Anyone knows what is happening?

The build is here:


https://build.opensuse.org/package/show/home:flyos:branches:Kernel:stable/kernel-default

Hi
Until all the builds are finished, the package won’t publish, so disable the arm builds, else use osc to grab the binaries or finally look on this page (make sure your logged into OBS);

Build Results -> standard, then click each package eg:
https://build.opensuse.org/package/binary/home:flyos:branches:Kernel:stable/kernel-default?arch=x86_64&filename=kernel-default-4.8.1-4.1.gc6408a6.x86_64.rpm&repository=standard

Then click on the package name top grab the binary Detailed Information About <[Package Name version etc]this is the download link>;
https://api.opensuse.org/build/home:flyos:branches:Kernel:stable/standard/x86_64/kernel-default/kernel-default-4.8.1-4.1.gc6408a6.x86_64.rpm

So where is the patch in the list of files? I see no changes to apply the patch?

Hi, thanks!

I’ve managed to download the package and install it, but now when booting, grub is angry and says kernel “has invalid signature”. I guess it does, since it’s not the official oS build, and I’m happy GRUB won’t let any piece of junk boot on my PC, but right now, this is MY junk that I’m trying to boot on! :stuck_out_tongue:

Any idea about how to make GRUB more understanding? Sorry I’m being all noob about this…

The patch is in the file “pci.c.diff” and is applied in “kernel-default.spec” at line 461.

Hi
Disable secure boot?

Yes, I just figured that out. Stupid me… Quite obvious wasn’t it? :wink:

OK, so, I managed to get it boot and the patch did indeed fix the issue!! I’ll let the devs know! \o/

(What a shame that ASUS won’t fix the firmware though… They basically replied that they don’t support Linux, even though their firmware is obviously faulty… Typical!)

Hi
You need to raise an openSUSE bug and ask if the fix can be backported otherwise you may need to run Kernel:HEAD if it’s included upstream, or keep patching/building the kernel…

Yes, I was wondering about that… It’s not really for me (starting the kernel with usb.autosuspend=-1 does the trick, whatever the kernel version), but in case other people are having the same issue.

The bug report is here:
https://bugzilla.opensuse.org/show_bug.cgi?id=1004887

Well done with that! :slight_smile: