Bug 99784

Summary: AMD 7470m When VGA plugged into laptop, only one monitor working at a time
Product: DRI Reporter: lazanet96
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: christopher.m.penalver, vbalaban
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
URL: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1553441
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Latest xOrg log file (Ubuntu 17.04 mainline kernel 4.10.rc7)
none
xrandr --verbose output
none
dmesg output
none
xrandr outputs for radeon and fglrx
none
Output of xrandr and dmesg
none
Kernel oops at drm module (4.12.rc2 kernel)
none
"dmesg | grep drm" output (4.12.rc2, libdrm 2.4.8)
none
Workaround (Ubuntu 17.10 DRM 2.50.0 / 4.13.0-19-generic, LLVM 5.0.0) none

Description lazanet96 2017-02-12 20:15:31 UTC
Monitors are correctly reported in xrandr, however when both VGA (ASUS VW193) and internal laptop monitor (ASUS K55DR) are connected, image is only shown on one screen at the time. When HDMI output is connected (another monitor or tv) image is displayed seemingly random (either both HDMI and VGA output image, or only VGA, or internal monitor and HDMI - but never all three or VGA and internal monitor at the same time). Also at 1080i screen glitches (as seen on ubuntu bug report).

Hardware is functional under Windows or fglrx drivers

Original issue was reported @ launchpad.net here https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1553441 
That bug report contains log files from xOrg, and images that could better explain bug that is affecting me (as I'm not native speaker, if that isn't obvious enough :)). If necessary I can provide more logs from latest mainline kernel.

Last kernel version which I tested (and reproduced bug) was mainline Ubuntu 4.10.0-041000rc7-lowlatency
Comment 1 lazanet96 2017-02-12 20:26:10 UTC
Created attachment 129539 [details]
Latest xOrg log file (Ubuntu 17.04 mainline kernel 4.10.rc7)

My wild guess is that problem has something to do with "Driver allocated offscreen pixmaps" warnings (as I can see 10-ish pixels from another monitor on each output device)
Comment 2 Christopher M. Penalver 2017-02-13 00:54:13 UTC
Version xorg is 7.7 but xserver-xorg-video-ati is 7.8.0.
Comment 3 Michel Dänzer 2017-02-13 03:49:22 UTC
Please attach the output of dmesg and

 xrandr --verbose

when the problem occurs.
Comment 4 lazanet96 2017-02-13 03:58:32 UTC
Created attachment 129546 [details]
xrandr --verbose output

When xrandr command is executed HDMI output stops working
Comment 5 lazanet96 2017-02-13 03:59:04 UTC
Created attachment 129547 [details]
dmesg output
Comment 6 lazanet96 2017-03-01 13:00:36 UTC
Problem persists with DRM 2.49.0 / 4.10.1-041001-lowlatency, LLVM 3.9.1
Comment 7 lazanet96 2017-03-31 02:42:42 UTC
Problem persists with kernel 4.11.rc4. I also made imgur post with relevant screenshots and explanations http://imgur.com/a/3kwiq
Comment 8 Michel Dänzer 2017-03-31 03:01:20 UTC
I wonder if at least some of the issues could be related to the internal panel's horizontal resolution of 1366... Does setting a lower resolution on the internal panel make any difference?
Comment 9 lazanet96 2017-03-31 03:11:47 UTC
I changed resolution to 1280x768, and it disabled both internal monitor and VGA. After message box timed out and reverted resolution to 1366x768, VGA is now off and HDMI and internal are on.
Comment 10 lazanet96 2017-03-31 03:48:57 UTC
Created attachment 130604 [details]
xrandr outputs for radeon and fglrx

Also there are a lot differences in xrandr outputs for fglrx and radeon, maybe timings are off too?
Comment 11 lazanet96 2017-04-17 00:00:49 UTC
Problem persists with 4.11rc7 kernel. Should I try updating some other package?

Also, I noticed that problem starts before X is active (at grub/systemd/ubuntu splash logo). With fglrx only internal monitor would display image at that time - until lightdm and X start (when all three monitors would turn on). Using radeon drivers/drm however, external monitors would display mirrored systemd log/splash screen and internal monitor is off right after grub menu.
Comment 12 lazanet96 2017-05-02 02:46:11 UTC
Problem persists with Ubuntu 17.10 / DRM 2.49.0 / 4.11.0-041100rc8-lowlatency, LLVM 4.0.0

Tested all resolution options for all three of the monitors, and has been able to output either on HDMI and VGA or HDMI and LVDS (internal). I have no idea what else could I test (or which code could I look at). Would setting drm.debug flag  to 0x4 in GRUB provide some more relevant data?  

Also, I have found this forum thread about the same issue, which dates from 2013: https://ubuntuforums.org/showthread.php?t=2194601
Comment 13 lazanet96 2017-05-15 23:56:53 UTC
4.12.rc1 kernel (from http://kernel.ubuntu.com/~kernel-ppa/mainline/) crashes at boot during DRM loading phase, just after internal display turns off.
http://imgur.com/a/VBKv4
Comment 14 Valeriu Balaban 2017-05-22 02:29:59 UTC
Created attachment 131429 [details]
Output of xrandr and dmesg

I have the same issue on Ubuntu 16.04 LTS with Mate desktop that runs on an iMac 11. The second monitor is connected through a Display Port to VGA adapter and the kernel selects it to be primary by default. 

After a fresh boot, since the second monitor is the primary one it contains the login screen, however the screen is black. So I have to unplug it to make the internal monitor (eDP) primary. If I plug again the external one, the internal monitor turns black and the external becomes active and starts to display it's content.

If I take a screenshot, I can see what is displayed on both monitors.
Comment 15 lazanet96 2017-05-22 13:57:34 UTC
Created attachment 131434 [details]
Kernel oops at drm module (4.12.rc2 kernel)

Just tested 4.12.rc2 kernel, and had another kernel oops in drm related functions (at line 909 in attachment).
Comment 16 lazanet96 2017-05-26 20:30:07 UTC
Created attachment 131532 [details]
"dmesg | grep drm" output (4.12.rc2, libdrm 2.4.8)

I updated libdrm and xorg from edgers ppa, and drm-tip kernel is now able to boot.
I attached latest "dmesg | grep drm" output. I went trough logs while changing drm.debug mask, but have failed to see any errors.  

Package versions are:
libdrm-radeon1/artful,now 2.4.80+git20170524.eeb51df3-0ubuntu0ricotz,
4.12.0-994-lowlatency kernel,
xorg 1:7.7+19 with xserver-xorg-video-radeon 1:7.9.0-0ubuntu1
Comment 17 lazanet96 2017-12-09 18:39:38 UTC
Created attachment 136058 [details]
Workaround (Ubuntu 17.10 DRM 2.50.0 / 4.13.0-19-generic, LLVM 5.0.0)

After testing new version of kernel on Ubuntu 17.10 installation (wayland + systemd) I discovered by chance that after suspend and unsuspend (systemctl suspend), internal monitor starts displaying image and everything works (for the first time with radeon driver).

So as a workaround I used /etc/rc.local compatibility to trigger suspend after appropriate ring level is initialized during boot(sudo chmod +x /etc/rc.local is also required). 

I tested same method with 14.04 LTS with no success (so I don't know exactly what upgrade made it work).
Comment 18 Martin Peres 2019-11-19 09:23:44 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/772.

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.