Skip to content

Instantly share code, notes, and snippets.

@mikaelhg
Created May 5, 2020 15:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelhg/9b6dfbf1ff66b899e6132c808c55e4e9 to your computer and use it in GitHub Desktop.
Save mikaelhg/9b6dfbf1ff66b899e6132c808c55e4e9 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 suspend / sleep / wakeup NVidia CUDA / NVENC / NVDEC error
#! /bin/sh
# Workaround for broken CUDA/NVENC/NVDEC after suspend.
# This file now lives in /lib/systemd/system-sleep/nvidia-resume .
# Remember to chmod 755 it.
PATH=/sbin:/usr/sbin:/bin:/usr/bin
case $1 in
post)
rmmod nvidia_uvm
modprobe nvidia_uvm
;;
esac
@mikaelhg
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment