From owner-freebsd-acpi@freebsd.org Wed Nov 1 18:41:19 2017 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8277DE62206 for ; Wed, 1 Nov 2017 18:41:19 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from sonic317-27.consmr.mail.bf2.yahoo.com (sonic317-27.consmr.mail.bf2.yahoo.com [74.6.129.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46B587D46F for ; Wed, 1 Nov 2017 18:41:18 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) X-YMail-OSG: Q5ogU6oVM1m_pTN6u.eT.69qX9UUL2l1eV_ma73RJNyvHJY9WrZ5x4OlFt_QWlR Y8BP2k20EOfhBwGLK6aOqvUBMN0oy5DdGPU5Bt8y3oSEm1YF6NL4cOGuhlI8kNivNu.UBStUZtp8 PvuPzyKPwCtOaFrkb6Y0JLBO1k89N6Joke9qePzMPCR54EeS7a5jRer3lhhOByOQQj2vzyLY3ruU xlsZ_DWSnQZb48to.eRUcyU779uZTy14s6leVn4H3YH2z01GEQumvPEH1cyD5MIqbITQ8TbIm6UC mL7CNbadnYwqZCbSHXiSQtHcIPS4DDlYph.i0Zv2_P5kBBZyJiEwq6iBw9ta.7XePSEXazNf9Dc5 qXmdliZhKvyIR8hROP_pWLg8xMzSHqGTw2UORm7ShpvVIMNZ7nPrQhs6WUhdwjzjXQD2wHB1GSYe 6llnBLYtJn089sQYIBYsfFe54Yk185V9oK7eIRBWtHjJ61tN6vuLwiHe2oGhTJ86dKM6t3McSEFY Pm_Wst9AZyymYzS5RkrEGsx8CGsFmfsCn3S3KeYO8a5kyPI5LakW3DC4FxaVVP2Phmzv.TMsS_VP _Ltbv1JxqZmnIMkiMsGlYMdG5cV5ycGtqZq743UY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.bf2.yahoo.com with HTTP; Wed, 1 Nov 2017 18:41:12 +0000 Received: from [127.0.0.1] by smtp230.mail.bf1.yahoo.com with NNFMP; 01 Nov 2017 18:20:54 -0000 X-Yahoo-Newman-Id: 660350.68223.bm@smtp230.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Q5ogU6oVM1m_pTN6u.eT.69qX9UUL2l1eV_ma73RJNyvHJY 9WrZ5x4OlFt_QWlRY8BP2k20EOfhBwGLK6aOqvUBMN0oy5DdGPU5Bt8y3oSE m1YF6NL4cOGuhlI8kNivNu.UBStUZtp8PvuPzyKPwCtOaFrkb6Y0JLBO1k89 N6Joke9qePzMPCR54EeS7a5jRer3lhhOByOQQj2vzyLY3ruUxlsZ_DWSnQZb 48to.eRUcyU779uZTy14s6leVn4H3YH2z01GEQumvPEH1cyD5MIqbITQ8TbI m6UCmL7CNbadnYwqZCbSHXiSQtHcIPS4DDlYph.i0Zv2_P5kBBZyJiEwq6iB w9ta.7XePSEXazNf9Dc5qXmdliZhKvyIR8hROP_pWLg8xMzSHqGTw2UORm7S hpvVIMNZ7nPrQhs6WUhdwjzjXQD2wHB1GSYe6llnBLYtJn089sQYIBYsfFe5 4Yk185V9oK7eIRBWtHjJ61tN6vuLwiHe2oGhTJ86dKM6t3McSEFYPm_Wst9A ZyymYzS5RkrEGsx8CGsFmfsCn3S3KeYO8a5kyPI5LakW3DC4FxaVVP2Phmzv .TMsS_VP_Ltbv1JxqZmnIMkiMsGlYMdG5cV5ycGtqZq743UY- X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- To: Freebsd From: Anthony Jenkins Subject: can't evaluate \134_SB_.PCI0.VGA_.LCD_._BQC - AE_NOT_FOUND Message-ID: Date: Wed, 1 Nov 2017 14:20:52 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 18:41:19 -0000 My HP laptop has (had) this issue, where the _BQC method (Brightness Query Current level) is missing and our ACPI code throws up its hands and doesn't bother trying to adjust the brightness.  I patched my DSDT to add a _BQC method to fix mine, but later I asked the acpica mailing list if a missing _BQC was valid and what we should do about it.  They said it was valid and I should maintain the value locally in the OS. I attached a patch to bug 207086 which maintains the brightness level in a static variable, initially set to 0.  If _BQC call fails, from then on the code maintains LCD brightness in the static variable. A possible problem with the code is if there are multiple displays with backlight control, but _BQC doesn't have any concept of multiple displays, so it's a non-problem.  Other than that, I probably violated FreeBSD coding standards in several places.  I can stick the patch up on Phabricator if desired. References:  - Patch - https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187601&action=diff  - FreeBSD bug #207086 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207086  - ACPICA mailing list _BQC thread - https://lists.acpica.org/pipermail/devel/2017-January/001074.html