On Thu, Apr 19, 2012 at 02:07:47PM -0400, Alan Stern wrote: > > > Below is a patch that will prevent any PCI device from being put into > > > D3 during suspend. (This is meant to be used without any of the > > > earlier diagnostic patches.) Obviously it's not the final solution; > > > the test in the "if" statement needs to be more discriminating. :-) > > > > > > But before going any farther, I'd like to test if USB wakeup works. > > > So after booting with this patch, make sure that the power/wakeup file > > > says "enabled" in the sysfs path for each controller as well as the > > > usb1, usb2, 1-2, and 2-2 paths under /sys/bus/usb/devices/. > > > > > > Then suspend the computer without using the script, and while it is > > > asleep try plugging in a new USB device. That should cause the > > > computer to wake up, if everything is working properly. > > I've set "enabled" for following files: > > > > /sys/bus/usb/devices/usb1/power/wakeup > > /sys/bus/usb/devices/usb2/power/wakeup > > /sys/bus/usb/devices/1-1/power/wakeup > > /sys/bus/usb/devices/2-1/power/wakeup > > /sys/bus/pci/devices/0000:00:1a.0/power/wakeup > > /sys/bus/pci/devices/0000:00:1d.0/power/wakeup > > Good. > > > yet it didn't wake up after plugging, though devices light up. > > You mean, the devices that you plug in light up? Yes. An mp3 player and a flash drive. > I'd like to see the dmesg log for the complete suspend/resume cycle > (naturally you'll have to resume the system by hand after plugging in > the USB device). Make sure that CONFIG_USB_DEBUG is enabled. Attached. -- WBR, wRAR
[ 145.122398] PM: Syncing filesystems ... done. [ 146.095904] PM: Preparing system for mem sleep [ 146.110135] Freezing user space processes ... (elapsed 0.01 seconds) done. [ 146.121637] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done. [ 146.132804] PM: Entering mem sleep [ 146.140388] sd 0:0:0:0: [sda] Synchronizing SCSI cache [ 146.188114] sd 0:0:0:0: [sda] Stopping disk [ 146.569462] PM: suspend of devices complete after 436.593 msecs [ 146.569638] PM: late suspend of devices complete after 0.154 msecs [ 146.570125] ehci_hcd 0000:00:1d.0: wakeup: 1 [ 146.570159] ehci_hcd 0000:00:1d.0: wake-up capability enabled by ACPI [ 146.570172] ehci_hcd 0000:00:1d.0: --> PCI D0 [ 146.570234] ehci_hcd 0000:00:1a.0: wakeup: 1 [ 146.570251] ehci_hcd 0000:00:1a.0: wake-up capability enabled by ACPI [ 146.570288] ehci_hcd 0000:00:1a.0: --> PCI D0 [ 146.570399] PM: noirq suspend of devices complete after 0.747 msecs [ 146.571068] ACPI: Preparing to enter system sleep state S3 [ 146.588943] ------------[ cut here ]------------ [ 146.588995] WARNING: at drivers/gpu/drm/i915/i915_drv.c:398 gen6_gt_check_fifodbg.isra.5+0x31/0x44 [i915]() [ 146.589010] Hardware name: K53E [ 146.589017] MMIO read or write has been dropped ffffffff [ 146.589026] Modules linked in: aes_x86_64 aes_generic af_packet cpufreq_userspace cpufreq_stats cpufreq_powersave cpufreq_ondemand rfcomm bnep uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ipv6 snd_hda_codec_hdmi snd_hda_codec_realtek btusb bluetooth uvcvideo videobuf2_vmalloc snd_hda_intel videobuf2_memops snd_hda_codec videobuf2_core videodev snd_hwdep crc16 snd_pcm arc4 snd_page_alloc ath9k snd_seq_midi snd_seq_midi_event snd_rawmidi ath9k_common ath9k_hw ath mac80211 snd_seq acpi_cpufreq mperf freq_table joydev i915 asus_nb_wmi asus_wmi sparse_keymap pci_hotplug i2c_algo_bit drm_kms_helper i2c_i801 drm cfg80211 processor evdev battery wmi button i2c_core intel_agp intel_gtt psmouse video backlight snd_seq_device coretemp crc32c_intel ac agpgart snd_timer snd soundcore dm_mod ehci_hcd sr_mod cdrom usbcore usb_common atl1c thermal thermal_sys hwmon [last unloaded: scsi_wait_scan] [ 146.589261] Pid: 2880, comm: kworker/u:11 Not tainted 3.4.0-rc2-wrar-sabine-8+ #18 [ 146.589273] Call Trace: [ 146.589294] [<ffffffff8102a5e1>] warn_slowpath_common+0x7e/0x96 [ 146.589310] [<ffffffff8102a68d>] warn_slowpath_fmt+0x41/0x43 [ 146.589337] [<ffffffffa02143b7>] gen6_gt_check_fifodbg.isra.5+0x31/0x44 [i915] [ 146.589365] [<ffffffffa021462e>] __gen6_gt_force_wake_put+0x19/0x1b [i915] [ 146.589392] [<ffffffffa0214884>] i915_read32+0x61/0x82 [i915] [ 146.589433] [<ffffffffa022e111>] ? intel_disable_plane+0x60/0x60 [i915] [ 146.589462] [<ffffffffa02167ea>] i915_update_gfx_val+0x61/0xb9 [i915] [ 146.589500] [<ffffffffa022e156>] intel_idle_update+0x45/0x18b [i915] [ 146.589518] [<ffffffff810463d1>] ? need_resched+0x1e/0x28 [ 146.589551] [<ffffffffa022e111>] ? intel_disable_plane+0x60/0x60 [i915] [ 146.589569] [<ffffffff8103c292>] process_one_work+0x13c/0x21e [ 146.589585] [<ffffffff8103cb93>] worker_thread+0xce/0x152 [ 146.589600] [<ffffffff8103cac5>] ? manage_workers.isra.28+0x16c/0x16c [ 146.589614] [<ffffffff8103ffab>] kthread+0x86/0x8e [ 146.589629] [<ffffffff812f2094>] kernel_thread_helper+0x4/0x10 [ 146.589644] [<ffffffff8103ff25>] ? kthread_freezable_should_stop+0x3e/0x3e [ 146.589658] [<ffffffff812f2090>] ? gs_change+0xb/0xb [ 146.589668] ---[ end trace d4f42eb8f9f0177b ]--- [ 146.590280] ------------[ cut here ]------------ [ 146.590302] WARNING: at drivers/gpu/drm/i915/i915_drv.c:398 gen6_gt_check_fifodbg.isra.5+0x31/0x44 [i915]() [ 146.590315] Hardware name: K53E [ 146.590322] MMIO read or write has been dropped ffffffff [ 146.590330] Modules linked in: aes_x86_64 aes_generic af_packet cpufreq_userspace cpufreq_stats cpufreq_powersave cpufreq_ondemand rfcomm bnep uinput fuse nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ipv6 snd_hda_codec_hdmi snd_hda_codec_realtek btusb bluetooth uvcvideo videobuf2_vmalloc snd_hda_intel videobuf2_memops snd_hda_codec videobuf2_core videodev snd_hwdep crc16 snd_pcm arc4 snd_page_alloc ath9k snd_seq_midi snd_seq_midi_event snd_rawmidi ath9k_common ath9k_hw ath mac80211 snd_seq acpi_cpufreq mperf freq_table joydev i915 asus_nb_wmi asus_wmi sparse_keymap pci_hotplug i2c_algo_bit drm_kms_helper i2c_i801 drm cfg80211 processor evdev battery wmi button i2c_core intel_agp intel_gtt psmouse video backlight snd_seq_device coretemp crc32c_intel ac agpgart snd_timer snd soundcore dm_mod ehci_hcd sr_mod cdrom usbcore usb_common atl1c thermal thermal_sys hwmon [last unloaded: scsi_wait_scan] [ 146.590551] Pid: 2880, comm: kworker/u:11 Tainted: G W 3.4.0-rc2-wrar-sabine-8+ #18 [ 146.590563] Call Trace: [ 146.590576] [<ffffffff8102a5e1>] warn_slowpath_common+0x7e/0x96 [ 146.590590] [<ffffffff8102a68d>] warn_slowpath_fmt+0x41/0x43 [ 146.590614] [<ffffffffa02143b7>] gen6_gt_check_fifodbg.isra.5+0x31/0x44 [i915] [ 146.590639] [<ffffffffa021462e>] __gen6_gt_force_wake_put+0x19/0x1b [i915] [ 146.590664] [<ffffffffa0214884>] i915_read32+0x61/0x82 [i915] [ 146.590696] [<ffffffffa022e1ae>] intel_idle_update+0x9d/0x18b [i915] [ 146.590728] [<ffffffffa022e111>] ? intel_disable_plane+0x60/0x60 [i915] [ 146.590744] [<ffffffff8103c292>] process_one_work+0x13c/0x21e [ 146.590758] [<ffffffff8103cb93>] worker_thread+0xce/0x152 [ 146.590772] [<ffffffff8103cac5>] ? manage_workers.isra.28+0x16c/0x16c [ 146.590786] [<ffffffff8103ffab>] kthread+0x86/0x8e [ 146.590797] [<ffffffff812f2094>] kernel_thread_helper+0x4/0x10 [ 146.590810] [<ffffffff8103ff25>] ? kthread_freezable_should_stop+0x3e/0x3e [ 146.590823] [<ffffffff812f2090>] ? gs_change+0xb/0xb [ 146.590832] ---[ end trace d4f42eb8f9f0177c ]--- [ 146.644755] PM: Saving platform NVS memory [ 146.649445] Disabling non-boot CPUs ... [ 146.651233] CPU 1 is now offline [ 146.654012] CPU 2 is now offline [ 146.656592] CPU 3 is now offline [ 146.657317] Extended CMOS year: 2000 [ 146.658682] ACPI: Low-level resume complete [ 146.658728] PM: Restoring platform NVS memory [ 146.659118] Extended CMOS year: 2000 [ 146.659141] Enabling non-boot CPUs ... [ 146.660262] Booting Node 0 Processor 1 APIC 0x2 [ 146.674899] CPU1 is up [ 146.675071] Booting Node 0 Processor 2 APIC 0x1 [ 146.689611] CPU2 is up [ 146.689735] Booting Node 0 Processor 3 APIC 0x3 [ 146.704075] CPU3 is up [ 146.707254] ACPI: Waking up from system sleep state S3 [ 147.297244] ehci_hcd 0000:00:1a.0: wake-up capability disabled by ACPI [ 147.333090] power_supply BAT0: parent PNP0C0A:00 should not be sleeping [ 147.458847] ehci_hcd 0000:00:1d.0: wake-up capability disabled by ACPI [ 147.559435] PM: noirq resume of devices complete after 432.678 msecs [ 147.559694] PM: early resume of devices complete after 0.106 msecs [ 147.559822] i915 0000:00:02.0: setting latency timer to 64 [ 147.559840] ehci_hcd 0000:00:1a.0: setting latency timer to 64 [ 147.559880] usb usb1: root hub lost power or was reset [ 147.559906] ehci_hcd 0000:00:1a.0: reset command 0080002 (park)=0 ithresh=8 period=1024 Reset HALT [ 147.559930] snd_hda_intel 0000:00:1b.0: irq 45 for MSI/MSI-X [ 147.560048] ehci_hcd 0000:00:1d.0: setting latency timer to 64 [ 147.560054] ahci 0000:00:1f.2: setting latency timer to 64 [ 147.560071] usb usb2: root hub lost power or was reset [ 147.560085] ehci_hcd 0000:00:1d.0: reset command 0080002 (park)=0 ithresh=8 period=1024 Reset HALT [ 147.563800] ehci_hcd 0000:00:1a.0: cache line size of 64 is not supported [ 147.563820] usb usb1: usb resume [ 147.563828] ehci_hcd 0000:00:1a.0: resume root hub after power loss [ 147.564282] ehci_hcd 0000:00:1d.0: cache line size of 64 is not supported [ 147.564819] usb usb2: usb resume [ 147.564826] ehci_hcd 0000:00:1d.0: resume root hub after power loss [ 147.583553] hub 1-0:1.0: hub_reset_resume [ 147.583559] hub 1-0:1.0: trying to enable port power on non-switchable hub [ 147.584563] hub 2-0:1.0: hub_reset_resume [ 147.584572] hub 2-0:1.0: trying to enable port power on non-switchable hub [ 147.641086] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off [ 147.650114] atl1c 0000:03:00.0: irq 46 for MSI/MSI-X [ 147.684584] ehci_hcd 0000:00:1a.0: GetStatus port:1 status 001803 0 ACK POWER sig=j CSC CONNECT [ 147.684602] hub 1-0:1.0: port 1: status 0501 change 0001 [ 147.685571] ehci_hcd 0000:00:1d.0: GetStatus port:1 status 001803 0 ACK POWER sig=j CSC CONNECT [ 147.685583] hub 2-0:1.0: port 1: status 0501 change 0001 [ 147.785577] usb 1-1: finish reset-resume [ 147.786555] usb 2-1: finish reset-resume [ 147.836698] ehci_hcd 0000:00:1a.0: port 1 high speed [ 147.836714] ehci_hcd 0000:00:1a.0: GetStatus port:1 status 001005 0 ACK POWER sig=se0 PE CONNECT [ 147.875482] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 147.877791] ata3.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded [ 147.877811] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out [ 147.881892] ata3.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded [ 147.881912] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out [ 147.883449] ata3.00: configured for UDMA/100 [ 147.887485] usb 1-1: reset high-speed USB device number 2 using ehci_hcd [ 147.938648] ehci_hcd 0000:00:1a.0: port 1 high speed [ 147.938664] ehci_hcd 0000:00:1a.0: GetStatus port:1 status 001005 0 ACK POWER sig=se0 PE CONNECT [ 148.001587] ehci_hcd 0000:00:1a.0: set dev address 2 for port 1 [ 148.001598] ehci_hcd 0000:00:1a.0: LPM: no device attached [ 148.002062] hub 1-1:1.0: hub_reset_resume [ 148.002071] hub 1-1:1.0: enabling power on all ports [ 148.052711] ehci_hcd 0000:00:1d.0: port 1 high speed [ 148.052727] ehci_hcd 0000:00:1d.0: GetStatus port:1 status 001005 0 ACK POWER sig=se0 PE CONNECT [ 148.103404] usb 2-1: reset high-speed USB device number 2 using ehci_hcd [ 148.104514] hub 1-1:1.0: port 1: status 0101 change 0001 [ 148.104888] hub 1-1:1.0: port 2: status 0101 change 0001 [ 148.160530] ehci_hcd 0000:00:1d.0: port 1 high speed [ 148.160546] ehci_hcd 0000:00:1d.0: GetStatus port:1 status 001005 0 ACK POWER sig=se0 PE CONNECT [ 148.206372] usb 1-1: link qh256-0001/ffff88013a93ed00 start 3 [1/0 us] [ 148.206557] usb 1-1.2: finish reset-resume [ 148.206858] usb 1-1.1: finish reset-resume [ 148.223468] ehci_hcd 0000:00:1d.0: set dev address 2 for port 1 [ 148.223480] ehci_hcd 0000:00:1d.0: LPM: no device attached [ 148.224226] hub 2-1:1.0: hub_reset_resume [ 148.224235] hub 2-1:1.0: enabling power on all ports [ 148.234465] hub 1-1:1.0: port 2 not reset yet, waiting 10ms [ 148.296583] usb 1-1.2: reset high-speed USB device number 4 using ehci_hcd [ 148.325925] hub 2-1:1.0: port 3: status 0101 change 0001 [ 148.388528] hub 1-1:1.0: port 1 not reset yet, waiting 10ms [ 148.427243] usb 2-1: link qh256-0001/ffff88013a93e400 start 2 [1/0 us] [ 148.450517] usb 1-1.1: reset full-speed USB device number 3 using ehci_hcd [ 148.467506] hub 1-1:1.0: port 1 not reset yet, waiting 10ms [ 149.457684] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 149.465889] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out [ 149.472303] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded [ 149.472312] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out [ 149.482789] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out [ 149.489164] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded [ 149.489176] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out [ 149.496961] ata1.00: configured for UDMA/133 [ 149.502899] sd 0:0:0:0: [sda] Starting disk [ 149.559598] PM: resume of devices complete after 2000.913 msecs [ 149.619233] PM: Finishing wakeup. [ 149.619241] Restarting tasks ... [ 149.619442] hub 1-0:1.0: state 7 ports 2 chg 0002 evt 0000 [ 149.624455] done. [ 149.632672] hub 1-0:1.0: port 1, status 0503, change 0000, 480 Mb/s [ 149.632686] hub 2-0:1.0: state 7 ports 2 chg 0002 evt 0000 [ 149.632699] hub 2-0:1.0: port 1, status 0503, change 0000, 480 Mb/s [ 149.632707] hub 1-1:1.0: state 7 ports 6 chg 0006 evt 0004 [ 149.632817] hub 1-1:1.0: port 1, status 0103, change 0000, 12 Mb/s [ 149.632960] hub 1-1:1.0: port 2, status 0503, change 0000, 480 Mb/s [ 149.632974] hub 2-1:1.0: state 7 ports 6 chg 0008 evt 0000 [ 149.633205] hub 2-1:1.0: port 3, status 0101, change 0000, 12 Mb/s [ 149.643682] hub 2-1:1.0: port 3 not reset yet, waiting 10ms [ 149.705688] usb 2-1.3: new high-speed USB device number 3 using ehci_hcd [ 149.720119] video LNXVIDEO:01: Restoring backlight state [ 149.790209] usb 2-1.3: default language 0x0409 [ 149.790751] usb 2-1.3: udev 3, busnum 2, minor = 130 [ 149.790761] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=5133 [ 149.790907] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5 [ 149.791051] usb 2-1.3: Product: YP-U6 [ 149.791127] usb 2-1.3: Manufacturer: Samsung Electronics [ 149.791234] usb 2-1.3: SerialNumber: 38F5000001B1241C0002DCE4D908E41C [ 149.791902] usb 2-1.3: usb_probe_device [ 149.791911] usb 2-1.3: configuration #1 chosen from 2 choices [ 149.792207] usb 2-1.3: adding 2-1.3:1.0 (config #1, interface 0) [ 149.925318] uas 2-1.3:1.0: usb_probe_interface [ 149.925328] uas 2-1.3:1.0: usb_probe_interface - got id [ 149.925422] usbcore: registered new interface driver uas [ 149.936863] libusual 2-1.3:1.0: usb_probe_interface [ 149.936877] libusual 2-1.3:1.0: usb_probe_interface - got id [ 149.936996] usbcore: registered new interface driver libusual [ 149.958603] Initializing USB Mass Storage driver... [ 149.958802] usb-storage 2-1.3:1.0: usb_probe_interface [ 149.958816] usb-storage 2-1.3:1.0: usb_probe_interface - got id [ 149.958931] scsi6 : usb-storage 2-1.3:1.0 [ 149.959189] usbcore: registered new interface driver usb-storage [ 149.959309] USB Mass Storage support registered. [ 150.962927] scsi 6:0:0:0: Direct-Access Samsung YP-U6 0100 PQ: 0 ANSI: 4 [ 150.965186] sd 6:0:0:0: [sdb] 1889152 2048-byte logical blocks: (3.86 GB/3.60 GiB) [ 150.966136] sd 6:0:0:0: [sdb] Write Protect is off [ 150.966271] sd 6:0:0:0: [sdb] Mode Sense: 3e 00 00 00 [ 150.966875] sd 6:0:0:0: [sdb] No Caching mode page present [ 150.967020] sd 6:0:0:0: [sdb] Assuming drive cache: write through [ 150.968497] sd 6:0:0:0: [sdb] 1889152 2048-byte logical blocks: (3.86 GB/3.60 GiB) [ 150.969732] sd 6:0:0:0: [sdb] No Caching mode page present [ 150.969897] sd 6:0:0:0: [sdb] Assuming drive cache: write through [ 150.972374] sdb: sdb1 [ 150.974025] sd 6:0:0:0: [sdb] 1889152 2048-byte logical blocks: (3.86 GB/3.60 GiB) [ 150.975232] sd 6:0:0:0: [sdb] No Caching mode page present [ 150.979258] sd 6:0:0:0: [sdb] Assuming drive cache: write through [ 150.983262] sd 6:0:0:0: [sdb] Attached SCSI removable disk [ 150.994014] usb 1-1.1: usb auto-suspend, wakeup 0 [ 150.994027] usb 1-1.2: usb auto-suspend, wakeup 0 [ 153.003869] hub 1-1:1.0: hub_suspend [ 153.003893] usb 1-1: unlink qh256-0001/ffff88013a93ed00 start 3 [1/0 us] [ 153.004042] usb 1-1: usb auto-suspend, wakeup 1 [ 155.013849] hub 1-0:1.0: hub_suspend [ 155.013870] usb usb1: bus auto-suspend, wakeup 1 [ 155.013877] ehci_hcd 0000:00:1a.0: suspend root hub
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/linux-pm