Re: ACPI Suspend -> /dev/ums0 dead

From: Jose M Rodriguez <josemi_at_freebsd.jazztel.es>
Date: Tue, 12 Oct 2004 15:11:52 +0200
El Martes, 12 de Octubre de 2004 14:33, Jochen Gensch escribió:
> Jose M Rodriguez wrote:
> > You may also try and specific resume in /etc/rc.resume:
> > /usr/bin/killall moused
> > [ -c /dev/psm0 ] && /usr/sbin/moused -p /dev/psm0 \
> >  -I /var/run/moused.pid
> > [ -c /dev/ums0 ] && /usr/sbin/moused -p /dev/ums0 \
> >  -I /var/run/moused.ums0.pid
> > /usr/sbin/vidcontrol -m on
>
> Yes, that's kind of the same, what I did. However this doesn't seem
> to be executed. If you just enter a '/usr/bin/killall moused' for
> instance, then nothing is going to be killed. Even your version
> doesn't work at all. By the way, what is that is the brackets?
> [...]

try as attached.  [ -c ] are test of device presence, see test(1)

> But I can kill and restart it manually, which is working fine...
> maybe I'm using the wrong position in rc.resume?
>
> SU NB /home/incmc:cat /etc/rc.resume
> #!/bin/sh
> #
> # Copyright (c) 1999  Mitsuru IWASAKI
> # All rights reserved.
> #
> # Redistribution and use in source and binary forms, with or without
> # modification, are permitted provided that the following conditions
> # are met:
> # 1. Redistributions of source code must retain the above copyright
> #    notice, this list of conditions and the following disclaimer.
> # 2. Redistributions in binary form must reproduce the above
> copyright #    notice, this list of conditions and the following
> disclaimer in the #    documentation and/or other materials provided
> with the distribution. #
> # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
> AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
> TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
> PARTICULAR PURPOSE # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
> CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT
> LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF
> USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND
> ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY,
> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT
> OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF #
> SUCH DAMAGE.
> #
> # $FreeBSD: src/etc/rc.resume,v 1.7 2003/12/30 17:30:39 njl Exp $
> #
>
> # sample run command file for APM Resume Event
>
> if [ $# -ne 2 ]; then
>          echo "Usage: $0 [apm|acpi] [standby,suspend|1-5]"
>          exit 1
> fi
>
> subsystem=$1
> state=$2
>
> if [ -r /var/run/rc.suspend.pid ]; then
>          kill -9 `cat /var/run/rc.suspend.pid`
>          rm -f /var/run/rc.suspend.pid
>          echo 'rc.resume: killed rc.suspend that was still around'
> fi
>
> # Turns on a power supply of a card in the slot inactivated.
> # See also contrib/pccardq.c (only for PAO users).
> # pccardq | awk -F '~' '$5 == "inactive" \
> #       { printf("pccardc power %d 1", $1); }' | sh
>
> # UHCI has trouble resuming so we just load/unload it.  You
> # should add any other kernel modules you want reloaded here.
> # kldload usb
>
> logger -t $subsystem resumed at `date +'%Y%m%d %H:%M:%S'`
> sync && sync && sync
>
> #Moused killen und neu starten
> #/usr/bin/killall -KILL moused
> #/usr/sbin/moused -p /dev/psm0
>
> /usr/bin/killall moused [ -c /dev/psm0 ] && /usr/sbin/moused -p
> /dev/psm0 \ -I /var/run/moused.pid [ -c /dev/ums0 ] &&
> /usr/sbin/moused -p /dev/ums0 \ -I /var/run/moused.ums0.pid
> exit 0
>
>
> Jochen
>
>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe_at_freebsd.org"
Received on Tue Oct 12 2004 - 11:17:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:16 UTC