# ThinkPad Multimedia Keys



## jbo (Oct 25, 2021)

I have a Lenovo Thinkpad P2000 in front of me running FreeBSD 13.-0 RELEASE p4.
From previous Thinkpads (usually the Carbon series), I'm used that multimedia keys for volume & screen brightness just work out of the box.

On this Thinkpad P2000 the volume keys are working but the backlight keys are not doing anything.

I'd like to understand:

which component(s) of the system are responsible for handling these multimedia keys
where possible configuration(s) can happen
how to check whether this particular Thinkpad model is simply not supported
what the mechanism for adding support for this Thinkpad model would be
Any insights you guys are able & willing to share?


----------



## SirDice (Oct 25, 2021)

The problem with these keys is that every manufacturer implements them differently, even differently across different models of the same manufacturer. Have a look at acpi_video(4) and/or acpi_ibm(4) (there are a bunch of acpi_* modules).


----------



## Deleted member 30996 (Oct 25, 2021)

Maybe this will be of some help, it's from the ThinkWiki site about keymapping:






						Windows Keys - ThinkWiki
					






					www.thinkwiki.org
				









						How to get special keys to work - ThinkWiki
					






					www.thinkwiki.org
				




They've got a Category for a P14s but not a P2000:






						Category:P14s - ThinkWiki
					






					www.thinkwiki.org


----------



## Menelkir (Oct 25, 2021)

Try adding Try adding 
	
	



```
hw.usb.usbhid.enable=1
```
 to your /boot/loader.conf.local. if still doesn't work, try adding ig4 iicbus and iichid to your kld_list in rc.conf and see if helps.


----------



## jbo (Oct 25, 2021)

Menelkir said:


> Try adding Try adding
> 
> 
> 
> ...


Thanks, I'll try that and report back!

Regarding iichid: If I am understanding the table at sysutils/iichid properly, there doesn't seem to be a version available for FreeBSD 13.0 amd64.
Or was this merged into the base system?


----------



## Menelkir (Oct 25, 2021)

jbodenmann said:


> Thanks, I'll try that and report back!
> 
> Regarding iichid: If I am understanding the table at sysutils/iichid properly, there doesn't seem to be a version available for FreeBSD 13.0 amd64.
> Or was this merged into the base system?


It's part of FreeBSD 13 now, you just need to load the modules.


----------



## jbo (Oct 26, 2021)

Menelkir said:


> Try adding Try adding
> 
> 
> 
> ...


Unfortunately, neither of these approaches made the screen brightness keys work.



SirDice said:


> The problem with these keys is that every manufacturer implements them differently, even differently across different models of the same manufacturer. Have a look at acpi_video(4) and/or acpi_ibm(4) (there are a bunch of acpi_* modules).


I already had acpi_ibm(4) loaded. After loading acpi_video(4) the screen brightness keys are actually doing something: Pressing either the brightness-up or the brightness-down key will set they screen brightness to 100%.

Could somebody outline the process of adding support for this ThinkPad model? As I understand handling of these keys is done through ACPI kernel modules. Therefore, I should be able to locate the corresponding source code, modify it as necessary, compiling and loading the new kernel module, right? No need to mess with the kernel at all?
Would this be as easy as adding some mapping table in the corresponding acpi_* module given that all the interfaces already exist?


----------



## Menelkir (Oct 26, 2021)

Found this, looks reasonable: https://www.davidschlachter.com/misc/freebsd-acpi_video-thinkpad-display-brightness


----------

