Results 1 to 3 of 3

Thread: Getting Ubuntu to automatically suspend on battery low (command-line)

  1. #1
    Join Date
    Aug 2012
    Beans
    6

    Getting Ubuntu to automatically suspend on battery low (command-line)

    I've been using Ubuntu without a desktop environment on one of my computers - just pure command-line without even an X server installed. I need to keep it this way. What surprises - completely throws me - is that there is very little to no automatic power management going on; I need the computer to automatically and gracefully power off or hibernate when the laptop battery reaches a critically low level. Instead, the machine abruptly shuts down and causes filesystem corruption every time.
    How is it that there is no official Linux (or even Ubuntu- specific) power management driver that works in or out of a graphical session? Windows handles handles events like this seamlessly by hibernating... but c'mon, do I really need to run a desktop under Linux to get the full benefits of automatic power management? If so, this should be treated as a bug or serious deficiency.
    How can I get Ubuntu 12.04 and up to automatically shut down gracefully from the command line? The solution cannot conflict with desktop power managers, since I use another computer with X, but spend a lot of time there in pure command-line too.

  2. #2
    Join Date
    Aug 2012
    Location
    In front of the computer
    Beans
    159
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Getting Ubuntu to automatically suspend on battery low (command-line)

    Take a look at laptop-mode-tools. It's a power-saving solution that doesn't require any graphical DE. There's an option to auto-hibernate on low battery in /etc/laptop-mode/conf.d/auto-hibernate.conf. An option to shut down should be in one of LMT config files(in /etc/laptop-mode/). If not you can change the hibernate command in auto-hibernate.conf to a shutdown command.

  3. #3
    Join Date
    Aug 2012
    Beans
    6

    Re: Getting Ubuntu to automatically suspend on battery low (command-line)

    Thanks. I shall try that!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •