The image is distorted while use iGPU(Intel GPU) rendering and output via dGPU (AMD GPU)
Brief summary of the problem:
Duplicate the issue with ppa:canonical-x/x-staging ppa and upgraded mesa to 21.0.0~rc5 It looks like it fails to get correct window width while running "DRI_PRIME=1 glxgears", and you could get a correct result by adjusting the window width manually.
Hardware description:
- CPU: 11th Gen Intel(R) Core(TM) i5-11500 @ 2.70GHz
- GPU: Intel [8086:4c8a] (rev 04) & AMD Radeon PRO WX 3200 [1002:6981] (rev 10)
- System Memory: 8GB
- Display(s): 1920x1080 AOC monitor
- Type of Diplay Connection: mini DP on the AMD graphics card
System information:
- Distro name and Version: Ubuntu 20.04.2
- Kernel version: 5.12.0-rc1 drmtip 20210306
- Custom kernel: drmtip 20210306
- AMD package version: "No package"
How to reproduce the issue:
$ glxinfo | grep "OpenGL render" OpenGL renderer string: AMD Radeon (TM) Pro WX 3200 Series (POLARIS12, DRM 3.40.0, 5.10.0-1014-oem, LLVM 11.0.1)
$ DRI_PRIME=1 glxinfo | grep "OpenGL render" OpenGL renderer string: Mesa Intel(R) Graphics (RKL GT1)
$ DRI_PRIME=1 glxgears The result shown as the attached screenshot