[CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

[CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

My system does not resume from suspend anymore. The last time it succesfully resumed was on May 2nd:
Output of journalctl | grep resume:

Code: Select all

May 02 11:33:02 ambrosia kernel: ACPI: Low-level resume complete
May 02 11:33:02 ambrosia systemd-sleep[874]: System resumed.
According to the logs it hasn't resumed since then.

Now, after I suspend, it looks like the system is suspending. However, when I resume, I am greeted by my UEFI boot screen. I have tried to make sense of it all, but I don't get it.

Output of 'inxi -Fxz':

Code: Select all

System:    Host: ambrosia Kernel: 5.4.0-72-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: Cinnamon 4.4.8 
           Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic 
Machine:   Type: Laptop System: ASUSTeK product: N750JV v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: N750JV v: 1.0 serial: <filter> UEFI: American Megatrends v: N750JV.210 date: 04/11/2014 
Battery:   ID-1: BAT0 charge: 49.3 Wh condition: 49.3/69.3 Wh (71%) model: ASUSTeK N750-62 status: Full 
           Device-1: hidpp_battery_0 model: Logitech Wireless Mouse charge: 55% status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i7-4700HQ bits: 64 type: MT MCP arch: Haswell rev: 3 L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38312 
           Speed: 2395 MHz min/max: 800/2400 MHz Core speeds (MHz): 1: 2395 2: 2395 3: 2395 4: 2395 5: 2395 6: 2395 7: 2395 
           8: 2395 
Graphics:  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GK107M [GeForce GT 750M] vendor: ASUSTeK driver: N/A bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz, 1280x1024~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 20.0.8 direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.0-72-generic 
Network:   Device-1: Qualcomm Atheros AR9485 Wireless Network Adapter vendor: AzureWave driver: ath9k v: kernel port: e000 
           bus ID: 03:00.0 
           IF: wlp3s0 state: up mac: <filter> 
Drives:    Local Storage: total: 297.32 GiB used: 227.52 GiB (76.5%) 
           ID-1: /dev/sda vendor: LITE-ON IT model: LCS-256M6S size: 238.47 GiB 
Partition: ID-1: / size: 64.46 GiB used: 47.66 GiB (73.9%) fs: ext4 dev: /dev/sda10 
           ID-2: swap-1 size: 9.40 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda8 
Sensors:   System Temperatures: cpu: 89.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 4500 
Info:      Processes: 323 Uptime: 2h 02m Memory: 7.66 GiB used: 4.53 GiB (59.1%) Init: systemd runlevel: 5 Compilers: 
           gcc: 7.5.0 Shell: bash v: 4.4.20 inxi: 3.0.32 

The BIOS (v210) is the latest BIOS available for the ASUS N750JV and is the same version that I 've been using for the past three years or so.

I checked gparted to confirm that /dev/sda8 is indeed my swap partition (File system: linux-swap) with UUID 092d8b70-b201-4a78-afdd-f605102d56f7 and size: 9.4GiB

RAM: 7.7GiB
Swap: 10.9GiB (swap partition + swap file)
Swap partition: 9.4GiB


The following is what I have done to try to get resume work again:

1.
I reformatted /dev/sda8 (linux-swap).

I edited /etc/fstab to include the new UUID:

Code: Select all

UUID=092d8b70-b201-4a78-afdd-f605102d56f7 none swap sw 0 0
That didn't help.

2.
Next, I edited /etc/initramfs-tools/conf.d/resume ('sudo gedit /etc/initramfs-tools/conf.d/resume') and entered the new UUID of my swap partition:
resume=UUID=092d8b70-b201-4a78-afdd-f605102d56f7
Then I updated initramfs:

Code: Select all

sudo update-initramfs -u
Output:

Code: Select all

update-initramfs: Generating /boot/initrd.img-5.4.0-72-generic
I: The initramfs will attempt to resume from /dev/sda8
I: (UUID=092d8b70-b201-4a78-afdd-f605102d56f7)
I: Set the RESUME variable to override this.
That didn't help.

3.
So, when that did not have any effect, I edited the grub file at /etc/default/grub

Code: Select all

sudo gedit /etc/default/grub
and also added the new UUID of my swap partition:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=092d8b70-b201-4a78-afdd-f605102d56f7"
Then I did a

Code: Select all

sudo update-grub
Output:

Code: Select all

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-72-generic
Found initrd image: /boot/initrd.img-5.4.0-72-generic
Found linux image: /boot/vmlinuz-5.4.0-71-generic
Found initrd image: /boot/initrd.img-5.4.0-71-generic
Found linux image: /boot/vmlinuz-5.3.0-61-generic
Found initrd image: /boot/initrd.img-5.3.0-61-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-142-generic
Found initrd image: /boot/initrd.img-4.15.0-142-generic
Adding boot menu entry for EFI firmware configuration
done
Afterwards I checked /boot/grub/grub.cfg to be sure it had updated, which it had.

That didn't help.

Somewhere else I read that the PARTUUID should be used. I tried that, but - as you may have guessed - that didn't work either.

4.
As a last resort I chose a different kernel at boot. I am currently using 5.4.0-72-generic, so I went back to 5.4.0-71.

That didn't help either.

5.
I deleted /etc/initramfs-tools/conf.d/resume

Didn't help...

I should add that instead of the UUID of the swap partition, I not only tried the PARTUUID, but also the device name

Code: Select all

/dev/sda8
It should be no surprise that that didn't help either.

It still looks like the system is suspending, but it does not resume. It stops, but when I touch the space bar (aka 'any key') the system comes alive, but greets me with the UEFI boot screen instead of the resume login screen.

So, until May 2, suspend and resume worked fine. Then 'something' happened, and now the system won't resume anymore. It looks like suspend is actually working fine, but the moment it is supposed to resume, 'something' goes awry.

I hope some of you wonderful people can help. If you need more info, please let me know.

Thanks in advance!
Ocor61
Last edited by ocor on Wed Jun 02, 2021 7:41 am, edited 1 time in total.
User avatar
SMG
Level 15
Level 15
Posts: 5688
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by SMG »

ocor wrote:
Mon May 10, 2021 7:11 pm
My system does not resume from suspend anymore. The last time it succesfully resumed was on May 2nd:
Did you possibly do an Nvidia driver update around that time?

I did not see you mention reverting to a Timeshift snapshot of when the system was working. Do you use Timeshift?

Please provide the output of dpkg -l | grep -i nvidia. Even though you are currently using Intel graphics, sometimes the Nvidia driver files can have an effect on resuming from suspend.
A woman typing on a laptop with LM20.1 Cinnamon.
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

Thanks for your reply @SMG!
Did you possibly do an Nvidia driver update around that time?
I hadn't thought of that at all. I did not do an Nvidia driver update, but I believe I actually removed the Nvidia driver around that time, although I do find quite a bit of Nvidia remnants still on my system. Output of dpkg -l | grep -i nvidia:

Code: Select all

rc  libnvidia-compute-390:amd64                390.143-0ubuntu0.18.04.1                         amd64        NVIDIA libcompute package
rc  libnvidia-compute-390:i386                 390.143-0ubuntu0.18.04.1                         i386         NVIDIA libcompute package
rc  libnvidia-compute-418-server:amd64         418.181.07-0ubuntu0.18.04.1                      amd64        NVIDIA libcompute package
rc  nvidia-compute-utils-390                   390.143-0ubuntu0.18.04.1                         amd64        NVIDIA compute utilities
rc  nvidia-compute-utils-418-server            418.152.00-0ubuntu0.18.04.1                      amd64        NVIDIA compute utilities
ii  nvidia-dkms-390                            390.143-0ubuntu0.18.04.1                         amd64        NVIDIA DKMS package
rc  nvidia-dkms-418-server                     418.152.00-0ubuntu0.18.04.1                      amd64        NVIDIA DKMS package
ii  nvidia-kernel-common-390                   390.143-0ubuntu0.18.04.1                         amd64        Shared files used with the kernel module
rc  nvidia-kernel-common-418-server            418.152.00-0ubuntu0.18.04.1                      amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-390                   390.143-0ubuntu0.18.04.1                         amd64        NVIDIA kernel source package
rc  nvidia-prime                               0.8.16~0.18.04.1                                 all          Tools to enable NVIDIA's Prime
ii  nvidia-prime-applet                        1.0.8                                            all          An applet for NVIDIA Prime
rc  nvidia-settings                            460.39-0ubuntu0.18.04.2                          amd64        Tool for configuring the NVIDIA graphics driver
Should I purge all the Nvidia files from the system? And if so, how can I best go about that?

Thanks again!
Ocor61
User avatar
SMG
Level 15
Level 15
Posts: 5688
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by SMG »

ocor wrote:
Mon May 17, 2021 7:39 pm
I did not do an Nvidia driver update, but I believe I actually removed the Nvidia driver around that time, although I do find quite a bit of Nvidia remnants still on my system.
Did you remove the Nvidia driver and install the nouveau driver? Or did you just remove the Nvidia driver? Removing the Nvidia driver might be why you are currently having an issue resuming from suspend even though you are using Intel.

You can remove the Nvida-418 driver files with apt remove nvidia-driver-418 and then apt autoremove and then reboot.

If you want to remove the Nvidia-390 files instead of just reinstalling the Nvidia-390 you can use a similar process: apt remove nvidia-driver-390 and then apt autoremove and then reboot.

If you do not have the nouveau driver installed, I would recommend installing it or the Nvidia driver as I suspect that may be why your system is having issues resuming from suspend.
A woman typing on a laptop with LM20.1 Cinnamon.
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

I followed up on your suggestion, but unfortunately, it didn't work.. Resume still didn't work after removing the nvidia drivers and installing the nouveau driver. So, I thought let's re-install the nvidia drivers:

Code: Select all

$ apt install nvidia-driver-418
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nvidia-driver-418 is already the newest version (430.50-0ubuntu0.18.04.2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-ifr1-450 : Depends: libnvidia-gl-450 but it is not going to be installed
 libnvidia-ifr1-450:i386 : Depends: libnvidia-gl-450:i386 but it is not going to be installed
 nvidia-driver-450 : Depends: libnvidia-gl-450 (= 450.119.03-0ubuntu0.18.04.1) but it is not going to be installed
                     Recommends: libnvidia-gl-450:i386 (= 450.119.03-0ubuntu0.18.04.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
As suggested, I then tried apt --fix-broken install, but that just came back with a list of commands to use. Installing the nvidia 390 driver gave me the same error message as above.

So then I did apt reinstall nvidia-driver-418 and chose the suggested solution. However:

Code: Select all

The following packages will be REINSTALLED:
  nvidia-driver-418 
The following NEW packages will be installed:
  libnvidia-gl-450{a} 
The following packages will be REMOVED:
  libnvidia-ifr1-450:i386{a} 
The following partially installed packages will be configured:
  bamfdaemon dbus desktop-file-utils gnome-menus initramfs-tools libc-bin libnvidia-cfg1-450 libnvidia-common-450 
  libnvidia-compute-450 libnvidia-compute-450:i386 libnvidia-decode-450 libnvidia-decode-450:i386 libnvidia-encode-450 
  libnvidia-encode-450:i386 libnvidia-extra-450 libnvidia-fbc1-450 libnvidia-fbc1-450:i386 libnvidia-ifr1-450 man-db 
  mime-support nvidia-compute-utils-450 nvidia-dkms-450 nvidia-driver-430 nvidia-driver-440 nvidia-driver-450 
  nvidia-kernel-common-450 nvidia-kernel-source-450 nvidia-prime nvidia-settings nvidia-utils-450 screen-resolution-extra 
  xserver-xorg-video-nvidia-450 
0 packages upgraded, 1 newly installed, 1 reinstalled, 1 to remove and 5 not upgraded.
Need to get 0 B/60,5 MB of archives. After unpacking 217 MB will be used.
Do you want to continue? [Y/n/?] 
E: Internal Error, No file name for nvidia-driver-418:amd64
I don't know how to continue. I would really like to understand why this does not work AND why a graphics driver is so important for resume to work, especially if everything else just works normally.

This has taken up so much time as of late, that I am very close to doing a completely new installation of Mint 20.x. However, if you have any more thoughts on this, I am willing to try to get it fixed first.
User avatar
SMG
Level 15
Level 15
Posts: 5688
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by SMG »

ocor wrote:
Tue May 18, 2021 7:31 am
I followed up on your suggestion, but unfortunately, it didn't work.. Resume still didn't work after removing the nvidia drivers and installing the nouveau driver. So, I thought let's re-install the nvidia drivers:
apt install nvidia-driver-418
If you are going to re-install Nvidia drivers, I suggest using ones which are currently supported. I did not realize you were not using Driver Manager to install drivers. Had you used Driver Manager, you would know the Nvidia-418 is no longer a supported driver. Maybe that is why you are receiving errors? (It stopped receiving support in Nov. 2019.)

The Nvidia-390 is a currently supported driver, but when leftover files from other drivers remain, sometimes errors can happen.
ocor wrote:
Tue May 18, 2021 7:31 am
I don't know how to continue. I would really like to understand why this does not work AND why a graphics driver is so important for resume to work, especially if everything else just works normally.
Graphics hardware goes to sleep just like everything else does when you suspend. The Nvidia card is not completely disabled and so the system knows it is there and expects it to jump to attention and be ready when the computer resumes from sleep.
ocor wrote:
Tue May 18, 2021 7:31 am
This has taken up so much time as of late, that I am very close to doing a completely new installation of Mint 20.x.
You can test on a live session of Mint to see if it works.

As an FYI, there are some issues currently with nvidia-related files and switching between Intel and Nvidia on LM20 (I do not recall if it was affecting LM19). There is a fix/workaround for the most commonly seen issue should you run into it.
A woman typing on a laptop with LM20.1 Cinnamon.
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

Yes, well, I wanted to use Driver Manager, but it told me that I didn't need any drivers. That is, before I applied the changes you recommended.
Out of curiosity, I started Driver Manager again just now. And this time it tells me that 'This device is using an alternate driver', which is xserver-xorg-video-nouveau (v 1:1.0.15-2). The alternatives it shows are nvidia-driver-390 (recommended) and nvidia-340.

I am currently backing up my data partition and my home directory to a new disk. After that I'll see if resume works this time, although I won't hold my breath.

I'll let you know, but for now I'd just like to say that I think you're awesome for all the help you offer me and this community. Thanks!
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

I forgot: I tested Mint 20.1 with a live disk and everything works fine, including suspend and resume, just like it used to on my 19.3 installation until earlier this month.
User avatar
SMG
Level 15
Level 15
Posts: 5688
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by SMG »

ocor wrote:
Tue May 18, 2021 12:06 pm
Yes, well, I wanted to use Driver Manager, but it told me that I didn't need any drivers. That is, before I applied the changes you recommended.
Driver Manager is set up to read drivers that it installs. If you install drivers using another method, the files can be slightly different and thus Driver Manager may not be able to read them properly. Your system did have some driver files installed (but not enough for it to work properly) and it's possible those installed files gave a "false positive" to Driver Manager? I do not know.
ocor wrote:
Tue May 18, 2021 12:06 pm
I'll let you know, but for now I'd just like to say that I think you're awesome for all the help you offer me and this community. Thanks!
You're welcome. :)
ocor wrote:
Tue May 18, 2021 12:09 pm
I forgot: I tested Mint 20.1 with a live disk and everything works fine, including suspend and resume, just like it used to on my 19.3 installation until earlier this month.
It's possible something happened during an update. That's one reason we encourage people to take Timeshift snapshots.
A woman typing on a laptop with LM20.1 Cinnamon.
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

I am going to close this. Before I do, here's an update: Resume still does not work, even after applying all the tips and studying all relevant posts here and on other forums. I still cannot purge my Nvidia drivers. I tried sudo apt install --fix-broken, which ended with a bunch of errors

Then I tried sudo apt-get -f install and sudo apt reinstall, both of which didn't work.

I found https://stackoverflow.com/questions/474 ... pendencies and followed up on suggestions in that thread:
ocor61@ambrosia:~$ sudo dpkg --configure --force-overwrite -a
ocor61@ambrosia:~$ sudo dpkg -r libnvidia-gl-450
ocor61@ambrosia:~$ sudo apt-get install libnvidia-gl-450
None of those worked.

Then I tried to purge all relevant nvidia drivers:

Code: Select all

ocor61@ambrosia:~$ sudo apt purge libnvidia-gl-450 libnvidia-ifr1-450 nvidia-driver-450 nvidia-driver-440 nvidia-driver-430 nvidia-driver-418
and rebooted

That seemed to have worked as I didn't get any error message anymore. However, when trying to install nvidia-driver-390 (my recommended driver), these error messages occurred:

Code: Select all

E: Unable to correct problems, you have held broken packages.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
E: Unable to lock the download directory
I am not willing to spend more time on this and although I don't want to, I see myself forced to delete my installation and install Mint 20.1.

It has dented my belief in FOSS and Linux Mint somewhat. That said, Microsoft Windows has done so a lot more often, so I'm staying with Linux...
rene
Level 17
Level 17
Posts: 7543
Joined: Sun Mar 27, 2016 6:58 pm

Re: Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by rene »

ocor wrote:
Wed Jun 02, 2021 7:40 am
It has dented my belief in FOSS and Linux Mint somewhat.
What it should have really dented your belief in is in installing non-open hence poorly integrated drivers such as the binary nvidia one :)
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: [CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

What it should have really dented your belief in is in installing non-open hence poorly integrated drivers such as the binary nvidia one
I stand corrected, @rene! I still firmly believe in FOSS and GNU/Linux. I hereby vow to never install poorly integrated proprietary drivers ever again. Ever.
rene
Level 17
Level 17
Posts: 7543
Joined: Sun Mar 27, 2016 6:58 pm

Re: [CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by rene »

That reply may be meant cynically; if so, can assure you am not of the Free Software extremist wing: it's just that nvidia specifically is a bit of a trigger for me. Well, admittedly, any binary driver, but nvidia is certainly one of the worst. Do always feel somewhat of a need to point out IT being the problem in cases like this, and not so much the 99% open code surrounding it...
mikeflan
Level 7
Level 7
Posts: 1626
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: [CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by mikeflan »

I'm not surprised you are staying with Linux. Kind of a no brainer :)

If you have the disk space please consider running Timeshift. You will find that you won't Timeshift backwards for months, but when you do it will save you more than a days worth of work - maybe much more.
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: [CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

@rene No, that was not meant to be cynical at all. Sorry if it came across like that. And it didn't even enter my mind that you might be a Free Software extremist. Honestly! :)
I appreciate your remark. Admittedly, I have another - much older- laptop with an ATI Radeon graphics card, which has been running smoothly for a long time with no extra drivers installed. The lesson here is not only to not install crappy closed-source proprietary drivers anymore, but also to not buy a pc with an Nvidia card installed.
ocor
Level 1
Level 1
Posts: 27
Joined: Mon May 04, 2020 7:03 am

Re: [CLOSED, NOT SOLVED] Resume from Suspend stopped working; instead, the system boots as if it was shutdown

Post by ocor »

@mikeflan I have an old 500 GB external HDD, which I am going to use for TimeShift backups of my new install. I should have done so much earlier, but didn't have the disk space then.

And yeah, I may encounter issues now and again, but these are mainly due to my lack of knowledge, I guess. To be honest, I do love Linux and Mint especially!
Post Reply