From owner-freebsd-x11@FreeBSD.ORG Sat May 10 19:44:07 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5514BC85 for ; Sat, 10 May 2014 19:44:07 +0000 (UTC) Received: from mail-oa0-x231.google.com (mail-oa0-x231.google.com [IPv6:2607:f8b0:4003:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E45A202 for ; Sat, 10 May 2014 19:44:07 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id eb12so6447142oac.22 for ; Sat, 10 May 2014 12:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=k64U4qX1TMtnlCPSTMAtE8ptIZulYU17Q5rrs47Wq70=; b=dor1eU8Li0nbZQP929zyIWps5lLtRTH1kkB3Zu7iCbvOX+OyRu26QBXtWYMr9JjCSE j9g/xasAKNGeG/aWfzLk0RLOYkrz3zYnAFAv0BCZw6Qh49c/qK5idNHT78zUT9t2G7vt WxHAcYQlmSoeUH4p57jw+RbJcY6odm2SjIy5NKyZ0+0mwuEJh+bE+bbllJ9beWTGkaea ZDwc/fbmNqHk3vxcjnF/DuY8pVJaV0JeU3ioF5nScpVZggGZk+XjfbsjKI6WifGPru4v HBUT4Wbj21BLlOhVOiVKsN6QK1dfHleZkwZHcsks8dLP8wYg5LAH7AQJ5DuBZX7nSiSq btLA== X-Received: by 10.60.131.40 with SMTP id oj8mr23264008oeb.14.1399751046387; Sat, 10 May 2014 12:44:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.87.104 with HTTP; Sat, 10 May 2014 12:43:46 -0700 (PDT) In-Reply-To: <20140509221926.GA2342@coyotlan.atelo.org> References: <20140509221926.GA2342@coyotlan.atelo.org> From: Henry Hu Date: Sat, 10 May 2014 15:43:46 -0400 Message-ID: Subject: Re: Intel i915 backlight To: =?UTF-8?B?WMSrY8Oy?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-x11@freebsd.org" X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 19:44:07 -0000 On Fri, May 9, 2014 at 6:19 PM, X=C4=ABc=C3=B2 wrote: > Dear freebsd-x11, > > I am running /stable/10 (with i915kms and newcons) on a Vaio VPCZ21 > with a SandyBridge. Unfortunately backlight is not working out of the > box. > > I played a bit with the existing acpi modules (including acpi_sony and > acpi_video), and wrote a bit of code to modify the backlight level, > through sony acpi, but it does not seem quite effective. Basically, the > (sony) acpi reports 16 backlight levels, iirc, but modifying them does > not influence the actual brightness. > > On linux, backlight level is controlled through the graphic card. So, > basically I am investigating how to do so on FreeBSD. I am quite unsure > of how it works, probably xbacklight relies on xf86-video-intel. There > is some code in sys/dev/drm2/i915/intel_panel.c which looks appropriate > to handle the backlight, but I fail to understand how it is called by > xorg, for instance. > > Well, I assume someone here will have a better understanding of all > that, and possible on how the intel backlight works, and whether it is > only a pwm. For now, I am relying on software xrandr --brightness to set > an adequate luminosity, before further investigating the issue. > I'm using an ASUS UX51VZ, with an integrated intel display adapter, and a NVidia card. Now I'm using intel-backlight tool from intel-gpu-tools ( http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/). It works fairly well. There are several ACPI functions which seem to set the brightness, but most of them don't work, including \_SB.ATKD.SPLV. Settings in sysctls hw.acpi.video do not work for me, although I can see brightness levels being reported. I think that some code is absent in the i915 module, because in sys/dev/drm2/i915/intel_opregion.c, there is a big block of code surrounded by #ifdef CONFIG_ACPI which only works for Linux. I've seen a patch which exposed some sysctls to adjust brightness, and it calls intel_panel_set_backlight()/intel_panel_get_max_backlight(). > Best, > > -- > X=C4=ABc=C3=B2 > _______________________________________________ > freebsd-x11@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-x11 > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org" --=20 Cheers, Henry