Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jan 2004 01:15:07 +0000
From:      James Green <jim@thebadger.org>
To:        freebsd-current@freebsd.org
Subject:   Re: API to turn off the display
Message-ID:  <1075338907.12011.224.camel@mobius.int.thebadger.org>
In-Reply-To: <20040129060727.619f3866.taku@cent.saitama-u.ac.jp>
References:  <200401272247.59306.freebsd-current@webteckies.org> <20040128.083215.114732225.imp@bsdimp.com> <20040128181110.GC775@laptop.lambertfam.org> <200401281319.02208.jhb@FreeBSD.org> <20040129060727.619f3866.taku@cent.saitama-u.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2004-01-28 at 21:07, Taku YAMAMOTO wrote:
> I wrote a driver that handles what John told.
> 
> http://access.cent.saitama-u.ac.jp/~taku/freebsd/acpi_vid-20031013.tar.gz
> MD5 (acpi_vid-20031013.tar.gz) = adbfa6931e505544fb784e00c7b974e7
> 
> This driver uses ACPI video extension to control display switching and
> backlight brightness. So working ACPI is a requisition for this driver.
> 
> Whether it does or does not work depends heavily on how well the BIOS written,
> however, I hope it worth trying.
> 
> Suggestions, working/not-working reports etc are very appreciated.

(Just a quick note: the MD5 for the package did not match - turned out
that with the above filename it was a plain (not gzipped) tar file. gzip
extensions in apache perhaps?)

I have had a good play with this as well. D600 also, lcd only tested.
Builds and loads without errors on CURRENT built this afternoon (GMT).

sysctl mibs all report 0 on first loading, but report correctly after
being set to 1/0.

LCD can be turned on/off successfully from the console with  
# sysctl hw.acpi.video.lcd0.active=0 && sleep 5 && sysctl
hw.acpi.video.lcd0.active=1

In XFree86-4.3 (from ports) the LCD is successfully turned off, but
creates a hairy mess when it comes back on. (black and white patterns up
and down the screen...) Over ssh you can still successfully turn the LCD
on and off as above, but when it is on you get the same mess on the
screen, can't switch back to a vt and is only cleared up by a reboot.

This is a great and much needed bit of functionality though - thank you
very much! If you have anything else that needs testing, I am always
happy (if I can find/make time!)

Thanks,

James

p.s. On a related note: if I suspend using 'acpiconf -s 1', the
/etc/rc.suspend and rc.resume scripts run as expected. 
If I use the lid switch/sleep button to go to S1, these scripts do not
get called. A quick grep through /usr/src/ confirmed that only acpiconf
references them. So I set up entries in /etc/devd.conf to call a script
that calls rc.suspend and rc.resume (because the logic of the suspend
button and the Lid switch are reversed...). The problem is, the suspend
event does not seem to get processed by devd until the laptop resumes.
Changing hw.acpi.sleep_delay does not seem to make any difference to
this. Do you know if this is a bug, a feature or work in progress?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1075338907.12011.224.camel>