Problem with resume from suspend (Ubuntu 16.04, GT 940MX)

How is there still no bug fix?

I switched NVIDIA X server settings to use the intel GPU instead of Nvidia, and suspend works perfect. Problem is, installed programs that use CUDA are not happy (pytorch / tensorflow).

It’s impossible to work on a laptop that you must restart every time you wish to move it. Please fix ASAP!!!

You could check if stopping nvidia-persistenced before suspend changes the situation.

Elementary OS 0.4.1 Juno with the included NVIDIA driver (don’t remember the number, but based on Ubuntu 16.04) and now Ubuntu 18.04 using both the 390 included in repos and the 396 in Proprietary GPU Drivers PPA (currently 396.18)

Alpha Centurion Ultra laptop (now I think out of business and I got shipped the last one) but has a Intel 620 Kaby Lake and NVIDIA 940MX with i5-7200u

Most of the testing was done on Ubuntu 18.04, but seemed to be the same with Elementary OS.
Installing the NVIDIA drivers when NVIDIA will NOT resume from suspend, but using nvidia prime to switch back to Intel suspend works great. I can reproduce this over and over again. When you come back from suspend the computer stays at the same black screen as mentioned above. How can I help you get this resolved, I would prefer to use my NVIDIA hardware.

@generix

This problem persists for more than two years now. Most of the affected laptops are from ASUS brand. NVIDIA doesn’t want to fix it, as I think. Am I right @generix?
You may think that if you switch to Intel it works but NVIDIA card become unresponsive and you should do a full reboot and can’t simply switch to NVIDIA after suspending, also.

Hello again everybody,
the moderator @sandipt never replied any of the messages again and I see more and more people finding this thread but without any support from Nvidia. This issue is very very annoying and it’s very weird that nobody from Nvidia can solve this problem or give us any hint on what to do… do we have to start bullying people to get some attention?

Problem is, there is more than one thing that can cause this. This can happen either due to an acpi bug in the kernel or due to a bug in the driver. Only the latter one can/would be fixed by nvidia. So it is necessary to test for that and provide proper logs with actual error messages.
To rule out a general acpi bug, using nouveau would be useful. If suspend/resume works while using nouveau and the nvidia gpu can actually be used after resume, a driver bug is likely.
To get error messages in that case, the procedure would be using the proprietary driver, stopping X, suspend/resume, then trying to start X again. dmesg should display driver related errors then.
In the case of an acpi bug, debugging acpi would be necessary which is a lot harder.
So far nobody in this thread succeeded in providing a useful log.

@generix
I am currently running 18.04, I am willing to try and run the nouveau drivers, but it seems like I only have an option to uninstall the nvidia driver (which should default to nouveau) and use the Intel one (instead), or use the nvidia one with an option of using the prime-select command to switch to the Intel driver. Do you know how to actually make nouveau driver work?

a quick summery of what I have tried.

  1. Fresh install of Ubuntu 18.04 - I suspend and resume, everything works great This is the “nouveau” selection in Ubuntu’s Additional Drivers, but really using my Intel 620
  2. Enable NVIDIA 390 or now 396.24 and suspend happens, then you try and wake it and never returns.
    You have to hold the power button to force the machine all the way off to get it to boot again.
  3. Enable NVIDIA 396.24 drivers and then prime-select intel drivers and suspend and resume without issues.

I also tried your list of steps and I cannot seem to kill the display manager in a way that I drop down to just a bash console, I am not sure if that is because things have changed, or if there is a problem with the instructions, but stopping display-manager does not seem to kill GNOME.
nvidia-bug-report.log.gz (126 KB)

In latest logs also no error related to nvidia. Did you report this issue to Canonical/Ubuntu? Also please check system logs like xorg, dmesg, gnome logs, gdm/sddm/kdm logs for error. I think this will give some clue.

Hello,

I had given up on this issue, but seeing this renewed interest let me say something - This has nothing to do with Ubuntu or Canonical.

I have tried Ubuntu (old ones, new ones, with several different desktops), Fedora, Arch, Solus. And in each of the desktops I have tried many versions of the nvidia driver. In every one of it I have faced this problem, exactly as described by several people above.

If you really want to help us, I am willing to give you any help that you require. Stop making us idiots by asking us to look here and there, when it is bloody clear that the solution has to come from your end.

Warm Regards,
Jones JP

Hi all,
I just want to figure out that is this acpi or nvidia driver issue. So I have requested that info. It always good report issue for OS vendor if it’s not the driver issue.

From forum thread I see below are the affected notebooks for now :

Asus x556 (GT 940MX)
Asus R558U (930MX)
ASUS UX560U
Dell Precision 7520
Asus ZenBook UX530UX with GeForce GTX 950M
MSI cx62 nvidia geforce940mx, Ubuntu 16.04

Its would be good if you share your system config details with nvidia bug report. [Make sure you have dmidecode package installed]. I need info like notebook model + GPU + driver + OS + desktop env like Unity, Gnome, KDE etc. . Hope your notebooks have latest SBIOS.

Is this issue reproduce with bare X? I mean not desktop env like Gnome or KDE, just start X with X or Xorg command then try to suspend system with the command like pm-suspend, echo “mem” > /sys/power/ state, systemctl suspend and check if the issue still reproduces.

Meanwhile, I will check if I can find one notebook to reproduce this issue. I’m assuming you all are on PRIME setup.

Just treat your dev team with a brand new shiny laptop and let them install Linux on that :) Easiest way to produce the issue - in-house!

Just one more data point:
I can reproduce this issue using an Asus UX310UQ-FC365T (GT 940MX) using Ubuntu 16.04 and Ubuntu 18.04 using the latest NVIDIA driver (nvidia-390).
Using noveau suspend works just fine (but I cannot use CUDA then…).

Here’s a thread with a bit more info:
[url]https://devtalk.nvidia.com/default/topic/1028058/linux/940mx-black-screen-and-100-xorg-cpu-usage-on-system-resume/post/5230038/#5230038[/url]

Hi all,
I’ve always assumed this is an NVIDIA’s issue since logic tells me that if everything works well when using Intel Prime profile but crashes when using Nvidia Prime profile then the problem is with Nvidia… moreover, if it repeats across multiple versions of Ubuntu and laptop vendors and the common factor is Nvidia then Nvidia should be the main suspect.
But hey, I’m not an expert on drivers, or kernels, or Nvidia, or for that matter I’m not even an expert in Ubuntu. So I’ll I appreciate to have a detailed list of commands for us to provide you with the specific information that you require to solve this issue as soon as possible.
I agree with @jonesjp that this really feels like you guys are playing with us since it’s like going in circles and blaming others instead of giving us a step-by-step instruction list about what it’s needed to start solving this problem. In the meantime I’m attaching some info from my side from my ASUS UX303U:

@boris:~$ lspci -nnk | grep VGA -A1
00:02.0 VGA compatible controller [0300]: Intel Corporation Sky Lake Integrated Graphics [8086:1916] (rev 07)
	Subsystem: ASUSTeK Computer Inc. Skylake Integrated Graphics [1043:1b1d]

@boris:~$ lspci -nnk | grep 3D -A1
01:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 940M] [10de:1347] (rev a2)
	Subsystem: ASUSTeK Computer Inc. GM108M [GeForce 940M] [1043:1b1d]

@boris:~$ cat /proc/driver/nvidia/version 
NVRM version: NVIDIA UNIX x86_64 Kernel Module  390.30  Wed Jan 31 22:08:49 PST 2018
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 

@boris:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial

@boris:~$ ls /usr/bin/*session
/usr/bin/dbus-run-session  /usr/bin/gnome-session

Cheers,
Boris

I’ve got Asus Zenbook UX410U - NVidia GeForce 940 MX

and I have the same problem. Not only i have problem signing back in after suspension. When i want to shutdown or restart (once happened when i was working), a black screen shows up with an error message rolling down the screen.
something like nouveau 0000:01 titu/fifo: sched error 20. it rolls down so fast and makes laptop’s fan go crazy.

I’ve had lags or freezes on 16.04 but since i’ve upgraded to 18.04 i am dealing with this annoying issue.

I’ve already tried switching to Inter Power Saving mode in prime profiles. but that only seems to help the signing back in problem, not the black screen error that makes the laptop go berserk.

i tried switching between different drivers x.org server nouveau display driver and nvidia driver 390 and 396. but doesn’t fix it.

https://devtalk.nvidia.com/default/topic/1028058/linux/940mx-black-screen-and-100-xorg-cpu-usage-on-system-resume/post/5230038/?offset=14#5259981

We are tracking this issue in internal bug 2060048 . We’ll keep you posted.

@sandipt, you can also add Dell XPS 15 9560 to list of laptops that can readily demonstrate this behavior. If NVIDIA is too cheap to buy laptop and solve this issue, one of us would gladly bring our laptops to your shiny new hightech HQ.

The problem should be high priority considering that most of your CUDA toolchains are require UBUNTU. And one would imagine people use laptop this days.

Back to the problem: its same. default drivers dont interfere with suspend. as soon as CUDA toolkit is installed (9.2 in my case), every suspend requires two long presses on power button. 1st one to unsuspend - at which point one can ssh into the machine, 2nd power btn push is to force shutdown. If CUDA is no longer a focus, we can move our attention to FPGA based accelerators, just an FYI.

the issue occur on Asus Zenbook ux303ub with nvida 940m with most popular distros ( Arch linux , ubuntu , fedora , opensuse ) ,

also on HP paviion 14-bf101nx with nvidia 940mx ,

the issue been there for two years on the asus laptop ,

help please .

Hi all
I also experienced the same problem (Acer Aspire v3-772G - GTX850M with various drivers) on many ditributions. Can’t remember how but I had managed to get a stable setup for three years with Linux Mint 17 (Mate 64 edition), which I had upgraded via the manager to version 17.3 (installing directly version 17.3 leaded to the same issue…)
Things becoming buggier (and too old for some interesting features), I’ve given a try with Ubuntu 18.04… and here I am !! Though not too pleased to join this group, actually. Using heavily the GPU for fast 3D rendering, I desperately hope somebody found a solution at last.