Bug 107858 - Screen resolution wrong after turning monitor off and on
Summary: Screen resolution wrong after turning monitor off and on
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-07 13:08 UTC by Lothar Paltins
Modified: 2019-11-19 08:54 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg output before and after monitor power cycle (80.21 KB, text/plain)
2018-09-08 15:43 UTC, Lothar Paltins
no flags Details
Xorg.0.log output before monitor power cycle (69.51 KB, text/plain)
2018-09-08 15:45 UTC, Lothar Paltins
no flags Details
Xorg.0.log after monitor power cycle (76.65 KB, text/plain)
2018-09-08 15:45 UTC, Lothar Paltins
no flags Details
xrandr output before monitor power cycle (913 bytes, text/plain)
2018-09-08 15:46 UTC, Lothar Paltins
no flags Details
xrandr output after monitor power cycle (528 bytes, text/plain)
2018-09-08 15:47 UTC, Lothar Paltins
no flags Details

Description Lothar Paltins 2018-09-07 13:08:31 UTC
This is related to bug 105046, which was closed as RESOLVED FIXED. Unfortunately, the issue still exists. This is my configuration:

OS: OpenSuse Tumbleweed with kernel 4.18.0

Installed amdgpu packages:
  libdrm_amdgpu1-32bit-2.4.93-1.1.x86_64
  libdrm_amdgpu1-2.4.93-1.1.x86_64
  xf86-video-amdgpu-18.0.1-2.1.x86_64

Prozessor: AMD Ryzen 5 2400G with Vega Graphics
Monitor:   Dell U3011 (resolution 2560x1600) connected via DisplayPort

After switching the monitor off and on, the screen resolution is sometimes changed to a very low value. Most of the time there's no problem, but sometimes the resolution is changed to 800x600. A reboot is required to set it back to 2560x1600.

It seems, that there are several different error cases. In the past, I've seeen messages in the dmesg output and in the syslog, but just now neither dmesg nor the syslog did show any errors, there are only the following lines added to /var/log/Xorg.0.log:

[ 11925.228] (II) AMDGPU(0): EDID vendor "DEL", prod id 16485
[ 11925.228] (II) AMDGPU(0): Using hsync ranges from config file
[ 11925.228] (II) AMDGPU(0): Using vrefresh ranges from config file
[ 11925.228] (II) AMDGPU(0): Printing DDC gathered Modelines:
[ 11925.228] (II) AMDGPU(0): Modeline "2560x1600"x0.0  268.50  2560 2608 2640 2720  1600 1603 1609 1646 +hsync -vsync (98.7 kHz eP)
[ 11925.228] (II) AMDGPU(0): Modeline "1920x1080"x0.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1920x1080i"x0.0   74.25  1920 2008 2052 2200  1080 1084 1094 1125 interlace +hsync +vsync (33.8 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1280x720"x0.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "720x480"x0.0   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1440x480i"x0.0   27.00  1440 1478 1602 1716  480 488 494 525 interlace -hsync -vsync (15.7 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1440x576i"x0.0   27.00  1440 1464 1590 1728  576 580 586 625 interlace -hsync -vsync (15.6 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "720x576"x0.0   27.00  720 732 796 864  576 581 586 625 -hsync -vsync (31.2 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1280x720"x0.0   74.25  1280 1720 1760 1980  720 725 730 750 +hsync +vsync (37.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1920x1080i"x0.0   74.25  1920 2448 2492 2640  1080 1084 1094 1125 interlace +hsync +vsync (28.1 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1920x1080"x0.0  148.50  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync (56.2 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1920x1080"x0.0   74.25  1920 2558 2602 2750  1080 1084 1089 1125 +hsync +vsync (27.0 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "640x480"x0.0   31.50  640 656 720 840  480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1280x1024"x0.0  135.00  1280 1296 1440 1688  1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1024x768"x0.0   78.75  1024 1040 1136 1312  768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "800x600"x0.0   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1152x864"x0.0  108.00  1152 1216 1344 1600  864 865 868 900 +hsync +vsync (67.5 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1280x800"x0.0   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz e)
[ 11925.228] (II) AMDGPU(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 11925.229] (II) AMDGPU(0): Modeline "1600x1200"x0.0  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (75.0 kHz e)
[ 11925.229] (II) AMDGPU(0): Modeline "1920x1200"x0.0  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync (74.6 kHz e)
[ 11925.229] (II) AMDGPU(0): Modeline "1920x1440"x0.0  234.00  1920 2048 2256 2600  1440 1441 1444 1500 -hsync +vsync (90.0 kHz e)
[ 11925.963] (II) AMDGPU(0): Allocate new frame buffer 800x600
[ 11925.963] (II) AMDGPU(0):  => pitch 3584 bytes


The EDID information is correct, but for some reason the amdgpu driver asumes, that the highest possible resolution is 800x600.
Comment 1 Michel Dänzer 2018-09-07 13:17:20 UTC
(In reply to Lothar Paltins from comment #0)
> [ 11925.963] (II) AMDGPU(0): Allocate new frame buffer 800x600
> [ 11925.963] (II) AMDGPU(0):  => pitch 3584 bytes
> 
> 
> The EDID information is correct, but for some reason the amdgpu driver
> asumes, that the highest possible resolution is 800x600.

The drivers or even the X server never change the display configuration on their own. The change to 800x600 above must have been done by a client. Which desktop environment are you using?

Please attach the full Xorg log file, and the output of dmesg and xrandr after the problem occurred.
Comment 2 Lothar Paltins 2018-09-08 15:43:56 UTC
Created attachment 141484 [details]
dmesg output before and after monitor power cycle
Comment 3 Lothar Paltins 2018-09-08 15:45:15 UTC
Created attachment 141485 [details]
Xorg.0.log output before monitor power cycle
Comment 4 Lothar Paltins 2018-09-08 15:45:50 UTC
Created attachment 141486 [details]
Xorg.0.log after monitor power cycle
Comment 5 Lothar Paltins 2018-09-08 15:46:51 UTC
Created attachment 141487 [details]
xrandr output before monitor power cycle
Comment 6 Lothar Paltins 2018-09-08 15:47:15 UTC
Created attachment 141488 [details]
xrandr output after monitor power cycle
Comment 7 Lothar Paltins 2018-09-08 15:50:41 UTC
But the client must know the possible resolutions and this information must come from the X server and the driver.

I'm using the KDE5 desktop environment and I've attached the appropriate log files. The dmesg output is the same before and after the monitor power cycle, the other files have the suffix _good and _bad. Now there are lines with "get vblank counter failed: Invalid argument" in the Xorg.0.log file, which I didn't see previously. This all looks like a random problem, maybe the use of an unititialized variable or an out of bounds array access.
Comment 8 Michel Dänzer 2018-09-10 09:51:55 UTC
(In reply to Lothar Paltins from comment #7)
> But the client must know the possible resolutions and this information must
> come from the X server and the driver.

Right, looks like there's indeed a problem with the kernel driver DC code obtaining / processing EDID.


> Now there are lines with "get vblank counter failed: Invalid argument" in the
> Xorg.0.log file, which I didn't see previously.

Those can happen occasionally with a DisplayPort connection, they should be harmless.
Comment 9 Martin Peres 2019-11-19 08:54:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/516.


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.