Package: toshset Version: 1.76-1 Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu oneiric ubuntu-patch
After fixing a pm-utils bug, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633147, that ensured that suspend was never inhibited it was discovered that toshset doesn't check for the existence of a device before trying to modify it. Subsequently, if the device doesn't exist it returns a non-zero exit code which thereby inhibits suspend. The following patch fixes that. In Ubuntu, the attached patch was applied to achieve the following: to allow users to suspend / hibernate again. * 08_novatel_3g_suspend.patch: allow suspend / hibernate if device doesn't exist Thanks for considering the patch. -- System Information: Debian Release: squeeze/sid APT prefers natty-updates APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-8-generic (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru toshset-1.76/debian/patches/08_novatel_3g_suspend.patch toshset-1.76/debian/patches/08_novatel_3g_suspend.patch --- toshset-1.76/debian/patches/08_novatel_3g_suspend.patch 2011-03-14 12:34:26.000000000 -0700 +++ toshset-1.76/debian/patches/08_novatel_3g_suspend.patch 2011-07-08 18:36:01.000000000 -0700 @@ -1,8 +1,10 @@ Author: Roberto C. Sanchez <robe...@connexer.com> Description: Script that was omitted from the release by upstream ---- /dev/null -+++ trunk/novatel_3g_suspend -@@ -0,0 +1,30 @@ +Index: toshset-1.76/novatel_3g_suspend +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ toshset-1.76/novatel_3g_suspend 2011-07-08 18:35:53.000000000 -0700 +@@ -0,0 +1,34 @@ +#! /bin/sh + +# This script puts the Novatel 3G modem in Toshiba Portege R500 to USB @@ -24,6 +26,10 @@ +BUS=2 +DEVICE=2 + ++if [ ! -x /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level ]; then ++ exit 0 ++fi ++ +case $1 in + suspend|suspend_hybrid|hibernate) + echo suspend > /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level @@ -33,8 +39,10 @@ + : + ;; +esac ---- trunk.orig/Makefile.in -+++ trunk/Makefile.in +Index: toshset-1.76/Makefile.in +=================================================================== +--- toshset-1.76.orig/Makefile.in 2011-07-08 18:35:02.000000000 -0700 ++++ toshset-1.76/Makefile.in 2011-07-08 18:35:03.000000000 -0700 @@ -308,7 +308,7 @@ for program in $(PROGRAMS); do \ $(BININSTALL) $$program $(DESTDIR)/$(BINDESTDIR)/$$program;\