升级到 17.10 后,所有功能键都映射到“XF86WakeUp”

升级到 17.10 后,所有功能键都映射到“XF86WakeUp”

我使用的是联想 Thinkpad E330,刚刚使用 Unity 升级到 Ubuntu 17.10。升级之前,我的媒体键没有问题,但现在它们似乎都映射到“XF86WakeUp”。但是,在 ACPI 级别上它们似乎没问题。运行acpi_listen静音、VolDown 和 VolUp 的输出时,输出正确:

$ acpi_list
button/mute MUTE 00000080 00000000
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K

但是输出xev结果却是错误的:

$ xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'
151 XF86WakeUp
151 XF86WakeUp
151 XF86WakeUp

完整输出如下:

$ xev
Outer window is 0x6200001, inner window is 0x6200002

PropertyNotify event, serial 8, synthetic NO, window 0x6200001,
    atom 0x27 (WM_NAME), time 16513838, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0x6200001,
    atom 0x22 (WM_COMMAND), time 16513838, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0x6200001,
    atom 0x28 (WM_NORMAL_HINTS), time 16513838, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0x6200001,
    parent 0x6200001, window 0x6200002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 14, synthetic NO, window 0x6200001,
    atom 0x151 (WM_PROTOCOLS), time 16513838, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0x6200001,
    event 0x6200001, window 0x6200002, override NO

PropertyNotify event, serial 28, synthetic NO, window 0x6200001,
    atom 0x1bc (_NET_WM_ALLOWED_ACTIONS), time 16513839, state PropertyNewValue

ConfigureNotify event, serial 29, synthetic NO, window 0x6200001,
    event 0x6200001, window 0x6200001, (0,0), width 178, height 178,
    border_width 0, above 0x4600017, override NO

ReparentNotify event, serial 29, synthetic NO, window 0x6200001,
    event 0x6200001, window 0x6200001, parent 0x1290641,
    (0,0), override NO

ConfigureNotify event, serial 29, synthetic YES, window 0x6200001,
    event 0x6200001, window 0x6200001, (55,24), width 178, height 178,
    border_width 0, above 0x0, override NO

ConfigureNotify event, serial 29, synthetic YES, window 0x6200001,
    event 0x6200001, window 0x6200001, (55,24), width 178, height 178,
    border_width 0, above 0x0, override NO

MapNotify event, serial 29, synthetic NO, window 0x6200001,
    event 0x6200001, window 0x6200001, override NO

VisibilityNotify event, serial 29, synthetic NO, window 0x6200001,
    state VisibilityUnobscured

Expose event, serial 29, synthetic NO, window 0x6200001,
    (0,0), width 178, height 10, count 3

Expose event, serial 29, synthetic NO, window 0x6200001,
    (0,10), width 10, height 58, count 2

Expose event, serial 29, synthetic NO, window 0x6200001,
    (68,10), width 110, height 58, count 1

Expose event, serial 29, synthetic NO, window 0x6200001,
    (0,68), width 178, height 110, count 0

PropertyNotify event, serial 29, synthetic NO, window 0x6200001,
    atom 0x15f (_NET_WM_STATE), time 16513841, state PropertyNewValue

FocusIn event, serial 29, synthetic NO, window 0x6200001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  68  0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

PropertyNotify event, serial 29, synthetic NO, window 0x6200001,
    atom 0x159 (_NET_WM_DESKTOP), time 16513841, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6200001,
    atom 0x1c2 (WM_STATE), time 16513841, state PropertyNewValue

VisibilityNotify event, serial 32, synthetic NO, window 0x6200001,
    state VisibilityPartiallyObscured

ConfigureNotify event, serial 32, synthetic YES, window 0x6200001,
    event 0x6200001, window 0x6200001, (55,52), width 178, height 178,
    border_width 0, above 0x0, override NO

VisibilityNotify event, serial 32, synthetic NO, window 0x6200001,
    state VisibilityUnobscured

Expose event, serial 32, synthetic NO, window 0x6200001,
    (168,0), width 10, height 140, count 1

Expose event, serial 32, synthetic NO, window 0x6200001,
    (0,140), width 178, height 38, count 0

PropertyNotify event, serial 32, synthetic NO, window 0x6200001,
    atom 0x1bc (_NET_WM_ALLOWED_ACTIONS), time 16513844, state PropertyNewValue

PropertyNotify event, serial 32, synthetic NO, window 0x6200001,
    atom 0x156 (_NET_FRAME_EXTENTS), time 16513844, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x6200001,
    atom 0x15f (_NET_WM_STATE), time 16513848, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x6200001,
    atom 0x15f (_NET_WM_STATE), time 16513848, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x6200001,
    atom 0x1bf (_NET_WM_ICON_GEOMETRY), time 16513895, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x6200001,
    atom 0x1bf (_NET_WM_ICON_GEOMETRY), time 16513895, state PropertyNewValue

KeyRelease event, serial 34, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16513915, (287,625), root:(342,677),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

PropertyNotify event, serial 37, synthetic NO, window 0x6200001,
    atom 0x1bf (_NET_WM_ICON_GEOMETRY), time 16514495, state PropertyNewValue

KeyPress event, serial 37, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16515406, (287,625), root:(342,677),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  4294967208 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   4294967168 0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 37, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16516314, (287,625), root:(342,677),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16517461, (287,625), root:(342,677),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   4294967168 0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 37, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16517885, (287,625), root:(342,677),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16518629, (287,625), root:(342,677),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   4294967168 0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 37, synthetic NO, window 0x6200001,
    root 0x12d, subw 0x0, time 16519033, (287,625), root:(342,677),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyNormal, detail NotifyNonlinear

PropertyNotify event, serial 37, synthetic NO, window 0x6200001,
    atom 0x15f (_NET_WM_STATE), time 16520695, state PropertyNewValue

如果您需要任何进一步的信息来帮助我,我很乐意提供。

答案1

对我有用的修复方法是禁用commands插件compiz-settings-manager

  1. sudo apt-get install compizconfig-settings-manager
  2. 打开它 -ccsm
  3. 搜索commands,取消选中,然后关闭管理器。
  4. 利润。

我的功能键立即开始工作,无需重新启动或执行任何操作。

相关内容