Userspace Advanced Configuration and Power Interface event daemon

Latest on Hackage:1.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by Dino Morelli
Maintained by Dino Morelli



Userspace Advanced Configuration and Power Interface event daemon (Haskell)


uacpid is a daemon designed to be run in userspace that will monitor the local system's acpid socket for hardware events. These events can then be acted upon by handlers with access to the user's environment.

An example of why you need this: Suppose you want to have a hardware event change the active X displays, like a laptop external monitor function button. Some tools to achieve this display change require the logged in user's DISPLAY and other settings that may be difficult or impossible to gain access to from acpid scripts.

Another example is media control function buttons, like play/pause or next/previous track for a music player.

uacpid is running as you and is getting the hardware events reported by the system's acpid. uacpid can then act on the events on your behalf, with your environment.

uacpid will respond to SIGHUP by reloading the event handlers and reestablishing its connection to the acpid socket. Changes to the config file will require that uacpid be restarted, it will not reload the config on SIGHUP.

Handler syntax closely follows that of acpid. Users familiar with acpid should have no problem here. An example is included.

Note that uacpid requires acpid. It must be installed and running.

(Please see the uacpid man page for more detailed info)

Getting source

  • Download the cabalized source package from Hackage
  • epub-tools is available for Arch Linux from the AUR
  • Get the source with darcs: $ darcs get
  • If you're just looking, browse the source

Getting started developing:

This daemon is designed to make files for itself in ~/.uacpid/ the first time it's run. To assist with development, there is a script which will build a development installation and execution environment in /tmp/uacpid-dev/ for you.

To initialize for development:

$ bin/uacpid-dev-setup

Once that's completed, it can be run like this:

$ bin/uacpid-dev

And once you have it, building the usual way:

$ cabal configure
$ cabal build
$ cabal install


Build and install with cabal-install: $ cabal update ; cabal install uacpid


Dino Morelli <>


1.2 (2015-06-30)

  • Added a lower bound for mtl dep
  • Simplified some config error handling
  • Decided to not force time >= 1.5 for now
  • Reformatted cabal file a bit

1.1 (2015-06-28)

  • Replaced deprecated Control.Monad.ErrorT with ExceptT
  • Fixed defaultTimeLocale import problem
  • Now getting version from cabal info using Paths_ code
  • Updated cabal info
  • Moved copyright date up to 2015
  • Adjustments to documentation (2011-03-18)

  • Fixed code that was leaving zombie child processes by not waiting for them
  • Changed listenAcpi delay time from 0.25 secs to 2 secs
  • Refined developer and testing environment creation scripts
  • Updated and clarified some documentation

1.0.1 (2010-04-06)

  • Fix for a recent change in how System.Directory.doesFileExist behaves with sockets
  • Fixes for new GHC 6.12.x unused do binding warnings
  • Various cosmetic changes of copyright dates and version strings
  • Added HCAR info

0.0.4 (2009-07-19)

  • Another try at fixing the broken man page installation problem on Arch Linux.

0.0.3 (2009-07-15)

  • Fix for installation problem on Arch Linux. The man page was not getting installed.

0.0.2 (2009-07-15)

  • Initial release
comments powered byDisqus