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

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


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

Note You need to log in before you can comment on or make changes to this bug.
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.


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.