Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237789 - xorg-x11-7.* - keyboard layout switching is broken in a number of ways
Summary: xorg-x11-7.* - keyboard layout switching is broken in a number of ways
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 21:23 UTC by Ivan D Vasin
Modified: 2009-08-17 20:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan D Vasin 2008-09-15 21:23:37 UTC
I've been experiencing these problems for almost a year now. They first appeared with xorg-x11-7.0 or 7.1 (I don't remember exactly) around the time that I started testing the KDE 4.0 alpha 2. I'll try to describe the problems as precisely as I can. For the record I have both KDE4 and Xfce installed.

1) X ignores my XkbLayout setting. I've had Option "XkbLayout" "dvorak,en_US" the whole time, but except for unexplainable brief periods, xdm/kdm/slim always use the en_US layout. This is not that big a deal, but certainly not what I expect, and not how it worked with xorg-6.x. KDE and Xfce both start up using en_US.

2) Last time I checked, switching keyboard layouts using the Xfce panel switcher does absolutely nothing.

3) Switching keyboard layouts using the KDE4 settings applet does switch layouts, but introduces some serious glitches. For instance, the following keys all stop working: all four arrow keys, Home, End, PageUp, and PageDown. Disabling keyboard layouts does not fix the problem, but restarting X after disabling them does fix it. Unplugging my keyboard and plugging it back in also "fixes" the problem, but the layout gets set back to en_US regardless of whether KDE layout switcher is enabled and regardless of which layout it's set to. Curiously, doing so also causes my mouse acceleration to be reset back to 2.0x, although the value in the associated KDE mouse settings applet stays at whatever I previously set it to. My mouse is plugged into a USB port on my keyboard.

Interestingly, (3) disappeared when I upgraded to xorg-x11-7.4 today, but reappeared later in the day. It is possible that the problem may have also disappeared right after previous xorg-x11 upgrades, but I didn't test/notice it.

Just in case it's relevant: I have a Razer Copperhead mouse plugged into a Logitech G15 keyboard, which is plugged into my Asus Z71V laptop. I'm currently running KDE-4.1.1 with xorg-x11-7.4. I use kbd for my keyboard driver and evdev for my mouse driver.

Reproducible: Didn't try

Steps to Reproduce:

Actual Results:  
Keyboard layout switching is very broken (see problems 1-3 above).

Expected Results:  
1) kdm/xdm/slim should start up using the dvorak layout, as specified in my xorg.conf; KDE and Xfce should do the same
2) the Xfce layout switcher should actually switch layouts
3) the KDE layout switcher should switch layouts without breaking a bunch of keys; it should keep its layout (and my mouse acceleration setting) regardless of how many times I unplug my keyboard

WARNING: repository at /usr/local/portage is missing a repo_name entry
Portage 2.2_rc8 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.27-rc5-00313-g64f996f i686)                                                     
=================================================================                
System uname: Linux-2.6.27-rc5-00313-g64f996f-i686-Intel-R-_Pentium-R-_M_processor_1.86GHz-with-glibc2.0                                                          
Timestamp of tree: Sun, 14 Sep 2008 23:45:01 +0000                               
ccache version 2.4 [enabled]                                                     
app-shells/bash:     3.2_p39                                                     
dev-java/java-config: 1.3.7, 2.1.6-r1                                            
dev-lang/python:     2.5.2-r7                                                    
dev-python/pycrypto: 2.0.1-r6                                                    
dev-util/ccache:     2.4-r7                                                      
sys-apps/baselayout: 2.0.0                                                       
sys-apps/openrc:     0.2.5-r1                                                    
sys-apps/sandbox:    1.2.18.1-r3                                                 
sys-devel/autoconf:  2.13, 2.62-r1                                               
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 
sys-devel/binutils:  2.18-r3                                                     
sys-devel/gcc-config: 1.4.0-r4                                                   
sys-devel/libtool:   2.2.4                                                       
virtual/os-headers:  2.6.26                                                      
ACCEPT_KEYWORDS="x86 ~x86"                                                       
CBUILD="i686-pc-linux-gnu"                                                       
CFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer"                         
CHOST="i686-pc-linux-gnu"                                                        
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/bind /var/qmail/alias /var/qmail/control"        
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"                     
CXXFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -fvisibility=hidden"                                                        
DISTDIR="/usr/portage/distfiles"                                                 
EMERGE_DEFAULT_OPTS=""                                                           
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"                                    
GENTOO_MIRRORS="ftp://gentoo.wpi.edu/gentoo  ftp://ftp.gtlib.gatech.edu/pub/gentoo  http://distfiles.gentoo.org"                                                  
INSTALL_MASK=""                                                                  
LANG="en_US.UTF-8"                                                               
LC_ALL="en_US.UTF-8"                                                             
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"                    
LINGUAS="en en_US"                                                               
MAKEOPTS="-j2"                                                                   
PKGDIR="/usr/portage/packages"                                                   
PORTAGE_RSYNC_EXTRA_OPTS=""                                                      
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                     
PORTAGE_TMPDIR="/var/tmp"                                                        
PORTDIR="/usr/portage"                                                           
PORTDIR_OVERLAY="/usr/local/portage/layman/sabayon /usr/local/portage/layman/enlightenment /usr/local/portage/layman/zen-overlay /usr/local/portage/layman/kdesvn-portage /usr/local/portage"                                                      
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"                          
USE="7zip X Xaw3d a52 aac aalib acl acpi addressbook administrator aim akode alias alsa amarok amazon amr animgif ansi ao apache2 apm applet artswrappersuid aspnet2 async asyncns athena audacious audiofile autoipd automount avahi avalon-framework avalon-logkit backtrace bash-completion bcmath bdf berkdb bidi big-tables binfilter bittorrent blas blender-game bluetooth boost branding bzip2 cairo calendar caps captury cardbus cblas cdaudio cdda cddb cdinstall cdio cdparanoia cdr chm chroot clamav clearcase cli clisp cmake colordiff connectionstatus console contentcache corba cpufreq cracklib crypt cscope css ctype cups cupsddk curl curlwrappers cursors custom-optimization cviewer cvs cvsgraph daap dbus device-mapper devil dia directfb disassembler disk-partition divx djbfft djvu dnd dri dts dvd dvdr dvdread dynamicplugin eap-tls ebook ecc emacs emerald emovix enca encode enscript eolconv epydoc equalizer erandom exif exiv2 expat extra-cardsets extraengine fam fame fastbuild fasttrack fat fbcon fbcondecor fbsplash ffmpeg fftw finger firefoxfirefox3 fits flac flash flatfile flexresp2 fltk fontconfig foomaticdb fortran fpx freetype ftp fuse g15 gd gdbm gif gimpprint git glade glib glibc-omitfp glitz glut gmedia gmp gnutella gnutls gpgme gphoto2 gpm graphviz gs gsm gstreamer gtk gtkhtml hal hash haskell hddtemp hdri highlight history hou howl-compat hpn htmlhandbook http httpd hunspell icons iconv icq icu id3 id3tag idn ieee1394 image imagemagick inifile inkjar inline innodb inode inotify ipod ipv6 isdnlog ithreads j2me jabber jack java java-internal java5 javascript jbig jce jikes jingle jms jmx joystick jpeg jpeg2k kcal kde kde4 kdeenablefinal kdehiddenvisibility kdm kerberoskig-scripting kqemu ladspa lame lapack latex lcms ldap ldap-sasl libcaca libffi libgcrypt libnotify libsamplerate libsexy libssh2 libtommath libvisual libwww live lm_sensors logitech-mouse lzo mad magic maps marble math matroska md5sum mdnsresponder-compat mhash midi mikmod mime ming mjpeg mmap mmx mmxext mng modplug monomoonlight motif mozdom mozembed moznopango mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer mtp mudflap multiuser musepack music musicbrainz mysql mysqli ncurses nepomuk net netboot netjack network network-cron networkmanager new-clx nfs nis nls nntp no-helper nocd normalize nova nowin nowlistening nptl nptlonly nsplugin ntfs numeric nvidia nxclient offensive ogg openal openexr opengl openmp openssl opensslcrypt oscar pam pango pccts pch pcmcia pcntl pcre pdf perfprofiling perl perlsuidphp physfs plasma plib plotutils plugins pmu png pnm pop posix postproc postscript pppd prediction prelude psyco pulseaudio pyste python qmake qt-copy qt-static qt3 qt3support qt4 query-browser quicktime rar rdesktop react readline real realmedia reflection reiser4 reiserfs remix replaygain replytolist rtc rtsp samba saslscenarios sdl sdl-image semantic-desktop sensord server session shorten simplexml skins slang slp smime sms smtp sndfile snmp snortsam soap sockets socks5 sou sound soundex sounds sox speex spell spl sql sqlite sqlite3 srp srt sse sse2 ssl startup-notification statistics stream subversion suhosin suid svg svga svgz swat swig sysfs syslog sysvipc szip taglib tagwriting tcl tcpd tetex texteffect textures tga themes theora threads thunderbird tidy tiff timestats tk tokenizer tomsfastmath toolbar toolkit-scroll-bars tordns translator trayicon truetype tunepimp twolame unicode upnp usb userlocales userpriv vcd vcdx vhosts videos vim vim-pager vim-syntax vim-with-x visualization vlm vnc vncviewer voice vorbis vorbis-psy vpopmail wavpack webdav webpresence wifi win32codecs winbind wireshark wma wmf wmp wordexp workbench wxwindows x264 x86 xanim xattr xcb xcomposite xemacs xface xfce xforms xft xine xinerama xinetd xml xmldoclet xmlreader xmlrpc xmlwriter xorg xosdxpm xrender xscreensaver xsl xulrunner xv xvid xvmc xvnc yv12 zip zlib zoran" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics joystick" KERNEL="linux" LCD_DEVICES="g15 ncurses text xosd" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, FFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Ivan D Vasin 2008-09-21 21:39:50 UTC
Problems (1) and (2) got fixed with a recent update. I'm not sure what it was, but I'm guessing it was that previously my keyboard layout settings weren't getting properly migrated to /etc/hal/fdi/policy/10-x11-input.fdi. Indeed a recent dispatch-conf did change the <merge key="input.xkb.layout" ...> entry in that file to include dvorak instead of just en_US. I'm happily dvoraking away now. Thanks for the fix, whoever you are!

I'm still not sure about problem (3) since I'm currently transitioning to KDE-4.1.66. That may be a separate bug.
Comment 2 Ivan D Vasin 2008-11-04 15:21:24 UTC
This got broken again by a more recent hal upgrade. The syntax used in the fdi file appears to have changed slightly, and for some reason my keyboard layout did not get migrated into the new file. This appears to be a new edition of the same old problem. Can I have my layout back, please?
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2008-11-04 16:53:54 UTC
Please attach your xorg.conf, Xorg.0.log and your hal input .fdi file.

Thanks
Comment 4 mixman 2008-11-19 09:49:52 UTC
(In reply to comment #2)
> This got broken again by a more recent hal upgrade. The syntax used in the fdi
> file appears to have changed slightly, and for some reason my keyboard layout
> did not get migrated into the new file. This appears to be a new edition of the
> same old problem. Can I have my layout back, please?
> 

The solution
Simple! please modify hardware abstraction layer (hal) input rule (/etc/hal/fdi/policy/10-x11-input.fdi) change this keys:

comment out "XkbModel" and "input.xkb.variant" variables
"input.xkb.layout" -> variable must be "us,lt"

Then check your /etc/X11/xorg.conf keyboard device input section to look like this

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "Xkb_Layout" "us,lt"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection


After you have finished please restart your Xorg or xdm and hal it look like this.

/etc/init.d/xdm stop
/etc/init.d/hald restart
/etc/init.d/xdm start


NOTE! "lt" and "us" are for example. You can use another languages like deutch "de", russian "ru" and so on. To change keyboard layout you need just to press alt+shift. 
Comment 5 Francisco José Cañizares Santofimia 2008-11-19 19:24:24 UTC
I don't want to make this a forum, but, for me the answer #4 is too long and probably will not solve the issue (at least the issue "3)" ).

Regarding xorg.conf, you should change or add this lines (as specified in comment #4):

        Driver  "evdev"
        Option          "Protocol"      "evdev"
        Option  "XkbModel" "evdev"

And, you do not mention if the problem "3)" happens also in Xfce, but for KDE:
System Settings / Regional & Language / Keyboard Layout / then select under "Keyboard Model": Evdev-managed keyboard.
Comment 6 Ivan D Vasin 2008-11-24 15:48:31 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > This got broken again by a more recent hal upgrade. The syntax used in the fdi
> > file appears to have changed slightly, and for some reason my keyboard layout
> > did not get migrated into the new file. This appears to be a new edition of the
> > same old problem. Can I have my layout back, please?
> > 
> 
> The solution
> Simple! please modify hardware abstraction layer (hal) input rule
> (/etc/hal/fdi/policy/10-x11-input.fdi) change this keys:
> 
> comment out "XkbModel" and "input.xkb.variant" variables
> "input.xkb.layout" -> variable must be "us,lt"

This fixed once again the problems (1) and (2). My question is, why did I have to do this? Previously, this setting was configured by a dispatch-conf (see comment #1), but more recently, the setting got erased. Shouldn't this be handled automatically? Is there a more proper way to report this?

Problem (3) is fixed by setting the keyboard driver to evdev in xorg.conf, then setting "Keyboard model" to "Evdev-managed keyboard" in KDE System Settings -> Regional & Language -> Keyboard Layout.
Comment 7 Matt Whitlock 2009-01-27 13:27:33 UTC
Is there a HAL FDI key to specify the default mouse acceleration factor and threshold?  I'm getting very annoyed by X always defaulting to 2.0x every time I unplug and replug my mouse.  Ideally, it should just apply the existing settings to the "new" mouse, but short of that, there ought to be some way to set defaults for those values in the FDI policy file.
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2009-01-27 17:30:26 UTC
If there was an xorg.conf setting, then you can specify it in the fdi. Otherwise, no.
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2009-08-17 20:55:12 UTC
Please get back to us if you can still reproduce the issue. Please don't hesitate to reopen this bug with the requested information in comment 3.

Meanwhile, I'll assume this has been fixed, as many users are able to use layout switching.

Thanks