Adrian Chadd
2013-Jun-20 21:19 UTC
USB ports on Lenovo T400 do not work after a suspend/resume
Hi, FreeBSD-9 works fine on this Lenovo T400 - except that suspending with no USB devices plugged in result in no ports working after resume. If I have a device plugged in during suspend - on any port - then all the ports work fine after resume. I've attached usbconfig and acpidump output. here's what is logged in the kernel buffer during suspend and resume: Her'es the suspend: Jun 20 14:03:34 lucy acpi: suspend at 20130620 14:03:34 Jun 20 14:03:38 lucy kernel: [100031] uhub0: at usbus0, port 1, addr 1 (disconnected) Jun 20 14:03:38 lucy kernel: [100036] uhub1: at usbus1, port 1, addr 1 (disconnected) Jun 20 14:03:38 lucy kernel: ugen1.2: <vendor 0x08ff> at usbus1 (disconnected) Jun 20 14:03:38 lucy kernel: ugen1.3: <Lenovo Computer Corp> at usbus1 (disconnected) Jun 20 14:03:38 lucy kernel: [100036] ubt0: at uhub1, port 2, addr 3 (disconnected) Jun 20 14:03:47 lucy kernel: [100041] uhub2: at usbus2, port 1, addr 1 (disconnected) Jun 20 14:03:47 lucy kernel: [100046] uhub3: at usbus3, port 1, addr 1 (disconnected) Jun 20 14:03:47 lucy kernel: ugen3.2: <Kingston> at usbus3 (disconnected) Jun 20 14:03:47 lucy kernel: [100046] umass0: at uhub3, port 1, addr 2 (disconnected) Jun 20 14:03:47 lucy kernel: (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 1 refs Jun 20 14:03:47 lucy kernel: (da0:umass-sim0:0:0:0): removing device entry Jun 20 14:03:47 lucy kernel: ugen3.3: <Chicony Electronics Co., Ltd.> at usbus3 (disconnected) Jun 20 14:03:47 lucy kernel: uhci_interrupt: resume detect Jun 20 14:03:47 lucy kernel: [100052] uhub4: at usbus4, port 1, addr 1 (disconnected) Jun 20 14:03:47 lucy kernel: [100057] uhub5: at usbus5, port 1, addr 1 (disconnected) Jun 20 14:03:47 lucy kernel: [100062] uhub6: at usbus6, port 1, addr 1 (disconnected) Jun 20 14:03:47 lucy kernel: [100067] uhub7: at usbus7, port 1, addr 1 (disconnected) ..and resume: I wonder what these devices are? Jun 20 14:03:47 lucy kernel: [100095] pci21: failed to set ACPI power state D2 on \_SB_.PCI0.PCI1.CDBS: AE_BAD_PARAMETER Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP0: AE_BAD_PARAMETER Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP1: AE_BAD_PARAMETER Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP3: AE_BAD_PARAMETER Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP4: AE_BAD_PARAMETER Jun 20 14:03:47 lucy kernel: [100095] acpi0: cleared fixed power button status Jun 20 14:03:47 lucy kernel: uhci_interrupt: resume detect Jun 20 14:03:47 lucy kernel: wakeup from sleeping state (slept 00:00:06) Jun 20 14:03:47 lucy kernel: [100067] uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus7 Jun 20 14:03:47 lucy kernel: [100046] uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3 Jun 20 14:03:47 lucy kernel: [100031] uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0 Jun 20 14:03:47 lucy kernel: [100036] uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1 Jun 20 14:03:47 lucy kernel: [100057] uhub4: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5 Jun 20 14:03:47 lucy kernel: [100052] uhub5: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4 Jun 20 14:03:47 lucy kernel: [100062] uhub6: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus6 Jun 20 14:03:47 lucy kernel: [100041] uhub7: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2 .. local APIC error? Jun 20 14:03:47 lucy kernel: CPU0: local APIC error 0x40 Jun 20 14:03:47 lucy acpi: resumed at 20130620 14:03:47 It probes the hubs fine though. Thanks! Adrian -------------- next part -------------- ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen2.1: <UHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen3.1: <EHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen6.1: <UHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen7.1: <EHCI root HUB Intel> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen3.2: <DT 101 G2 Kingston> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA) ugen1.2: <Fingerprint Sensor vendor 0x08ff> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) ugen3.3: <Integrated Camera Chicony Electronics Co., Ltd.> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen1.3: <ThinkPad Bluetooth with Enhanced Data Rate II Lenovo Computer Corp> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
Ian Smith
2013-Jun-21 12:48 UTC
USB ports on Lenovo T400 do not work after a suspend/resume
On Thu, 20 Jun 2013 14:19:21 -0700, Adrian Chadd wrote: > Hi, > > FreeBSD-9 works fine on this Lenovo T400 - except that suspending with > no USB devices plugged in result in no ports working after resume. > > If I have a device plugged in during suspend - on any port - then all > the ports work fine after resume. > > I've attached usbconfig and acpidump output. No acpidump output on -stable or -acpi anyway .. likely best as an URL, if it comes down to ACPI. So the fingerprint reader, camera and bluetooth shown in your usbconfig don't serve as 'USB devices plugged in' in this regard? Do they work ok after resume, or not? > here's what is logged in the kernel buffer during suspend and resume: > > > Her'es the suspend: With all but the USB-related stuff dropped, I assume? > Jun 20 14:03:34 lucy acpi: suspend at 20130620 14:03:34 > Jun 20 14:03:38 lucy kernel: [100031] uhub0: at usbus0, port 1, addr 1 > (disconnected) > Jun 20 14:03:38 lucy kernel: [100036] uhub1: at usbus1, port 1, addr 1 > (disconnected) > Jun 20 14:03:38 lucy kernel: ugen1.2: <vendor 0x08ff> at usbus1 (disconnected) > Jun 20 14:03:38 lucy kernel: ugen1.3: <Lenovo Computer Corp> at usbus1 > (disconnected) > Jun 20 14:03:38 lucy kernel: [100036] ubt0: at uhub1, port 2, addr 3 > (disconnected) > Jun 20 14:03:47 lucy kernel: [100041] uhub2: at usbus2, port 1, addr 1 > (disconnected) > Jun 20 14:03:47 lucy kernel: [100046] uhub3: at usbus3, port 1, addr 1 > (disconnected) > Jun 20 14:03:47 lucy kernel: ugen3.2: <Kingston> at usbus3 (disconnected) > Jun 20 14:03:47 lucy kernel: [100046] umass0: at uhub3, port 1, addr 2 > (disconnected) > Jun 20 14:03:47 lucy kernel: (da0:umass-sim0:0:0:0): lost device - 0 > outstanding, 1 refs > Jun 20 14:03:47 lucy kernel: (da0:umass-sim0:0:0:0): removing device entry > Jun 20 14:03:47 lucy kernel: ugen3.3: <Chicony Electronics Co., Ltd.> > at usbus3 (disconnected) > Jun 20 14:03:47 lucy kernel: uhci_interrupt: resume detect The last message is news to me. > Jun 20 14:03:47 lucy kernel: [100052] uhub4: at usbus4, port 1, addr 1 > (disconnected) > Jun 20 14:03:47 lucy kernel: [100057] uhub5: at usbus5, port 1, addr 1 > (disconnected) > Jun 20 14:03:47 lucy kernel: [100062] uhub6: at usbus6, port 1, addr 1 > (disconnected) > Jun 20 14:03:47 lucy kernel: [100067] uhub7: at usbus7, port 1, addr 1 > (disconnected) > > ..and resume: I wonder what these devices are? > > Jun 20 14:03:47 lucy kernel: [100095] pci21: failed to set ACPI power > state D2 on \_SB_.PCI0.PCI1.CDBS: AE_BAD_PARAMETER > Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power > state D2 on \_SB_.PCI0.EXP0: AE_BAD_PARAMETER > Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power > state D2 on \_SB_.PCI0.EXP1: AE_BAD_PARAMETER > Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power > state D2 on \_SB_.PCI0.EXP3: AE_BAD_PARAMETER > Jun 20 14:03:47 lucy kernel: [100095] pci0: failed to set ACPI power > state D2 on \_SB_.PCI0.EXP4: AE_BAD_PARAMETER No, the above are still on the suspend path, but logged on resume. I don't know what CDBS or EXP0,1,3,4 are. You've left out something like 'pci0:X:Y:0 Transition from D0 to D2' (or D3) before these ones, right? On 9(.1-R so far) I always get the same sort of messages for the cardbus slots on my T23, eg pci2: failed to set ACPI power state D2 on \_SB_.PCI0.PCI1.CBS0: AE_BAD_PARAMETER, also for CBS1. I've supposed it meant there was no D2 setting for these and they seem to resume alright, later on: pci2: set ACPI power state D0 on \_SB_.PCI0.PCI1.CBS0 (& CBS1) I suppose you'd have lines setting state back to D0 on these, later on? > Jun 20 14:03:47 lucy kernel: [100095] acpi0: cleared fixed power button status > Jun 20 14:03:47 lucy kernel: uhci_interrupt: resume detect > Jun 20 14:03:47 lucy kernel: wakeup from sleeping state (slept 00:00:06) I hope 'slept' message is still in 10, I've seen a few listed without, and they're very handy if there's any resume delay, as I had up to 8.2 (plus exactly 60 seconds) unless I unloaded (in particular) UHCI and reloaded it on resume, needing a kernel w/out uhci, ohci and ehci, loading on boot and unload/reload in rc.suspend/resume. This however was fixed by 9.1 for me, the first release where suspend/resume works flawlessly on the T23. I haven't tried a recent 9-STABLE though. > Jun 20 14:03:47 lucy kernel: [100067] uhub0: <Intel EHCI root HUB, > class 9/0, rev 2.00/1.00, addr 1> on usbus7 > Jun 20 14:03:47 lucy kernel: [100046] uhub1: <Intel EHCI root HUB, > class 9/0, rev 2.00/1.00, addr 1> on usbus3 > Jun 20 14:03:47 lucy kernel: [100031] uhub2: <Intel UHCI root HUB, > class 9/0, rev 1.00/1.00, addr 1> on usbus0 > Jun 20 14:03:47 lucy kernel: [100036] uhub3: <Intel UHCI root HUB, > class 9/0, rev 1.00/1.00, addr 1> on usbus1 > Jun 20 14:03:47 lucy kernel: [100057] uhub4: <Intel UHCI root HUB, > class 9/0, rev 1.00/1.00, addr 1> on usbus5 > Jun 20 14:03:47 lucy kernel: [100052] uhub5: <Intel UHCI root HUB, > class 9/0, rev 1.00/1.00, addr 1> on usbus4 > Jun 20 14:03:47 lucy kernel: [100062] uhub6: <Intel UHCI root HUB, > class 9/0, rev 1.00/1.00, addr 1> on usbus6 > Jun 20 14:03:47 lucy kernel: [100041] uhub7: <Intel UHCI root HUB, > class 9/0, rev 1.00/1.00, addr 1> on usbus2 > > .. local APIC error? No idea. > Jun 20 14:03:47 lucy kernel: CPU0: local APIC error 0x40 > Jun 20 14:03:47 lucy acpi: resumed at 20130620 14:03:47 > > It probes the hubs fine though. But you get nothing at all if you plug something in? No messages? Well, the earlier resume issues on UHCI might still not be fixed? You could try a kernel without UHCI, with the unload/reload dance .. cheers, Ian
Hans Petter Selasky
2013-Jul-07 07:32 UTC
USB ports on Lenovo T400 do not work after a suspend/resume
Hi, FYI: The USB stack will currently run a complete controller reset upon resume, like during boot. --HPS -----Original message-----> From:Ian Smith <smithi at nimnet.asn.au <mailto:smithi at nimnet.asn.au> > > Sent: Sunday 7th July 2013 7:52 > To: Adrian Chadd <adrian at freebsd.org <mailto:adrian at freebsd.org> > > Cc: freebsd-acpi at freebsd.org <mailto:freebsd-acpi at freebsd.org> ; freebsd-stable at freebsd.org <mailto:freebsd-stable at freebsd.org> ; freebsd-usb at freebsd.org <mailto:freebsd-usb at freebsd.org> > Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume > > On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote: > > On 30 June 2013 07:22, Ian Smith <smithi at nimnet.asn.au <mailto:smithi at nimnet.asn.au> > wrote: > [..] > > > Nothing of note that I can see, if that usb hub-to-bus remapping is > > > normal. As you said, 'CPU0: local APIC error 0x40' looks maybe sus. > > > Maybe someone who knows might comment on that? > > Does noone know what that signifies? Maybe it's not relevant to this. > > > > Just checking: you've tried other USB devices apart from uftdi0? > > > > Yup, there's no 5v on the port. > > I was rather taken aback to hear this. Would not this indicate a > failure to reinitialise the basic underlying USB hardware on resume? > > More than a bit bemused, Ian > _______________________________________________ > freebsd-acpi at freebsd.org <mailto:freebsd-acpi at freebsd.org> mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi <http://lists.freebsd.org/mailman/listinfo/freebsd-acpi> > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe at freebsd.org <mailto:freebsd-acpi-unsubscribe at freebsd.org> " >
Hans Petter Selasky
2013-Jul-07 18:22 UTC
USB ports on Lenovo T400 do not work after a suspend/resume
Hi, The USB code should re-attach the uhub driver to the root HUB and any other HUBs after resume. Part of the attach code is to set the power on. See /sys/dev/usb/usb_hub.c And: grep -r UHF_PORT_POWER /sys/dev/usb/ --HPS -----Original message-----> From:Adrian Chadd <adrian at freebsd.org <mailto:adrian at freebsd.org> > > Sent: Sunday 7th July 2013 18:43 > To: Hans Petter Selasky <hans.petter.selasky at bitfrost.no <mailto:hans.petter.selasky at bitfrost.no> > > Cc: freebsd-acpi at freebsd.org <mailto:freebsd-acpi at freebsd.org> ; freebsd-stable at freebsd.org <mailto:freebsd-stable at freebsd.org> ; Ian Smith <smithi at nimnet.asn.au <mailto:smithi at nimnet.asn.au> >; freebsd-usb at freebsd.org <mailto:freebsd-usb at freebsd.org> > Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume > > I don't think it's a USB controller issue. > > Those ports are connected to USB hubs, right? I wonder if there's some > ACPI nonsense that's resulting in the hubs not being powered up on > resume. > > > > -adrian > > On 7 July 2013 00:32, Hans Petter Selasky > <hans.petter.selasky at bitfrost.no <mailto:hans.petter.selasky at bitfrost.no> > wrote: > > Hi, > > > > FYI: The USB stack will currently run a complete controller reset upon > > resume, like during boot. > > > > --HPS > > > > > > > > -----Original message----- > >> From:Ian Smith <smithi at nimnet.asn.au <mailto:smithi at nimnet.asn.au> > > >> Sent: Sunday 7th July 2013 7:52 > >> To: Adrian Chadd <adrian at freebsd.org <mailto:adrian at freebsd.org> > > >> Cc: freebsd-acpi at freebsd.org <mailto:freebsd-acpi at freebsd.org> ; freebsd-stable at freebsd.org <mailto:freebsd-stable at freebsd.org> ; > >> freebsd-usb at freebsd.org <mailto:freebsd-usb at freebsd.org> > >> Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume > >> > >> On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote: > >> > On 30 June 2013 07:22, Ian Smith <smithi at nimnet.asn.au <mailto:smithi at nimnet.asn.au> > wrote: > >> [..] > >> > > Nothing of note that I can see, if that usb hub-to-bus remapping is > >> > > normal. As you said, 'CPU0: local APIC error 0x40' looks maybe sus. > >> > > Maybe someone who knows might comment on that? > >> > >> Does noone know what that signifies? Maybe it's not relevant to this. > >> > >> > > Just checking: you've tried other USB devices apart from uftdi0? > >> > > >> > Yup, there's no 5v on the port. > >> > >> I was rather taken aback to hear this. Would not this indicate a > >> failure to reinitialise the basic underlying USB hardware on resume? > >> > >> More than a bit bemused, Ian > >> _______________________________________________ > >> freebsd-acpi at freebsd.org <mailto:freebsd-acpi at freebsd.org> mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi <http://lists.freebsd.org/mailman/listinfo/freebsd-acpi> > >> To unsubscribe, send any mail to "freebsd-acpi-unsubscribe at freebsd.org <mailto:freebsd-acpi-unsubscribe at freebsd.org> " > >> > _______________________________________________ > freebsd-acpi at freebsd.org <mailto:freebsd-acpi at freebsd.org> mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi <http://lists.freebsd.org/mailman/listinfo/freebsd-acpi> > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe at freebsd.org <mailto:freebsd-acpi-unsubscribe at freebsd.org> " >