I have this problem where if my battery runs low Ubuntu shows a dialog warning me the computer will soon hibernate, and if I close the lid and then plug it and open the lid to resume my work, Ubuntu will wake up but then hibernate again, even though the laptop is now plugged.
Is there a setting to prevent this?