ubuntu aptdemon shutsdown when idle

Asked by Simon Cropper on 2010-10-17


I have noticed today that when left idle one of my main machines with Ubuntu 10.04 automatically reboots.

The sequence is as follows...
1. I start the main computer and leave so other computers can see data on Samba Shares or NFS.
2. Access computer with Windows Vista Business Laptop.
3. <1 hour later I find the main file computer is unavailable. When investigating I find it has reboot and is hung at the BIOS password.
4. I have tried this several times and found that it does it regardless of whether any program is running.

Anyone have any ideas?

System of computer left idle with files...
Ubuntu Release 10.04 LTS
Kernel Linux 2.6.32-25-generic-pae
Gnome 2.30.2

I have checked my log and seen an suspicious comment that AptDemon requested a shutdown. I ran 'sudo aptd --debug' in terminal and got the following responses...

23:19:47 AptDaemon [INFO]: Initializing daemon
23:19:47 AptDaemon [DEBUG]: Setting up worker thread
23:19:47 AptDaemon [DEBUG]: Daemon was initialized
23:19:47 AptDaemon [DEBUG]: Using inactivity check
23:19:47 AptDaemon [DEBUG]: Waiting for calls
23:20:48 AptDaemon [DEBUG]: Checking for inactivity
23:21:48 AptDaemon [DEBUG]: Checking for inactivity
23:22:48 AptDaemon [DEBUG]: Checking for inactivity
23:23:48 AptDaemon [DEBUG]: Checking for inactivity
23:24:48 AptDaemon [DEBUG]: Checking for inactivity
23:24:48 AptDaemon [INFO]: Quiting due to inactivity
23:24:48 AptDaemon [INFO]: Shutdown was requested
23:24:48 AptDaemon [DEBUG]: Quitting main loop...
23:24:48 AptDaemon [DEBUG]: Exit

This behavior only appears to have started today after some upgrades yesterday. Any ides how I can isolate the problem and stop the system shutting down?

Note that if I am at the keyboard typing the system does not shutdown. It only appears to happen if the keyboard and mouse is idle.

Cheers Simon

Question information

English Edit question
Ubuntu aptdaemon Edit question
No assignee Edit question
Solved by:
Simon Cropper
Last query:
Last reply:
A. Denton (aquina) said : #1

I guess you should configure the the timeout values for Ubuntu.

Maybe this helps too:

Simon Cropper (scropper) said : #2


Thanks for the reply. I had already seen these posts but had decided after investigation that they were not the same problem. The rapid shift in behaviour appeared to be related to a recent update or something as the system had been stable for quite a while. Both the bugs mentioned relate back to a BIOS incompatability - an understandable problem for a new install but not a old stable system.

Continuing on with my testing I noticed that if logged on as a different user (i.e. not me) the computer did not shutdown. Consequently I surmised that the problem was a corrupt configuration file or something in my home folder. as I make complete backups of my home folder every night, I reverted to Friday's backup and the problem appears to be fixed.

I left the computer idle for the last 6 hours and it stayed on. In the previous 5 hours, prior to the restoration of the home folder, the system would have rebooted many many times.

So the problem appears to be solved. I suppose the lesson is backup and backup often!

Cheers Simon

Simon Cropper (scropper) said : #3

Problem Solved by reverting to backup of home folder. I presume that a configuration file had become corrupted.