[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: Swap vsync order, trade in 1frame lag,
From:       Thomas_Lübking <thomas.luebking () web ! de>
Date:       2011-11-09 22:06:06
Message-ID: 20111109220606.31238.12565 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Nov. 7, 2011, 5:35 p.m., Martin Gräßlin wrote:
> > kwin/options.cpp, lines 67-72
> > <http://git.reviewboard.kde.org/r/103058/diff/1/?file=40442#file40442line67>
> > 
> > meh that doesn't look nice. Is there no better way to get it? Let me guess: the \
> > language from nvidia_settings does not have to be the same as returned by \
> > QLocale::system()?

LOCAL(E) issue - for some reason, kwin thinks the locale is "C" but nvidia-settings \
thinks it's de_DE.UTF-8 (as set in the boot var) - might be because arch recently \
changed the system and KDM doesn't read in wherever this ends (i just blindly \
followed their instructions ;-)

As a broadsword solution, the coming patches set the locale for the nvidia-settings \
process environment (to "C") and then QLocale::c().toFloat() is used. This works \
always ;-)

(Note to self: as soon as world domination reached, enforce common global language. \
<- there's no smiley)


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103058/#review7995
-----------------------------------------------------------


On Nov. 6, 2011, 6:17 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103058/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2011, 6:17 p.m.)
> 
> 
> Review request for kwin and Martin Gräßlin.
> 
> 
> Description
> -------
> 
> This performs a paint & glFlush immediately after the buffer swapping and defers \
> the next swapping to the next anticipated frame (or idling) The behavior is still \
> not as deterministic as we hoped to be since we cannot measure the time for the \
> actual vsync :\ I set a fuzzyness of 6ms what leads to a majority of 2-3ms times in \
> waitsync but single wait times up to 8 or 9ms occur (what ultimately can be part of \
> the syncing itself) 
> There's some debug code to print lagging.
> 
> TODO:
> - attempt egl support
> - probably lie to the effects about the time
> 
> 
> Diffs
> -----
> 
> kwin/composite.cpp bc29233 
> kwin/options.cpp 19c3ee5 
> kwin/scene.h d8bcf48 
> kwin/scene.cpp 413e46f 
> kwin/scene_basic.h a087eb5 
> kwin/scene_basic.cpp cc8dbdd 
> kwin/scene_opengl.h e13d8a5 
> kwin/scene_opengl_egl.cpp 22e082c 
> kwin/scene_opengl_glx.cpp ddebcd0 
> kwin/scene_xrender.h 6c916c8 
> kwin/scene_xrender.cpp 3618d79 
> kwin/workspace.h e4db7e7 
> kwin/workspace.cpp 70b2df8 
> 
> Diff: http://git.reviewboard.kde.org/r/103058/diff/diff
> 
> 
> Testing
> -------
> 
> I've used a CRT for testing which can sync every 11ms ie. 85Hz and lowered the \
> maxFPS down to 10fps with pretty constant results for the time lost waiting for the \
> sync. 
> 
> Thanks,
> 
> Thomas Lübking
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103058/">http://git.reviewboard.kde.org/r/103058/</a>
  </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On November 7th, 2011, 5:35 p.m., <b>Martin \
Gräßlin</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/103058/diff/1/?file=40442#file40442line67" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/options.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int \
currentRefreshRate()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">67</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">ok</span><span class="p">)</span></pre></td>  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">68</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="n">frate</span> <span class="o">=</span> <span \
class="n">QLocale</span><span class="o">::</span><span class="n">system</span><span \
class="p">().</span><span class="n">toFloat</span><span class="p">(</span><span \
class="n">reply</span><span class="p">,</span> <span class="o">&amp;</span><span \
class="n">ok</span><span class="p">);</span></pre></td>  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">69</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">ok</span><span class="p">)</span></pre></td>  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">70</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="n">frate</span> <span class="o">=</span> <span \
class="n">QLocale</span><span class="p">(</span><span class="n">QLocale</span><span \
class="o">::</span><span class="n">German</span><span class="p">).</span><span \
class="n">toFloat</span><span class="p">(</span><span class="n">reply</span><span \
class="p">,</span> <span class="o">&amp;</span><span class="n">ok</span><span \
class="p">);</span> <span class="c1">// &quot;,&quot;</span></pre></td>  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">71</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">ok</span><span class="p">)</span></pre></td>  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">72</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="n">frate</span> <span class="o">=</span> <span \
class="n">QLocale</span><span class="p">(</span><span class="n">QLocale</span><span \
class="o">::</span><span class="n">English</span><span class="p">).</span><span \
class="n">toFloat</span><span class="p">(</span><span class="n">reply</span><span \
class="p">,</span> <span class="o">&amp;</span><span class="n">ok</span><span \
class="p">);</span> <span class="c1">// &quot;.&quot;</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">meh that doesn&#39;t \
look nice. Is there no better way to get it? Let me guess: the language from \
nvidia_settings does not have to be the same as returned by QLocale::system()?</pre>  \
</blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">LOCAL(E) \
issue - for some reason, kwin thinks the locale is &quot;C&quot; but nvidia-settings \
thinks it&#39;s de_DE.UTF-8 (as set in the boot var) - might be because arch recently \
changed the system and KDM doesn&#39;t read in wherever this ends (i just blindly \
followed their instructions ;-)

As a broadsword solution, the coming patches set the locale for the nvidia-settings \
process environment (to &quot;C&quot;) and then QLocale::c().toFloat() is used. This \
works always ;-)

(Note to self: as soon as world domination reached, enforce common global language. \
&lt;- there&#39;s no smiley)</pre> <br />




<p>- Thomas</p>


<br />
<p>On November 6th, 2011, 6:17 p.m., Thomas Lübking wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin and Martin Gräßlin.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated Nov. 6, 2011, 6:17 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This performs a paint &amp; glFlush immediately after the buffer \
swapping and defers the next swapping to the next anticipated frame (or idling) The \
behavior is still not as deterministic as we hoped to be since we cannot measure the \
time for the actual vsync :\ I set a fuzzyness of 6ms what leads to a majority of \
2-3ms times in waitsync but single wait times up to 8 or 9ms occur (what ultimately \
can be part of the syncing itself)

There&#39;s some debug code to print lagging.

TODO:
- attempt egl support
- probably lie to the effects about the time</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I&#39;ve used a CRT for testing which can sync every 11ms ie. 85Hz and \
lowered the maxFPS down to 10fps with pretty constant results for the time lost \
waiting for the sync.</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/composite.cpp <span style="color: grey">(bc29233)</span></li>

 <li>kwin/options.cpp <span style="color: grey">(19c3ee5)</span></li>

 <li>kwin/scene.h <span style="color: grey">(d8bcf48)</span></li>

 <li>kwin/scene.cpp <span style="color: grey">(413e46f)</span></li>

 <li>kwin/scene_basic.h <span style="color: grey">(a087eb5)</span></li>

 <li>kwin/scene_basic.cpp <span style="color: grey">(cc8dbdd)</span></li>

 <li>kwin/scene_opengl.h <span style="color: grey">(e13d8a5)</span></li>

 <li>kwin/scene_opengl_egl.cpp <span style="color: grey">(22e082c)</span></li>

 <li>kwin/scene_opengl_glx.cpp <span style="color: grey">(ddebcd0)</span></li>

 <li>kwin/scene_xrender.h <span style="color: grey">(6c916c8)</span></li>

 <li>kwin/scene_xrender.cpp <span style="color: grey">(3618d79)</span></li>

 <li>kwin/workspace.h <span style="color: grey">(e4db7e7)</span></li>

 <li>kwin/workspace.cpp <span style="color: grey">(70b2df8)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103058/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic