From nobody Wed Jul 03 22:00:29 2024 X-Original-To: freebsd-stable@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 4WDty51hK8z5QNHP for ; Wed, 03 Jul 2024 22:00:45 +0000 (UTC) (envelope-from freebsd-stable@m.gmane-mx.org) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WDty43zxgz4qky for ; Wed, 3 Jul 2024 22:00:44 +0000 (UTC) (envelope-from freebsd-stable@m.gmane-mx.org) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (mx1.freebsd.org: domain of freebsd-stable@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=freebsd-stable@m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sP81k-000979-Q0 for freebsd-stable@freebsd.org; Thu, 04 Jul 2024 00:00:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Anton Shepelev Subject: Need help controlling laptom display brightness via sysctl Date: Thu, 4 Jul 2024 01:00:29 +0300 Message-ID: <20240704010029.75608a4e49205eb38a6034be@gmail.com> List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) X-Spamd-Bar: + X-Spamd-Result: default: False [1.69 / 15.00]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-0.99)[-0.986]; NEURAL_SPAM_MEDIUM(0.98)[0.978]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[antontxt@gmail.com,freebsd-stable@m.gmane-mx.org]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; ONCE_RECEIVED(0.10)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:24940, ipnet:116.202.0.0/16, country:DE]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[antontxt@gmail.com,freebsd-stable@m.gmane-mx.org]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4WDty43zxgz4qky Hello, all. I need your help in setting up the brightness control on my HP 15-b0xx laptop via sysctl. Upon perusal of the following materials: https://docs.freebsd.org/en/books/handbook/config/#acpi-config https://forums.freebsd.org/threads/laptop-setting-display-brightness.80524/ I added kld_list="i915kms acpi_hp acpi_video" to rc.conf, activated the `intel' interface modes in sysctl variables, in loader.conf: hw.i915kms.enable_dpcd_backlight=3 compat.linuxkpi.i915_enable_dpcd_backlight=3 (standard interface (=1) does not work either). Made sure that the modules are loaded with kldstat: 2 1 0xffffffff82c18000 1b3920 i915kms.ko 9 1 0xffffffff82e67000 3288 acpi_hp.ko 11 1 0xffffffff82e6f000 4388 acpi_video.ko And listed the relevant sysctl variables: hw.i915kms.enable_dpcd_backlight: 3 hw.i915kms.invert_brightness: 0 hw.acpi.video.lcd0.levels: 80 50 0 1 <...> 100 hw.acpi.video.lcd0.economy: 50 hw.acpi.video.lcd0.fullpower: 80 hw.acpi.video.lcd0.brightness: 50 hw.acpi.video.lcd0.active: 0 compat.linuxkpi.i915_enable_dpcd_backlight: 3 compat.linuxkpi.i915_invert_brightness: 0 First, I noticed that .lcd0.active above is 0, which probably means that sysctl thinks my display inactive. Trying to set it to unity, however, has no effect: hw.acpi.video.lcd0.active: 0 -> 0 with nothing new in dmesg. [Perhaps] consequentyly, sysctl hw.acpi.video.lcd0.brightness=70 is obeyed, but the actuall visible brightness is not affected. On the other hand, backlight 70 has the takes visible effect, but the sysctl values stay the same. This is my pciconf output for the display device: vgapci0@pci0:0:2:0: class=0x030000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x1916 subvendor=0x103c subdevice=0x8328 vendor = 'Intel Corporation' device = 'Skylake GT2 [HD Graphics 520]' class = display subclass = VGA I have found nothing interesting in dmesg outoput, so here it is in full: I have FreeBSD 14.1 (stable).