Bug 545970 - fedora-setup-keyboard ignores some options from /etc/sysconfig/keyboard
Summary: fedora-setup-keyboard ignores some options from /etc/sysconfig/keyboard
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-setup-keyboard
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adel Gadllah
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-09 18:29 UTC by Petr Machata
Modified: 2015-05-05 01:34 UTC (History)
3 users (show)

Fixed In Version: 0.6-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-02 03:38:48 UTC


Attachments (Terms of Use)
A patch to iterate all configuration keys, not just the ones that have default (1.18 KB, patch)
2009-12-09 18:29 UTC, Petr Machata
no flags Details | Diff
A patch to iterate all configuration keys, not just the ones that have default (1.29 KB, text/plain)
2009-12-09 18:32 UTC, Petr Machata
no flags Details

Description Petr Machata 2009-12-09 18:29:13 UTC
Created attachment 377262 [details]
A patch to iterate all configuration keys, not just the ones that have default

Description of the problem:

My /etc/sysconfig/keyboard:
KEYBOARDTYPE="pc"
KEYTABLE="us"
MODEL="evdev"
LAYOUT="us,cz,ru"
VARIANT=",qwerty,winkeys"
OPTIONS="grp:switch,grp:alt_shift_toggle,grp_led:scroll"

When I restart the HAL daemon, lshal outputs the following:
# lshal | sed -n '/input.product.*eyboard/,/input.xkb.options/p'
  input.product = 'AT Translated Set 2 keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us,cz,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.options = 'terminate:ctrl_alt_bksp'  (string)
  input.product = 'Dell Dell USB Keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us,cz,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.options = 'terminate:ctrl_alt_bksp'  (string)

Notice that xkb.layout gets set, but xkb.options don't (fully, anyway, the terminate option comes from 10-x11-keymap.fdi).

fedora-setup-keyboard uses the "keytable" key to determine default options.  For my value, "us", the default is (from keyboards.h):
  g_hash_table_insert(kbd_models, "us", "us pc105+inet");
... meaning defaults are layout=us, model=pc105+inet.  My setting of layout override these defaults, which is fine.  The problem is, fedora-setup-keyboard doesn't process any settings beyond these two.

Version-Release number of selected component (if applicable):
fedora-setup-keyboard-0.4-3.fc12.x86_64

How reproducible:
Always.  Actually I believe this was present on F 11 too.

Steps to reproduce:
1. Adjust /etc/sysconfig/keyboard
2. service haldaemon restart
3. Use lshal to see that only some settings take effect

Additional info:
The problem that I really try to solve is that when the computer wakes up from suspend, keyboard layout settings get lost.  This has been the case since upgrade to F 11, F 10 worked fine in this regard.

Comment 1 Petr Machata 2009-12-09 18:32:27 UTC
Created attachment 377265 [details]
A patch to iterate all configuration keys, not just the ones that have default

My earlier patch leaks a key.  This one fixes the problem.

Comment 2 Petr Machata 2009-12-09 18:37:35 UTC
lshal output with the patch applied:

# lshal | sed -n '/input.product.*eyboard/,/input.xkb.options/p'
  input.product = 'AT Translated Set 2 keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us,cz,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.options = 'terminate:ctrl_alt_bksp,grp:switch,grp:alt_shift_toggle,grp_led:scroll'  (string)
  input.product = 'Dell Dell USB Keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us,cz,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.options = 'terminate:ctrl_alt_bksp,grp:switch,grp:alt_shift_toggle,grp_led:scroll'  (string)

Comment 3 Peter Hutterer 2009-12-10 01:30:27 UTC
Reviewed-by: Peter Hutterer <peter.hutterer@redhat.com>

Adel, can you merge this upstream and put out a new version please?


changing version to 12, pretty sure Petr didn't intend to file against F9 :)

Comment 4 drago01 2009-12-10 09:05:07 UTC
(In reply to comment #3)
> Reviewed-by: Peter Hutterer <peter.hutterer@redhat.com>
> 
> Adel, can you merge this upstream and put out a new version please?
> 
> 
> changing version to 12, pretty sure Petr didn't intend to file against F9 :)  

Sure, thanks for the patch Petr, and Peter for the review,

Will apply it today evening and spin a new package.

Comment 5 Adel Gadllah 2009-12-10 09:06:01 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Reviewed-by: Peter Hutterer <peter.hutterer@redhat.com>
> > 
> > Adel, can you merge this upstream and put out a new version please?
> > 
> > 
> > changing version to 12, pretty sure Petr didn't intend to file against F9 :)  
> 
> Sure, thanks for the patch Petr, and Peter for the review,
> 
> Will apply it today evening and spin a new package.  

Wrong account, above still applies though ;)

Comment 6 Fedora Update System 2009-12-26 18:38:37 UTC
fedora-setup-keyboard-0.6-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/fedora-setup-keyboard-0.6-1.fc12

Comment 7 Fedora Update System 2009-12-26 18:40:20 UTC
fedora-setup-keyboard-0.6-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/fedora-setup-keyboard-0.6-1.fc11

Comment 8 Fedora Update System 2009-12-27 20:31:01 UTC
fedora-setup-keyboard-0.6-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-setup-keyboard'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13742

Comment 9 Fedora Update System 2009-12-27 20:33:41 UTC
fedora-setup-keyboard-0.6-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-setup-keyboard'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-13745

Comment 10 Fedora Update System 2010-01-02 03:38:43 UTC
fedora-setup-keyboard-0.6-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-01-02 03:39:04 UTC
fedora-setup-keyboard-0.6-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.