← Back to team overview

lubuntu-desktop team mailing list archive

Re: Hibernate/suspend doesn't work when closing lid

 

Don't remember where I found these tips, but they aren't mine!  However, they do work on my Aspire One.





Fan:



With A110 and UNR v9.10, (late 2009 release), the only thing needed to be changed from the vanilla install is to edit /etc/modprobe.d/acerhdf.conf and add the line: options acerhdf kernelmode=1 then reboot. This controls the fan and is worth swapping to ubuntu just for this, the netbook is then silent apart from the sound made by using the keyboard..



The default temps are a bit high, so if you notice your device getting too hot, you can adjust the temp that the fan turns on and off by adding a few parameters to the options line above. The following seems to prevent it from running too hot: 'options acerhdf kernelmode=1 fanon=61000 fanoff=54000' See http://piie.net/files/acerhdf_README.txt for more info.



(N.B.- http://piie.net/files/acerhdf_README.txt has not yet been updated to reflect that ubuntu now expects the temperatures to be specified as '61000' rather than the former '61'.)



As described the battery status will take bit of time to update when you unplug the AC cord, but if you wait 30 seconds it will change, which I can live with. The second Wifi LED that indicates traffic does not flash, but again that's no great loss.



Suspend mode will hang if a MM/SD/SDHC card is mounted, if you don't like the excellent script below then you can unmount it from the Nautilus file manger, or physically pop it out, if you're 100% sure it's not is use. In the script below I have to change /dev/mmcblk?p* to /dev/mmcblk*



If you try and suspend with a card mounted then you'll have to hold down the power button for five seconds to power off.



Power manager status icon in the Notification Applet does not switch from AC power to Battery when unplugged, although the screen dims. Since it still shows as AC power, it does not show an estimate of battery time left. If it is unplugged at login, it will switch to AC power status when plugged in, but not back if unplugged again. A work around for this is to add the add the following line in /etc/rc.local before the exit 0 line



    *



      /etc/init.d/laptop-mode start

      service laptop-mode status



Suspend Mode with SD cards mounted: The system hangs when the suspend mode is entered with SD cards inserted. The following script will unmount these SD cards. All SD cards will be automatically mounted again after resume. The suspend mode is not entered when there are programs that still access the SD cards. There are no more system crashes with the following script. Create one named /usr/lib/pm-utils/sleep.d/010_unmount_SD.sh as user root. Make it executable with chmod 755 /usr/lib/pm-utils/sleep.d/010_unmount_SD.sh. This script should contain the following lines:



# 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

Freedom isn't free.


> -----Original Message-----
> From: agger@xxxxxxxxxx
> Sent: Mon, 7 Jun 2010 13:01:12 -0400
> To: lubuntu-desktop@xxxxxxxxxxxxxxxxxxx
> Subject: [Lubuntu-desktop] Hibernate/suspend doesn't work when closing
> lid
> 
> I'm using Lubuntu on an Acer Aspire netbook 110 and am generally happy.
> 
> One thing, though: In the power settings (reached by clicking the battery
> icon) I've asked the computer to suspend if the lid is closed when on AC
> power, and to hibernate if on battery.
> 
> Alas, what it does in both cases is to freeze.
> 
> This worked *fine* in UNR 9.10 as well as in Xubuntu 10.04.
> 
> But these distros both used gnome-power-manager, I believe.
> 
> Any ideas how to fix this/what to look for or should  bug be filed? (And
> if so, against which package?)
> 
> br
> Carsten
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~lubuntu-desktop
> Post to     : lubuntu-desktop@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~lubuntu-desktop
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References