User avatar
scruss
Posts: 2822
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Can no longer reconfigure keyboard

Wed Apr 06, 2016 5:35 pm

One used to be able to add advanced keyboard options using

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
but all this does now is say:

Code: Select all

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
and do nothing.

The graphical Keyboard & Mouse/Configuration options don't go into the necessary detail for setting up modifiers like the Compose key. I can't function without a working Compose key.

Looks like something broke in Raspbian, as this also doesn't work from the raspi-config command.

Any suggestions, please?
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
jojopi
Posts: 3135
Joined: Tue Oct 11, 2011 8:38 pm

Re: Can no longer reconfigure keyboard

Wed Apr 06, 2016 6:15 pm

dpkg-reconfigure skips the questions if it thinks you do not have a keyboard connected.

Does your keyboard appear in /proc/bus/input/devices?

User avatar
scruss
Posts: 2822
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Can no longer reconfigure keyboard

Wed Apr 06, 2016 8:02 pm

jojopi wrote:Does your keyboard appear in /proc/bus/input/devices?
Yes:

Code: Select all

I: Bus=0005 Vendor=0a5c Product=8502 Version=011b
N: Name="Rapoo E6700"
P: Phys=b8:27:eb:0e:e8:ee
S: Sysfs=/devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:0A5C:8502.0002/input/input2
U: Uniq=6c:5d:63:21:fd:ab
H: Handlers=sysrq kbd mouse0 event1 
B: PROP=0
B: EV=12001f
B: KEY=1f0000 10000 2000007 ff9f387a d941d7ff febeffdf ffefffff ffffffff fffffffe
B: REL=143
B: ABS=f00 0
B: MSC=10
B: LED=1f
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
scruss
Posts: 2822
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Can no longer reconfigure keyboard

Mon Apr 11, 2016 5:42 pm

Further to this, it seems that keyboard presence is being checked by some very dubious methods in the reconfigure script, and there's no way around it.

For the curious, you can see what the script does with

Code: Select all

DEBCONF_DEBUG=developer dpkg-reconfigure keyboard-configuration
This shoes that it calls the script /var/lib/dpkg/info/keyboard-configuration.config, which in turn contains the function ‘keyboard_present’. It searches /proc/bus/input/devices for some specific strings, and unless they are found, says there are no keyboards present.

I suspect it might be easier for me to work out how /proc chooses to name things, and add a rule (if possible) to add the word 'Keyboard' in the description. It sure beats yelling at the computer in an Arthur Dent-like manner.

Bugs filed: Raspbian - keyboard-configuration only works if USB keyboard attached, Debian (suspected) - #792086 keyboard-configuration: can't change the layout to us international
Last edited by scruss on Mon Apr 11, 2016 6:53 pm, edited 1 time in total.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
jojopi
Posts: 3135
Joined: Tue Oct 11, 2011 8:38 pm

Re: Can no longer reconfigure keyboard

Mon Apr 11, 2016 6:47 pm

I misunderstood the code. If /proc/bus/input/devices does not exist, paradoxically you are assumed to have a keyboard. If it does exist, the patterns used will only match legacy non-USB keyboards on non-Pi hardware.

Then on a Pi, if /sys/bus/usb/devices/ does not exist, you are assumed to have a keyboard. If it does exist, then one of the directories matching /sys/bus/usb/devices/*:*/ must have bInterfaceClass = 03 (HID), bInterfaceSubClass = 01 (Boot Interface), bInterfaceProtocol = 01 (Keyboard).

So, do you see "03:01:01:" in the output of the command below, and if not can you work out which device is your keyboard and what it is reporting differently?

Code: Select all

for i in /sys/bus/usb/devices/*\:*/; do for j in bInterfaceClass bInterfaceSubClass bInterfaceProtocol; do printf $(cat "$i/$j"):; done; echo; done
09:00:00:
09:00:02:
ff:00:ff:
03:01:01:
03:01:02:

User avatar
scruss
Posts: 2822
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Can no longer reconfigure keyboard

Mon Apr 11, 2016 7:25 pm

jojopi wrote:So, do you see "03:01:01:" in the output of the command below, and if not can you work out which device is your keyboard and what it is reporting differently?
Thanks for that.

No "03:01:01:" in the output. The bluetooth keyboard is at /sys/bus/hid/devices/0005\:0A5C\:8502.0002, as reported above.

I have the same problem on another Debian system with a different USB keyboard, so I'm pretty sure it's a package problem from Debian.

I'm going to have to find my old MS natural keyboard, amn't I?
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Return to “Troubleshooting”