如果我尝试调高/调低/静音笔记本电脑的音量,它总是像我按住按钮一样。我认为我必须更改一些内容/lib/udev/hwdb.d/60-keyboard.hwdb
,但我不知道该做什么。
我有一台 medion 笔记本电脑
System Information
Manufacturer: Medion
Product Name: P6669 MD60147
答案1
我在 Medion P6689 MD61019 上遇到了同样的问题,例如在 Medion E6246 MD63200 上也存在同样的问题。您的思路是正确的;这似乎可以解决问题:
创建一个包含以下内容的文本文件:
# Fix for volume keys on Medion keyboards
evdev:atkbd:dmi:bvn*:bvr*:svnMEDION:pn*:pvr*
evdev:atkbd:dmi:bvn*:bvr*:svnMedion:pn*:pvr*
KEYBOARD_KEY_a0=!mute
KEYBOARD_KEY_ae=!volumedown
KEYBOARD_KEY_b0=!volumeup
保存/lib/udev/hwdb.d/99-keyboard-medion-vol-fix.hwdb
并以 root 身份运行以下命令:
systemd-hwdb update
udevadm trigger --verbose --sysname-match="event*"
大功告成!音量键现在可正常工作。
笔记:由于它似乎没有副作用(因为此补丁仅由受影响的人应用),因此该:pn*
字段不将其限制为任何型号。虽然可以通过指定其产品编号轻松更改为仅匹配少数型号。(您可能需要检查/sys/class/dmi/id/modalias
您的特定供应商 ID 和产品编号。)
来自 /lib/udev/hwdb.d/60-keyboard.hwdb:
# Supported hardware matches are:
...
# - AT keyboard DMI data matches:
# evdev:atkbd:dmi:bvn*:bvr*:bd*:svn<vendor>:pn<product>:pvr*
# <vendor> and <product> are the firmware-provided strings
# exported by the kernel DMI modalias, see /sys/class/dmi/id/modalias
...
# An '!' as the first character of the key identifier string
# will add the scan code to the AT keyboard's list of scan codes
# where the driver will synthesize a release event and not expect
# it to be generated by the hardware.
...
# To update this file, create a new file
# /etc/udev/hwdb.d/70-keyboard.hwdb
# and add your rules there. To load the new rules execute (as root):
# systemd-hwdb update
# udevadm trigger /dev/input/eventXX
# where /dev/input/eventXX is the keyboard in question. If in
# doubt, simply reload all input rules
# udevadm trigger --verbose --sysname-match="event*"
...
# Akoya
evdev:atkbd:dmi:bvn*:bvr*:svnMEDION*:pnS3409*:pvr*
evdev:atkbd:dmi:bvn*:bvr*:svnMedion*:pnAkoya*:pvr*
KEYBOARD_KEY_a0=!mute
KEYBOARD_KEY_ae=!volumedown
KEYBOARD_KEY_b0=!volumeup
KEYBOARD_KEY_19=!p
KEYBOARD_KEY_df=sleep
简而言之,一些 Medion 笔记本电脑键盘需要!
音量键(也可能是按键p
,不管它是什么),因为它们不会生成按键释放事件;但是,并非所有 Medion 型号都默认包含在 /lib/udev/hwdb.d/60-keyboard.hwdb 中。
奇怪的是,修复后,按住音量键会自动重复,直到您松开该键。