Keyboard layout switcher is unrealible

The standard panel of LXDE - http://wiki.lxde.org/en/LXPanel
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: Keyboard layout switcher is unrealible

Post by Marty Jack »

Rats. The thing I fixed was definitely a bug, though.

Once again, when you start it from scratch, what's the displayed flag and what's the tooltip? And when you click or scroll it what happens? Also just for sanity please check your /usr/lib/lxpanel/plugins to make sure the plugin got rebuilt and reinstalled. It should be xkb.so.

The KBLED thing was a dumb mistake hanging out in a place I wasn't looking.
bmarkus
Posts: 33
Joined: Tue Sep 08, 2009 6:23 pm

Re: Keyboard layout switcher is unrealible

Post by bmarkus »

Displays "UNKNOWN". Moving the cursor to it displays "Unknown" in a bubble. Settings panel lists only "UNKNOWN", no more items on the scroll list. When clicked nothing happens.

It is tested in "always clean" live environment, nothing installed. For sure up to date compiled plugins used as it is shown by "Keyboard LED" different operation.
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: Keyboard layout switcher is unrealible

Post by Marty Jack »

I made two more checkins to clamp the group number into a valid range and to ensure that things are initialized on all flow paths. That is the only other thing I see immediately. I do not know if this will help. I am completely puzzled as to where the string "UNKNOWN" in all caps might be coming from. The Xkb spec says that the group number that it returns is in the range 0 .. 3, but we should have had code to deal with an out of range value. Clearly most times the X server is reporting the right value, because the Xkb plugin works most of the time. We also know that the test program works on your system, so that is an additional puzzle if the plugin doesn't.

We do have one other bug report 2939617 claiming that the Xkb plugin makes the panel unstable and crash, which might easily be caused if this value were out of range.

Let's see whether it's better or different with these two checkins. Just for curiosity can you take a look at the top of /var/log/Xorg.0.log and see what your server version is.
bmarkus
Posts: 33
Joined: Tue Sep 08, 2009 6:23 pm

Re: Keyboard layout switcher is unrealible

Post by bmarkus »

Just for curiosity can you take a look at the top of /var/log/Xorg.0.log and see what your server version is.
Xorg 1.6.1
bmarkus
Posts: 33
Joined: Tue Sep 08, 2009 6:23 pm

Re: Keyboard layout switcher is unrealible

Post by bmarkus »

I just rerun the kbd test program and now its output:

Code: Select all

1
-
-
-
-
unknown
Randomly when switcher works, test program reports correct values.
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: Keyboard layout switcher is unrealible

Post by Marty Jack »

Well, that explains where the string UNKNOWN came from. It came from the X server, which reset its idea of what the XkbLayouts are for an unknown reason. The Xkb applet does not have any code that might do that. The only thing it calls that writes the server state is XkbLockGroup to change the layout to one that is already defined.

It's still possible that the bug is in the Xkb applet, but I am running out of ways to help you further from this distance. The next question is, if you restart the X server and use the test program to probe what the server reports, what action causes that to change to "1 unknown". I am happy to consult further, but only a couple people are having any problems, so it is not something that I'll be able to reproduce. I would be delighted to get this solved though.

If you are adventurous and have the capacity to debug, the way to debug the panel is to ssh in from another machine, kill the panel, and start it under the debugger; run it --profile LXDE to get your profile. You'll find the Xkb applet in src/plugins/xkb, and it's only a few hundred lines. (To log out after you've killed the panel, kill lxsession). You can also do it without another machine by changing the startup to start a terminal instead of lxpanel, but this is less convenient.

An interesting thing to do would be ps aux to see what other daemons are running that might have changed something, like HAL overwriting your Xorg.conf setup, or something, particularly when on your distro/system it works so rarely, this is a distinct possibility.

Especially with the new information that you just added, I would be looking at those other processes to catch them doing something bad. I no longer think debugging the Xkb applet is going to be necessary. The problem lies in, why is it "1 unknown" most of the times you start.
bmarkus
Posts: 33
Joined: Tue Sep 08, 2009 6:23 pm

Re: Keyboard layout switcher is unrealible

Post by bmarkus »

Marty, thanks for your help and appreciate fast response. Agree, it looks a local Xorg issue and not lxpanel related. I will think over how to proceed and report findings.

BTW, I'm running it in a minimalistic environment, no HAL, other processes suspected to influence Xorg, etc. WIll talk to developer responsible for Xorg in the distro.

Thanks again!

Béla
Drummond Lorn
Posts: 2
Joined: Fri Oct 08, 2010 1:10 pm

Re: Keyboard layout switcher is unrealible

Post by Drummond Lorn »

Hi,
I want to study computer programming and pursue a career in programming and IT. Should I learn to use the dvorak keyboard layout? I've heard and read that it's better and faster, but that hardly anyone uses it. I'd especially like to hear the opinions of IT professionals and what they think about the pros and cons of using the dvorak layout. Thanks.


Profile Design
Locked