[amdgpu] Wrong external screen resolution after wake up from sleep

Bug #1978980 reported by Miroslav Šimko
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
xorg-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After the Ubuntu distro upgrade (upgrade from LTS 20.04 to LTS 22.04, running KDE) I started experiencing a problem with external screen resolution after the wake up from sleep. The monitor resolution is small (1280x768) and doesn't respect the setting prior the sleep (1920x1200).

After the wake up from sleep:

```
> xrandr
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 connected primary 1280x768+0+0 (normal left inverted right x axis y axis) 535mm x 339mm
   1280x768 59.94*
   # a list of lower resolutions
```

There is an error when trying to change the setting to the highest resolution supported by the monitor (which is not included in the above list).

```
> xrandr --output DisplayPort-1 --mode 1920x1200
xrandr: cannot find mode 1920x1200
```

After the turn off and turn on of the external monitor, the resolution is somehow added to the xrandr list:

```
> xrandr
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 connected primary 1280x768+0+0 (normal left inverted right x axis y axis) 535mm x 339mm
   1920x1200 59.95 +
   # a list of resolutions
   1280x768 59.94*
   # a list of lower resolutions
```

Now it is possible to change the resolution:

```
> xrandr --output DisplayPort-1 --mode 1920x1200
# no output, the resolution was successfully changed
```

After the change, the resolution is successfully changed and xrandr gives proper output:

```
> xrandr
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 535mm x 339mm
   1920x1200 59.95*+
   # a list of lower resolutions
```

The problem is not present on fresh start. However, it is consistently present after the wake up from sleep.

What can cause the problem and how may I fix it?

Running AMD based laptop (Ryzen 7 3700U with integrated graphics), the external monitor is connected via USB-C. There are no problems with laptop screen resolution, only external monitor is affected.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: xorg 1:7.7+23ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-37.39-generic 5.15.35
Uname: Linux 5.15.0-37-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: unknown
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: KDE
Date: Thu Jun 16 18:12:05 2022
DistUpgraded: 2022-05-08 07:52:25,560 DEBUG icon theme changed, re-reading
DistroCodename: jammy
DistroVariant: ubuntu
ExtraDebuggingInterest: No
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev c1) (prog-if 00 [VGA controller])
   Subsystem: Lenovo ThinkPad E595 [17aa:5124]
InstallationDate: Installed on 2019-08-21 (1030 days ago)
InstallationMedia: Kubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
MachineType: LENOVO 20NE000BMC
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-37-generic root=UUID=0fff4104-4909-4124-b8b0-8430281f24be ro open splash iommu=soft vt.handoff=7
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to jammy on 2022-05-08 (39 days ago)
dmi.bios.date: 01/26/2022
dmi.bios.release: 1.24
dmi.bios.vendor: LENOVO
dmi.bios.version: R11ET44W (1.24 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20NE000BMC
dmi.board.vendor: LENOVO
dmi.board.version: Not Defined
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.ec.firmware.release: 1.24
dmi.modalias: dmi:bvnLENOVO:bvrR11ET44W(1.24):bd01/26/2022:br1.24:efr1.24:svnLENOVO:pn20NE000BMC:pvrThinkPadE495:rvnLENOVO:rn20NE000BMC:rvrNotDefined:cvnLENOVO:ct10:cvrNone:skuLENOVO_MT_20NE_BU_Think_FM_ThinkPadE495:
dmi.product.family: ThinkPad E495
dmi.product.name: 20NE000BMC
dmi.product.sku: LENOVO_MT_20NE_BU_Think_FM_ThinkPad E495
dmi.product.version: ThinkPad E495
dmi.sys.vendor: LENOVO
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.110-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 22.0.1-1ubuntu2.1
version.libgl1-mesa-glx: libgl1-mesa-glx 22.0.1-1ubuntu2.1
version.xserver-xorg-core: xserver-xorg-core 2:21.1.3-2ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-2build3
version.xserver-xorg-video-intel: xserver-xorg-video-intel N/A
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1

Revision history for this message
Miroslav Šimko (msimko81) wrote :
Revision history for this message
Miroslav Šimko (msimko81) wrote :
affects: ubuntu → xorg (Ubuntu)
summary: - Wrong external screen resolution after wake up from sleep
+ [amdgpu] Wrong external screen resolution after wake up from sleep
affects: xorg (Ubuntu) → xorg-server (Ubuntu)
tags: added: amdgpu multimonitor
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Miroslav Šimko (msimko81) wrote :

The bug is also effective on ubuntu 20.04.3 - fresh installation with all updates. But it wasn't effective prior updating.
After downgrading xserver-xorg-legacy and xserver-xorg-core from 2:1.20.13-1ubuntu1~20.04.3 back to the version 2:1.20.13-1ubuntu1~20.04.2, the problem seems to be gone. I'll come back in a week and confirm whether this is really true.

Revision history for this message
Miroslav Šimko (msimko81) wrote (last edit ):

No success, the downgrade doesn't work either. Today morning, wrong resolution after the wake up. It seems as if the monitor wakes up with correct resolution if there is just a little period between sleep and wake up. But when there's a longer period in between, it wakes up with wrong resolution.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike (michalzukowski) wrote :

Not only the resolution is wrong for the USB-C display but also the order is different. Unplugging and plugging the connector seems to fix the issue (Ubuntu 22 LTS).

Revision history for this message
Jake Jellinek (jake-jellinek) wrote :

I don't know if my problem is the same as this bug or not. Ubuntu 22.04.1 LTS clean install.

Dell Latitude 5520 laptop.

I have two external monitors attached, one via HDMI and one via USB-C (different resolutions on each monitor)

After the screen locks, when coming back after 15 minutes or so and putting in my password to resume my session, the USB-C monitor has changed to a lower resolution and the layout of the three monitors has changed around.

I correct this by unplugging the usb-c connector and plugging it back in again whereupon everything goes back to how it should be.

Revision history for this message
Benjamin Bock (crapshit) wrote :
Download full text (3.4 KiB)

I have the same issue on a Dell Latitude 5490 running Ubuntu 22.04.1 LTS.
The Dell is connected via USB-C to DisplayPort (DisplayPort alt mode) to an external monitor (Dell Alienware aw3821dw).
After the screen locks and display went to sleep mode and I return to my desk, the screen always has a resolution of 1024x768 and I can see the following in my syslog:

Nov 25 13:05:03 latitude-5490 kernel: [17418.633249] i915 0000:00:02.0: [drm] *ERROR* failed to enable link training
Nov 25 13:04:59 latitude-5490 rtkit-daemon[1842]: message repeated 29 times: [ Supervising 11 threads of 6 processes of 1 users.]
Nov 25 13:05:03 latitude-5490 /usr/libexec/gdm-x-session[3009]: (EE) modeset(0): failed to set mode: Invalid argument
Nov 25 13:05:03 latitude-5490 /usr/libexec/gdm-x-session[3009]: (EE) modeset(0): failed to set mode: Invalid argument
Nov 25 13:05:03 latitude-5490 dbus-daemon[1165]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.100' (uid=1000 pid=3348 comm="/usr/bin/gnome-shell " label="unconfined")
Nov 25 13:05:03 latitude-5490 systemd[1]: Starting Fingerprint Authentication Daemon...
Nov 25 13:05:03 latitude-5490 dbus-daemon[1165]: [system] Successfully activated service 'net.reactivated.Fprint'
Nov 25 13:05:03 latitude-5490 systemd[1]: Started Fingerprint Authentication Daemon.
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (EE) modeset(0): failed to set mode: Invalid argument
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (WW) modeset(0): hotplug event: connector 112's link-state is BAD, tried resetting the current mode. You may be leftwith a black screen if this fails...
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): EDID vendor "DEL", prod id 41343
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Using hsync ranges from config file
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Using vrefresh ranges from config file
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Printing DDC gathered Modelines:
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Modeline "3840x1600"x0.0 397.40 3840 3888 3920 4000 1600 1603 1608 1656 +hsync -vsync (99.3 kHz eP)
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Modeline "3840x1600"x0.0 566.25 3840 3888 3920 4000 1600 1603 1608 1666 +hsync -vsync (141.6 kHz e)
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (II) modeset(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
Nov 25 13:05:04 latitude-5490 /usr/libexec/gdm-x-session[3009]: (EE) modeset(0): failed to set mode: Invalid argument
Nov 25 13:05:04 latitud...

Read more...

Revision history for this message
Jan Herzog (jnx230uo) wrote :

Fresh installation Ubuntu 20.04 LTS with all updates / Fresh installation with all updates 22.04 LTS.

Thinkpad X230 and external display. Default resolution external display 2560x1440. After screenlock the external display has a different resolution. Sometimes 1920x1080 or 1280x720. Only unplugging and plugging it back solves the problem.

Revision history for this message
Dyson Lu (dysonlu) wrote (last edit ):

Experiencing this as well.

22.04 LTS
Lenovo Lenovo YOGA 720-15IKB
Intel® HD Graphics 630
External Dell monitor native resolution 2560x1440, connected through USB-C

Revision history for this message
Drew Andersen (drewser42) wrote :

Experiencing this on Dell XPS 13:
Ubuntu 20.04.5 LTS
Gnome 3.36.8
X11
Mesa Intel® Graphics (ADL GT2)

Revision history for this message
Drew Andersen (drewser42) wrote :

Disabling DDC/CI on my monitor appears to have resolved this issue for me.

Revision history for this message
FrozrLighting (frozrlighting) wrote :

I have the same problem on my Dell Latitude 5400 on Ubuntu 22.04.2 LTS connected via HDMI to AOC Q3279VWFD8. After sleep the resolution goes from 2560x1440 75hz to 1920x1080 60hz

Revision history for this message
Francisco R. Santos (frsantos) wrote :

I see that if I disable "Automatic screen lock", it does not happen any more, even if the screen goes blank for a long time.

Revision history for this message
Arthur (the-great) wrote (last edit ):

Happens with me too after sleep/wakeup lenovo x1 carbon gen8 / HDMI LG 27GL850 which should run at 2460x1440@60hz but instead its 1920x1080@60hz.
I should either restart the system to make the proper resolution work again or reconnect hdmi cable like 10-20 times

Revision history for this message
nairboon (nairboon) wrote :

I had the same issue with a NEC display on Debian stable and AMD gpu. Interestingly, *enabling* DDC/CI seems to solve it, at least so far.

Revision history for this message
Wojciech Semik (wojtek-semik) wrote :

I have the same issue. Kubuntu 22.04, after sleep/screen lock my usb-c -> display port connected monitor goes from 5120x1440 down to 3840x2160.

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.