6

I have a file: /etc/pm/sleep.d/85rmNvidiaModule. In it I have:

#!/bin/bash
case $1 in
    suspend)
        echo "Oh, this time we are doing a suspend to RAM. Cool!"
        sudo modprobe -r nvidia-uvm; optirun true
    ;;
    *)
        echo "Not doing anything useful"
    ;;
esac

This works well when I use pm-suspend, but does not work when I use the power button to suspend or when I do:

dbus-send --system --print-reply \ 
--dest=org.freedesktop.login1 /org/freedesktop/login1 \
"org.freedesktop.login1.Manager.Suspend" boolean:true

So the question is how do I run a script when I suspend using gnome-shell 3.14.1.

Also I am on Debian GNU/Linux jessie/sid, and most packages are pretty cleanly installed.

Braiam
  • 35,380
  • 25
  • 108
  • 167
amir
  • 161
  • 2

0 Answers0