Bug 104495

Summary: RRScreenChangeNotify rotation is always zero for some screens in a multimonitor setup
Product: xorg Reporter: Valeriy Malov <jazzvoid>
Component: Server/Ext/RandRAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED NOTABUG QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xev -root -event randr dumps none

Description Valeriy Malov 2018-01-04 19:09:13 UTC
Created attachment 136554 [details]
xev -root -event randr dumps

I have a dual screen setup. When I rotate screens e.g. via xrandr --rotate, two randr events are fired, RRScreenChangeNotify and RRNotify.

However, in some cases, RRScreenChangeNotify reports no rotation, even if the screen has been actually rotated and RRNotify reports correct value.

I've attached dumps of xev -root -event randr output for calling
$ xrandr --output *output* --rotate inverted
$ xrandr --output *output* --rotate normal
for the right screen, then for the left screen, for two setups (first is using nvidia proprietary drivers, second is using intel modesetting driver). Issue always happens for one screen but not the other and I haven't found any system yet.

This seems to break rotation monitoring in QtGui since it checks for changes in xcb_randr_screen_change_notify_event_t->rotation

xorg-server ver. 1.19.5 and libXrandr ver. 1.5.1 on both machines
Comment 1 Michel Dänzer 2018-01-05 09:17:10 UTC
Since the RRScreenChangeNotify event already existed in RandR 1.0, it only conveys pre-1.2 global information about the X11 screen as a whole, not post-1.2 per-output information. I.e. the RRScreenChangeNotify event rotation field reflects what's set via

 xrandr --orientation <...>

not

 xrandr --output <output> --rotate <...>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.