Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jun 2022 13:53:47 +0300
From:      Oleksandr Kryvulia <shuriku@shurik.kiev.ua>
To:        x11@freebsd.org
Subject:   Re: backlight(8) and Thinkpad special keys
Message-ID:  <2f8cb56f-c58c-d45e-2541-a479d3e41f45@shurik.kiev.ua>
In-Reply-To: <20220617042845.vjnje56q2hixok3g@colony>
References:  <20220617042845.vjnje56q2hixok3g@colony>

next in thread | previous in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2f8cb56f-c58c-d45e-2541-a479d3e41f45>