present: Crash in 'present_scmd_get_crtc' and 'present_flush' (NVIDIA 495.46)

Bug #1959995 reported by Mazen Mardini
94
This bug affects 17 people
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Unknown
marco (Ubuntu)
Fix Released
Critical
Martin Wimpress 
Focal
Confirmed
Undecided
Unassigned
Impish
Won't Fix
Undecided
Unassigned
Jammy
Fix Released
Critical
Martin Wimpress 
xorg-server (Ubuntu)
Fix Released
High
Timo Aaltonen
Focal
Confirmed
High
Unassigned
Impish
Won't Fix
High
Unassigned
Jammy
Fix Released
High
Timo Aaltonen

Bug Description

This bug causes xserver to crash when using newer Nvidia drivers (NVIDIA 495.46+) with Optimus. It's apparently triggered when using the MATE desktop environment. It has been noticed on xorg-server-21.1, but it's likely affecting version 1.20.13 as well.

It has been fixed already, but could you please backport the fix?

Patch that fixes it is here: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/841/diffs?commit_id=22d5818851967408bb7c903cb345b7ca8766094c

The bug report at freedesktop.org is here: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275

Thank you!

tags: added: fixed-in-22 fixed-upstream
Changed in xorg-server (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Mazen Mardini (mazen-mardini) wrote (last edit ):

I can confirm that this patch works. It fixed the crash on my computer. I'm running the Nvidia 510.47 drivers.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

I confirm this issue affects users of NVIDIA 495 and 510 drivers if they use an Xpresent compositor such as Marco (the MATE Windows Manager) or Metacity 3.42. It affects Ubuntu MATE 20.04 and 21.10 users.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu Focal):
status: New → Confirmed
Changed in xorg-server (Ubuntu Impish):
status: New → Confirmed
Revision history for this message
dlotton (yellow56) wrote :

Same issue here. Two systems running Mint Mate 20.3.

System #1: GeForce GTX 1050 Ti
System #2: RTX A4000

Revision history for this message
Stephen (belrik) wrote :

Confirmed same issue as recorded here: https://github.com/mate-desktop/mate-session-manager/issues/297

Please release a fix for Ubuntu MATE as focal 20.04 currently crashes with Nvidia drivers.

Revision history for this message
kyle (kmcclure) wrote :

This issue affects me, too. Ubuntu mate 20.04 with Nvidia Quadro P2200 Graphics card. Please fix for the Mate desktop.

Revision history for this message
Jacob Moroni (jakemoroni) wrote :

This affects me in the sense that Xpresent support in Marco was temporarily disabled in 22.04 until this is fixed, which ultimately results in screen tearing with Intel Iris Xe integrated graphics.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in xorg-server (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
status: Triaged → Fix Committed
Revision history for this message
Rob Pieke (robpieke) wrote :

Apologies for my rookie message, but I'm trying to track the roadmap for a 20.04 fix/roll-out. Is this the place to ask? Virtual cookies/beers as thanks in advance :)

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

20.04 is tracked by the 'Focal' line near the top of this page.

Revision history for this message
Mazen Mardini (mazen-mardini) wrote (last edit ):

If you don't like to wait for the patch to be applied, here is what you can do (for focal):

If you end up having unmet dependencies at step 7, install them using "sudo apt install package-name".

1. mkdir xorg-server && cd xorg-server
2. git clone -b applied/ubuntu/focal-security https://git.launchpad.net/ubuntu/+source/xorg-server
3. cd xorg-server/debian/patches
4. wget https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1959995/+attachment/5572420/+files/nvidia-495-fix.patch
5. echo "nvidia-495-fix.patch" >> series
6. cd ../..
7. dpkg-buildpackage -us -uc
8. cd ..
9. sudo dpkg -i ./*.deb
10. sudo systemctl reboot

Done. Next you can install newer Nvidia drivers and there shouldn't be any issues.

Note: This is the patch from https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275

Revision history for this message
Rob Pieke (robpieke) wrote :

Many thanks Daniel & Mazen!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "nvidia-495-fix.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Xpresent is currently disabled in Marco (the MATE window manager) in Jammy. When xorg-server 2:21.1.3-2ubuntu1 migrates from Proposed, then Xpresent needs to be re-enabled.

Changed in marco (Ubuntu Focal):
status: New → Confirmed
Changed in marco (Ubuntu Impish):
status: New → Confirmed
Changed in marco (Ubuntu Jammy):
status: New → Confirmed
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

The i386 build failed a month ago and is preventing migration from proposed:

- https://bugs.launchpad.net/ubuntu/+source/xorg-server/2:21.1.3-2ubuntu1/+build/23194148

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

proposed has -2ubuntu2, and it builds on i386

the blocker has been nvidia-390 and then the various kernels that can't migrate alone

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Now xorg-server 2:21.1.3-2ubuntu2 has migrated to the release pocket in Jammy, macro can have Xpresent re-enabled.

Changed in marco (Ubuntu Impish):
status: Confirmed → Invalid
Changed in marco (Ubuntu Focal):
status: Confirmed → Invalid
Changed in marco (Ubuntu Impish):
status: Invalid → Confirmed
Changed in marco (Ubuntu Focal):
status: Invalid → Confirmed
Changed in marco (Ubuntu Jammy):
status: Confirmed → In Progress
importance: Undecided → Critical
assignee: nobody → Martin Wimpress  (flexiondotorg)
Changed in marco (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Fixed in 22.04 via xorg-server 2:21.1.3-2ubuntu2

Changed in xorg-server (Ubuntu Jammy):
status: Fix Committed → Fix Released
Changed in xorg-server (Ubuntu Impish):
importance: Undecided → High
Changed in xorg-server (Ubuntu Focal):
importance: Undecided → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Strictly speaking, the fix for this bug was introduced in xorg-server 2:21.1.3-2ubuntu1

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

This bug was fixed in the package marco - 1.26.0-3ubuntu0

---------------
marco (1.26.0-3ubuntu0) jammy; urgency=medium

  * debian/control:
    + Add B-D: libxpresent-dev. (LP: #1959995)

 -- Martin Wimpress <email address hidden> Sat, 02 Apr 2022 10:45:19 +0000

Changed in marco (Ubuntu Jammy):
status: Fix Committed → Fix Released
Changed in xorg-server:
status: Unknown → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 21.10 (Impish Indri) has reached end of life, so this bug will not be fixed for that specific release.

Changed in xorg-server (Ubuntu Impish):
status: Confirmed → Won't Fix
Changed in marco (Ubuntu Impish):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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