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

List:       kde-hardware-devel
Subject:    Re: [Kde-hardware-devel] Review Request: Fix libkscreen when running with old RandR (1.1)
From:       Lukáš Karas <lukas.karas () centrum ! cz>
Date:       2012-12-30 18:39:30
Message-ID: 20121230183930.20555.6427 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Dec. 30, 2012, 5:25 p.m., Dan Vrátil wrote:
> > XRandR 1.1 only supports single screen via XRRGetScreenInfo(). Maybe we should \
> > fallback to this in order to obtain at least the basic information about mode and \
> > rotation and switch libkscreen to read-only mode? 
> > http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n499
> 
> Àlex Fiestas wrote:
> Well, we have been waiting for a usecase to support XRandR 1.1 and it seems we have \
> found one (vnc). Imho we should implement support for it in both kscreen and \
> libkscreen shouldn't be that difficult after all.

If you want reproducible usecase, I used Xvnc 4.1.1 and followed script for testing:

#!/bin/bash

Xvnc :666 dpms +kb -SecurityTypes none -geometry 1600x900 -depth 24  &
vncPid=`ps | grep "[X]vnc" | awk '{print $1}'`
echo "Xvnc PID: $vncPid"

export DISPLAY=:666
export `dbus-launch `
echo "DBUS_SESSION_BUS_PID: "$DBUS_SESSION_BUS_PID

/usr/bin/kdeinit4 > kded.log 2>&1 &
/usr/bin/kwin &
/usr/bin/kcmshell4 kcmkded &
/usr/bin/xterm &

read

kill $vncPid


- Lukáš


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


On Dec. 30, 2012, 5:03 p.m., Lukáš Karas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108030/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2012, 5:03 p.m.)
> 
> 
> Review request for Solid, Àlex Fiestas and Dan Vrátil.
> 
> 
> Description
> -------
> 
> If you are using libkscreen with old RandR (1.1) method XRandR::screenResources() \
> returns NULL. It is needed check this result and prevent dereference NULL pointer. 
> For example if you running KDED in VNC server with RandR 1.1, you get something \
> like this: 
> RandR version 1.1 too old
> ...
> X Error: BadRequest (invalid request code or no such operation) 1
> Extension:    149 (RANDR)
> Minor opcode: 6 (RRGetScreenSizeRange)
> Resource id:  0x2e
> 
> and emtpy list of outputs...
> 
> 
> Diffs
> -----
> 
> backends/xrandr/xrandr.cpp 468c8dd 
> backends/xrandr/xrandrconfig.cpp 91467d7 
> 
> Diff: http://git.reviewboard.kde.org/r/108030/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Lukáš Karas
> 
> 


[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/108030/">http://git.reviewboard.kde.org/r/108030/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On December 30th, 2012, 5:25 p.m., <b>Dan \
Vrátil</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">XRandR 1.1 only supports single screen via XRRGetScreenInfo(). Maybe we \
should fallback to this in order to obtain at least the basic information about mode \
and rotation and switch libkscreen to read-only mode?

http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n499</pre>
 </blockquote>




 <p>On December 30th, 2012, 6:26 p.m., <b>Àlex Fiestas</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well, we have been \
waiting for a usecase to support XRandR 1.1 and it seems we have found one (vnc). \
Imho we should implement support for it in both kscreen and libkscreen shouldn&#39;t \
be that difficult after all.</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If you want reproducible \
usecase, I used Xvnc 4.1.1 and followed script for testing:

#!/bin/bash

Xvnc :666 dpms +kb -SecurityTypes none -geometry 1600x900 -depth 24  &amp;
vncPid=`ps | grep &quot;[X]vnc&quot; | awk &#39;{print $1}&#39;`
echo &quot;Xvnc PID: $vncPid&quot;

export DISPLAY=:666
export `dbus-launch `
echo &quot;DBUS_SESSION_BUS_PID: &quot;$DBUS_SESSION_BUS_PID

/usr/bin/kdeinit4 &gt; kded.log 2&gt;&amp;1 &amp;
/usr/bin/kwin &amp;
/usr/bin/kcmshell4 kcmkded &amp;
/usr/bin/xterm &amp;

read

kill $vncPid</pre>
<br />








<p>- Lukáš</p>


<br />
<p>On December 30th, 2012, 5:03 p.m., Lukáš Karas 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 Solid, Àlex Fiestas and Dan Vrátil.</div>
<div>By Lukáš Karas.</div>


<p style="color: grey;"><i>Updated Dec. 30, 2012, 5:03 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;">If you are using libkscreen with old RandR (1.1) method \
XRandR::screenResources() returns NULL. It is needed check this result and prevent \
dereference NULL pointer.

For example if you running KDED in VNC server with RandR 1.1, you get something like \
this:

RandR version 1.1 too old
...
X Error: BadRequest (invalid request code or no such operation) 1
  Extension:    149 (RANDR)
  Minor opcode: 6 (RRGetScreenSizeRange)
  Resource id:  0x2e

and emtpy list of outputs...</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>backends/xrandr/xrandr.cpp <span style="color: grey">(468c8dd)</span></li>

 <li>backends/xrandr/xrandrconfig.cpp <span style="color: grey">(91467d7)</span></li>

</ul>

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




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








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



_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


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

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