Solution for NVIDIA sleep/wake issue in Linux

Hi guys. For once, my obsessive behaviour has been fruitful.

It seems that if you ask around, there is a page (Linux: ACPI: Fix problems with Suspend, Resume, and Missing devices using acpi_osi=) where the solution is detailed for all of us. I imagine that there is a minimal chance that it will go down before you get to read this so I will summarize the solution:

  1. Remove whatever you already entered into /etc/default/grub
  2. Create a text file which contains the following script:
#!/bin/sh
VERSION="$(sudo strings /sys/firmware/acpi/tables/DSDT | grep -i 'windows ' | sort | tail -1)"
echo 'Linux kernel command-line options required: acpi_osi=! "acpi_osi='$VERSION'"'
read -p "Do you want to add this setting (y/n) ? " answer
if [ x$answer != xY -a x$answer != xy ]; then
  exit 1
fi
echo "Existing Command Line: ` sed -n '/.*linux[[:space:]].*root=\(.*\)/{s//BOOT_IMAGE=\1/ p;q;}' /boot/grub/grub.cfg `"
if grep -m 1 'acpi_osi=Windows' -q /etc/default/grub; then
  echo "There is already an entry; please remove it from /etc/default/grub and redo 'sudo update-grub' then re-run this script"
  exit 2
fi
sudo sed -i "s/^\(GRUB_CMDLINE_LINUX=.*\)\"$/\1 acpi_osi=! \\\\\"acpi_osi=$VERSION\\\\\"\"/" /etc/default/grub
echo "Modified Command Line: ` sed -n '/.*linux[[:space:]].*root=\(.*\)/{s//BOOT_IMAGE=\1/ p;q;}' /boot/grub/grub.cfg `"
sudo update-grub
  1. Save file as [insert_name_here].sh
  2. In the console/command prompt/terminal, run “sudo chmod +x [insert_name_here].sh” (without the quotes)
  3. Then type in “./[insert_name_here].sh” (without the quotes)
  4. The script will detect what you need to enter into /etc/default/grub and offer to enter it for you. It will also update grub for you.
  5. Restart

Worked for me! In fact, it is the only damned thing that ever worked for me.

1 Like

I’m on Mint 20.2 and this did not work for me. Still receive black screen when resuming from sleep on Dell T3620 with Nvidia 750Ti

Thanks, Its worked for me in OS Arch Linux, My Laptop Samsung NP300e5a-s06ru, on the Nvidia Geforce 520MX, Driver version nvidia-390xx-utils 390.154-2.
Before this kernel parameter GRUB_CMDLINE_LINUX=" acpi_osi=! "acpi_osi=Windows 2009""
there was an error:
nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device VGA-0
and sometimes the laptop would not wake up from sleep mode