[PATCH 1/1] randr: make RROutputChanged change the main protocol screen not the gpu screen

Alberto Milone alberto.milone at canonical.com
Sun Dec 8 03:25:44 PST 2013


On 08/12/13 12:08, Alberto Milone wrote:
> We only set changes on the main protocol screen as, for example
> in RRSetChanged() and RRTellChanged(), therefore we should follow
> the same logic when reporting that an output changed in
> RROutputChanged().
> 
> This means that RRTellChanged() will then update the relevant
> timestamps also when events come from gpu screens.
> 
> Signed-off-by: Alberto Milone <alberto.milone at canonical.com>

Hi all,

This solves a problem that I spotted using RandR offloading with
modesetting and nvidia on a system with Optimus. At first noticed that
the gnome-settings-daemon, while getting the RRScreenChangeNotify event
on output hotplug, wouldn't enable the output or do anything at all with it.

After disabling g-s-d and investigating the issue using xev -root, I
found out that the RRScreenChangeNotify did not have an updated
config_timestamp. After my changes in RROutputChanged() (which is
basically what Dave Airlie did for RRSetChanged() in a previous commit),
the config_timestamp is properly updated and hotplugging seems to work
as expected. I've also tried the patch with intel only (disabling the
discrete card) and there are no regressions.

Thank you in advance for you time,

-- 
Alberto Milone
Software Engineer
Hardware Enablement Team
Professional and Engineering Services
-------------- next part --------------
:~$ xev -root

RRScreenChangeNotify event, serial 18, synthetic NO, window 0x2c1,
    root 0x2c1, timestamp 2345281, config_timestamp 4005780
    size_index 65535, subpixel_order SubPixelUnknown
    rotation RR_Rotate_0
    width 1366, height 768, mwidth 361, mheight 203

RRNotify event, serial 18, synthetic NO, window 0x2c1,
    subtype XRROutputChangeNotifyEvent
    output HDMI-1-0, crtc None, mode None
    rotation RR_Rotate_0
    connection RR_Connected, subpixel_order SubPixelUnknown

ClientMessage event, serial 18, synthetic YES, window 0x2c1,
    message_type 0x145 (WM_PROTOCOLS), format 32

RRScreenChangeNotify event, serial 24, synthetic NO, window 0x2c1,
    root 0x2c1, timestamp 2345281, config_timestamp 4008702
    size_index 65535, subpixel_order SubPixelUnknown
    rotation RR_Rotate_0
    width 1366, height 768, mwidth 361, mheight 203

RRNotify event, serial 24, synthetic NO, window 0x2c1,
    subtype XRROutputChangeNotifyEvent
    output HDMI-1-0, crtc None, mode None
    rotation RR_Rotate_0
    connection RR_Disconnected, subpixel_order SubPixelUnknown

ClientMessage event, serial 26, synthetic YES, window 0x2c1,
    message_type 0x145 (WM_PROTOCOLS), format 32
^C

-------------- next part --------------
:~$ xev -root

ClientMessage event, serial 18, synthetic YES, window 0x2c1,
    message_type 0x145 (WM_PROTOCOLS), format 32

ClientMessage event, serial 19, synthetic YES, window 0x2c1,
    message_type 0x145 (WM_PROTOCOLS), format 32

RRScreenChangeNotify event, serial 19, synthetic NO, window 0x2c1,
    root 0x2c1, timestamp 4108797, config_timestamp 4108797
    size_index 65535, subpixel_order SubPixelUnknown
    rotation RR_Rotate_0
    width 1366, height 768, mwidth 361, mheight 203

RRNotify event, serial 19, synthetic NO, window 0x2c1,
    subtype XRROutputChangeNotifyEvent
    output HDMI-1-0, crtc None, mode None
    rotation RR_Rotate_0
    connection RR_Connected, subpixel_order SubPixelUnknown

RRScreenChangeNotify event, serial 24, synthetic NO, window 0x2c1,
    root 0x2c1, timestamp 4108797, config_timestamp 4108797
    size_index 65535, subpixel_order SubPixelUnknown
    rotation RR_Rotate_0
    width 1366, height 768, mwidth 361, mheight 203

RRNotify event, serial 24, synthetic NO, window 0x2c1,
    subtype XRROutputChangeNotifyEvent
    output HDMI-1-0, crtc None, mode None
    rotation RR_Rotate_0
    connection RR_Disconnected, subpixel_order SubPixelUnknown

ClientMessage event, serial 26, synthetic YES, window 0x2c1,
    message_type 0x145 (WM_PROTOCOLS), format 32
^C



More information about the xorg-devel mailing list