Project

General

Profile

Bug #310

svc:/system/keymap ignores eeprom layout

Added by Albert Lee over 9 years ago. Updated about 9 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
2010-10-06
Due date:
% Done:

50%

Estimated time:
Difficulty:
Tags:

Description

usr/src/cmd/kbd/keymap:

#
# Systems with no hardware keyboard ID may provide an eeprom value,
# or the value can be supplied in svc:/system/keymap:default. A value
# supplied in svc:/system/keymap:default will override the value
# supplied in eeprom.
#
[ -x /usr/lib/set_keyboard_layout ] && /usr/lib/set_keyboard_layout

# Initialize the keyboard defaults

[ -h /dev/kbd -a -x /usr/bin/kbd ] && /usr/bin/kbd -i >/dev/null 2>&1

However, usr/src/cmd/kbd/keymap.xml has:

<propval name='layout' type='astring' value='US-English' />

Hence /usr/bin/kbd -i will always override the settings from /usr/lib/set_keyboard_layout.


Related issues

Related to OpenIndiana Distribution - Bug #203: Keyboard configuration is not preserved across upgradesResolved2010-09-15

Actions
Related to illumos gate - Bug #1563: Keyboard configuration is not preserved across upgradesIn Progress2010-09-15

Actions
Has duplicate illumos gate - Bug #121: Any keypboard but US-Enlish does not workClosed2010-08-30

Actions
Has duplicate illumos gate - Bug #338: keyboard layout setting not workingClosed2010-10-12

Actions

History

#1

Updated by Albert Lee over 9 years ago

  • % Done changed from 0 to 50

I think this is the correct solution:

--- a/usr/src/cmd/kbd/keymap.xml
+++ b/usr/src/cmd/kbd/keymap.xml
@@ -77,7 +77,7 @@
                        <propval name='keyclick' type='boolean' value='false' />
                        <propval name='repeat_delay' type='integer' value='500' />
                        <propval name='repeat_rate' type='integer' value='40' />
-                       <propval name='layout' type='astring' value='US-English' />
+                       <propval name='layout' type='astring' value='' />
                        <propval name='kbd_beeper_freq' type='integer' value='2000' />
                        <propval name='console_beeper_freq' type='integer' value='900' />
                </property_group>

The caselog for PSARC/2010/183 ( http://arc.opensolaris.org/caselog/PSARC/2010/183/mail ) shows that SMF contains values for the properties rather than leaving them uninitialised is to make the defaults visible to the user, but the real default for the layout should be the eeprom value and not "US-English".

Related is #203 Keyboard configuration is not preserved across upgrades

#2

Updated by Albert Lee about 9 years ago

set_keyboard_layout needs to set the layout to "US-English" if it's currently "Unknown", else loadkeys (run at the end of the keymap method script) will fail.

#3

Updated by Garrett D'Amore about 9 years ago

Joerg has a fix for this as well:

http://hg.berlios.de/repos/schillix-on/rev/ddbb71ca03b9

This is different from his first attempted fix, and seems to be the "correct" fix. To bad he didn't submit this to us more directly.

#4

Updated by Albert Lee about 9 years ago

Joerg's kbd change covers #203 which I think my fix would be preferred for, as his involves introducing an additional value to the layout property to support /etc/default/kbd.

On the OpenIndiana live media it was discovered that the interactive layout selection runs before the keymap method but does apparently does not set the SMF or eeprom property, so an updated set_keyboard_layout invoked from the keymap method would override its selection with "US-English" since the layout appeared to be empty. Either the layout selection should be updated to store its configuration or the keymap method should not attempt to change the layout when both eeprom and SMF have an empty string (or eeprom has "Unknown"?).

Also available in: Atom PDF