op_power: minor fixes
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 14 May 2012 22:37:55 +0000 (01:37 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 14 May 2012 22:41:12 +0000 (01:41 +0300)
- add timeout for first-time suspend message
  (in case it's hidden and user does not see it)
- add bridgedriver to suspend blacklist (requested-by klaxon)

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_power.sh

index 7de19c4..593cfbc 100644 (file)
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r95"
+PR = "r96"
 
 SRC_URI = " \
           file://op_paths.sh \
index 8dc1c21..0816a3b 100644 (file)
@@ -124,7 +124,7 @@ lowPowerOff(){ # switch from lowpower to normal mode
 show_message() {
        # TODO: check if desktop is visible; maybe use layer3?
        xfceuser=$(ps u -C xfce4-session | tail -n1 | awk '{print $1}')
-       cmd="DISPLAY=:0.0 zenity --info --text \"$1\""
+       cmd="DISPLAY=:0.0 zenity --info --text \"$1\" --timeout 10"
        su -c "$cmd" $xfceuser
 }
 
@@ -149,10 +149,6 @@ suspend_real() {
                return 1
        fi
 
-       # TODO: we probably want to NOT do real suspend if:
-       # - cards don't unmount (running PNDs will break)
-       # - while charging too, since it stops on suspend?
-
        if ! grep -q 'mmc_core.removable=0' /proc/cmdline; then
                # must unmount cards because they will be "ejected" on suspend
                # (some filesystems may even deadlock if we don't do this due to bugs)
@@ -183,8 +179,9 @@ Please do not remove SD cards while pandora is suspended, doing so will corrupt
 
        # get rid of modules that prevent suspend due to bugs
        modules="$(lsmod | awk '{print $1}' | xargs echo)"
-       blacklist="ehci_hcd g_zero g_audio g_ether g_serial g_midi gadgetfs g_file_storage
-               g_mass_storage g_printer g_cdc g_multi g_hid g_dbgp g_nokia g_webcam g_ncm g_acm_ms"
+       blacklist="g_zero g_audio g_ether g_serial g_midi gadgetfs g_file_storage
+               g_mass_storage g_printer g_cdc g_multi g_hid g_dbgp g_nokia g_webcam g_ncm g_acm_ms
+               ehci_hcd bridgedriver"
        restore_list=""
        for mod in $modules; do
                if echo $blacklist | grep -q "\<$mod\>"; then