All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 100289] 'flip queue failed in radeon_scanout_flip: Invalid argument' error and small frame buffer allocated on turning off and on new monitor
Date: Sun, 04 Feb 2018 18:24:50 +0000	[thread overview]
Message-ID: <bug-100289-502-8JlX8MOSaj@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-100289-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 11499 bytes --]

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

--- Comment #14 from OmegaPhil@startmail.com ---
After messing around with this on and off for months, I have found that the
radeon_scanout_flip error is irrelevant - when the third monitor is turned off
and on, sometimes DisplayPort-0 is reported as Disconnected and then Connected
- through monitoring the root window (xev -root), I can finally get into a
useful X events stream:

======================================================================

RRScreenChangeNotify event, serial 114, synthetic NO, window 0x4bc,
    root 0x4bc, timestamp 332828415, config_timestamp 386328254
    size_index 65535, subpixel_order SubPixelHorizontalRGB
    rotation RR_Rotate_0
    width 5760, height 1200, mwidth 1526, mheight 318

RRNotify event, serial 114, synthetic NO, window 0x4bc,
    subtype XRROutputChangeNotifyEvent
    output DisplayPort-0, crtc 79, mode 1920x1200 (1920x1200)
    rotation RR_Rotate_0
    connection RR_Disconnected, subpixel_order SubPixelHorizontalRGB

RRScreenChangeNotify event, serial 115, synthetic NO, window 0x4bc,
    root 0x4bc, timestamp 332828415, config_timestamp 386328254
    size_index 65535, subpixel_order SubPixelHorizontalRGB
    rotation RR_Rotate_0
    width 5760, height 1200, mwidth 1526, mheight 318

RRNotify event, serial 115, synthetic NO, window 0x4bc,
    subtype XRRCrtcChangeNotifyEvent
    crtc 79, mode None, rotation RR_Rotate_0
    x 0, y 0, width 0, height 0

RRNotify event, serial 115, synthetic NO, window 0x4bc,
    subtype XRROutputChangeNotifyEvent
    output DisplayPort-0, crtc None, mode None
    rotation RR_Rotate_0
    connection RR_Disconnected, subpixel_order SubPixelHorizontalRGB

ConfigureNotify event, serial 115, synthetic NO, window 0x4bc,
    event 0x4bc, window 0x4bc, (0,0), width 5760, height 1200,
    border_width 0, above 0x0, override NO

RRScreenChangeNotify event, serial 117, synthetic NO, window 0x4bc,
    root 0x4bc, timestamp 386328636, config_timestamp 386328813
    size_index 65535, subpixel_order SubPixelHorizontalRGB
    rotation RR_Rotate_0
    width 5760, height 1200, mwidth 1526, mheight 318

RRNotify event, serial 117, synthetic NO, window 0x4bc,
    subtype XRROutputChangeNotifyEvent
    output DisplayPort-0, crtc None, mode None
    rotation RR_Rotate_0
    connection RR_Connected, subpixel_order SubPixelHorizontalRGB

RRScreenChangeNotify event, serial 117, synthetic NO, window 0x4bc,
    root 0x4bc, timestamp 386328636, config_timestamp 386328813
    size_index 65535, subpixel_order SubPixelHorizontalRGB
    rotation RR_Rotate_0
    width 3840, height 1200, mwidth 1016, mheight 318

ConfigureNotify event, serial 117, synthetic NO, window 0x4bc,
    event 0x4bc, window 0x4bc, (0,0), width 3840, height 1200,
    border_width 0, above 0x0, override NO

...


RRScreenChangeNotify event, serial 125, synthetic NO, window 0x4bc,
    root 0x4bc, timestamp 386328636, config_timestamp 386328813
    size_index 65535, subpixel_order SubPixelHorizontalRGB
    rotation RR_Rotate_0
    width 3840, height 1200, mwidth 1016, mheight 318

RRNotify event, serial 125, synthetic NO, window 0x4bc,
    subtype XRRCrtcChangeNotifyEvent
    crtc 79, mode 1920x1200, rotation RR_Rotate_0
    x 0, y 0, width 1920, height 1200

RRNotify event, serial 125, synthetic NO, window 0x4bc,
    subtype XRROutputChangeNotifyEvent
    output DisplayPort-0, crtc 79, mode 1920x1200 (1920x1200)
    rotation RR_Rotate_0
    connection RR_Connected, subpixel_order SubPixelHorizontalRGB

ConfigureNotify event, serial 125, synthetic NO, window 0x4bc,
    event 0x4bc, window 0x4bc, (0,0), width 3840, height 1200,
    border_width 0, above 0x0, override NO

======================================================================

In the middle of that mess, there is a RRScreenChangeNotify event with width
3840, which signifies the invalid desktop state that I get as the result of the
problem - I've managed to smoke it out to xfsettingsd (part of the
xfce4-settings package) - it responds to the disconnection by disabling the
CRTC, and then when it reappears, it enables it without a clue of what the
monitor is, despite it being described in the xfconf settings - and therefore
not putting it in the right place again.

xfsettingsd's version of the events:

=========================================================

Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 85 DisplayPort-0.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 3, after = 3.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 85 DisplayPort-0.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 3, after = 3.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 3, after = 2.
xfce4-settings(displays): Output disconnected: DisplayPort-0
xfce4-settings(displays): Disabling CRTC 79.
xfce4-settings(displays): Normalized CRTC 80: size=1920x1200, pos=0x0.
xfce4-settings(displays): Normalized CRTC 81: size=1920x1200, pos=1920x0.
xfce4-settings(displays): min_h = 200, min_w = 320, max_h = 16384, max_w =
16384, prev_h = 1200, prev_w = 5760, prev_hmm = 318, prev_wmm = 1524, h = 1200,
w = 3840, hmm = 318, wmm = 1016.
xfce4-settings(displays): Applying desktop dimensions: 3840x1200 (px), 1016x318
(mm).
xfce4-settings(displays): Configuring CRTC 80.
xfce4-settings(displays): Configuring CRTC 79.
xfce4-settings(displays): Configuring CRTC 81.
xfce4-settings(displays): Configuring CRTC 82.
xfce4-settings(displays): Configuring CRTC 83.
xfce4-settings(displays): Configuring CRTC 84.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 85 DisplayPort-0.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 2, after = 3.
xfce4-settings(displays): New output connected: DisplayPort-0
xfce4-settings(displays): enabling crtc for DisplayPort-0
xfce4-settings(displays): CRTC 79 assigned to DisplayPort-0.
xfce4-settings(displays): CRTC 79, output list[0] -> 85.
xfce4-settings(displays): Normalized CRTC 80: size=1920x1200, pos=0x0.
xfce4-settings(displays): Normalized CRTC 79: size=1920x1200, pos=0x0.
xfce4-settings(displays): Normalized CRTC 81: size=1920x1200, pos=1920x0.
xfce4-settings(displays): min_h = 200, min_w = 320, max_h = 16384, max_w =
16384, prev_h = 1200, prev_w = 5760, prev_hmm = 318, prev_wmm = 1524, h = 1200,
w = 3840, hmm = 318, wmm = 1016.
xfce4-settings(displays): Applying desktop dimensions: 3840x1200 (px), 1016x318
(mm).
xfce4-settings(displays): Configuring CRTC 80.
xfce4-settings(displays): Configuring CRTC 79.
xfce4-settings(displays): Applying changes to CRTC 79.
xfce4-settings(displays): Configuring CRTC 81.
xfce4-settings(displays): Configuring CRTC 82.
xfce4-settings(displays): Configuring CRTC 83.
xfce4-settings(displays): Configuring CRTC 84.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 85 DisplayPort-0.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 3, after = 3.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 85 DisplayPort-0.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 3, after = 3.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 80.
xfce4-settings(displays): Detected CRTC 79.
xfce4-settings(displays): Detected CRTC 81.
xfce4-settings(displays): Detected CRTC 82.
xfce4-settings(displays): Detected CRTC 83.
xfce4-settings(displays): Detected CRTC 84.
xfce4-settings(displays): Detected output 85 DisplayPort-0.
xfce4-settings(displays): Detected output 86 HDMI-0.
xfce4-settings(displays): Detected output 88 DVI-1.
xfce4-settings(displays): Noutput: before = 3, after = 3.

=========================================================

I'm assuming the important part from the X perspective is when
xfsettingsd/displays.c:xfce_displays_helper_screen_on_event realises the
display is Disconnected, and runs xfce_displays_helper_disable_crtc which calls
XRRSetCrtcConfig with RRCrtc->mode of None/NULL.

If the daemon is killed, no reconfiguration occurs and the desktop keeps its
correct configuration - presumably at the X level its just treated like a
monitor powering off and on - so I guess the next step is for me to understand
what is causing the Disconnect event to be fired through the stack, since the
monitor is definitely not disconnected in reality.

Kudos to Michel for the guess earlier.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 12445 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-02-04 18:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 17:59 [Bug 100289] 'flip queue failed in radeon_scanout_flip: Invalid argument' error and small frame buffer allocated on turning off and on new monitor bugzilla-daemon
2017-03-22  9:19 ` bugzilla-daemon
2017-03-22  9:30 ` bugzilla-daemon
2017-03-22 19:46 ` bugzilla-daemon
2017-03-23  9:30 ` bugzilla-daemon
2017-03-23 15:49 ` bugzilla-daemon
2017-03-23 19:45 ` bugzilla-daemon
2017-03-23 19:47 ` bugzilla-daemon
2017-03-24 18:58 ` bugzilla-daemon
2017-04-19  6:34 ` bugzilla-daemon
2017-06-26 19:39 ` bugzilla-daemon
2017-06-26 20:13 ` bugzilla-daemon
2017-06-27 16:19 ` bugzilla-daemon
2017-07-21 19:39 ` bugzilla-daemon
2017-07-22 14:24 ` bugzilla-daemon
2018-02-04 18:24 ` bugzilla-daemon [this message]
2018-02-04 18:58 ` bugzilla-daemon
2018-03-09 17:26 ` bugzilla-daemon
2018-03-09 17:35 ` bugzilla-daemon
2018-03-10 11:43 ` bugzilla-daemon
2019-11-19  9:26 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100289-502-8JlX8MOSaj@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.