Bug 75044 - Repeated mode switching eventually fails
Summary: Repeated mode switching eventually fails
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-16 06:58 UTC by Dan Doel
Modified: 2014-05-31 17:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log from single monitor switching (110.60 KB, text/plain)
2014-02-16 06:58 UTC, Dan Doel
no flags Details
Xorg.0.log from multi-monitor switching (89.88 KB, text/plain)
2014-02-16 06:59 UTC, Dan Doel
no flags Details
dmesg from single monitor switching (430.11 KB, text/plain)
2014-02-16 06:59 UTC, Dan Doel
no flags Details
xrandr output prior to performing the test (1.62 KB, text/plain)
2014-02-16 07:00 UTC, Dan Doel
no flags Details

Description Dan Doel 2014-02-16 06:58:36 UTC
Created attachment 94145 [details]
Xorg.0.log from single monitor switching

I recently came into possession of two 4K monitors, and have noticed that switching modes with them is fairly unreliable. I believe I've put together a reliable way of triggering the failure now.

My procedure is as follows:

  startx into fluxbox
  xrandr --output DisplayPort-1 --right-of DisplayPort-0
  xrandr --output DisplayPort-1 --mode 1920x1080
  xrandr --output DisplayPort-1 --mode 3840x2160
  ... repeat

The second switch back to 3840x2160 causes both monitors to enter power saving mode. Subsequently switching to a different virtual terminal and back to the one running X leaves X dead.

I can also reproduce this with a single monitor. The procedure is the same, except I turn DisplayPort-1 off, and then switch DisplayPort-0. It requires more switches to trigger the behavior, but it does eventualy happen.

In all cases, the Xorg log has two lines like the following (this is from the single monitor case):

  [264287.242] (II) RADEON(0): Allocate new frame buffer 3840x2176 stride 3840
  [264287.248] (EE) RADEON(0): failed to set mode: Invalid argument(II) RADEON(0): VRAM usage limit set to 1828584K

I assume this means that video memory for the frame buffer has somehow been exhausted, which explains why it happens faster with two displays, and why it's more likely to happen with very high resolution displays.

I'll attach dmesg output, Xorg log and xrandr output. Some relevant information is:

  Kernel 3.12.9
  glamor from git (latest at the time of this post, I believe)
  Mesa 10.2 from git (compiled today)
  xf86-video-ati 7.3.0
  Radeon HD 7870

I found this bug, which sounds like similar behavior:

    https://bugs.freedesktop.org/show_bug.cgi?id=37545

and memory fragmentation is suggested as the problem. However, given that my problem is triggered by multiple mode switches (I'd say it takes 6-8 in the single monitor case), perhaps memory is actually being leaked?

If any additional information is desired, I'll try to provide it.
Comment 1 Dan Doel 2014-02-16 06:59:21 UTC
Created attachment 94146 [details]
Xorg.0.log from multi-monitor switching
Comment 2 Dan Doel 2014-02-16 06:59:57 UTC
Created attachment 94147 [details]
dmesg from single monitor switching
Comment 3 Dan Doel 2014-02-16 07:00:34 UTC
Created attachment 94148 [details]
xrandr output prior to performing the test
Comment 4 Dan Doel 2014-02-24 03:47:17 UTC
I tried this with my Intel integrated graphics (i7 4770, Haswell). I was unable to reproduce the behavior even after mode switching many times. So this seems like it is probably Radeon specific. The only alternative I can imagine is that the integrated graphics have access to a much larger amount of RAM (I have 32 GB of system memory). But that seems unlikely.

Also, I am now on kernel 3.13.4, and still see the behavior with Radeon.
Comment 5 Dan Doel 2014-05-31 17:29:24 UTC
Just tested this again, and it appears to now be fixed. I don't know when it happened, but I can't reproduce using mesa and glamor git from a week or so ago, and kernel 3.14.4.


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.