amdgpu+xorg possibly marks displays as off while they wake from sleep

Bug #1770836 reported by Mariusz Mazur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Ubuntu 18.04, all the x, libdrm, kernel, etc. packages up to date. KDE.

When waking the displays from sleep with 4.15 any display not yet fully woken up seem to be reported as disconnected. This happens both when waking the whole computer from sleep (systemctl suspend) or just the displays themselves (due to me not touching mouse+keyboard for a while).

Setup:
Radeon RX 560
Primary display: bottom right, displayport, on
Secondary display 1: left, hdmi, on
Secondary display 2: top right, dvi, off

Video of how it should work, using 4.4.15: https://www.youtube.com/watch?v=h7nMYbm5ZxU
Note how even though the left (secondary) display wakes up first, both instantly display their proper desktops.

Video of how it works with the current default kernel (and 4.16.7 from kernel-ppa/mainline): https://www.youtube.com/watch?v=VdVFNXPszSI
Note how when the left (secondary) display wakes up first, KDE decides that this is probably the only display available, so tries to switch the primary desktop to it, then a split second later the bottom right wakes up and KDE knows *that* should be the primary according to the config, so it switches back.

My interpretation is that KDE thinks the bottom right display slowly waking up is actually off, so it does the reasonable thing and uses the other available one as primary.

One way or the other, that's not how it used to work in older kernels, so as far as I'm concerned it's a regression.
---
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: mmazur 2270 F.... pulseaudio
 /dev/snd/controlC1: mmazur 2270 F.... pulseaudio
CurrentDesktop: KDE
DistroRelease: Ubuntu 18.04
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-20-generic root=UUID=d170afa1-e8de-4480-a0d7-4a4e8e304caf ro amdgpu.dc_log=1
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-20-generic N/A
 linux-backports-modules-4.15.0-20-generic N/A
 linux-firmware 1.173
RfKill:
 1: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
Tags: bionic
Uname: Linux 4.15.0-20-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm bacula cdrom dip docker libvirt libvirtd lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 04/29/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P2.10
dmi.board.name: Z97E-ITX/ac
dmi.board.vendor: ASRock
dmi.chassis.asset.tag: To Be Filled By O.E.M.
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:bvnAmericanMegatrendsInc.:bvrP2.10:bd04/29/2016:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnZ97E-ITX/ac:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: To Be Filled By O.E.M.
dmi.product.name: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: To Be Filled By O.E.M.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1770836

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected bionic
description: updated
Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : CRDA.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : IwConfig.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : Lspci.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : Lsusb.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : ProcEnviron.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : ProcModules.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : PulseList.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : UdevDb.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote : WifiSyslog.txt

apport information

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote :

Went with amdgpu.dc_log=1 to make the kernel more chatty.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Mariusz Mazur (mmazur-pld) wrote :

Oh, and I did a single sleep/wake, so if there's gonna be anything in the logs regarding the displays coming back up, it'll be after 15:48:32.

description: updated
description: updated
description: updated
Revision history for this message
Mariusz Mazur (mmazur-pld) wrote :

Looks like I'm not the only one: https://bugs.freedesktop.org/show_bug.cgi?id=104300.

And, interestingly enough, running 4.15 with amdgpu.dc=0 makes this issue happen, but not 100% of the time (had it work correctly when waking computer from sleep, but have a problem when only the monitors went to sleep and the computer was on). So whatever amdgpu changes were made between 4.14 and 4.15, introduce this issue a bit even on the non-DC code path.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.17 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.17-rc5

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Mariusz Mazur (mmazur-pld) wrote :

Just checked and nothing changes – monitors in standby get treated as hotplugged. So unless someone can get upstream interested, multi monitor on amd stays kind of broken for who knows how long.

I really should've bought an nvidia card. :/

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please file an upstream bug at https://bugs.freedesktop.org/
Product: DRI
Component: DRM/amdgpu

Revision history for this message
Mariusz Mazur (mmazur-pld) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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