From nobody Sat Jun 18 10:53:47 2022 X-Original-To: x11@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 1EFAF86ED82 for ; Sat, 18 Jun 2022 10:53:58 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from mail.flex-it.com.ua (mail.flex-it.com.ua [193.239.74.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LQCT10Qb2z4qLF for ; Sat, 18 Jun 2022 10:53:56 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from [93.183.208.50] (helo=[192.168.200.124]) by mail.flex-it.com.ua with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1o2W5M-0000l4-1X for x11@freebsd.org; Sat, 18 Jun 2022 13:53:48 +0300 Message-ID: <2f8cb56f-c58c-d45e-2541-a479d3e41f45@shurik.kiev.ua> Date: Sat, 18 Jun 2022 13:53:47 +0300 List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: backlight(8) and Thinkpad special keys Content-Language: en-US To: x11@freebsd.org References: <20220617042845.vjnje56q2hixok3g@colony> From: Oleksandr Kryvulia In-Reply-To: <20220617042845.vjnje56q2hixok3g@colony> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4LQCT10Qb2z4qLF X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of shuriku@shurik.kiev.ua designates 193.239.74.7 as permitted sender) smtp.mailfrom=shuriku@shurik.kiev.ua X-Spamd-Result: default: False [-3.06 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[shurik.kiev.ua]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.95)[-0.953]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.81)[-0.810]; MLMMJ_DEST(0.00)[x11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:35297, ipnet:193.239.72.0/22, country:UA]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 17.06.22 07:28, Pete Wright пише: > hey there, > i've noticed that on my lenovo thinkpad that when loading the drm-510-kmod driver > the my usual way of managing screen brightness via hw.acpi.video.lcd.brightness > does not work (the sysctl knob is not available). when loading the drm-54-kmod > it is available. while debugging this i've noticed that using both drivers i am > able to adjust things via the backlight(8) utility - thanks manu! > > the one drawback with this is that it seems like acpi_ibm(4) is no longer able > to manage screen brightness. i.e. i can no longer use the special brightness > function keys to increase/descrase screen brightness. > > so couple questions: > > 1. has anyone sucessfully tied their "special" keys to the backlight utility? > 2. if not is the best approach to map the screen brightness keys to special events > via devd that would call backlight(8) directly? my reading of the acpi_ibm > man page seems to indicate it prefers to operate directly via sysctl which > doesn't seem to work for me under the 5.10 drm driver. Hi! On my thinkpad t490 I`m using backlight(8) with acpi_ibm(4) and devd(8). Here is my simple config:     notify 100 {             match "system"                  "ACPI";             match "subsystem"               "ACAD";             match "notify"                  "0x00";             action "/usr/bin/backlight 20; service power_profile $notify";     };     notify 100 {             match "system"                  "ACPI";             match "subsystem"               "ACAD";             match "notify"                  "0x01";             action "/usr/bin/backlight 50; service power_profile $notify";     };     notify 100 {             match "system"                  "ACPI";             match "subsystem"               "IBM";             match "notify"                  "0x10";             action "/usr/bin/backlight +";     };     notify 100 {             match "system"                  "ACPI";             match "subsystem"               "IBM";             match "notify"                  "0x11";             action "/usr/bin/backlight -";    }; acpi_ibm module is loaded after i915kms in /etc/rc.conf: kld_list="i915kms acpi_ibm"