1

I am in the process of getting rid of udev daemon from my system. I have fixed all issues, only one small problem is remaining:

It used to be (when I was using udev), that Fn+Down acted as XF86MonBrightnessDown and Fn+UP acted as XF86MonBrightnessUp, so that I could create a keybinding in Openbox for xbacklight -dec 5 and xbacklight -inc 5 respectively to change display brightness.

When I boot my laptop without udev, these keys no longer work. Other Fn keys such as Fn+Pause or Fn+SysRq work fine.

Looking with xev, I see following when I press Fn+Down,

KeyPress event, serial 46, synthetic NO, window 0x2600001,
    root 0xb9, subw 0x0, time 952589, (169,-10), root:(1040,435),
    state 0x10, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x2600001,
    root 0xb9, subw 0x0, time 952589, (169,-10), root:(1040,435),
    state 0x10, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

How can I make my Fn keys work again ?

I am using LXDE (Openbox) on Debian.

UPDATE

I have discovered a file /lib/udev/keymaps/dell which apparently idev uses to set up the keymap. It contains, among other lines:

0x85 brightnessdown # Fn+Down arrow Brightness Down
0x86 brightnessup # Fn+Up arrow Brightness Up

so how can I map this file manually, without udev? What command do I need to use?

Martin Vegter
  • 358
  • 75
  • 236
  • 411

2 Answers2

1

Maybe I overlook something, but isn't this just a matter of adding the XF86MonBrightnessDown and XF86MonBrightnessUp to your xmodmap?

xmodmap -e "keycode 101 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown" for testing this temporarily. Similar for brightness up.

If it works, you need to make this permanent depending on your display manager. LXDE has LXDM, so make your changes according to here (xmodmap handling starts at line 39) after you modify a keymap generated with xmodmap -pke > ~/.Xmodmap permanently as tested with the xmodmap modification above.

emk2203
  • 778
  • thanks. Works fine now, both for BrightnessUp and BrightnessDown. – Martin Vegter Apr 08 '16 at 06:24
  • I am using SLIM as my login manager. Do you happen to know how to add the xmodmap changes to slim ? – Martin Vegter Apr 08 '16 at 06:27
  • If you put a call to xmodmap in your .xinitrc file as so: xmodmap ~/.Xmodmap, it should work. It means that your brightness change works only after login, but this is a feature, not a bug. Sometimes, a sh -c 'sleep 30 && xmodmap ~/.Xmodmap' is needed. – emk2203 Apr 08 '16 at 06:38
0

With udev on, get your keyboard layout with:

xkbcomp $DISPLAY mylayout.xkb

Then you should be able to load it (once udev is off) by:

xkbcomp -i <XInput_id> mylayout.xkb $DISPLAY

where <XInput_id> can be found by xinput list or grep XINPUT /var/log/Xorg.0.log.

References that may be of interest: this and that (not an exact duplicate).

L. Levrel
  • 1,503