4

Whenever I switch languages from English to another, my Num Lock light turns off, though I still can use it. I'm aware that it's an Ubuntu 14.04 LTS bug. But are there any patches for it?

  • This bug also appears in Ubuntu 16.04 LTS after login when using a non-English keyboard layout (even without any manual layout switching). – Håkon A. Hjortland May 15 '16 at 21:41
4

The bug report is here. Egmont Koblinger wrote a patch (see comment #22 of the bug report). I don't switch languages so I didn't test it, but other users have reported that it works.

Download it and rebuild xorg-server using the following steps (as Egmont outlined in his comment):

sudo apt-get install build-essential fakeroot dpkg-dev
mkdir build
cd build
apt-get source xorg-server
sudo apt-get build-dep xorg-server
cd xorg-server-1.15.1
cp ~/Downloads/xorg-server-xkb-numlock.patch debian/patches/ # replace Downloads appropriately
echo xorg-server-xkb-numlock.patch >> debian/patches/series
dpkg-buildpackage -rfakeroot -b
cd ..
sudo dpkg -i xserver-common_1.15.1-0ubuntu2_all.deb xserver-xorg-core_1.15.1-0ubuntu2_amd64.deb

See also comment #27 of that report by dimitronic for an alternate method, though it's a script, not a patch as you requested. I've copied it below:

1)mkdir ~/keyfix ; cd ~/keyfix

2)open a file show_layout.sh and copy and paste this: " setxkbmap -print | grep xkb_symbols | awk '{print $4}' | awk -F"+" '{print $2}' " (without the first and the last ")

3)open a file keyfix.sh and copy and paste this:
s=0
s1=0
while test "1" == "1"
do

s=`$HOME/keyfix/show_layout.sh`

sleep 0.001s

if test "$s" != "$s1"
then

numlockx off
numlockx on

#if test "$s" == "alt_layout"
#then
#xset led named "Scroll Lock"
#else
#xset -led named "Scroll Lock"
#fi

fi

s1=`$HOME/keyfix/show_layout.sh`

if test "$s" != "$s1"
then

numlockx off
numlockx on

#if test "$s" == "alt_layout"
#then
#xset led named "Scroll Lock"
#else
#xset -led named "Scroll Lock"
#fi

fi
sleep 0.01s

done
********************
if you want to turn on scroll lock when you use alternative layout, remove the #'s and change alt_layout to your alternative layout i.e. "gr" or "us"
**************************

3)open a file disown_easy.sh and copy and paste this:
#!/bin/bash
$1 &
P=`which $1`
disown `pidof ${P}`

4)open a file run-keyfix and copy and paste this:
$HOME/keyfix/disown_easy.sh $HOME/keyfix/keyfix.sh

5) open a terminal and type:
 chmod +x ~/keyfix/* ; sudo cp ~/keyfix/run-keyfix /usr/bin/

6)make the script run-keyfix to run on startup! (go to startup applications and add it)

THIS IS NOT A SOLUTION! THIS IS A STUPID FIX!

*don't use these scripts to make weapons!
  • Thanks, do they plan to fix this annoying bug? I mean ubuntu team. – Alexander Kim Aug 9 '14 at 18:37
  • If I'm reading it correctly, it seems like it's a problem with certain hardware manufacturers doing things weirdly. The bug was forwarded upstream, so if anyone would fix it it's the xorg developers. See: bugs.freedesktop.org/show_bug.cgi?id=78012 – Aibara Aug 9 '14 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.