From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 11:41:42 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C115C106566B for ; Tue, 27 Jan 2009 11:41:42 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id 86BD88FC1D for ; Tue, 27 Jan 2009 11:41:42 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (67.158.192-77.rev.gaoland.net [77.192.158.67]) by smtp.lamaiziere.net (Postfix) with ESMTPA id AA5F2633301 for ; Tue, 27 Jan 2009 12:41:41 +0100 (CET) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id C3662C184 for ; Tue, 27 Jan 2009 12:41:39 +0100 (CET) Date: Tue, 27 Jan 2009 12:41:37 +0100 From: Patrick =?ISO-8859-15?Q?Lamaizi=E8re?= To: freebsd-hackers@freebsd.org Message-ID: <20090127124137.46fcfac5@baby-jane.lamaiziere.net> Organization: /dave/nulle X-Mailer: Claws Mail 3.7.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Mackbook pro nvidia based video backlight X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 11:41:43 -0000 Hello, I've made a small driver to set the backlight level on Apple MacBook Pro, for the models based on the Nvida video card (model 3,1 and 3,2). (if it works on other models please tell me) At the moment this is a quick and dirty hack, but you don't need to wear a pair of sunglasses anymore! Module (FreeBSD 7.1): http://user.lamaiziere.net/patrick/ambnb-270109.tar.gz The driver does not check if the hardware is a suitable Macbook Pro (TODO!), so use with care. You can check the model of your Mac with dmidecode: Handle 0x0011, DMI type 1, 27 bytes System Information Manufacturer: Apple Inc. Product Name: MacBookPro3,1 Version: 1.0 There is a sysctl hw.ambnb.level to set the level of the backlight (0 <= level <= 15). I don't have the time for the moment, but i will try to improve it a bit. I'm asking which method will be the best to interface the driver with userland applications? Regards.