Bug 531818

Summary: US layout selected by default instead of Brazil
Product: [openSUSE] openSUSE 11.2 Reporter: Isis Binder <isis.binder>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P3 - Medium CC: coolo, elchevive68, martin.schlander, sndirsch
Version: Milestone 5   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Xorg.conf file
Xorg log
Fix for keyboard map.

Description Isis Binder 2009-08-17 17:12:39 UTC
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13 (.NET CLR 3.5.30729)

Chosen options for language and keyboard: portuguese_BR, portuguese_BR.
After installation my keyboard seems to be echoing characters from the US layout (eg: ';' instead of 'ç').


/etc/sysconfig/keyboard :

KEYTABLE = 'br-abnt2.map.gz'
COMPOSETABLE = 'clear latin1.add'
YAST_KEYBOARD = 'portugese-br,pc104'

Reproducible: Always
Comment 1 Luiz Fernando Ranghetti 2009-08-17 17:21:06 UTC
As an addendum the YaST keyboard module isn't showed/installed in M5
Comment 2 Stefan Dirsch 2009-08-17 19:31:22 UTC
It's no longer possible to configure your keyboard layout with SaX2 (module has been removed). Use your desktop tool to change it (on-the-fly). The system wide defalt for keybaord layout in X depends on the setting in /etc/sysconfig/keyboard:KEYTABLE. In your case this maps to 'br'.
Comment 3 Isis Binder 2009-08-17 20:36:45 UTC
(In reply to comment #2)
> It's no longer possible to configure your keyboard layout with SaX2 (module has
> been removed). Use your desktop tool to change it (on-the-fly). The system wide
> defalt for keybaord layout in X depends on the setting in
> /etc/sysconfig/keyboard:KEYTABLE. In your case this maps to 'br'.


Actually I selected SaX2 because I thought it was where the bug was hidden, not because I was sure of bug's origin.

And I'm using gnome-control-center to change my keyboard layout. This bug is about a situation right after DVD install, without messing with any settings.
Comment 4 Stefan Dirsch 2009-08-17 20:57:47 UTC
Would it be possible to provide the required information according
to our HOWTO

  http://en.opensuse.org/Bugs:X

for reporting X11 related bugs? Please set the Status back to
ASSIGNED after providing all the required information. Thanks.
Comment 5 Isis Binder 2009-08-17 21:15:22 UTC
Created attachment 313374 [details]
Xorg.conf file
Comment 6 Isis Binder 2009-08-17 21:15:55 UTC
Created attachment 313375 [details]
Xorg log
Comment 7 Stefan Dirsch 2009-08-17 21:52:57 UTC
II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "br"
(**) Option "xkb_options" "inet:microsoftpro"
(II) XKB: reuse xkmfile /var/lib/xkb/compiled/server-439C9ACEEB12846B110AEBF050F5D4F93A737A4C.xkm
(II) config/hal: Adding input device Sleep Button

Layout is "br". So where is the issue?
Comment 8 Isis Binder 2009-08-17 23:39:20 UTC
The issue is: selecting portuguese_BR before installation gives me US layout.
After performing a second install the contents are:

(xorg.conf)
Section "InputDevice"
  # Driver "kbd" will be disabled unless 'Option "AutoAddDevices" "off"'
  # is set in "ServerFlags" section.
  Driver "kbd"
  Identifier "keyboard[0]"
  Option "Protocol" "Standard"
  Option "XkbLayout" "br"
  Option "XkbModel" "abnt2"
  Option "XkbOptions" "inet:microsoftpro"
  Option "XkbRules" "xfree86"
EndSection


(Xorg.0.log)

II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type:
KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "br"
(**) Option "xkb_options" "inet:microsoftpro"
(II) XKB: generating xkmfile
/var/lib/xkb/compiled/server-439C9ACEEB12846B110AEBF050F5D4F93A737A4C.xkm
(II) config/hal: Adding input device Sleep Button



(Xorg.0.log.old)

II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type:
KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "inet:microsoftpro"
(II) XKB: generating xkmfile
/var/lib/xkb/compiled/server-D378AD8,(...).xkm
(II) config/hal: Adding input device Sleep Button


And I still get ';' instead of 'ç', '/' over ';' and other "misplaced" characters.
Comment 9 Isis Binder 2009-08-18 00:28:03 UTC
This is the way I managed to get back my layout. If this can lead you to a fix during installation...

1. Edit sysconfig and remove autologin
2. Reboot
3. Select user
4. Below the user/password box, reselect 'Brazil' layout*
5. Log in

* 'Brazil' is already selected.
Comment 10 Stefan Dirsch 2009-08-18 01:45:10 UTC
What's the output for 'setxkbmap -print' for using autologin and when reselecting 'Brazil' layout in gdm?
Comment 11 Luiz Fernando Ranghetti 2009-08-18 02:08:34 UTC
Hi,

I had this output for M5 and autologin:

elchevive@linux-8i1m:~/teste-doc> cat /etc/sysconfig/keyboard | grep KEY
# e.g. KEYTABLE="de-latin1-nodeadkeys", "us" or empty for US settings
KEYTABLE="br-abnt2.map.gz"
#  or KEYTABLE will be used then -- most keyboard maps don't have a
YAST_KEYBOARD="portugese-br,pc104"
elchevive@linux-8i1m:~/teste-doc> setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+br+inet(evdev)+inet(microsoftpro)"  };
        xkb_geometry  { include "pc(pc104)"     };
};
elchevive@linux-8i1m:~/teste-doc>

Regards,
Comment 12 Isis Binder 2009-08-18 21:39:59 UTC
Output for M5 right after DVD install is the same as posted by Ranghetti.

Output for M5 after reselecting 'Brazil':

isis@linux-15ja:~> setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+br+inet(evdev)"  };
        xkb_geometry  { include "pc(pc104)"     };
};


Also,after reselecting 'Brazil' in GDM screen from bug 531824 appears.
Comment 13 Stefan Dirsch 2009-08-18 22:17:58 UTC
There is no difference in xkb configuration besides the "inet(microsoftpro)" for the internet keys that get even removed when you reselect 'Brazil' in gdm.
Comment 14 Luiz Fernando Ranghetti 2009-08-18 22:29:04 UTC
Hi,

The output from 11.1 (working) is:

elchevive@linux-e7el:~> setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "xfree86(abnt2)+aliases(qwerty)"        };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+br" };
        xkb_geometry  { include "pc(abnt2)"     };
};
elchevive@linux-e7el:~>

The difference is in the last line xkb_geometry which gets wrong in Factory
Comment 15 Stefan Dirsch 2009-08-18 22:39:38 UTC
Isis doesn't see this difference according to his comment #12.
Comment 16 Luiz Fernando Ranghetti 2009-08-18 23:52:13 UTC
Hi,

Even if I change the keyboard layout in KDE system settings I don`t have the desired keyboard layout. Trying the command suggested by KDE system settings I got the following error:

elchevive@linux-8i1m:~/teste-doc> setxkbmap -model abnt2 -layout br
Error loading new keyboard description
elchevive@linux-8i1m:~/teste-doc>

Any hints?
Comment 17 Stefan Dirsch 2009-08-19 12:55:25 UTC
Same for me. Honestly I have no idea how to fix that issue within a static HAL .fdi file. What somewhat works is using us layout and then running

  setxkbmap -model abnt2 -layout br
Comment 18 Stefan Dirsch 2009-08-19 13:16:13 UTC
I believe Egbert knows more about that keyboard stuff. It's completely confusing to me.
Comment 19 Luiz Fernando Ranghetti 2009-08-21 03:59:43 UTC
Hi,

I tested it with Milestone 6 KDE LiveCD (build 235) and doesn't matter which keyboard layout I choose (neither by changing in country/language nor in the summary before installation) it always had the same behaviou (en_us).

But in the other hand, after installed, if I change in KDE system settings or using the comment in #17 it works!

Regards
Comment 20 Stefan Dirsch 2009-08-21 08:06:03 UTC
No idea why you reassigned that bug. Reverting.
Comment 21 Stephan Kulow 2009-08-21 09:38:37 UTC
@#19 - just for completness, german layout works fine.
Comment 22 Egbert Eich 2009-09-01 15:15:42 UTC
Created attachment 316211 [details]
Fix for keyboard map.

I've updated keytable4hal to also set the keyboard model. This is required for abnt2 and jp106 keyboards.
Also the microsoftpro symbol table doesn't exist any more. Closest replacement is microsoftprousb. I've added a patch to fix the keyboard map.
I expect this will address the issues with the Brazilian keyboard layout.
We still have bug #518281 which may also cause problems.
Comment 24 Stefan Dirsch 2009-09-01 20:44:00 UTC
Thanks. Fixed. sax2 and xorg-x11 submitted for openSUSE:Factory.