[Kde-hardware-devel] Review Request: Fix libkscreen when running with old RandR (1.1)

Lukáš Karas lukas.karas at centrum.cz
Sun Dec 30 18:39:30 UTC 2012



> 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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20121230/ebc1b92e/attachment-0001.html>


More information about the Kde-hardware-devel mailing list