"SOLVED" : SUSPEND , RESUMING and WAKEUP with nvidia370.28

Hi all

How to solve the issues of suspending , hibernating and wakeup with nvidia-370.28

first step :
Just open this file
sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla and enable hibernation


[Disable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Disable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

second step :

on /etc/default/grub :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1 vga=0 rdblacklist=nouveau nouveau.modeset=0 "

third step :
sudo gedit /etc/initramfs-tools/modules and add the following modules

nvidia
nvidia_modeset
nvidia_uvm
nvidia_drm

fourth step :

sudo update-initframs -k “yourkernel” -u

fifth step :

reboot and you are done .

Note : if are not on Ubuntu follow this:

PolicyKit Local Authority policy to enable suspend and hibernate for all users. Should be installed into /var/lib/polkit-1/localauthority/90-mandatory.d or /etc/polkit-1/localauthority/90-mandatory.d

file to edit under the directory mentionned : enable-suspend-and-hibernate.pkla
copy this text and save and continue other steps

[Completely disable suspend and hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend;org.freedesktop.upower.hibernate;org.freedesktop.login1.suspend*;org.freedesktop.login1.hibernate*
ResultAny=nyes
ResultInactive=yes
ResultActive=yes

regards
Mounir

PS : I hope it works for you
AMEN

You never mentioned the file’s name.

great thanks Hussam . i added it .

Mounir, is this possibly a typo in your script?:

third step :
sudo gedit /etc/initramfs-tools/modules and add the following modules

nvidia
vidia_modeset
nvidia_uvm
nvidia_drm

you write “vidia_modeset”, I’m assuming it should be nvidia_modeset

johnatananderson
yes …it is a typo error.
great thanx

how can I run this command? When I tried to this command
"sudo update-initframs -k “yourkernel” -u "

Terminal shows me this error.
“update-initframs: command not found”
Can somebody help me? I am new to Linux world.

That’s a typo
sudo update-initramfs -u
should be sufficient.

The solution doesn’t work for ubuntu 18.04

Step 1.

[Disable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Disable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes

step 2.
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nvidia-drm.modeset=1 vga=0 rdblacklist=nouveau nouveau.modeset=0”

step 3.
nvidia
nvidia_modeset
nvidia_uvm
nvidia_drm

step 4.
update-initramfs -u

and after reboot I still see black screen with a message
“alarms can be up to one month in the future”

I want to second the “doesn’t work for ubuntu 18.04”. Any other ideas for that OS?

@Mounir,
Thanks so much for your time. Just a couple of notes regarding grub and initramfs.

  1. after updating grub run:
    sudo update-grub

  2. the update-initramfs options I typically use are:
    sudo update-initramfs -u -k all

Just to make sure all installed kernels get updated. I usually only have a couple but it’s helpful.

For the “doesn’t work on ubuntu 18.04” issues, I suspect it’s a conflict between the NVIDIA driver and the Nouveau driver due to both being installed at the same time. try googling nouveau conflicts with nvidia to see if anything helps. I’m also having suspend, hibernate, resume issues on my 18.04 based distro.

It’s unfortunate that the distros seems to have removed all the configuration to support suspend, hibernate, resume rather than just allowing users to turn it off via gui configuration options if it doesn’t work for their computers. This causes the rest of us to have to figure out how to get it all put back in and up to date with current versions of what ever power management system is being used by our distros.