fixes to allow use of xrandr for setprovideroutputsource type configs
Submitted by guy goode
Assigned to Xorg Project Team
Description
Created attachment 120467 tarball of patches and related data
Recent mods to X server can cause xrandr --setprovideroutputsource to be lost due to dispatchException. This command is used to configure a gpu/master type config. This mod corrects a few minor bugs, and creates a work-around for the use of xrandr setprovideroutputsource.
This change was submitted to NVIDIA, but they have indicated it is low priority, and so I thought maybe it would be worth a try here.
The attachment contains: ==== x.patch fix to rrprovider.c missing "if" guarding a swapl in ProcRRGetProviderInfo fix to rrmonitor.c use list version of crtc set, since "c" is an index to mon_list. ==== y.patch add --retain parameter to xrand the effect of setprovideroutputsource (et. al.) are lost in the current implementation since a dispatchException is created by the use of these commands. The exception causes a server generation cycle to be executed, which reloads the config from conf. This deletes the effect of the desired config change. The patch does not address that conf no longer agrees with config, and that any dispatchException will reverse all accumualated xrandr config updates.
==== xinitrc example .xinitrc when using this kind of config
This mod was tested on an HP Envy model 17t-n000 laptop, which uses an intel/nvidia design, but it applies to any config which uses this style of configuration, that is: xrandr generated master/gpus via setprovideroutputsource.
Attachment 120467, "tarball of patches and related data":
bug.tgz