From nobody Fri Aug 16 22:53:38 2024 X-Original-To: freebsd-acpi@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 4Wly2t3wLFz5Tj9S for ; Fri, 16 Aug 2024 22:53:42 +0000 (UTC) (envelope-from marc@mccd.space) Received: from fhigh2-smtp.messagingengine.com (fhigh2-smtp.messagingengine.com [103.168.172.153]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wly2s6QJQz4LMF for ; Fri, 16 Aug 2024 22:53:41 +0000 (UTC) (envelope-from marc@mccd.space) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mccd.space header.s=fm3 header.b=ruJZCIkb; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=ZqTCCCzK; dmarc=none; spf=pass (mx1.freebsd.org: domain of marc@mccd.space designates 103.168.172.153 as permitted sender) smtp.mailfrom=marc@mccd.space Received: from phl-compute-06.internal (phl-compute-06.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 26019114EA5E for ; Fri, 16 Aug 2024 18:53:41 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 16 Aug 2024 18:53:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mccd.space; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1723848821; x=1723935221; bh=J1RCf26u+I 3QrWVmYzIvaAI2aHtRUVpWo8SsdgH8+xo=; b=ruJZCIkbuTinIDseoeXSRjp5b/ lTk/PqK6DzAcaaxl382R6TY+h+HKtlkroOHZcqxpn7axKfVAfAOoGgHg+wOluyIL Bfv+PGmDtZzIMzquilltOj0zW/YU3R+TbvjlOoKfsy8GzLMcpTKv+3zxuAu3MHee 4oQCYA26p7AP0ShLVScFbi7Tmoi1YhOPZPtLwQZJnzIaCUkXutjmMWCA4YV927WJ 8vfd06WV/BSwgo5+LRVsaBVO3dGF9ZMsXHnti7AP/Atz9wkpZ33WTvd76LOoLOSr IqW1yqb6OUKPC2oHkZRpmKlz2xXmtssjamQKXJ502m8eUmjOE6dlJDxV6j/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1723848821; x=1723935221; bh=J1RCf26u+I3QrWVmYzIvaAI2aHtR UVpWo8SsdgH8+xo=; b=ZqTCCCzKfGck8jr39/wo85I2CW/shLUZ+DoOlKsACH4g EbfB9Upi/PWJ8V+MONEY31sDSRQ3lhe43dNb4fkllScrFfBEucEXMSbqgdih1Fjr pRGUv89WM9Hnh/csdgCWI7VW+jVsmBh6U32oBcjpLdGxY8aFlJeY4/gg6Wc3FHf3 2XLtcWsSOA558jX0T8IXXCpu6UHutarvgm5fHw+PEKbyk01LGbRzcmWG0C/kQ5tt 5Hz4j2KWsMoVhfnKmTFMhLzPZsDqSiBH1nhIeHyNPaUjiEpJ/sQMOInksyw1KUVf C2wxTnVrczrkn3TXKMwh6+mglq94hAHvGXzQppiP3w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtledgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpegggfgtff fkhffvuffosehtqhertdertdejnecuhfhrohhmpedfofgrrhgtucevohhquhgrnhgufdcu oehmrghrtgesmhgttggurdhsphgrtggvqeenucggtffrrghtthgvrhhnpeejfffhtdevhf efffelkeevudefudekgeetgefhffeltefhkefhhfdvffevkefgteenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrtgesmhgttggurdhsph grtggvpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehfrhgvvggsshguqdgrtghpihesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: ia2d149fd:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 16 Aug 2024 18:53:40 -0400 (EDT) List-Id: ACPI and power management development List-Archive: https://lists.freebsd.org/archives/freebsd-acpi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-acpi@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 16 Aug 2024 17:53:38 -0500 Message-Id: From: "Marc Coquand" To: Subject: acpi_ibm brightness man page example not working + fix X-Mailer: aerc 0.16.0 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; RWL_MAILSPIKE_VERYGOOD(-0.20)[103.168.172.153:from]; R_SPF_ALLOW(-0.20)[+ip4:103.168.172.128/27:c]; R_DKIM_ALLOW(-0.20)[mccd.space:s=fm3,messagingengine.com:s=fm3]; RCVD_IN_DNSWL_LOW(-0.10)[103.168.172.153:from]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[mccd.space:+,messagingengine.com:+]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[mccd.space]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:209242, ipnet:103.168.172.0/24, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEFALL_USER(0.00)[marc]; PREVIOUSLY_DELIVERED(0.00)[freebsd-acpi@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-acpi@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim] X-Rspamd-Queue-Id: 4Wly2s6QJQz4LMF Hi! Apologize in advance if I'm reporting this wrong, this is my first post to the mailing list and my first time contributing to Freebsd. :) I noticed that the example in the manpage for acpi_ibm, specifically for setting up brightness was not working for me. The specific part that did not work for me is: + 0x10|0x11) + LEVEL=3D`sysctl -n dev.acpi_${OEM}.0.lcd_brightness` + PERCENT=3D`${ECHO} "${BC_PRECOMMANDS} ; \ + ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\ + ${CALC} | ${CUT} -d . -f 1` + MESSAGE=3D"brightness level ${PERCENT}%" + ;; + This was tested on my Thinkpad T480s. It makes sense that it would not work, because manually changing the brightness with `sysctl dev.acpi_ibm.0.lcd_brightness=3DXXX` did not do anything either on my laptop. Since FreeBSD 13.0, there is a new backlight utility, and with that I was able to fix backlight on my computer by simply creating the following devd config: /etc/devd/acpi_ibm_brightness.conf + notify 20 { + match "system" "ACPI"; + match "subsystem" "IBM"; + match "notify" "0x10"; + action "/usr/bin/backlight incr 10"; + }; + + notify 20 { + match "system" "ACPI"; + match "subsystem" "IBM"; + match "notify" "0x11"; + action "/usr/bin/backlight decr 10"; + }; Maybe the examples in acpi_ibm manpages should use backlight utility instead? Alternatively, maybe the devd rules above could be added by default so that backlight works out of the box if you load acpi_ibm? It'd be easy to also add support for volume control with mixer. I am happy to make a patch if this is of interest. Sincerely, Marc