<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>935</bug_id>
          
          <creation_ts>2011-03-28 01:14:41 +0000</creation_ts>
          <short_desc>Keyboard do not work properly when there is a vnc client connection</short_desc>
          <delta_ts>2011-08-22 16:08:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-configuration</component>
          <version>1.0</version>
          <rep_platform>Blacksand</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>scheduled for completion on or before 1.1 M4 RC1 (Sept 6)</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Xudong Hao">xudong.hao</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>jiajun.xu</cc>
    
    <cc>kunwei.tian</cc>
    
    <cc>sgw</cc>
    
    <cc>yp.bsp.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13005</commentid>
    <comment_count>0</comment_count>
    <who name="Xudong Hao">xudong.hao</who>
    <bug_when>2011-03-28 01:14:41 +0000</bug_when>
    <thetext>Image location: http://autobuilder02.yoctoproject.org/sugarbay-bernard/nightly/20110326-1/machines/sugarbay/x86_32/poky-image-sato-sdk-live-sugarbay-20110327030158.hddimg.bz2

commit: 8b6416db1e04af83ecdf57522240ac859d5d8031

On blacksand and Sugarbay with BSP image installed, start a VNC server, then prepare a client system, and connect the yocto system by vncviewer in client. Both on server terminal console and client console, press any &quot;key&quot; (such as &quot;m&quot;) of the keyboard device for a long time, there was only one &quot;key&quot; (only one &quot;m&quot; ) printed in console.

Reproduce steps:
===============
1) install BSP image on sugarbay and boot to yocto system A
2) start vnc server with command: &quot;x11vnc -display :0.0&quot;
3) re-open a terminal console, and press &quot;m&quot; for a long time, there will be many &quot;m&quot; printed
4) in a system B, connect system A by vncviewer
5) do step3, there will be only one &quot;m&quot; printed
6) stop vncserver, then do step3, there will be many &quot;m&quot; printed

Influence:
===============
In terminal console, if we need to modify or delete a exist command, we need to click &quot;Backspace&quot; one by one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13006</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-03-28 06:11:06 +0000</bug_when>
    <thetext>Tom: any ideas for this one ? It doesn&apos;t look BSP specific, so if there&apos;s nothing obvious we can try and get more help on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13030</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-03-29 08:08:45 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Tom: any ideas for this one ? It doesn&apos;t look BSP specific, so if there&apos;s
&gt; nothing obvious we can try and get more help on this.

Yes, I would agree - it doesn&apos;t look BSP-specific.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13069</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-03-31 10:21:34 +0000</bug_when>
    <thetext>Looking at this, we need to confirm if it fails without VNC server running.  Also does if fail if we are in text mode (non-graphical), by running the minimal image and testing there.  That will give us more hints as to where the problem might be.

Please verify without VNC and on a text console, if those work, then the problem is with VNC not the BSP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13085</commentid>
    <comment_count>4</comment_count>
    <who name="Xudong Hao">xudong.hao</who>
    <bug_when>2011-03-31 20:13:28 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Looking at this, we need to confirm if it fails without VNC server running. 
&gt; Also does if fail if we are in text mode (non-graphical), by running the
&gt; minimal image and testing there.  That will give us more hints as to where the
&gt; problem might be.
&gt; Please verify without VNC and on a text console, if those work, then the
&gt; problem is with VNC not the BSP.

Double checked and make it clear here:
1) in text mode of SDK image, everything works fine.
2) boot with minimal BSP image, everything works fine.
3) in X mode of SDK image, without VNC server running, everything works fine.
4) in X mode of SDK image, start VNC server, everything works fine; then connect with vncviewer from another machine, failure happen; disconnect vnc, everything become fine.
5) in X mode of SDK image, start VNC server and connect with vncviewer from another machine, failure happen on X mode; if we change to text mode with &quot;Ctrl+Alt+F1&quot;, everything become fine. 

So this issue only happen on a X mode with a VNC connection.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15641</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-08-22 16:08:36 +0000</bug_when>
    <thetext>This is expected behavior.  The default setting is -norepeat, which turns off autorepeat on the X server to guard against misbehaving clients.  If 5 minutes have passed with no activity from the client, the normal X server autorepeat is turned back on, on the assumption that the only user is local.

From the x11vnc stdout, we can see X server key autorepeat being turned on a off, at which point, the keypresses on the server do repeat:
 
22/08/2011 21:24:40 Disabled X server key autorepeat.
22/08/2011 21:24:40   to force back on run: &apos;xset r on&apos; (3 times)

22/08/2011 21:25:21 Restored X server key autorepeat to: 1

So I&apos;m closing this - I don&apos;t see why we wouldn&apos;t go with the more conservative setting - users can always turn autorepeat on the server back on using the &apos;xset r on&apos; command described in the message above, or wait 5 minutes after no activity from the client.


  From x11vnc --help:


-norepeat              Option -norepeat disables X server key auto repeat when
-repeat                VNC clients are connected and VNC keyboard input is
                       not idle for more than 5 minutes.  This works around a
                       repeating keystrokes bug (triggered by long processing
                       delays between key down and key up client events:
                       either from large screen changes or high latency).
                       Default: -norepeat

                       You can set the env. var. X11VNC_IDLE_TIMEOUT to the
                       number of idle seconds you want (5min = 300secs).

                       Note: your VNC viewer side will likely do autorepeating,
                       so this is no loss unless someone is simultaneously at
                       the real X display.

                       Use &quot;-norepeat N&quot; to set how many times norepeat will
                       be reset if something else (e.g. X session manager)
                       undoes it.  The default is 2.  Use a negative value
                       for unlimited resets.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>