Freeze after suspend to RAM nvidia kernel 5.0.0.x

Bug #1843695 reported by Gregor Darius
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-430 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The computer is a notebook model PB71RD from Clevo. The problem happens in all Clevo models:
P960E*, P970E*, P960R*, P970R*, P960RC*, P970RC, PB51E*, PB71E*, PB51R*, PB71R*
with mainboard identifiers (cat /sys/devices/virtual/dmi/id/board_name):
- P95_96_97Ex_Rx
- PB50_70EF_ED_EC
- PB50_70RF_RD_RC
- P9XXRC

and NVIDIA GPU (in this case: GeForce RTX 2060 and also on GeForce GTX 1660 Ti).

The problem only happens with kernel >= 5.0.0 and using the NVIDIA proprietary driver.
On kernel 4.18 suspend works without problems on both GPU's (NVIDIA and Intel)
When using the Intel GPU or the nouveau driver then suspend works without problems.
With kernel 4.18 suspend works without problems on both GPU's.

                 | NVIDIA proprietary | Intel GPU | nouveau |
| kernel 4.18 | works | works | works |
| kernel 5.0.0.x | no suspend | works | works |

I have tried different proprietary drivers, official Ubuntu Versions and from PPA: 418 430.26 435.21

The notebook has a hybrid GPU configuration with NVIDIA and Intel GPUs.

The notebook goes into suspend when pressing the suspend button (Fn-suspend).

When pressing the suspend button again, the power button light goes on and nothing else happens.

             | power button | power LED | Battery LED | HD LED
Notebook on | on | on | on | sporadic
suspend | off | blinking | on | off
freeze after | on | on | on | off
activated
from STR

The system is a Ubuntu 18.04.3

cat /etc/issue:
Ubuntu 18.04.3 LTS \n \l

uname -a:
Linux test-notebook 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I first thought that it could be an ACPI-Problem. I reluctantly tried acpi_osi=linux and all other OS's (as listed in: strings /sys/firmware/acpi/tables/DSDT | grep -i windows | sort) for GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub

Also acpi_os_name=linux

Also tried to blacklist the nouveau driver.

Nothing helped.

Then i found out that a driver from pop-os launchpad worked. I posted a possible solution on the button of this message.

LOGFILES:
I will attach now the logfiles as required on the Ubuntu Website DebuggingKernelSuspend (https://wiki.ubuntu.com/DebuggingKernelSuspend)

dmesg.txt from: sh -c "sync && echo 1 > /sys/power/pm_trace && pm-suspend"

I think the problem might be this:
[ 2.797119] Magic number: 2:1:0
[ 2.797623] memory memory48: hash matches

Answers to DebuggingKernelSuspend:
1. the system freezes when comming back from STR
2. suspend was activated by pressing: Fn+suspendButton
3. resume was activated by pressing: Fn+suspendButton
4. As required i installed the newest non-daily mainline kernel (v5.3-rc8)
now the notebook refuses to go into freeze at all, it just returns to the desktop
As the fix described below works only on kernel 5.0.0.x i will continue with information gathered with the kernel 5.0.0.27-generic

The logs are all attached to this message.

POSSIBLE SOLUTION:

The solution i found was a patch for nvidia-kernel-source-435

pop-os included the patch into nvidia-dkms-435:

diff --git a/nvidia/nv.c b/nvidia/nv.c
index b6dc6f3..ed250c8 100644
--- a/nvidia/nv.c
+++ b/nvidia/nv.c
@@ -4200,8 +4200,6 @@ nv_power_management(
             nv_kthread_q_stop(&nvl->bottom_half_q);

             nv_disable_pat_support();
-
- pci_save_state(nvl->pci_dev);
             break;
         }
         case NV_PM_ACTION_RESUME:

I testet it with different notebook models from Clevo with a different hardware than mentioned above . It had no adverse effects so far.

Is this a possible solution? Could this be sent upstream? I would gladly provide more information if necessary.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: nvidia-driver-430 430.26-0ubuntu0.18.04.2
ProcVersionSignature: Ubuntu 5.0.0-27.28~18.04.1-generic 5.0.21
Uname: Linux 5.0.0-27-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Sep 12 11:52:09 2019
InstallationDate: Installed on 2019-09-12 (0 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: nvidia-graphics-drivers-430
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :
Revision history for this message
Gregor Darius (gregordarius) wrote :

Patch is supposed to go into nvidia-dkms-435

/usr/src/nvidia-435.21/patch

has to be included into dkms.conf

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

The attachment "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
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-430 (Ubuntu):
status: New → Confirmed
Revision history for this message
Michal Siatkowski (ataisjr) wrote :

@gregordarius
is it possible to apply this patch on your own?
could you post more detailed instructions?

I am having exactly the same error as you and I can solve it with all the ways you mentioned before.

Revision history for this message
Gregor Darius (gregordarius) wrote :

The patch has already been applied on newer ppa nvidia drivers (e.g. 440.36) from here: https://launchpad.net/~oem-solutions-group/+archive/ubuntu/nvidia-driver-staging

The same problem is being discussed here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1836630

So, this should work now on the hardware I specified above. It should take some time till it gets into the official nvidia drivers from canonical.

Just add the ppa on your system and choose the driver from "Software & Updates" - "Additional Drivers".

Revision history for this message
Michal Siatkowski (ataisjr) wrote :

Yey it works with 440!
Thanks a lot!

Revision history for this message
Tomasz Makara (csowiec) wrote :

Seems that ppa killed my laptop...

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.