Origen: several issues with suspend/resume

Bug #880432 reported by Ricardo Salveti
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Ubuntu
Fix Released
Medium
Ricardo Salveti
linaro-landing-team-samsung
Fix Released
Medium
Inderpal Singh

Bug Description

Hwpack: hwpack_linaro-lt-origen_20111022-0_armel_supported.tar.gz
Image: linaro-o-ubuntu-desktop-tar-20111023-0.tar.gz

Click at the system icon, then click at suspend. The display will turn itself off, but the console will remain active, but even after pressing the keyboard, even via usb, the display doesn't get on anymore.

tags: added: origen suspend
Changed in linaro-ubuntu:
milestone: none → 11.10
Inderpal Singh (ips)
Changed in linaro-landing-team-samsung:
assignee: nobody → Inderpal Singh (ips)
status: New → Confirmed
Revision history for this message
Inderpal Singh (ips) wrote :

For embedded systems, following config needs to be defined.
CONFIG_MMC_UNSAFE_RESUME

With that defined, the system goes to suspend and wakes up with press of button.
It might take some time to go to suspend as it syncs the FS on MMC/SD card. Wait till the time
console becomes inactive.
Attached is the dmesg log across suspend/resume.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Can you update the kernel package for 11.10? Then we can respin the origen hwpack with the fix.

Changed in linaro-ubuntu:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ricardo Salveti (rsalveti)
Revision history for this message
Angus Ainslie (angus-akkea) wrote :

linux-origen_3.0.0-1000.0samsung19 includes the defconfig change to fix this bug

Changed in linaro-landing-team-samsung:
status: Confirmed → Fix Committed
tags: added: linaro-ubuntu lt-origen suspend-resume
removed: origen suspend
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

A few issues with the suspend:

1 - usb doesn't come back:
Had only a "usb 2-1: USB disconnect, device number 2" after getting back from suspend (using a usb mouse).
2 - Reboot doesn't work after suspend:
Try suspending/resuming and calling 'reboot' from the serial, you'll see it'll freeze after the restart message "* Will now restart".
3 - Suspend doesn't work when the wireless module is loaded:
root@linaro-ubuntu-desktop:~# dmesg
EXT4-fs (mmcblk0p3): re-mounted. Opts: errors=remount-ro,commit=0
init: anacron main process (1807) killed by TERM signal
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleep
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
PM: Entering mem sleep
Suspending console(s) (use no_console_suspend to debug)
legacy_suspend(): wiphy_suspend+0x0/0x60 [cfg80211] returns -22
PM: Device phy0 failed to suspend: error -22
PM: Some devices failed to suspend
PM: resume of devices complete after 0.065 msecs
PM: Finishing wakeup.
Restarting tasks ... done.
s3cfb s3cfb: [fb0] already in FB_BLANK_UNBLANK
EXT4-fs (mmcblk0p3): re-mounted. Opts: errors=remount-ro,commit=0
ADDRCONF(NETDEV_UP): wlan0: link is not ready
s3cfb s3cfb: [fb0] already in FB_BLANK_UNBLANK

summary: - Origen: system fails to suspend and doesn't show the display anymore
+ Origen: several issues with suspend/resume
Usman Ahmad (usman-ah)
Changed in linaro-landing-team-samsung:
importance: Undecided → Medium
milestone: none → 2011.10
Revision history for this message
Inderpal Singh (ips) wrote :

1. USB is resuming fine after suspend/resume. The USB mouse continues to work well after resume and I get the following message:
"usb 2-1: reset low speed USB device number 2 using s5p-ohci"

Please refer at the end of the attached logs across suspend/resume.

2. Reboot Issue: Able to reproduce it. Debugging in progress.

3. Suspend doesn't work when the wireless module is loaded:
     Need to check with Sangwook

Revision history for this message
Inderpal Singh (ips) wrote :

The attached patch fixes the issue #2: Reboot doesn't work after suspend

Revision history for this message
Sangwook Lee (sangwook) wrote :

The attached patch fixes the issue #3. Suspend doesn't work when the wireless module is loaded:

Revision history for this message
Sangwook Lee (sangwook) wrote :

Please ignore above patch. and let me consider other solution.
1) Make SDIO pm_caps field patches (done, will be pushed into mainline)
2) Make SDIO patches fro SDIO device into SD/MMC host( To do)

Fathi Boudra (fboudra)
Changed in linaro-ubuntu:
milestone: 11.10 → 11.11
Revision history for this message
Kishore Kanna S (kishorek-s) wrote :

hwpack : hwpack_linaro-lt-origen_20111117-1_armel_supported.tar.gz

Issue is observed in the above release too.

Backlight control does not work after suspend/resume.
Reboot does not work after suspend/resume.

Suspend is done from Ubuntu User Interface ( top bar)

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Tested with 11.11 RC (hwpack_linaro-lt-origen_20111122-2_armel_supported.tar.gz):

1 - USB worked again after suspend;
2 - Reboot failed after suspend;
3 - Can't suspend with the wireless module loaded;

Changed in linaro-ubuntu:
milestone: 11.11 → none
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

With the latest origen-wlan package the system will unload and load the ath6kl before/after suspend/resume, so we avoid hitting this issue.

Tested with 11.12 RC, but the board fails to resume after suspending. At the time I press one button, one of the LEDs gets itself off, but that's all, nothing at console or screen (needs to reboot the board).

Hwpack: hwpack_linaro-leb-origen_20111219-1_armel_supported.tar.gz
Image: linaro-o-ubuntu-desktop-tar-20111219-0.tar.gz

I guess this is the first time we're running this test against the 3.2 kernel.

Changed in linaro-landing-team-samsung:
status: Fix Committed → Confirmed
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Still able to reproduce same issue as described by comment #11 with 12.01 RC:
Hwpack: hwpack_linaro-leb-origen_20120123-1_armel_supported.tar.gz
Image: linaro-o-ubuntu-desktop-tar-20120123-1.tar.gz

Revision history for this message
Usman Ahmad (usman-ah) wrote :

The original issues have been fixed, but still there are some other outstanding issues with S2RAM. In progress.

Changed in linaro-landing-team-samsung:
milestone: 2011.10 → 2012.02
Revision history for this message
Sangwook Lee (sangwook) wrote :

@Usman

let us split the issue. If there is another new bug for S2RAM, please open it with new bug number.

Changed in linaro-landing-team-samsung:
status: Confirmed → Fix Committed
Changed in linaro-landing-team-samsung:
status: Fix Committed → Fix Released
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Still able to reproduce same issue as described by comment #11 with 12.02 RC.

I'm also openinig the bug at the landing team project as well, as suspend is entirely broken atm. Please only close it once it's properly working from the userspace side.

Changed in linaro-landing-team-samsung:
status: Fix Released → Confirmed
Revision history for this message
Inderpal Singh (ips) wrote :

Suspend/Resume works fine with latest hwpack. This hwpack is still based on 3.2 kernel

hwpack_linaro-leb-origen_20120322-0_armel_supported.tar.gz

I have also tested suspend/resume with [1] which is based on linux-3.3-rc5 tag at linux-3.3-rc5-2012.03-1. It works well.

[1] git://git.linaro.org/landing-teams/working/samsung/kernel.git (Branch: tracking)

Revision history for this message
Ricardo Salveti (rsalveti) wrote :
Download full text (17.9 KiB)

Using 3.3.0-11-linaro-lt-origen I still had a few issues while suspending/resume origen.

In general it seems to be working fine, just found that the USB devices that were connected didn't go back properly, like:
root@linaro-ubuntu-desktop:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M
root@linaro-ubuntu-desktop:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 003: ID 046d:c526 Logitech, Inc. Nano Receiver
Bus 001 Device 004: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
Bus 001 Device 005: ID 0b95:772a ASIX Electronics Corp.

SUSPEND-->

root@linaro-ubuntu-desktop:~# [ 978.935000] CPU1: Unknown IPI message 0x1
[ 978.940000] s3c-sdhci exynos4-sdhci.2: could not set regulator OCR (-22)
[ 979.605000] hub 1-1:1.0: hub_port_status failed (err = -32)
[ 979.610000] hub 1-1:1.0: hub_port_status failed (err = -32)
[ 979.715000] hub 1-1:1.0: hub_port_status failed (err = -32)
[ 979.715000] hub 1-1:1.0: cannot disable port 4 (err = -32)
[ 979.715000] dpm_run_callback(): usb_dev_resume+0x0/0x20 returns -32
[ 979.715000] PM: Device 1-1.4 failed to resume async: error -32
[ 979.715000] hub 1-1:1.0: hub_port_status failed (err = -32)
[ 979.715000] hub 1-1:1.0: cannot disable port 3 (err = -32)
[ 979.715000] dpm_run_callback(): usb_dev_resume+0x0/0x20 returns -32
[ 979.715000] PM: Device 1-1.3 failed to resume async: error -32
[ 979.985000] hub 1-1:1.0: hub_port_status failed (err = -32)
[ 979.995000] s3c-sdhci exynos4-sdhci.0: could not set regulator OCR (-22)
[ 979.995000] hub 1-1:1.0: hub_port_status failed (err = -32)
[ 980.705000] mmc2: error -110 whilst initialising SDIO card
[ 986.560000] asix 1-1.4:1.0: eth0: Failed to write GPIO value 0x00b0: ffffffed

Log:
[ 971.405000] init: anacron main process (2965) killed by TERM signal
[ 971.540000] mmc2: card 0001 removed
[ 971.540000] init: upstart-udev-bridge main process (2082) killed by ABRT signal
[ 971.540000] init: upstart-udev-bridge main process ended, respawning
[ 978.795000] PM: Syncing filesystems ... done.
[ 978.800000] PM: Preparing system for mem sleep
[ 978.805000] Freezing user space processes ... (elapsed 0.01 seconds) done.
[ 978.820000] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 978.835000] PM: Entering mem sleep
[ 978.835000] Suspending console(s) (use no_console_suspend to debug)
[ 978.840000] wake enabled for irq 292
[ 978.840000] wake enabled for irq 301
[ 978.840000] wake enabled for irq 302
[ 978.840000] wake enabled for irq 303
[ 978.840000] wake enabled for irq 304
[ 978.840000] wake enabled for irq 305
[ 978.920000] PM: suspend of devices complete after 86.218 msecs
[ 978.920000] PM: late suspend of devices complete after 1.407 msecs
[ 978.920000] Disabling non-boot CPUs ...
[ 978.925000] IRQ80 no longer affine to CPU1
[ 978.925000] CPU1: shutdown
[ 978.925000] saved f8a00000 value 00000001
[ 978.925000] saved f8104500 value 00000013
[ 978.925000] s...

Revision history for this message
Inderpal Singh (ips) wrote :

Looking at the logs, the issue seems to be in USB-ehci driver. The ehci devices are not resuming.

The ohci devices are resuming fine. I have tested it with mouse and keyboard.

Since most of the suspend/resume issues have been resolved. I guess we should close this bug and start
a new one for usb-ehci resume.

Revision history for this message
Inderpal Singh (ips) wrote :
Download full text (3.6 KiB)

I tested the suspend/resume with ehci devices. They all are resuming fine after suspend/resume.
Below are the logs:

root@linaro-ubuntu-desktop:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=HID, Driver=usbhid, 1.5M
        |__ Port 3: Dev 4, If 0, Class=HID, Driver=usbhid, 1.5M
        |__ Port 4: Dev 5, If 0, Class=>ifc, Driver=dm9601, 12M
root@linaro-ubuntu-desktop:~#
.............
...............
[ 2640.805000] GPY3: CON4 22222222 => 22222222, DAT 00000000 => 00000000
[ 2640.805000] GPY4: CON4 22222222 => 22222222, DAT 00000000 => 00000000
[ 2640.805000] GPY5: CON4 22222222 => 22222222, DAT 00000000 => 000000ff
[ 2640.805000] GPY6: CON4 22222222 => 22222222, DAT 00000000 => 000000ff
[ 2640.805000] GPZ: CON4 00000000 => 02222222, DAT 00000000 => 00000001
[ 2640.805000] s3c_pm_enter: post sleep, preparing to return
[ 2640.805000] S3C PM Resume (post-restore)
[ 2640.805000] Enabling non-boot CPUs ...
[ 2640.815000] CPU1: Booted secondary processor
[ 2640.815000] Calibrating delay loop (skipped) already calibrated this CPU
[ 2640.815000] CPU1: Unknown IPI message 0x1
[ 2640.815000] CPU1 is up
[ 2640.820000] PM: early resume of devices complete after 1.263 msecs
[ 2640.820000] s3c-sdhci exynos4-sdhci.2: could not set regulator OCR (-22)
[ 2640.865000] s3c-i2c s3c2440-i2c.0: slave address 0x10
[ 2640.865000] s3c-i2c s3c2440-i2c.0: bus frequency set to 97 KHz
[ 2640.865000] s3c-i2c s3c2440-i2c.1: slave address 0x10
[ 2640.865000] s3c-i2c s3c2440-i2c.1: bus frequency set to 97 KHz
[ 2640.865000] s3c2410-wdt: watchdog disabled
[ 2640.865000] usb usb1: root hub lost power or was reset
[ 2640.890000] s3c-i2c s3c2440-hdmiphy-i2c: slave address 0x10
[ 2640.890000] s3c-i2c s3c2440-hdmiphy-i2c: bus frequency set to 97 KHz
[ 2640.945000] usb usb2: root hub lost power or was reset
[ 2640.945000] wake disabled for irq 301
[ 2640.945000] wake disabled for irq 302
[ 2640.945000] wake disabled for irq 303
[ 2640.945000] wake disabled for irq 304
[ 2640.945000] wake disabled for irq 305
[ 2640.950000] wake disabled for irq 292
[ 2641.240000] usb 1-1: reset high-speed USB device number 2 using s5p-ehci
[ 2641.650000] usb 1-1.4: reset full-speed USB device number 5 using s5p-ehci
[ 2641.740000] dm9601 1-1.4:1.0: no reset_resume for driver dm9601?
[ 2641.740000] dm9601 1-1.4:1.0: eth0: unregister 'dm9601' usb-s5p-ehci-1.4, Davicom DM9601 USB Ethernet
[ 2642.000000] usb 1-1.3: reset low-speed USB device number 4 using s5p-ehci
[ 2642.540000] usb 1-1.1: reset low-speed USB device number 3 using s5p-ehci
[ 2642.820000] PM: resume of devices complete after 2002.133 msecs
[ 2642.840000] dm9601 1-1.4:1.0: eth0: register 'dm9601' at usb-s5p-ehci-1.4, Davicom DM9601 USB Ethernet, 00:e0:4c:53:44:58
[ 2642.850000] PM: Finishing wakeup.
[ 2642.850000] Restarting tasks ... done.
[ 2642.870000] s3c-sdhci exynos4-sdhci.0: could not set regulator OCR (-22)
[ 2642.910000] s3c-sdhci exynos4-sdhci.3: could not set regulator OCR (-22)
[ 2643.155000] dm9601 1-1.4:1.0: eth0: link up, 10...

Read more...

Revision history for this message
Tushar Behera (tusharbehera) wrote :

The bug is closed as most of the issues reported in the list have been fixed. If there are new issues, please raise a new bug for tracking.

Changed in linaro-landing-team-samsung:
status: Confirmed → Fix Released
milestone: 2012.02 → 2012.04
Changed in linaro-ubuntu:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.