Binary package “sleepd” in ubuntu precise

puts an inactive or low battery laptop to sleep

 This is a daemon to put a laptop to sleep if it is not being used or
 if the battery is low.
 .
 It supports HAL, APM, and ACPI, although external programs must be used
 to actually put the system to sleep.