0

I'm running 15.04 along with MythTV. The computer can suspend but freezes on resume. I've traced this down to a problem with mythbackend and module saa7164. I've written a script that I can manually run that will kill mythbackend and then unload module saa7164. The script needs sudo privileges to modprobe saa7164. I've also written a script that reloads module saa7164 and then resumes mythbackend. When I do things manually I can run the first script, then suspend, then resume, run the second script, and everything works fine.

My problem is I want these to run on suspend/resume automatically and not prompt for a password. I've tried every solution that I could find. I've placed test scripts in /etc/pm/sleep.d and tried the solution posted in this link as well:

Ubuntu 15.04 Suspend doesn't run `pm-suspend`

1 Answers1

0

NOTE THIS IS NOT MY FIX AND WAS SIMPLY A RE-DIRECT. I AM NOT AT ALL IMPLYING THIS IS A DUPLICATE, BUT THE FIX HAS MULTIPLE USES. THIS FIX WAS TAKEN FROM HERE:

The approach to solve your problem is to put your user in sudoers file, like you can see.

Open terminal window and type:

sudo visudo

In the bottom of the file, type the follow:

username ALL=(ALL) NOPASSWD: ALL

Where username is your username in your system. Save and close sudoers file (if you haven't changed your default terminal editor (you'll know if you have), press ctl+x to exit nano (but note that the screenshot below shows vim), and it'll prompt you to save).

enter image description here

After this, you can, in terminal window, type sudo <Whatever you want>, without being prompted for the password.

This only applies, to sudo command in terminal window. For example, when you try to install a package in software center, you will be prompted to insert your password, like you can see in the next Screenshot.

enter image description here

I think this is what you want.

David
  • 3,367