From owner-freebsd-mobile Tue Jan 30 20:23: 1 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from mail8.nc.rr.com (fe8.southeast.rr.com [24.93.67.55]) by hub.freebsd.org (Postfix) with ESMTP id 8818237B6A0 for ; Tue, 30 Jan 2001 20:22:41 -0800 (PST) Received: from babbleon.org ([24.163.43.236]) by mail8.nc.rr.com with Microsoft SMTPSVC(5.5.1877.537.53); Tue, 30 Jan 2001 23:20:09 -0500 Message-ID: <3A779220.4E1F1336@babbleon.org> Date: Tue, 30 Jan 2001 23:18:40 -0500 From: The Babbler Organization: None to speak of X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Sean O'Connell , freebsd-mobile@freebsd.org, dot@dotat.at Subject: Re: switching away from X? References: <3A778B39.EA7D6200@babbleon.org> <20010130225821.B31985@stat.Duke.EDU> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Thanks for the XFree 4.0 tip, but I've changed my O/S from Linux to FreeBSD, gotten a new printer, set up a VPN, and about a zillion other major config changes in the past few weeks, and I really don't think I can deal with yet another change for a little while. At least not until I've recovered from the others. The zzz code works great, though. Thanks to you and to Mr. Finch. Sean O'Connell wrote: > > The Babbler stated: > : > : It turns out that I need to do the same thing under FreeBSD that I did > : under Linux for my Dell i7500; that is, the suspend works fine if I'm at > : a console but freezes the box if I'm under X. So I need to switch to a > : console if X is currently on the display. (It's fine for X to be > : *running* as long as it doesn't have the *display*.) > : > : Under Linux, this was with the "chvt" but FreeBSD doesn't seem to have > : one of those. I've been sporting about it--I've searched > : www.freebsd.org and the mailing lists archives and altavista and google, > : and I've come up empty-handed. > : > : So how do I switch to a console other than by hitting CTL-ALT-Fn? > : > : > : PS: And since I gotta post anyway, what gets auto-run when I suspend? > : I notice that the apmd.conf file has SUSPENDREQs go to rc.suspend, so I > : can just add whatever command there. > : > : But the USERSUSPENDREQ doesn't call the file. But it does do an apm -z > : at the end; does that really just trigger the SUSPENDREQ event in turn? > : What is the difference between the two varieties of SUSPENDREQ? > : > : Sorry if I'm missing something here. > > Brian- > > If this thing has a Mobility chipset in it, XFree86-4.0.x is your > friend. It corrects much of this mess; however, there is a program > floating around called zzz-wrapper written by Tony Finch > > He posted the contents and instructions to -mobile. I will paste it in > His comment was: > > "I changed apmd.conf to run my wrapped zzz rather than the standard > zzz, and my path puts the wrapped zzz first. The code's below." > > /* > * 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); > } > > -- > 1--------01---------01--------01--------01--------01--------01--------0 > Sean O'Connell sean@stat.Duke.EDU -- "Brian, the man from babble-on" bts@babbleon.org Brian T. Schellenberger http://www.babbleon.org Support http://www.eff.org. Support decss defendents. Support http://www.programming-freedom.org. Boycott amazon.com. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message