Bug 111310 - Failed to toggle display to mirror mode
Summary: Failed to toggle display to mirror mode
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-07 02:55 UTC by AceLan Kao
Modified: 2019-11-29 19:22 UTC (History)
2 users (show)

See Also:
i915 platform: CFL
i915 features: display/Other, display/watermark


Attachments
journal -b -k, the HDMI monitor fails to display after switched to mirror mode (563.72 KB, text/x-log)
2019-08-07 02:55 UTC, AceLan Kao
no flags Details
journal -b -k, the HDMI monitor works after switched to mirror mode (481.98 KB, text/x-log)
2019-08-07 02:56 UTC, AceLan Kao
no flags Details
xrandr --verbose while failed to switch to mirror mode (8.13 KB, text/x-log)
2019-08-14 03:43 UTC, AceLan Kao
no flags Details
xrandr --verbose when switching to mirror mode works (8.75 KB, text/x-log)
2019-08-14 03:44 UTC, AceLan Kao
no flags Details
xrandr --output DP-6 --off --output eDP-1 --off ; sleep 1 ; xrandr --auto; xrandr --verbose (9.46 KB, text/x-log)
2019-08-22 04:01 UTC, AceLan Kao
no flags Details
test script to test&log displays (640 bytes, text/plain)
2019-08-22 08:44 UTC, Jani Nikula
no flags Details
xrandr test xrandr.log (450.54 KB, text/x-log)
2019-08-26 02:33 UTC, AceLan Kao
no flags Details
xrandr test dmesg.log (94.32 KB, text/x-log)
2019-08-26 02:33 UTC, AceLan Kao
no flags Details

Description AceLan Kao 2019-08-07 02:55:22 UTC
Created attachment 144961 [details]
journal -b -k, the HDMI monitor fails to display after switched to mirror mode

OS: Ubuntu 18.04
Kernel: 5.3-rc3

XPS 13 7390 (TBT port) -> Dell WD19TB Thunderbolt Dock (Type C DP port) -> Type C to HDMI(04b4:5210) -> HDMI Monitor

Toggle the display to mirror mode the HDMI monitor always get blank screen.
But after added drm.debug=0xe, it leads to this issue hard to be reproduced, I've tried around 10 times to get one failure.
Comment 1 AceLan Kao 2019-08-07 02:56:26 UTC
Created attachment 144962 [details]
journal -b -k, the HDMI monitor works after switched to mirror mode
Comment 2 Lakshmi 2019-08-09 07:04:05 UTC
Have you done any changes recently and after that you see this issue? There are no failures in the logs indicating kernel issue.
Comment 3 AceLan Kao 2019-08-12 03:14:53 UTC
I didn't change anything, just install the mainline kernel, and toggling the display.
Without drm.debug=0xe, the external monitor always shows blank while in mirror mode.
Is there anything I could try to gather more useful logs? Or any debug patch I can apply to collect meaningful log for you?
Comment 4 Lakshmi 2019-08-13 07:00:02 UTC
(In reply to AceLan Kao from comment #3)
> I didn't change anything, just install the mainline kernel, and toggling the
> display.
> Without drm.debug=0xe, the external monitor always shows blank while in
> mirror mode.
> Is there anything I could try to gather more useful logs? Or any debug patch
> I can apply to collect meaningful log for you?

@Jani, any suggestion here?
Comment 5 Jani Nikula 2019-08-13 07:27:13 UTC
Please attach 'xrandr --verbose' output while in mirror mode for starters.
Comment 6 AceLan Kao 2019-08-14 03:43:19 UTC
Created attachment 145053 [details]
xrandr --verbose while failed to switch to mirror mode

This is the xrandr --verbose output when fails to switch mirror mode
Comment 7 AceLan Kao 2019-08-14 03:44:45 UTC
Created attachment 145055 [details]
xrandr --verbose when switching to mirror mode works

This xrandr --verbose output is the working one that mirror mode works.
Comment 8 Jani Nikula 2019-08-14 07:34:28 UTC
So the external display is listed as DP-5 and primary when it works, and DP-2-3 with eDP-1 as primary when it fails.

By toggling the mirror mode, do you mean using a settings dialog, and enabling/disabling mirror mode there?

And, in the same session, you'd sometimes have DP-5 and sometimes DP-2-3?

Can you reproduce this using xrandr on the command line? For example, if you repeat:

$ xrandr --output DP-5 --off --output DP-2-3 --off --output eDP-1 --off; sleep 1; xrandr --auto; xrandr --verbose

would you sometimes get DP-5 in the output, and sometimes DP2-3?
Comment 9 AceLan Kao 2019-08-22 04:01:04 UTC
Created attachment 145124 [details]
xrandr --output DP-6 --off --output eDP-1 --off ; sleep 1 ; xrandr --auto; xrandr --verbose

> By toggling the mirror mode, do you mean using a settings dialog, and enabling/disabling mirror mode there?
I use meta key + p to select mirror mode

> And, in the same session, you'd sometimes have DP-5 and sometimes DP-2-3?
No, I have to try it some times to reproduce the issue, so I should have reboot the machines to collect the failed and successful log.

>Can you reproduce this using xrandr on the command line? For example, if you >repeat:

>$ xrandr --output DP-5 --off --output DP-2-3 --off --output eDP-1 --off; sleep >1; xrandr --auto; xrandr --verbose
Sure, here is the failed log, the external monitor turns off after ran the command.

> would you sometimes get DP-5 in the output, and sometimes DP2-3?
I might have switched the cable and reboot the machine to collect good and bad log. But this time I use the same cable and reboot the machine, I got DP-6 and then DP-5
Comment 10 Jani Nikula 2019-08-22 08:40:50 UTC
(In reply to AceLan Kao from comment #9)
> >$ xrandr --output DP-5 --off --output DP-2-3 --off --output eDP-1 --off; sleep 1; xrandr --auto; xrandr --verbose
> Sure, here is the failed log, the external monitor turns off after ran the
> command.

Based on that, I think the mirror mode is a red herring here. I think it's just a sporadic failure to enable the external display.
Comment 11 Jani Nikula 2019-08-22 08:44:06 UTC
Created attachment 145127 [details]
test script to test&log displays

Here's a small test script to disable and enable displays, log stuff, and ask you whether it succeeded or not.

It uses sudo to log stuff in dmesg using /dev/kmsg. Please check the script yourself before running random stuff from the internets. ;)

It should stop after you've had one success and one fail.

It will write files xrandr.log and dmesg.log into the current directory. Please attach those to the bug after you're done.
Comment 12 AceLan Kao 2019-08-26 02:33:36 UTC
Created attachment 145155 [details]
xrandr test xrandr.log

Here is the logs from your script.
It failed 15 times in a raw and success at 16th time.
Comment 13 AceLan Kao 2019-08-26 02:33:58 UTC
Created attachment 145156 [details]
xrandr test dmesg.log
Comment 14 Lakshmi 2019-10-02 18:50:20 UTC
(In reply to AceLan Kao from comment #13)
> Created attachment 145156 [details]
> xrandr test dmesg.log

229.236316] modeset 1 start
[  244.097370] modeset 1 result: fails
[  244.187105] modeset 2 start
[  249.417777] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  259.287420] modeset 2 result: fails
[  259.374885] modeset 3 start
[  265.603457] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  280.548303] modeset 3 result: fails
[  280.635707] modeset 4 start
[  294.783926] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  315.220947] modeset 4 result: fails
[  315.308298] modeset 5 start
[  330.976321] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  356.236186] modeset 5 result: fails
[  356.323591] modeset 6 start
[  373.220764] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  400.658349] modeset 6 result: fails
[  400.745707] modeset 7 start
[  426.821406] modeset 7 result: fails
[  426.910324] modeset 8 start
[  433.805585] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  465.152740] modeset 8 result: fails
[  465.241756] modeset 9 start
[  469.096026] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  497.074056] modeset 9 result: fails
[  497.161822] modeset 10 start
[  506.738423] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  553.592075] modeset 10 result: fails
[  553.679171] modeset 11 start
[  561.929562] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun

Setting the priority considering the reproduction rate after adding drm.debug=0xe parameter.
Comment 15 Martin Peres 2019-11-29 19:22:00 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/intel/issues/356.


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.