Suspend fails if SD card is mounted.

Bug #560384 reported by SAL-e on 2010-04-10
54
This bug affects 10 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

I am testing daily build of Ubuntu 10.04.
Couple of days ago I notice that my Lenovo T400 (2767-R9U) some times fails to suspend or hibernate. Today (2010-04-10) after full update I found out this happens only when I have SD card inserted and mounted. I did several tests, but I don't know the root cause of the problem. Here are the test that I did so far:

1. Test suspend when no devices are attached and no SD card inserted. The laptop suspends without any issues.
2. I mounted the second partition and suspended the laptop. No problems.
3. I mounted external USB HDD and suspended the laptop. No problems again.
4. I inserted SD card after the card has been auto-mounted I tested the access. Then I unmounted the SD card and suspended the laptop. No problems at all.
5. I insert the SD card and after confirming access I suspended the laptop. The suspend process starts. The 'suspend LED' flashes. After short time all other LEDs go off except power and battery. At this point everything stops. Usually at this moment the power is turned-off and the suspend LED stops flashing and stays on until the laptop is awaken again.

I have tested this with number of different SD cards from Transcend, San Disk and Kingston, different capacities ranging from 256MB to 8GB and different formats SD and microSD with adapter. It appears that SD card it self is not the problem.

6. I have repeated the same test, but this time the SD card was connected using external SD-USB adapter and suspend worked as expected.

So I am suspecting that the problem is somewhere in the driver. I am attaching the full list of my hardware created by 'lshw' command. From there looks like the SD controller used by Lenovo is:
                description: SD Host controller
                product: R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
                vendor: Ricoh Co Ltd
                physical id: 0.2
                bus info: pci@0000:15:00.2
                version: 21
                width: 32 bits
                clock: 33MHz
                capabilities: pm bus_master cap_list
                configuration: driver=sdhci-pci latency=32
                resources: irq:18 memory:f4401800-f44018ff

What should I do in order to find the problem?

Thank you,
SAL-e
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: sal-e 2561 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc220000 irq 17'
   Mixer name : 'Conexant CX20561 (Hermosa)'
   Components : 'HDA:14f15051,17aa211c,00100000 HDA:14f12c06,17aa2122,00100000'
   Controls : 14
   Simple ctrls : 7
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 7VHT16WW-1.06'
   Mixer name : 'ThinkPad EC 7VHT16WW-1.06'
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
DistroRelease: Ubuntu 10.04
HibernationDevice: RESUME=UUID=d1065b56-bedb-4b48-a015-8005e0cfeb54
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100318)
MachineType: LENOVO 2767R9U
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic root=UUID=390f22f9-5e5e-4299-831a-df9dbc079677 ro quiet splash
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.utf8
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Regression: No
RelatedPackageVersions: linux-firmware 1.34
Reproducible: Yes
Tags: lucid suspend resume needs-upstream-testing
Uname: Linux 2.6.32-21-generic i686
UserGroups: disk
dmi.bios.date: 11/26/2009
dmi.bios.vendor: LENOVO
dmi.bios.version: 7UET81WW (3.11 )
dmi.board.name: 2767R9U
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7UET81WW(3.11):bd11/26/2009:svnLENOVO:pn2767R9U:pvrThinkPadT400:rvnLENOVO:rn2767R9U:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2767R9U
dmi.product.version: ThinkPad T400
dmi.sys.vendor: LENOVO

SAL-e (sal-electronics) wrote :

I can confirm this. I am having the exact same problem o a Toshiba M305-S4820 laptop, running Ubuntu Lucid AMD64.

Gabe Gorelick (gabegorelick) wrote :

Confirming since multiple users have reported the same bug.

tags: added: resume suspend
tags: added: needs-reassignment
Changed in ubuntu:
status: New → Confirmed
Philip Muškovac (yofel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, we can't fix it without more information.

Please run the following command which will attach necessary information:

apport-collect 560384

Bear in mind that when prompted to give apport-collect permissions for Launchpad you will need to give it at least the ability to "Change Non-Private" data as it will be adding information to your bug report.

If you cannot use apport please at least add the following information (pay attention to lspci's additional options):
First run the following commands:
1) uname -a > uname-a.log
2) dmesg > dmesg.log
3) sudo lspci -vvnn > lspci-vvnn.log
4) cat /proc/version_signature > version.log
then attach the files separately to the bug report (not pasted into comments or tar/zip-ed).

For your reference, the full description of procedures for kernel-related bug reports is available at https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies. Thanks in advance!

affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: lucid
removed: needs-reassignment

apport information

tags: added: apport-collected
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Vancouverite (sethgilchrist) wrote :

Hello,
I am running 9.10 64bit on a Lenovo T400 and also have the identical behaviour. I have attached the data that was requested of the poster in comment #4. Cheers.

Vancouverite (sethgilchrist) wrote :
Vancouverite (sethgilchrist) wrote :
Vancouverite (sethgilchrist) wrote :
Philip Muškovac (yofel) on 2010-04-30
Changed in linux (Ubuntu):
status: Incomplete → New
tags: added: kernel-suspend
tags: added: kj-triage
lyon (r-steiger) wrote :

Confirming bug with suspend/hibernate not working when SD card is inserted. I'm using Prestigio 1560 notebook with this built-in reader:

06:09.4 SD Host controller: Texas Instruments PCI6411/6421/6611/6621/7411/7421/7611/7621 Secure Digital Controller
 Subsystem: Wistron Corp. Device 3007
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 57 (1750ns min, 1000ns max), Cache Line Size: 32 bytes
 Interrupt: pin A routed to IRQ 22
 Region 0: Memory at b0108400 (32-bit, non-prefetchable) [size=256]
 Region 1: Memory at b0108000 (32-bit, non-prefetchable) [size=256]
 Region 2: Memory at b0107400 (32-bit, non-prefetchable) [size=256]
 Capabilities: [80] Power Management version 2
  Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
  Status: D0 PME-Enable- DSel=0 DScale=0 PME-
 Kernel driver in use: sdhci-pci
 Kernel modules: sdhci-pci

lyon (r-steiger) wrote :

uname -a:
Linux fenix 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

/proc/version_signature:
Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2

lyon (r-steiger) wrote :
lyon (r-steiger) wrote :
toby saunders (tobydafencer) wrote :

1 - open the text editor found in Accessories(? I think, don't have the Aspire in front of me), copy/paste the following:

# Drop to: /etc/pm/sleep.d
# Use this script to prevent data loss on mounted MMC/SD
# cards. It syncs data and umounts all mmcblk devices prior to
# suspend, and cancels suspend if umounting was not possible
# (i.e: something locks a file)
case "${1}" in
    hibernate|suspend)
        /bin/sync
        for drive in $( /bin/ls /dev/mmcblk?p* ); do
        /bin/umount ${drive} > /dev/null
        # If umount failed: abort suspend
        if [ $? -gt 0 ]; then
        # Test if device keeps mounted. Previous command could fail
        # (i.e device was not mounted) with a non-stopper
        # problem for the suspend process.
        /bin/mount | /bin/grep ${drive}
        if [ $? -eq 0 ]; then
            exit 1
        fi
        fi
    done
    ;;
# resume|thaw)
## Do nothing. All devices will be automatically mounted again.
# ;;
esac
2 - Save as 010_unmount_SD.sh in your Home folder

3 - Open the Terminal (under Accessories)

4 - Use the following command to copy the file to the correct location (you will be prompted for the Admin password when you hit Enter):

sudo cp 010_unmount_SD.sh /usr/lib/pm-utils/sleep.d/010_unmount_SD.sh

5 - Set the proper permissions with this command (you will again be prompted for the Admin password):

sudo chmod 755 /usr/lib/pm-utils/sleep.d/010_unmount_SD.sh

SAL-e (sal-electronics) wrote :

Hi Toby,
I just tested you script and worked for me. I tested:
1. Suspend by pressing Fn+F4.
2. Suspend by closing the lid.
3. Suspend from power menu.
4. Suspend by pressing the power button and select 'Suspend'
5. Hibernate from the power menu.
6. Hibernate by pressing the power button and select 'Hibernate'.
Every test passed.
I have some questions:
1. Is this a problem with current driver in the kernel?
2. If it is kernel problem has it been reported upstream or I need to do so?
3. I have added shell bang ( #!/bin/sh ) on line 1 in my script. Is this a good idea?
4. Is your script a workaround or it going to become part of the pm-utills package?

But most important. Thank you very much! It was very annoying to kill my session by closing the lid and forgetting that my SD card is mounted.

Thanks,
SAL-e

Béné (bene-d) wrote :

I can confirm that this bug exists on my Dell Mini 9 in all versions of Ubuntu I tried. (8.04, 9.10 and 10.04) I can also confirm, that Toby's workaround solves the problem. Thanks, Toby!
Yet this seems to be a serious issue.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers