Bug 75579 - Glitches with 'reverse-prime'(--setprovideroutputsource mode)
Summary: Glitches with 'reverse-prime'(--setprovideroutputsource mode)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/RandR (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 16:49 UTC by Nikita Mikhailov
Modified: 2015-07-02 16:52 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Drawing with mouse on what used to be firefox screen (551.68 KB, text/plain)
2014-02-27 16:49 UTC, Nikita Mikhailov
no flags Details
hdmi_output_after_startup (2.08 MB, image/jpeg)
2014-12-24 10:47 UTC, gofabian
no flags Details
hdmi output after mouse movement (1.39 MB, image/jpeg)
2014-12-24 10:48 UTC, gofabian
no flags Details
radeon hangs/crashes/resets (dmesg output) (70.65 KB, text/plain)
2014-12-24 11:12 UTC, gofabian
no flags Details
screenshot using compton (hdmi output with broken background image) (481.17 KB, image/jpeg)
2014-12-24 11:23 UTC, gofabian
no flags Details

Description Nikita Mikhailov 2014-02-27 16:49:48 UTC
Created attachment 94835 [details]
Drawing with mouse on what used to be firefox screen

Hello.

I am running Xorg 1.15 with radeon(r600g) and intel gpus.
I want to use xrandr's setprovideroutputsource feature, but its unusable since there are too many glitches.
Background: I have a laptop with MUXed Intel + AMD setup. Sadly, intel is connected only to vga and lvds, while AMD is connected to vga, lvds and  HDMI. So  I can't use hdmi without restarting X on AMD card.
What I see, is that screen parts are not updated, unless I will move mouse pointer over it. So there are problems with redraw, nothing redraws unless forced with mouse pointer. Sometimes I can draw pictures with my mouse(see picture).
glxgers works fine.


lspci | grep -i vga                                       ~ @laptop-arch
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 12)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M]



 xrandr --listproviders                                    ~ @laptop-arch
Providers: number : 3
Provider 0: id: 0x97 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 3 associated providers: 2 name:Intel
Provider 1: id: 0x58 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 3 associated providers: 2 name:radeon
Provider 2: id: 0x58 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 3 associated providers: 2 name:radeon

xrandr --setprovideroutputsource 1 0
xrandr --output HDMI-1-0 --auto
xrandr --output LVDS2 --off
Comment 1 gofabian 2014-12-24 10:30:30 UTC
Hello,

I have exactly the same problem and will add screenshots.

Xorg 1.16.3
xf86-video-ati 1:7.5.0-1
xf86-video-intel 2.99.916-3

lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M]

xrandr --listproviders
Provider 0: id: 0x97 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 3 associated providers: 2 name:Intel
Provider 1: id: 0x58 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 3 associated providers: 2 name:radeon
Provider 2: id: 0x58 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 3 associated providers: 2 name:radeon

xrandr
Screen 0: minimum 8 x 8, current 3286 x 1080, maximum 32767 x 32767
LVDS2 connected 1366x768+0+312 (normal left inverted right x axis y axis) 321mm x 181mm
   1366x768      59.64*+
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       59.94  
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
LVDS-1-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.88  
   1280x1024     60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x720      60.00    50.00    59.94  
   1440x576i     50.00  
   1024x768      60.00  
   1440x480i     60.00    59.94  
   800x600       60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
   720x400       70.08  
  1024x768 (0x68) 65.000MHz
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x6b) 40.000MHz
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  640x480 (0x70) 25.175MHz
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz


I want to use lvds (connected to Intel) and hdmi (connected to ati).

Before starting the window manager:
xrandr --setprovideroutputsource radeon Intel
xrandr --setprovideroffloadsink radeon Intel
xrandr --output LVDS2 --mode 1366x768 --pos 0x312 --output HDMI-1-0 --mode 1920x1080 --pos 1366x0

Generally the output is working: lvds on the left and hdmi output on the right. But: I see the same effect that the hdmi picture is not redrawn correctly (I will attach a picture). The lvds screen works properly.

What both of us have in common:
- same discrete graphics card: Mobility Radeon HD 5650/5750 / 6530M/6550M
- same window manager: i3wm
- same effect

Have you tried to use another window manager?
Comment 2 Nikita Mikhailov 2014-12-24 10:43:52 UTC
Hello,

I haven't, I only tried  with i3wm. This is an interesting point, afaik modern DE's utilize OpenGL capabilities and I belive OpenGL worked fine with setprovideroutputsource(not sure about tearing though). I will try to recheck it at the weekend, what would you recommend for it?
Comment 3 gofabian 2014-12-24 10:47:43 UTC
Created attachment 111268 [details]
hdmi_output_after_startup
Comment 4 gofabian 2014-12-24 10:48:21 UTC
Created attachment 111269 [details]
hdmi output after mouse movement
Comment 5 gofabian 2014-12-24 11:11:38 UTC
Hello,

I do not have a recommendation because I do not know enough about this stuff. 

Maybe this comment is helpful? "i3 does not properly implement double buffering hence tearing or flickering may occur. In case of problems, try using a composite manager." (from https://wiki.archlinux.org/index.php/i3)

I tried the composite manager compton, but that didn't make a difference.


Additional info: Sometimes the radeon driver will crash/reset and system will hang for some seconds if I move the mouse the the hdmi output. In this case the hdmi screen will not change its picture for this power cycle. Do you think I should create a new bug ticket for this?
Comment 6 gofabian 2014-12-24 11:12:16 UTC
Created attachment 111273 [details]
radeon hangs/crashes/resets (dmesg output)
Comment 7 gofabian 2014-12-24 11:22:53 UTC
Somehow I "solved" (?) the issue using compton and different parameters.

I accidentally found this topic: https://bbs.archlinux.org/viewtopic.php?id=161403

They suggest to use compton this way:

compton --backend glx --paint-on-overlay --vsync opengl-swc 

Now it works. 

But: 
- the background picture is not working (I will add an screenshot). 
- the mouse pointer flickers sporadicly

I do not know why compton solves the issue. What do you think is the reason? Does anyone options for fine tuning?
Comment 8 gofabian 2014-12-24 11:23:39 UTC
Created attachment 111274 [details]
screenshot using compton (hdmi output with broken background image)
Comment 9 Ismo Toijala 2015-06-16 16:43:01 UTC
I have the same hardware (ATI 5650 Mobile + Intel Ironlake, muxed) and the same problem.

I also use i3 but I tried KDE with KWin and it had the same problems as the solution using the above compton command.

The problem is also not limited to this hardware.
A friend has an Ivy Bridge + Nvidia 640M (or was it 540?) (muxless) that shows exactly the same symptoms.
Comment 10 Ismo Toijala 2015-07-02 16:52:56 UTC
This is fixed by commit 7fba4aa54d8efb65cb04b88f930e8b5301176770 in xf86-video-intel [0].

[0]: http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=7fba4aa54d8efb65cb04b88f930e8b5301176770


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.