From owner-freebsd-mobile Tue Apr 29 03:18:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA09035 for mobile-outgoing; Tue, 29 Apr 1997 03:18:12 -0700 (PDT) Received: from hot.ee.lbl.gov (hot.ee.lbl.gov [131.243.1.42]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA09030 for ; Tue, 29 Apr 1997 03:18:10 -0700 (PDT) Received: by hot.ee.lbl.gov (8.8.5/1.43r) id DAA13110; Tue, 29 Apr 1997 03:18:09 -0700 (PDT) Message-Id: <199704291018.DAA13110@hot.ee.lbl.gov> To: freebsd-mobile@freebsd.org Subject: blacklight blanking syscons module for the Butterfly Date: Tue, 29 Apr 1997 03:18:09 PDT From: Craig Leres Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- Ever since I switched my IBM 701 to FreeBSD, it's annoyed me that the "green" screen saver didn't turn off the backlight. I took a look at this tonight and found some code I wrote for BSD/OS once upon a time. It was easily adapted as the appended loadable kernel module and works great! It will probably work with any Chips & Technologies 65545/65540 based notebook/laptop (and falls back to the normal "green" behavior when using something else). The easiest way to build it is to unpack the appended sharchive in /sys/syscons/lcd, build and install it (in /lkm) and change /etc/sysconfig to use saver=lcd (and set blanktime to some non-zero number of seconds). (It would be really cool if this got picked up and incorporated back into the official source tree.) Craig - ------ #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # lcd_saver.c # Makefile # This archive created: Tue Apr 29 03:08:48 1997 export PATH; PATH=/bin:$PATH echo shar: extracting "'lcd_saver.c'" '(4192 characters)' if test -f 'lcd_saver.c' then echo shar: will not over-write existing file "'lcd_saver.c'" else sed 's/^X//' << \SHAR_EOF > 'lcd_saver.c' X/*- X * Copyright (c) 1995, 1997 Sxren Schmidt X * All rights reserved. X * X * X * Redistribution and use in source and binary forms, with or without X * modification, are permitted provided that the following conditions X * are met: X * 1. Redistributions of source code must retain the above copyright X * notice, this list of conditions and the following disclaimer X * in this position and unchanged. X * 2. Redistributions in binary form must reproduce the above copyright X * notice, this list of conditions and the following disclaimer in the X * documentation and/or other materials provided with the distribution. X * 3. The name of the author may not be used to endorse or promote products X * derived from this software withough specific prior written permission X * X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. X * X * CT65545 backlight hacks by Craig Leres X * Network Research Group, Lawrence Berkeley National Laboratory, April 1997 X * X * @(#) $Header: lcd_saver.c,v 1.1 97/04/29 03:02:14 leres Exp $ (LBL) X */ X X#include X#include X#include X#include X#include X#include X#include X#include X X/* Chips & Technologies 65545 extension registers */ X#define CT_XRI 0x3d6 /* extension index */ X#define CT_XRD 0x3d7 /* extension data */ X X#define XR_CHPVER 0x00 /* (XR00) chip version */ X#define XR_CHPVER_MSK 0x07 /* chip version mask */ X#define XR_CHPVER_545 0xd8 /* 65545 version base */ X#define XR_CHPVER_540 0xd0 /* 65540 version base */ X#define XR_PWRCTL 0x52 /* (XR52) power down control */ X#define XR_PWRCTL_PANOFF 0x08 /* panel off mode */ X#ifdef notdef X#define XR_TMRCTL 0x5c /* (XR5C) activity timer ctl */ X#define XR_TMRCTL_MSK 0x1f /* activity timer count mask */ X#define XR_TMRCTL_ENA 0x80 /* enable activity timer */ X#endif X XMOD_MISC(lcd_saver); X Xvoid (*current_saver)(int blank); Xvoid (*old_saver)(int blank); X Xstatic void Xlcd_saver(int blank) X{ X u_char val; X register u_int chipver; X X if (blank) { X scrn_blanked = 1; X X /* Special panel backlight blanking for the CT 65545/65540 */ X outb(CT_XRI, XR_CHPVER); X chipver = inb(CT_XRD); X chipver &= ~XR_CHPVER_MSK; X if (chipver == XR_CHPVER_545 || chipver == XR_CHPVER_540) { X outb(CT_XRI, XR_PWRCTL); X outb(CT_XRD, inb(CT_XRD) | XR_PWRCTL_PANOFF); X } else { X /* blank stuff */ X outb(TSIDX, 0x01); val = inb(TSREG); X outb(TSIDX, 0x01); outb(TSREG, val | 0x20); X X /* green stuff */ X outb(crtc_addr, 0x17); val = inb(crtc_addr + 1); X outb(crtc_addr + 1, val & ~0x80); X } X } X else { X outb(CT_XRI, XR_CHPVER); X chipver = inb(CT_XRD); X chipver &= ~XR_CHPVER_MSK; X if (chipver == XR_CHPVER_545 || chipver == XR_CHPVER_540) { X outb(CT_XRI, XR_PWRCTL); X outb(CT_XRD, inb(CT_XRD) & ~XR_PWRCTL_PANOFF); X } else { X /* blank stuff */ X outb(TSIDX, 0x01); val = inb(TSREG); X outb(TSIDX, 0x01); outb(TSREG, val & 0xDF); X X /* green stuff */ X outb(crtc_addr, 0x17); val = inb(crtc_addr + 1); X outb(crtc_addr + 1, val | 0x80); X } X X scrn_blanked = 0; X } X} X Xstatic int Xlcd_saver_load(struct lkm_table *lkmtp, int cmd) X{ X (*current_saver)(0); X old_saver = current_saver; X current_saver = lcd_saver; X return 0; X} X Xstatic int Xlcd_saver_unload(struct lkm_table *lkmtp, int cmd) X{ X (*current_saver)(0); X current_saver = old_saver; X return 0; X} X Xint Xlcd_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) X{ X DISPATCH(lkmtp, cmd, ver, lcd_saver_load, lcd_saver_unload, X lkm_nullcmd); X} SHAR_EOF if test 4192 -ne "`wc -c < 'lcd_saver.c'`" then echo shar: error transmitting "'lcd_saver.c'" '(should have been 4192 characters)' fi fi # end of overwriting check echo shar: extracting "'Makefile'" '(196 characters)' if test -f 'Makefile' then echo shar: will not over-write existing file "'Makefile'" else sed 's/^X//' << \SHAR_EOF > 'Makefile' X# @(#) $Header: Makefile,v 1.1 97/04/29 03:08:08 leres Exp $ (LBL) X XKMOD= lcd_saver_mod XSRCS= lcd_saver.c X XNOMAN= XCFLAGS+= -DLKM -I${.CURDIR}/.. -I${.CURDIR}/../../../sys X X.include SHAR_EOF if test 196 -ne "`wc -c < 'Makefile'`" then echo shar: error transmitting "'Makefile'" '(should have been 196 characters)' fi fi # end of overwriting check # End of shell archive exit 0 -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBM2XKur2JLbUEFcrxAQE+CwQAkvp8gwpTLZnB+HnXxOm86NdGrIcRZFar AkQ3dwbzl2moi0zlC1r4of1OUMdCiStR+n7tIgtfVERSiRdLH8WRWOvNh3oAHHZk kr/lxFy+zk3KguADR8Niz/DSkk30lDJ4NHjbaM7OhIOBmY7eKznuubh8jDNZeeYK GdnogZi5d7k= =9hK4 -----END PGP SIGNATURE----- From owner-freebsd-mobile Wed Apr 30 16:06:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA22046 for mobile-outgoing; Wed, 30 Apr 1997 16:06:12 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA22028 for ; Wed, 30 Apr 1997 16:06:07 -0700 (PDT) Received: from shell2.ba.best.com (root@shell2.ba.best.com [206.184.139.133]) by who.cdrom.com (8.8.5/8.6.11) with ESMTP id PAA08090 for ; Wed, 30 Apr 1997 15:47:58 -0700 (PDT) Received: (from apsolid@localhost) by shell2.ba.best.com (8.8.5/8.7.3) id PAA22225 for freebsd-mobile@freebsd.org; Wed, 30 Apr 1997 15:46:02 -0700 (PDT) From: Andrew Perkins Message-Id: <199704302246.PAA22225@shell2.ba.best.com> Subject: FreeBSD X-Developer Laptop Platform Recomendation To: freebsd-mobile@freebsd.org Date: Wed, 30 Apr 1997 15:46:01 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL26 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk hi all, Ive been teaching myself c++ from my friends mac and ISP /w shell account and really want my own "developer laptop" running FreeBSD. I need the laptop to: (1) hold the "X-developer" canned distribution (MB???), (2) compile quickly (pentium100 is adaquate, but how much ram (16-32)), (3) connect to random network links (i know thats a tough one, what I mean is modem/PPP and ethernet, not necessarily simultaniously) BOTTOM LINE___ ANY SUGGESTIONS FOR CHEAP/QUALITY PC LAPTOP HARDWARE CAPABLE OF RUNNING FREEBSD. I would love to hear from folks on this list who are already running from laptop, who may email me directly if they like. Thanks in advance. ......................................................... andrew perkins apsolid@white-eye-alive.org 925 fell st. #2 www.white-eye-alive.org san francisco 415.739.0540 radience is bliss ......................................................... From owner-freebsd-mobile Fri May 2 22:43:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA13886 for mobile-outgoing; Fri, 2 May 1997 22:43:54 -0700 (PDT) Received: from black-cat.igloo.org (black-cat.igloo.org [199.34.34.3]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA13881 for ; Fri, 2 May 1997 22:43:51 -0700 (PDT) Received: (from mattm@localhost) by black-cat.igloo.org (8.8.5/8.8.5) id BAA03546; Sat, 3 May 1997 01:43:53 -0400 (EDT) Date: Sat, 3 May 1997 01:43:53 -0400 (EDT) Message-Id: <199705030543.BAA03546@black-cat.igloo.org> From: Matt Mosley MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: freebsd-mobile@freebsd.org Subject: help! Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi. I am running FreeBSD-2.2.1 on a ThinkPad 560. It's model 2640-50A, and has what appears to be the 11 inch screen on it. It also has what appears to be a cyber9385 graphics card. I have been unable to make it work at anything greater than 640x480. I've hit all of the numerous web pages out there with the cyber9382 program, etc, and nothing any of them have said to try has worked. The cyber9382 program will not run, it detects the card as being different. Anyone have any suggestions? Thanks, -Matt From owner-freebsd-mobile Sat May 3 11:21:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA08907 for mobile-outgoing; Sat, 3 May 1997 11:21:29 -0700 (PDT) Received: from assaris.sics.se (assaris.pdc.kth.se [193.10.159.45]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA08902 for ; Sat, 3 May 1997 11:21:25 -0700 (PDT) Received: (from assar@localhost) by assaris.sics.se (8.8.5/8.7.3) id UAA22431; Sat, 3 May 1997 20:21:55 +0200 (MET DST) To: Matt Mosley Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: help! References: <199705030543.BAA03546@black-cat.igloo.org> Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: multipart/mixed; boundary="Multipart_Sat_May__3_20:21:50_1997-1" Content-Transfer-Encoding: 7bit From: Assar Westerlund Date: 03 May 1997 20:21:50 +0200 In-Reply-To: Matt Mosley's message of Sat, 3 May 1997 01:43:53 -0400 (EDT) Message-ID: <5lsp04ju0x.fsf@assaris.sics.se> Lines: 46 X-Mailer: Gnus v5.2.40/Emacs 19.34 Sender: owner-mobile@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk --Multipart_Sat_May__3_20:21:50_1997-1 Content-Type: text/plain; charset=US-ASCII Matt Mosley writes: > Hi. I am running FreeBSD-2.2.1 on a ThinkPad 560. It's model > 2640-50A, and has what appears to be the 11 inch screen on it. > It also has what appears to be a cyber9385 graphics card. I > have been unable to make it work at anything greater than 640x480. > I've hit all of the numerous web pages out there with the cyber9382 > program, etc, and nothing any of them have said to try has worked. > The cyber9382 program will not run, it detects the card as being > different. We've have run the cyber9382 program successfully on ThinkPad 560's with 9385by just commenting out the second 'return 0' in `isitcyber'. /assar --Multipart_Sat_May__3_20:21:50_1997-1 Content-Type: text/plain; charset=US-ASCII /* * are we running on a cyber 9382? * * (presumably, we could be more liberal, i.e., accept * more boards. however, since i don't know the impact * of trying this on random boards, i am into being * as conservative as possible.) */ int isitcyber(void) { if (g_etx(0x3c5, 0xb) != 0xd3) { fprintf(stderr, "does not appear to be a Trident 9660/80/9385/2\n"); return 0; } if (g_etx(0x3c5, 0x9) != 0x33) { fprintf(stderr, "does not appear to be a 9382\n"); /* return 0; Comment out this line */ } return 1; /* Yes! */ } --Multipart_Sat_May__3_20:21:50_1997-1--