From owner-freebsd-current@FreeBSD.ORG Fri Jan 18 23:27:37 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E799016A417 for ; Fri, 18 Jan 2008 23:27:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 3CF4613C469 for ; Fri, 18 Jan 2008 23:27:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so694193uge.37 for ; Fri, 18 Jan 2008 15:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=gTkFLeDl0BQy9PLhw/wf9NOdNKl+ZNk7XK3E7k3A2IY=; b=mNPIt3E4lST2bdaVmVVgOQg4nyhuyOr6hlZe2uHVamZq4lcHeo4BU6UdtLfTRKdOcwDBjivuIePlm1evo8GYPJJ4UWqY7ZkVton39z/DivSkRFtluFOCSXmXnYV5w5+ZsGnrm7R2aWn92Ab/nDBWvjd2wNEgQ3ms3EKTBim+aT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=Gs33RLhN3FUPYBA5OuT9RXScmBhi18h7TTEhADiZCICz5Kbzu3MIvV+GtM7KNOIvi2HUPChGRwZ8k8XfQtN+nQBMHDEFsOxIeQkw0od7PGjclKhRgsDyHXInQtCZdmCJhXl0ohqjLe5lEqq8z5tb+q19uZ/j9sPoXpAgNlQA8Ns= Received: by 10.67.20.3 with SMTP id x3mr1660230ugi.3.1200698855001; Fri, 18 Jan 2008 15:27:35 -0800 (PST) Received: from epsilon.mshome.net ( [78.130.107.158]) by mx.google.com with ESMTPS id 23sm4289374ugf.24.2008.01.18.15.27.29 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Jan 2008 15:27:34 -0800 (PST) Message-Id: From: Rui Paulo To: Eric Anholt In-Reply-To: <1200429291.2916.26.camel@localhost> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Fri, 18 Jan 2008 22:59:28 +0000 References: <20080113042318.GA5312@mua.local> <864pdgjt0y.wl%rpaulo@fnop.net> <1200429291.2916.26.camel@localhost> X-Mailer: Apple Mail (2.915) Sender: Rui Paulo Cc: freebsd-current@FreeBSD.org Subject: Re: FreeBSD on macbook & backlight module X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2008 23:27:37 -0000 On Jan 15, 2008, at 8:34 PM, Eric Anholt wrote: > On Mon, 2008-01-14 at 16:01 +0000, Rui Paulo wrote: >> I have the backlight module ready to be committed (needs approval >> first), but it would be great if we could create a general backlight >> API. I have some initial ideas, but needs a bit more thought. >> >> Also, xrandr on (7.3 with "intel" video driver) seems to be able to >> control the LCD backlight on MacBooks, but it seems bogus: >> >> % xrandr --prop >> Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280 >> VGA disconnected (normal left inverted right x axis y axis) >> LVDS connected 1280x800+0+0 (normal left inverted right x axis y >> axis) 286mm x 179mm >> EDID_DATA: >> 00ffffffffffff0006105b9c00000000 >> 0e100103801d12780a87f594574f8c27 >> 27505400000001010101010101010101 >> 010101010101bc1b00a0502017303020 >> 36001eb3100000190000000100061020 >> 00000000000000000a20000000fe004c >> 544e31333357310000000a20000000fc >> 00436f6c6f72204c43440a20202000c6 >> BACKLIGHT: 296 (0x00000128) range: (0,296) >> >> I don't really know about how exactly this control works, because: >> >> 1) the range is wrong. >> 2) setting values with xrandr --output LVDS --set BACKLIGHT , >> doesn't seem to be doing anything good. It just sets a high and low >> value for the backlight brigthness. >> >> If anyone knows anything about this, I would appreciate if you could >> step forward. >> >> There's another problem: xv (try it with mplayer -vo xv) seems to be >> setting the backlight value on initialization. So, if you start Xorg >> with backlight value of 50, then reduce it to 20 and after that try >> to play a video with mplayer, the backlight value seems to come back >> to 50. There are very strange interactions between xrandr and my own >> backlight control kernel module. It would be great to disable >> xrandr's >> backlight control, at least. >> >> Regards. >> -- >> Rui Paulo >> I have the backlight module ready to be committed (needs approval >> first), but it would be great if we could create a general backlight >> API. I have some initial ideas, but needs a bit more thought. >> >> Also, xrandr on (7.3 with "intel" video driver) seems to be able to >> control the LCD backlight on MacBooks, but it seems bogus: >> >> % xrandr --prop >> Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280 >> VGA disconnected (normal left inverted right x axis y axis) >> LVDS connected 1280x800+0+0 (normal left inverted right x axis y >> axis) 286mm x 179mm >> EDID_DATA: >> 00ffffffffffff0006105b9c00000000 >> 0e100103801d12780a87f594574f8c27 >> 27505400000001010101010101010101 >> 010101010101bc1b00a0502017303020 >> 36001eb3100000190000000100061020 >> 00000000000000000a20000000fe004c >> 544e31333357310000000a20000000fc >> 00436f6c6f72204c43440a20202000c6 >> BACKLIGHT: 296 (0x00000128) range: (0,296) >> >> I don't really know about how exactly this control works, because: >> >> 1) the range is wrong. >> 2) setting values with xrandr --output LVDS --set BACKLIGHT , >> doesn't seem to be doing anything good. It just sets a high and low >> value for the backlight brigthness. > > That xrandr --prop output may be broken. My xlib fu is weak. > >> If anyone knows anything about this, I would appreciate if you could >> step forward. >> >> There's another problem: xv (try it with mplayer -vo xv) seems to be >> setting the backlight value on initialization. So, if you start Xorg >> with backlight value of 50, then reduce it to 20 and after that try >> to play a video with mplayer, the backlight value seems to come back >> to 50. There are very strange interactions between xrandr and my own >> backlight control kernel module. It would be great to disable >> xrandr's >> backlight control, at least. > > I use xbacklight -set to control backlight. Your issue > with it flipping to only a high/low value may have been the one > jbarnes > fixed in git recently (apparently a low bit got redefined on us). That's great news. This way we can rely on Xorg to set the backlight instead of adding one more kernel module. Thanks for the information. -- Rui Paulo