# Install notes

## Software Requirements

To compile and run DDCcontrol, you need to have these packages installed:

- libxml2

- gtk+>=2.4

In addition to the library packages, you also need the development packages, which are not usually installed. For example, on Debian, their names are `libxml2-dev` and `libgtk-3-dev`. Other distributions probably have similar package names. On Fedora Core 5, you will also need `gnome-panel-devel` package.

You don't need gtk+ if you don't plan to use the Gnome GUI.

## Download the sources

Clone the source repositories from GitHub:

    # git clone https://github.com/ddccontrol/ddccontrol.git
    # git clone https://github.com/ddccontrol/ddccontrol-db.git

You should now have two directories, `ddccontrol` and `ddccontrol-db`.

Alternatively, download the latest source tarballs from the releases page and unpack them with:

    # tar xvfz ddccontrol-X.Y.tar.gz
    # tar xvfz ddccontrol-db-YYYYMMDD.tar.gz

## Compile and install

If you are building from a Git checkout, you must first generate the `configure` script using the autotools build system:

    # ./autogen.sh

To compile and install, type:

    # ./configure
    # make
    # su root
    Password: <root password>
    # make install

You need to do this in `ddccontrol` and `ddccontrol-db` directories.

If you set the `--prefix` parameter when configuring one package, you must set it to the same value when configuring the other.

## Configure `/dev/i2c-*` devices

DDCcontrol only uses userspace I2C access through `/dev/i2c-*` devices. Legacy direct PCI memory access and AMD ADL support have been removed, and USB-connected DDC/CI displays are not supported yet.

The kernel graphics driver must expose the monitor DDC bus as an I2C adapter, and the `i2c-dev` module must be loaded. To load it manually, type as root:

    # modprobe i2c-dev

If you want to automatically load this module when Linux starts, see your distribution's documentation. DDCcontrol also installs a `modules-load.d` configuration file for this purpose on systems that use systemd.

To allow standard (i.e. non-root) users to use DDCcontrol, grant read and write access to the relevant `/dev/i2c-*` devices. Many distributions do this with an `i2c` group, for example by adding your user to that group. For quick local testing, this can also be done by typing as root:

    # chgrp i2c /dev/i2c-*
    # chmod g+rw /dev/i2c-*

### Kernel configuration options

If `i2c-dev` or the relevant graphics driver support is not available with your kernel, you can build your own kernel with the following options turned on (we recommend building them as modules):

- Devices drivers I2C support .
- Devices drivers I2C support I2C device interface .
- Devices drivers Graphics support Direct Rendering Manager .
- and a specific driver for your graphics card.

## Installation on Debian (and derivatives)

The ddccontrol and ddccontrol-db packages are available in Debian (and derivatives). You simply need to install the ddccontrol package and all the proper dependencies will be installed along with it. For example:

    # apt-get install ddccontrol