NVIDIA systems will not suspend with lid close and no external monitors

Bug #1731318 reported by Jeremy Soller
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gnome-desktop
Confirmed
Medium
gnome-desktop3 (Ubuntu)
Fix Released
Undecided
Iain Lane
Bionic
Fix Released
Undecided
Iain Lane
Disco
Fix Released
Undecided
Iain Lane

Bug Description

[ Description ]

With the NVIDIA driver, nvidia-384, the system will not sleep when the lid is closed due to gnome_rr_output_is_builtin_display incorrectly returning false.

[ Fix ]

mutter provides a more reliable API to get the "type" of a connector (output). The fix switches gnome-desktop to use this API instead of looking at the output's name - which can be anything apparently.

(This drops a visible symbol, but it was only one which you could have used if you included "libgnome-desktop/gnome-rr-private.h", which is not shipped in the -dev package.)

[ QA ]

If you have an affected system - an NVIDIA-using laptop which doesn't sleep if the lid is closed: install the update, and check if the laptop does now sleep.

[ Regression potential ]

Changes the heuristic-based scheme for detecting if a display is "built-in" to a method based on the reported connector type. There's a low chance that this could be wrong for some machines which were right previously.

description: updated
summary: - NVIDIA systems will not suspend with lid close and no external montiors
+ NVIDIA systems will not suspend with lid close and no external monitors
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-desktop3 (Ubuntu):
status: New → Confirmed
Changed in gnome-desktop:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Michael Aaron Murphy (mmstick76) wrote :

At System76, we've been carrying this patch for 18.04 and 18.10, to solve the issue.

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

The attachment "fix_nvidia_suspend.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.]

tags: added: patch
Revision history for this message
Michael Aaron Murphy (mmstick76) wrote :

Making a note that we are also carrying this it in the 19.04 (disco) release now.

Revision history for this message
Stephan Fabel (sfabel) wrote :

Can you confirm this patch made it into 19.04? I am running Disco and still seem to be suffering from it.

Revision history for this message
Michael Aaron Murphy (mmstick76) wrote : Re: [Bug 1731318] Re: NVIDIA systems will not suspend with lid close and no external monitors

Canonical still does not carry this or many other patches we've made for Pop!_OS to improve NVIDIA support. If you want a better experience for your hardware, I'd recommend to install Pop!_OS. We've been carrying the patch you mentioned since 17.10, so it is enabled in both our 18.04 LTS and 19.04 ISOs.

https://system76.com/pop

On Tue, Jun 11, 2019, at 1:39 PM, Stephan Fabel wrote:
> Can you confirm this patch made it into 19.04? I am running Disco and
> still seem to be suffering from it.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1731318
>
> Title:
> NVIDIA systems will not suspend with lid close and no external
> monitors
>
> Status in gnome-desktop:
> Confirmed
> Status in gnome-desktop3 package in Ubuntu:
> Confirmed
>
> Bug description:
> With the NVIDIA driver, nvidia-384, the system will not sleep when the
> lid is closed due to gnome_rr_output_is_builtin_display incorrectly
> returning false. I have linked to an upstream bug, which also has
> patches fixing the issue.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gnome-desktop/+bug/1731318/+subscriptions
>

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Michael, please keep advertisement for your OS out of launchpad

The right place to fix that bug would be to work with upstream on a proper solution. The suggested change has been review by GNOME upstream on https://bugzilla.gnome.org/show_bug.cgi?id=777538 and they found issues with it.

Pop_OS team, any chance you would try to do the right thing there and submit a pull request with your patch on gitlab?

Revision history for this message
Jeremy Soller (jackpot51) wrote :

For what it's worth, what was said about the patch was that the code it was editing would be going away soon. That never happened. I have commented again to see if there is still interest in the patch upstream.

I highly recommend considering the patch for Ubuntu even if upstream has not taken it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> I have commented again to see if there is still interest in the patch upstream.

The right way to contribute a patch to GNOME nowadays is to make a pull request on gitlab, a comment on a bug is likely to not get in any reviewer queue and would require extra maintainer to be merged, please be a good upstream citizen and do a proper PR for the change

Revision history for this message
Jeremy Soller (jackpot51) wrote :
Revision history for this message
Iain Lane (laney) wrote :

Filing an MR and some light nagging managed to get it merged, thanks.

I filed cherry-pick MRs

  https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/40
  https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/41

because it'd be good to fix this in stable releases too.

Changed in gnome-desktop3 (Ubuntu):
status: Confirmed → In Progress
Changed in gnome-desktop3 (Ubuntu Bionic):
status: New → In Progress
Changed in gnome-desktop3 (Ubuntu Disco):
status: New → In Progress
Changed in gnome-desktop3 (Ubuntu):
assignee: nobody → Iain Lane (laney)
Changed in gnome-desktop3 (Ubuntu Bionic):
assignee: nobody → Iain Lane (laney)
Changed in gnome-desktop3 (Ubuntu Disco):
assignee: nobody → Iain Lane (laney)
Iain Lane (laney)
description: updated
Iain Lane (laney)
description: updated
Revision history for this message
Iain Lane (laney) wrote :

all nominated releases are uploaded - stable releases in the queue for review

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

This bug was fixed in the package gnome-desktop3 - 3.32.2-2ubuntu1

---------------
gnome-desktop3 (3.32.2-2ubuntu1) eoan; urgency=medium

  * Merge with Debian. Remaining changes:
    - Add 04_compute_average_color.patch: Compute the avergage color in
      gnome-desktop itself, not in unity to fix some races (LP #963140)
    - Add tweak_color_computation.patch, Patch from Gord, no patch header,
      no bug link.
    - Add git_revert_draw_background.patch
    - Add ubuntu_language.patch, Port relevant bits from gnome-control-center's
      52_region_language.patch, as required for gnome 3.8+ region panel
    - Add ubuntu_language_list_from_SUPPORTED.patch,
      Add API to get list of available languages from SUPPORTED file.
      To be used by gnome 3.8 region panel language installation.
    - Add gnomebg_hidpi_image.patch,
      gnome_bg_create_surface: always honor device scale, that fixes the
      wallpaper rendering in HiDPI config under ubiquity
    - debian/control.in: Build-Depend on language-pack-gnome-he for build tests
    - debian/libgnome-desktop-3-17.symbols:
      + Add symbols included in Ubuntu patches
    - Update Vcs fields and debian/gbp.conf for Ubuntu

gnome-desktop3 (3.32.2-2) experimental; urgency=medium

  [ Simon McVittie ]
  * Enable installed-tests.
    Install them in libgnome-desktop-3-dev for now; they can be moved
    to a separate gnome-desktop3-tests package (if desired) at the next
    SONAME break.
    - d/tests: Add autopkgtests, based on those in glib2.0.
      They are all marked superficial since gnome-desktop3 doesn't have
      great test coverage at the moment.
      A test for static linking is omitted because static linking is not
      supported for this package.
  * d/copyright: Update to reflect the presence of GPL-2+ code

  [ Iain Lane ]
  * Cherry-pick patch from upstream to use mutter's connector-type to detect
    output connector type. This fixes suspend on some systems (primarily ones
    using the NVIDIA binary driver). (LP: #1731318)
  * libgnome-desktop-3-17.symbols: Update. The patch add two symbols and drops
    one. These symbols are defined in "gnome-rr-private.h", which is not
    shipped in the -dev package, so they can't be used in practice. This is a
    technical ABI break but one which it's OK to overlook. There's probably a
    better way to handle the visibility of these symbols, though.

 -- Iain Lane <email address hidden> Fri, 28 Jun 2019 13:08:31 +0100

Changed in gnome-desktop3 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jeremy, or anyone else affected,

Accepted gnome-desktop3 into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-desktop3/3.32.1-1ubuntu1.2 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-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. 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 gnome-desktop3 (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-disco
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Jeremy, or anyone else affected,

Accepted gnome-desktop3 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-desktop3/3.28.2-0ubuntu1.4 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 gnome-desktop3 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Iain Lane (laney) wrote :

Sorry, I messed up the bionic upload. Another one should be coming shortly.

Revision history for this message
Andy Whitcroft (apw) wrote :

Hello Jeremy, or anyone else affected,

Accepted gnome-desktop3 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-desktop3/3.28.2-0ubuntu1.5 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.

Revision history for this message
Jeremy Soller (jackpot51) wrote :

I tested on a System76 NVIDIA laptop that was affected by this issue, on bionic and disco with proposed enabled. The eDP displays are detected as builtin displays, as expected.

tags: added: verification-done verification-done-bionic verification-done-disco
removed: verification-needed verification-needed-bionic verification-needed-disco
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-desktop3 - 3.32.1-1ubuntu1.2

---------------
gnome-desktop3 (3.32.1-1ubuntu1.2) disco; urgency=medium

  * Cherry-pick patch from upstream to use mutter's connector-type to detect
    output connector type. This fixes suspend on some systems (primarily ones
    using the NVIDIA binary driver). (LP: #1731318)
  * libgnome-desktop-3-17.symbols: Update. The patch add two symbols and drops
    one. These symbols are defined in "gnome-rr-private.h", which is not
    shipped in the -dev package, so they can't be used in practice. This is a
    technical ABI break but one which it's OK to overlook. There's probably a
    better way to handle the visibility of these symbols, though.
  * debian/control*, gbp.conf: Update for ubuntu/bionic

 -- Iain Lane <email address hidden> Fri, 28 Jun 2019 13:34:02 +0100

Changed in gnome-desktop3 (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for gnome-desktop3 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 gnome-desktop3 - 3.28.2-0ubuntu1.5

---------------
gnome-desktop3 (3.28.2-0ubuntu1.5) bionic; urgency=medium

  * Revert "libgnome-desktop-3-17.symbols: Update". I overzealously
    cherry-picked this from disco. This is in fact not a problem with the
    autotools build (in disco meson is used and the _-prefixed symbols are
    leaked). It is not needed here.

gnome-desktop3 (3.28.2-0ubuntu1.4) bionic; urgency=medium

  * Cherry-pick patch from upstream to use mutter's connector-type to detect
    output connector type. This fixes suspend on some systems (primarily ones
    using the NVIDIA binary driver). (LP: #1731318)
  * libgnome-desktop-3-17.symbols: Update. The patch add two symbols and drops
    one. These symbols are defined in "gnome-rr-private.h", which is not
    shipped in the -dev package, so they can't be used in practice. This is a
    technical ABI break but one which it's OK to overlook. There's probably a
    better way to handle the visibility of these symbols, though.

 -- Iain Lane <email address hidden> Wed, 03 Jul 2019 09:53:10 +0100

Changed in gnome-desktop3 (Ubuntu Bionic):
status: Fix Committed → Fix Released
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.