Bug 371756

Summary: [11.2] No keyboard auto-repeat in X11 during installation
Product: [openSUSE] openSUSE 11.2 Reporter: Stefan Hundhammer <shundhammer>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P4 - Low CC: eich, forgotten_QtBI7gWTIh, jack.hodge, jsuchome, locilka
Version: unspecified   
Target Milestone: ---   
Hardware: 32bit   
OS: openSUSE 11.0   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stefan Hundhammer 2008-03-17 14:48:13 UTC
Keyboard auto-repeat does not work for me in X11 during installation.

It works fine in a text console (Alt-F2), but not at all in X11.
Comment 1 Stefan Hundhammer 2008-03-17 14:50:14 UTC
If just this machine (my test machine) is affected, feel free to close this with WORKSFORME. But please test with other hardware if it works at all.

We might have some bad setting in the xorg.conf we use during installation.
Comment 2 Steffen Winterfeldt 2008-03-17 15:32:55 UTC
works with my test machine
Comment 3 Stefan Dirsch 2008-03-17 17:28:05 UTC
It's impossible to install Alpha2+.

[...]
Linuxrc crashed. :-((
Press ENTER to continue.

Please reopen, if the issue still occurs with Alpha3.
Comment 4 Stefan Hundhammer 2008-03-18 14:52:43 UTC
Still the same with Alpha3 (as of 2008-03-18 15:50 MET).
Comment 5 Stefan Dirsch 2008-03-18 16:27:38 UTC
There is no Alpha3 released yet. So how did you manage to install it?
Comment 6 Stefan Hundhammer 2008-03-18 17:13:40 UTC
Whatever that thing is that announces itself as "Alpha 3" via SLP.
Comment 7 Stefan Dirsch 2008-03-18 17:18:11 UTC
Ok. I'll try a SLP installation then.
Comment 8 Stefan Dirsch 2008-03-25 16:48:41 UTC
How can I reproduce this? I tried with german keyboard setting and opened an xterm with Ctrl-Alt-Shift-x, in which autorepeat works fine during installation. You can also check the autorepeat setting with the 'xset q' command inside a xterm.
Comment 9 Stefan Dirsch 2008-04-03 14:11:59 UTC
Can you please reopen once you provide the requested feedback? Thanks.
Comment 10 Stefan Hundhammer 2008-04-03 16:02:49 UTC
It didn't work in any Qt input field during installation. If it works in general, that's good enough for me - the problem might as well be the cheapish keyboard of my test PC.
Comment 11 Stefan Dirsch 2008-04-03 16:34:41 UTC
Where can I find a Qt input field during installation?
Comment 12 Stefan Hundhammer 2008-04-04 09:38:10 UTC
The user name in "create user", for example.
Comment 13 Stefan Dirsch 2008-04-04 10:50:33 UTC
Indeed I can reproduce this issue. Luckily it's before the installation begins.
According to 'xset q' autorepeat is enabled. After running 

  xset r rate 660 25

which are exactly the same settings as before autorepeat works again!?! No, this doesn't make any sense. I can't explain the behaviour. Therefore if you think this is an important issue, I suggest to apply this workaround to YaST2.

Comment 14 Stefan Hundhammer 2008-10-08 11:47:54 UTC
See also bug #433338
Comment 15 Stefan Hundhammer 2008-10-24 16:39:15 UTC
*** Bug 438749 has been marked as a duplicate of this bug. ***
Comment 16 Stefan Hundhammer 2008-11-07 18:12:48 UTC
*** Bug 441093 has been marked as a duplicate of this bug. ***
Comment 17 Stanislav Visnovsky 2008-11-10 08:08:10 UTC
Too many duplicates.
Comment 18 Stanislav Visnovsky 2008-11-10 08:09:08 UTC
(In reply to comment #13 from Stefan Dirsch)
> I can't explain the behaviour. Therefore if you
> think this is an important issue, I suggest to apply this workaround to YaST2.
> 

Which workaround?
Comment 19 Stefan Dirsch 2008-11-10 08:31:56 UTC
The xset command in exactly this comment #13.
Comment 20 Stefan Dirsch 2008-11-10 08:33:05 UTC
Reassigning to Stano, since I can't apply the workaround.
Comment 21 Stanislav Visnovsky 2008-11-10 14:23:04 UTC
Lukas, I'm not sure if this for you or Jiri.
Comment 22 Lukas Ocilka 2008-11-10 15:00:25 UTC
cd source/installation
grep -r "xset r on" * | grep -v "\.svn"
src/include/misc.ycp:           WFM::Execute (.local.bash, "xset r on");
startup/YaST2.call:                     xset r on

There are actually two places in installation that call `xset r on`, does it mean that calling that command is not enough? And how comes that if I open an xterm and write that command (during installation), autorepeat suddenly starts working?
Comment 23 Stefan Dirsch 2008-11-10 15:03:38 UTC
I have no idea, but maybe it's enough to run it each time you changed the keyboard layout. Just a wild guess.
Comment 24 Lukas Ocilka 2008-11-10 16:29:07 UTC
In that case it actually belongs to keyboard setup...
Comment 25 Jiří Suchomel 2008-11-11 06:44:04 UTC
Stefan, this bug is marked for 11.0, did you reproduce it for 11.1?

And when Lukas mentions xset command, it is a different one from your proposal in comment 13. So if YaST during start (in YaST2.call) would call "xset r rate 660 25", it may work regardless the change of the layout... Did anybody test it?
Comment 26 Stefan Dirsch 2008-11-11 07:57:06 UTC
Apparently the bug has been reproduced on 11.1 by a lot of users. Nobody tested
if "xset r rate 660 25" or "xset r on" helps in all cases. It's just wild guessing that it will help after changing keyboard layout.
Comment 27 Jiří Suchomel 2008-11-11 08:09:49 UTC
The problem is what should help: there is some current code with "xset r on", but nothing with "xset r rate 660 25". I don't know why we should have more such commands at more places, so I am asking.

If I create a patch for you, that calls "xset r rate 660 25" after setxkbmap call, are you able to test it that it helps?
Comment 28 Stefan Dirsch 2008-11-11 08:20:21 UTC
All the reporters, i.e. the initial reporter and all the others which bugreport
for 11.1 has been closed as duplicate of this one should be able to test if it works, yes.
Comment 29 Jiří Suchomel 2008-11-11 08:43:02 UTC
Well, I was asking if you can test it, not the reporters.

yast2-country-2.17.24 contains "xset r rate 660 25" after each setxkbmap call during installation.

As this can't be said to be fixed, moving to Stefan, which should find the real source of problems.
Comment 30 Stefan Dirsch 2008-11-11 09:17:23 UTC
The real source of the problem is that X Input in X.Org has changed a lot since openSUSE 10.3, i.e. with xorg-server 1.4 and I doubt that this issue can be fixed with reasonable efforts.
Comment 31 Stefan Dirsch 2008-11-11 09:18:53 UTC
Thus WONTFIX.
Comment 32 Jiří Suchomel 2008-11-11 09:24:43 UTC
Hey, how could it be WONTFIX if there is a real bug? Can't you escalate it upstream?
Comment 36 Egbert Eich 2008-11-26 09:51:41 UTC
The problem occurs while going from the 'Welcome' YaST screen to the
'Installation Mode' screen when the user hasn't pressed any key on the
keyboard, yet. Pressing any key (even if it doesn't trigger any action) will 
result in autorepeat on.

Apparently YaST loads the keyboard layout somewhere during the transition   
between the two screens (probably while doing system probing).

The reason for this is the changed default handling of the core keyboard:   
the core  keyboard is identified and the keyboard state is loaded on the    
first key press by the user. If the keymap gets modified before this is done 
the autorepeat state may not be the one of the core keyboard.
Thus this is not a bug but a change in the semantics which was introduced   
with dynamic input devices and the virtual keyboard.

I remember this being discussed on the last XDS in Edinburgh (maybe Luc also 
remembers).

The situation can be remedied by just calling 'xon r on' or just by calling 
XChangeKeyboardControl(3) with the appropriate arguments after the keyboard 
layout has been loaded to turn on autorepeat.  XAutoRepeatOn(3) may also    
already be sufficient. So please fix YaST.
Comment 37 Jiří Suchomel 2008-11-26 10:11:14 UTC
'xon r on' is called by YaST, see some previous comment by Lukas...
Comment 38 Egbert Eich 2008-11-26 10:53:47 UTC
Then it's most likely done at the wrong place.

Here is what I've tested:
- Started installation from CD (Beta4)
- After YaST has started:
  - switch to vc2
  - edited /etc/ssh/sshd_config to allow password logins
  - set a root password
  - did: ifconfig eth0 up
  - did: dhcpcd eth0
  - ran: rcsshd start
  - logged in from remote
(1) - on vc2 ran /bin/sh /usr/lib/YaST2/startup/YaST.call installation inital
(2) - navigated thru welcome screen purely by mouse
    - when 'mode' screen showed did: 'xset r on -display :0; xterm -display :0;
    input in xterm had autorepeat.
  - redid step (1) and (2)
  - when 'mode' screen showed did: xterm -display :0;
    input in xterm had *NO* autorepeat.

So it is possible to turn it on doing 'xset r on'.
Since I don't know what actions you are performing in YaST I cannot tell you where to turn it on. Please check your YaST command sequences and find out where you have to enable autorepeat.
Comment 39 Stefan Dirsch 2008-11-26 10:55:23 UTC
I think Egbert means 'xset r on'. Still interesting news. Never new about this change. Maybe we can also get rid of this stupid workaround to reload the keyboard layout in /etc/X11/xinit/xinitrc.common to make keyboard layout working also with kdm/gdm autologin.
Comment 40 Jiří Suchomel 2008-11-26 11:32:25 UTC
OK, I'll try to play around this again, but after SLE11 is released. Now when we have working solution it's better to stay with it.
Comment 41 Jiří Suchomel 2009-02-12 11:32:29 UTC
I'm not sure why the current placing of 'xset r on' is wrong (now it is at the very beginning), but according to the previous comments, it should be correct to call it after all the keyboard settings are done, i.e. just before the client with welcome screen exits. And remove those "xset r rate 660 25" calls after each setxkbmap.
Comment 42 Stefan Dirsch 2009-03-13 15:35:07 UTC
*** Bug 484211 has been marked as a duplicate of this bug. ***
Comment 43 Jiří Suchomel 2009-04-16 12:13:11 UTC
OK, now (from yast2-country-2.18.4), country calls just 'xset r on' after the keyboard is set (which is at the end of initial screen).