Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an automatic login and no screensaver password. I would easily have no password at all, but I am keeping it for the things that require root in hope of using alternative methods to get my convenience.

I removed the password from my keyring, because it does not get unlocked during the automatic login. I don't store anything in my keyring except some personal music and personal email anyway, also I am tech savvy and am more capable of protecting my computer than most.

The one place that still annoys me is when I put the computer to sleep and come back the next day, it asks for a password. I do this whenever I have a multi-day project I am working on (I am a programmer), so I don't have to launch all my windows back.

How can I have an automatic login when the computer wakes up from sleep?

share|improve this question
up vote 1 down vote accepted

If you mean you are trying to disable the screen lock that occurs when resuming from a suspend, you can do:

sudo vi /etc/default/acpi-support

Find the line that begins with LOCK_SCREEN= and replace it with:


You will have to reboot once. Then you can suspend and resume without a password prompt.

share|improve this answer
I am not allowed to write anything. How can I deal with this problem? Thx – Casper LI Jan 26 '14 at 2:14
didn't work for me, but the answer of Casper Li worked – Tim Aug 17 '15 at 4:20
  1. Search "lock" enter image description here

  2. turn "OFF" the "Lock". enter image description here

share|improve this answer

I think there is no easy way to that just by configuration , (I think) it needs a custom event listener, to listen for sleeping and wakeup events. there is a project called d-bus is used to write your custom event listener, its C based but have alot of wrapper for popular languages. I hope that it help you.

share|improve this answer

I think that Ubuntu Tweak ( ) allows to do that :)

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – stephenmyall Aug 21 '12 at 10:32

This command does right that:

dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend

You can create a custom launcher with this command by right clicking on your desktop.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.