9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: unobe@cpan.org
To: 9fans@9fans.net
Subject: Re: [9fans] Adjust Thinkpad Screen Brightness
Date: Thu, 08 Jun 2023 00:53:19 -0700	[thread overview]
Message-ID: <44712314AE4A971305D87A17793C7FF3@smtp.pobox.com> (raw)
In-Reply-To: <ZIELWNCK0leTjQ20@alice>

Quoth Anthony Martin <ality@pbrane.org>:
> unobe@cpan.org once said:
> > I reviewed the data sheet and the scripts should
> > work, but does not.
> 
> The above scripts can work for some Intel cards
> but probably not for all of them.

Thank you, Anthony.  That script helped me review the volumes again
and find out where the 'br' script is wrong.  It was just reading from
the wrong register for Ivy Bridge.  Here's the patch for qwx/rc's
branch, and it works like a charm now on my x230t.

From: Romano <unobe@cpan.org>
Date: Thu, 08 Jun 2023 07:49:37 +0000
Subject: [PATCH] Ivy Bridge uses South Display for reading brightness levels, per Vol. 3 Part 3 and 4 of Programmer's Reference

---
diff a9e9e008d4574c55fd9452de2cfc2cf9d964e7e5 d52fd7d1b16ce1e4f06607bfcec6859285077536
--- a/bin/br
+++ b/bin/br
@@ -29,8 +29,8 @@
        # works on x220, not on w520
        did["8086/0126","r"] = "0xc8254";  did["8086/0126","w"] = "0x48254"
        # ivy bridge
-       did["8086/0152","r"] = "0x48254";  did["8086/0152","w"] = "0x48254"
-       did["8086/0166","r"] = "0x48254";  did["8086/0166","w"] = "0x48254"
+       did["8086/0152","r"] = "0xc8254";  did["8086/0152","w"] = "0x48254"
+       did["8086/0166","r"] = "0xc8254";  did["8086/0166","w"] = "0x48254"
        # haswell
        did["8086/0412","r"] = "0xc8254";  did["8086/0412","w"] = "0x48254"
        did["8086/041a","r"] = "0xc8254";  did["8086/041a","w"] = "0x48254"


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T4c4247ec1c0429f6-M7438e53aae9530c902ef75f6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  parent reply	other threads:[~2023-06-08  7:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-28 16:36 zxcdewqa8
2023-05-28 19:17 ` ori
2023-05-29  2:36   ` Anthony Martin
2023-05-30  4:25     ` zxcdewqa8
2023-06-07  7:01       ` plan6
2023-06-07 21:27         ` mkf9
2023-06-07 21:42           ` unobe
2023-06-07 22:57             ` Anthony Martin
2023-06-08  7:16               ` plan6
2023-06-08  7:53               ` unobe [this message]
2023-06-08  8:12                 ` unobe
2023-06-08  8:08               ` plan6
2023-06-09  6:35                 ` zxcdewqa8
2023-06-09  7:37                   ` unobe
2023-06-09 18:11                   ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44712314AE4A971305D87A17793C7FF3@smtp.pobox.com \
    --to=unobe@cpan.org \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).