From owner-freebsd-mobile Sun Oct 8 2:17:24 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from hand.dotat.at (hand.dotat.at [212.240.134.135]) by hub.freebsd.org (Postfix) with ESMTP id B5AD937B66C for ; Sun, 8 Oct 2000 02:17:21 -0700 (PDT) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 13iCZt-0006UD-00; Sun, 08 Oct 2000 09:17:05 +0000 Date: Sun, 8 Oct 2000 09:17:04 +0000 From: Tony Finch To: Brett Glass Cc: mobile@FreeBSD.ORG Subject: Re: Suspend/Resume fails with X GUI running Message-ID: <20001008091704.A12691@hand.dotat.at> References: <4.3.2.7.2.20000923181925.051c3440@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <4.3.2.7.2.20000923181925.051c3440@localhost> Organization: Covalent Technologies, Inc Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brett Glass wrote: > >I'm working on configuring a FreeBSD laptop here -- Dell Inspiron 5000 >series, ATI Rage chipset, nice, fast 600 MHz Intel processor. FreeBSD >4.1-STABLE. If it's running text consoles, it suspends/resumes absolutely >perfectly. But when it's running any X Windows desktop, it hangs on suspend >and must be cold booted. Before I try redebugging the wheel, does anyone >have a handle on what might be wrong and how to work around it? /* * zzz.c: a wrapper around apm(8) that works on my dodgy laptop * * (C) 2000 Tony Finch */ static const char *const cvsid = "$Header: /cvs/fanf/zzz/zzz.c,v 1.1.1.1 2000/06/22 08:43:37 fanf Exp $"; #include #include #include #include #include #include #include int main() { int fd, vt, status; fd = open("/dev/vga", O_RDONLY); if(fd < 0) err(1, "open /dev/vga"); if(ioctl(fd, VT_GETACTIVE, &vt) < 0) err(1, "ioctl VT_GETACTIVE"); if(ioctl(fd, VT_ACTIVATE, 1) < 0) err(1, "ioctl VT_ACTIVATE"); switch(fork()) { case -1: err(1, "fork"); case 0: execl("/usr/sbin/apm", "apm", "-z", NULL); err(1, "exec apm -z"); default: wait(&status); if(!WIFEXITED(status) || WEXITSTATUS(status)) errx(1, "apm -z failed"); } sleep(3); if(ioctl(fd, VT_ACTIVATE, vt) < 0) err(1, "ioctl VT_ACTIVATE"); exit(0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message