Distorted colours after suspend / resume cycle

Bug #1643843 reported by Jan-Marek Glogowski on 2016-11-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
linux-lts-xenial (Ubuntu)

Bug Description

When waking up the system from a suspend-resume cycle, the display most times shows distorted colours.
As a workaround one can switch to the linux console (VT) and back to fix the display.
Alternatively triggering DPMS also fixes the problem (xset dpms force off ; sleep 0.1; xset dpms force on)

 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
 Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
 PCIID: 1002:6779

I've tested Ubuntu Xenial (16.04) with the latest updates:

mesa 11.2.0-1ubuntu2.2
xserver-xorg-video-radeon 1:7.7.0-1
linux-image-4.4.0-47-generic 4.4.0-47.68
xserver-xorg-core 2:1.18.3-1ubuntu2.3

I've tried older kernels, xorg, linux-firmware, as a colleague claimed it started for him after some of the latest Ubuntu updates, but couldn't find a working configuration.

I also checked Ubuntu Yakkety (16.10), where I couldn't reproduce with XFCE, but instantly with the Unity session, but probably XFCE was just lucky, as sometimes I also had series of working (~5) cycles. Current versions:

mesa 12.0.3-1ubuntu2
xserver-xorg-video-radeon 1:7.7.1-1
linux-image-4.8.0-27-generic 4.8.0-27.29
xserver-xorg-core 2:1.18.4-1ubuntu6.1

I'm also going to test Trusty (14.04) to check if it's really a regression. At least I have never seen this problem while running it.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: xorg 1:7.7+13ubuntu4
ProcVersionSignature: Ubuntu 4.8.0-27.29-generic 4.8.1
Uname: Linux 4.8.0-27-generic x86_64

ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Tue Nov 22 12:21:24 2016
DistUpgraded: Fresh install
DistroCodename: yakkety
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, including running git bisection searches
 Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM] [1002:6779] (prog-if 00 [VGA controller])
   Subsystem: Bitland(ShenZhen) Information Technology Co., Ltd. Radeon HD 6450 [1642:3a75]
 Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: LENOVO 4524BL8
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.8.0-27-generic root=UUID=4dda3a4b-6e9c-49ba-a969-5d2146f02b60 ro splash quiet vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/16/2012
dmi.bios.vendor: LENOVO
dmi.bios.version: 9HKT54AUS
dmi.board.vendor: LENOVO
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnLENOVO:bvr9HKT54AUS:bd10/16/2012:svnLENOVO:pn4524BL8:pvrThinkCentreM91p:rvnLENOVO:rn:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: 4524BL8
dmi.product.version: ThinkCentre M91p
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.70-1
version.libgl1-mesa-dri: libgl1-mesa-dri 12.0.3-1ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 12.0.3-1ubuntu2
version.xserver-xorg-core: xserver-xorg-core 2:1.18.4-1ubuntu6.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.2-1ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.7.1-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20160706-1ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.12-2
xserver.bootTime: Tue Nov 22 11:56:40 2016
xserver.configfile: default

xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.18.4-1ubuntu6.1
xserver.video_driver: radeon

Jan-Marek Glogowski (jmglogow) wrote :
Jan-Marek Glogowski (jmglogow) wrote :
Jan-Marek Glogowski (jmglogow) wrote :

This is just a display problem - a snapshot is correct, so it really looks like a radeon driver problem, instead of an xorg problem.

The wrong colors are always different, so every cycle produces a different result. For a photo as background it almost looks like modern art ;-)

Jan-Marek Glogowski (jmglogow) wrote :

I couldn't reproduce the problem with Trusty (14.04) using its original HWE stack (AKA Kernel 3.13).

Jan-Marek Glogowski (jmglogow) wrote :

Now I tried all the Trusty HWEs and it seems to have started with Wily.

xserver-xorg-video-radeon-lts-wily 1:7.5.0+git20150819-0ubuntu1~trusty1
xserver-xorg-core-lts-wily 2:1.17.2-1ubuntu9.1~trusty1
mesa-lts-wily 11.0.2-1ubuntu4~trusty1

I had once wrong colors with the Trusty initial stack (3.13), which I couldn't reproduce.

And I was just told that disabling DPMS / monitor power management in KDE also prevents the problem, which might correlate with the fact, that running a DPMS "force off" / "force on" cycle also restores the colors correctly.

Jan-Marek Glogowski (jmglogow) wrote :

While keeping the Xenial HWE stack on Ubuntu Trusty (14.04), I tried various installed HWE kernels.

It seems it really broke with the Wily kernel ( The Vivid kernel ( has survived multiple resume cycles, while Wily instantly created the problem.

Jan-Marek Glogowski (jmglogow) wrote :

So I downloaded some kernels from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D

Working: linux-image-4.1.35-040135-generic_4.1.35-040135.201610241431_amd64.deb
Broken: linux-image-4.2.7-040207-generic_4.2.7-040207.201512091533_amd64.deb

Jan-Marek Glogowski (jmglogow) wrote :

Hmm - so I'm not sure what's going on here. I started bisecting v4.1 .. v4.2.8 and I couldn't find a working version in 6-7 bisects and when I checked rest of the commit set in the bisect, it couldn't find any commits to drivers/gpu?!

So I decided to test Ubuntu mainline kernels a little bit more and the current status is:
Broken: linux-image-4.1.3-040103-generic_4.1.3-040103.201507220129_amd64.deb
Working: linux-image-4.1.4-040104-generic_4.1.4-040104.201508031330_amd64.deb

So probably something was fixed and in a short time broken again during the v4.2 development cycle?!

And probably I should check with other connectors too, as I currently run the monitor via DVI => VGA connector.

Jan-Marek Glogowski (jmglogow) wrote :

$ git bisect log
# bad: [89e419960fb6a260f6a112821507d516117d5aa1] Linux 4.1.4
# good: [c8bde72f9af412de57f0ceae218d648640118b0b] Linux 4.1.3
git bisect start 'v4.1.4' 'v4.1.3'
# good: [e0cf83cc3de0341d8cabbb23097ad85f5ce97a11] drm/qxl: Do not leak memory if qxl_release_list_add fails
git bisect good e0cf83cc3de0341d8cabbb23097ad85f5ce97a11
# bad: [9d680e03989324f000596be4862728a7c30f22c1] selinux: don't waste ebitmap space when importing NetLabel categories
git bisect bad 9d680e03989324f000596be4862728a7c30f22c1
# bad: [510c99974fdbc18f143c41cbd461c522f5ad7164] tpm, tpm_crb: fix le64_to_cpu conversions in crb_acpi_add()
git bisect bad 510c99974fdbc18f143c41cbd461c522f5ad7164
# bad: [8b941a43ea7709111d3cbea2bdfcc678975255da] drm/radeon: only check the sink type on DP connectors
git bisect bad 8b941a43ea7709111d3cbea2bdfcc678975255da
# good: [0f2bb042f21bdb28f20efcf1ff1c507e2f8b3caa] drm/i915: Declare the swizzling unknown for L-shaped configurations
git bisect good 0f2bb042f21bdb28f20efcf1ff1c507e2f8b3caa
# good: [1f977d7e942519127aea0a08e9d08437b363cf19] drm/i915: Use two 32bit reads for select 64bit REG_READ ioctls
git bisect good 1f977d7e942519127aea0a08e9d08437b363cf19
# good: [7b49262b642511a16699cc63cf2a716739f0c43f] drm/radeon: SDMA fix hibernation (CI GPU family).
git bisect good 7b49262b642511a16699cc63cf2a716739f0c43f
# bad: [d1a4362d41e4feb52df6464f70fb64f21b894623] Revert "drm/radeon: dont switch vt on suspend"
git bisect bad d1a4362d41e4feb52df6464f70fb64f21b894623
# first bad commit: [d1a4362d41e4feb52df6464f70fb64f21b894623] Revert "drm/radeon: dont switch vt on suspend"

Just remember that good and bad is inverted, as I was looking for the commit which fixes my colour problem in v4.1.4. For me it fixes more then just the cursor.

Jan-Marek Glogowski (jmglogow) wrote :

So I applied this "big hammer" solution of the patch to the Trusty (14.04) Xenial HWE kernel (4.4.0-47.68~14.04.1) and this fixes the bug. I'll give it some more testing, while bisecting v4.0 to v4.1.

Jan-Marek Glogowski (jmglogow) wrote :

I can't bisect the problem, because for the two kernels I build, suspend was broken and the PC didn't wake up from 2nd suspend :-(
I also tried 4.9-rc6 (albeit on an Arch Linux), which shows the same bug.

affects: xorg (Ubuntu) → linux-lts-xenial (Ubuntu)
Changed in xorg-server:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in xorg-server:
status: Confirmed → Fix Released
Changed in xorg-server:
status: Fix Released → Confirmed
Changed in xorg-server:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.