From nobody Fri Feb 3 15:50:28 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P7g9G0KH6z3kRnx for ; Fri, 3 Feb 2023 15:50:42 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7g9F0Z5Vz3HqS for ; Fri, 3 Feb 2023 15:50:40 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 313FoUrf051414; Fri, 3 Feb 2023 07:50:30 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 313FoSft051413; Fri, 3 Feb 2023 07:50:28 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202302031550.313FoSft051413@gndrsh.dnsmgr.net> Subject: Re: Could not change brightness anymore with i915kms & acpi_video modules c 202211 In-Reply-To: <202302030846.3138kSMO006053@critter.freebsd.dk> To: Poul-Henning Kamp Date: Fri, 3 Feb 2023 07:50:28 -0800 (PST) CC: Emmanuel Vadot , "parv/FreeBSD" , freebsd-current@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4P7g9F0Z5Vz3HqS X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[freebsd]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > -------- > Emmanuel Vadot writes: > > On Thu, 02 Feb 2023 20:58:58 +0000 > > "Poul-Henning Kamp" wrote: > > > > > -------- > > > parv/FreeBSD writes: > > > > > > > > Does backlight(8) works for you? > > > > > > > > Thanks for the clue. It does! It does ... > > > > > > > > - I get the same number back via "backlight" without any arguments as > > > > what I gave it earlier. There was no reporting of value being > > > > subtracted by one; > > > > > > Sorry for the delay in reporting back. > > > > > > I consistently read one less back, except for 0 and 100. > > > > Even 50 ? > > # backlight > brightness: 0 > # backlight 50 > # backlight > brightness: 49 > # backlight 25 > # backlight > brightness: 24 > # backlight 75 > # backlight > brightness: 74 > > yes This smells like a zero-bias byte rounding issue... Ie, if the backlight intensity register is 8 bit, having values 0 to 255, and we scale 50% to 256 * 50% == 128 or do we scale to 255 * 50% == 127, and then reverse it as 127/255 == 49. > > > So if you have, let's say brightness at 50%, and you plug an external > > monitor, brightness goes up to 100% ? > > No, plugging and unplugging does not change the backlight. > > But when the screen saver has kicked in, and I wake it up again, it comes > back at 100, (and reads back as 100) > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > > -- Rod Grimes rgrimes@freebsd.org