X crashes with "randr: falling back to unsynchronized pixmap sharing" when connecting to an external monitor via HDMI (I+A)

Bug #1789913 reported by Timo Aaltonen
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Fix Released
Undecided
Timo Aaltonen
Xenial
Won't Fix
Undecided
Unassigned
Bionic
Fix Released
Undecided
Timo Aaltonen
xorg-server-hwe-16.04 (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Invalid
Undecided
Unassigned

Bug Description

[Impact]
X server crashes in certain cases on I+A hybrid machines with modesetting+amdgpu drivers.

[Test case]
Connect an external monitor, check that it doesn't crash X.

[Regression potential]
This commit was provided by AMD and reviewed by an NVIDIA engineer, and after a few iterations it got applied upstream. We'll test it with many driver combinations (modesetting+amdgpu, m+nvidia, m+m...) to check that they all (still) work.

--

Copied from a private bug:

- Steps to see the issue:
1. Connect a monitor to UUT via HDMI port
Expected Result:
  Video outputs successfully in the monitor
Actual Result:
  X crashes into a login screen

- BIOS: 0.7.3
- AMD driver release: 18.10, 18.20RC8 and 18.20RC9

Timo Aaltonen (tjaalton)
Changed in xorg-server (Ubuntu Xenial):
status: New → Won't Fix
Changed in xorg-server-hwe-16.04 (Ubuntu Bionic):
status: New → Invalid
Changed in xorg-server-hwe-16.04 (Ubuntu):
status: New → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Standard response :)

Thank you for taking the time to report this bug and helping to make Ubuntu better. It sounds like some part of the system has crashed. To help us find the cause of the crash please follow these steps:

1. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

2. If step 1 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

3. If step 2 also failed then apply the workaround from bug 994921, reboot, reproduce the crash, and retry step 1.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

Changed in xorg-server (Ubuntu):
status: New → Incomplete
Changed in xorg-server (Ubuntu Bionic):
status: New → Incomplete
Changed in xorg-server-hwe-16.04 (Ubuntu Xenial):
status: New → Incomplete
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

not needed, there's a patch committed upstream which I'll push to cosmic first

Timo Aaltonen (tjaalton)
Changed in xorg-server (Ubuntu):
status: Incomplete → Triaged
Changed in xorg-server (Ubuntu Bionic):
status: Incomplete → Triaged
Changed in xorg-server-hwe-16.04 (Ubuntu Xenial):
status: Incomplete → Triaged
Changed in xorg-server (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
Changed in xorg-server (Ubuntu Bionic):
assignee: nobody → Timo Aaltonen (tjaalton)
Timo Aaltonen (tjaalton)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.20.1-1ubuntu2

---------------
xorg-server (2:1.20.1-1ubuntu2) cosmic; urgency=medium

  * prime-sync-refactor.diff: Fix crash on modesetting+amdgpu hybrid.
    (LP: #1789913)
  * sync-i965-pciids.diff: Update intel pci-id's. (LP: #1789924)

 -- Timo Aaltonen <email address hidden> Wed, 05 Sep 2018 14:13:19 +0300

Changed in xorg-server (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

So what crash was this? I'm interested to see a stack trace in case there are other reports of it to link together.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hmm, still not much detail but here tis:

commit f79e5368512b72bb463925983d265b070261b7aa
Author: Jim Qu <email address hidden>
Date: Mon Aug 27 13:37:38 2018 +0800

    modesetting: code refactor for PRIME sync

    The X will be crashed on the system with other DDX driver,
    such as amdgpu.

    show the log like:

    randr: falling back to unsynchronized pixmap sharing
    (EE)
    (EE) Backtrace:
    (EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4e)
    (EE) 1: /usr/lib/xorg/Xorg (0x55cb0151a000+0x1b5ce9)
    (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f1587a1d000+0x11390)
    (EE)
    (EE) Segmentation fault at address 0x0
    (EE)

    The issue is that modesetting as the master, and amdgpu as the slave.
    Thus, when the master attempts to access pSlavePixPriv in ms_dirty_update(),
    problems result due to the fact that it's accessing AMD's 'ppriv' using the
    modesetting structure definition.

    Apart from fixing crash issue, the patch fix other issue in master interface
    in which driver should refer to master pixmap.

    Signed-off-by: Jim Qu <email address hidden>
    Reviewed-by: Alex Goins <email address hidden>

summary: - X crashes when connecting to an external monitor via HDMI (I+A)
+ X crashes with "randr: falling back to unsynchronized pixmap sharing"
+ when connecting to an external monitor via HDMI (I+A)
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Timo, or anyone else affected,

Accepted xorg-server into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server/2:1.19.6-1ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xorg-server (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Timo, or anyone else affected,

Accepted xorg-server-hwe-16.04 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server-hwe-16.04/2:1.19.6-1ubuntu4.1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xorg-server-hwe-16.04 (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Leon Liao (lihow731) wrote :

I verified the xserver-xorg-core-hwe-16.04 on Dell Precision 7730(I+A).
This external monitor works normal.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Could someone also perform the same test on a bionic system? Thank you.

Revision history for this message
Chih-Hsyuan Ho (chih) wrote :

Yes, I have tested the package with Bionic on the same Dell Precision 7730 unit and found it works well, too.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

thanks, tags updated

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for xorg-server has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server-hwe-16.04 - 2:1.19.6-1ubuntu4.1~16.04.1

---------------
xorg-server-hwe-16.04 (2:1.19.6-1ubuntu4.1~16.04.1) xenial; urgency=medium

  * prime-sync-refactor.diff: Fix crash on modesetting+amdgpu hybrid.
    (LP: #1789913)

 -- Timo Aaltonen <email address hidden> Wed, 05 Sep 2018 14:31:56 +0300

Changed in xorg-server-hwe-16.04 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.19.6-1ubuntu4.1

---------------
xorg-server (2:1.19.6-1ubuntu4.1) bionic; urgency=medium

  * prime-sync-refactor.diff: Fix crash on modesetting+amdgpu hybrid.
    (LP: #1789913)
  * sync-i965-pciids.diff: Update intel pci-id's. (LP: #1789924)

 -- Timo Aaltonen <email address hidden> Wed, 05 Sep 2018 14:38:25 +0300

Changed in xorg-server (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Does anyone have a stack trace of what this crash was?

Revision history for this message
Ethan Trewhitt (courtarro) wrote :

At the risk of posting this in the wrong place ... I encountered a crash just like this today and I believe it's the same thing. I've got a Dell Precision 7530 with a discrete AMD card in bypass/direct mode (the Intel graphics are bypassed).

1. Like the original report, I connected a display to the HDMI output of the laptop
2. I waited several seconds and the external display was not automatically enabled
3. I pressed Win-P to get to the display quick change dialog
4. X crashes to a login screen

It's not clear whether the crash was in progress before or after I pressed Win-P. The symptom seems to be the same. The X log shows a bunch of EDID data being read from the HDMI device, then "randr: falling back to unsynchronized pixmap sharing", which is the last message in the crashed X log.

Packages on this machine:

xserver-common: 2:1.19.6-1ubuntu4.2
xserver-xorg-video-amdgpu-hwe-18.04: 18.1.0-1~18.04.1

Are there any additional data collection steps I can take to confirm that this is the same error or help debug it?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.