Gammy: Adaptive Screen Brightness Tool For Linux

Gammy auto linux brightness

Gammy, an adaptive screen brightness GUI tool that that was originally only available for Microsoft Windows, was ported to Linux (X11 only) recently.

The Qt5 application takes a screenshot periodically, then gradually adjusts the pixel brightness based on the screen (screenshot) contents, dimming the screen if its content is too bright, or brightening the screen if its content is too dark. This is especially useful for reducing eye strain when switching between dark and light windows.

The Gammy settings allow setting a minimum and maximum brightness, and an offset (the offset adds to the screen brightness, with a higher value meaning a brighter image). Also, because it conflicts with Redshift, the Gammy developer decided to add basic temperature control, which you'll also find in the application settings.

Here's everything you can tweak from the Gammy settings:

  • Brightness range (minimum and maximum brightness that Gammy can set)
  • Offset brightness calculation (higher means better image)
  • Adaptation speed, which controls how quickly the brightness adapts when a change is detected
  • Threshold controls how much of the screen has to change to trigger an adaptation
  • Screenshot rate sets the rate at which screenshots are taken to determine the brightness that should be used for the screen
  • Set the desired screen color temperature with optional temperature schedule (start and and time with the start and end temperature, as well as configurable adaptation speed)

Gammy adjusts the brightness by changing the gamma ramps, which the developer considers the most hassle free method, but this has the downside of losing contrast on screens with bad contrast. In a comment on Reddit, Fushko, the app developer, said that he's considering reducing the backlight instead of adjusting the gamma for devices that support it.

It's worth noting that Gammy has been ported to Linux recently, so expect to find some bugs.

The Gammy dev made a post on r/Linux recently, announcing the Gammy Linux port and asking for feedback, which you may want to check out.

Install Gammy on Linux (X11 only)


If you're a Windows user, you can download Gammy from its website. On Linux though, you'll have to build Gammy from source (see below).

[Update] Gammy is now available via AUR for easier Arch Linux installation.

1. Install the packages required to build Gammy on Linux (Mesa-libgl and Qt5), as well as Git to get the latest code of the app.

On Debian/Ubuntu or Fedora you can install these packages as follows:

  • Debian / Ubuntu / Linux Mint / Pop!_OS, etc.:
sudo apt install git build-essential libgl1-mesa-dev qt5-default libxxf86vm-dev libxext-dev

  • Fedora (not tested; note that Fedora uses Wayland by default, which is not supported by Gammy; you'll need to login to an Xorg session to use it):
sudo dnf install git mesa-libGL-devel qt5-devel libXxf86vm-devel libXext-devel

2. Build and install Gammy (from Git):

git clone https://github.com/Fushko/gammy.git
cd gammy
qmake Gammy.pro
make
sudo make install

On some Linux distributions, if you get an error message saying qmake: command not found, even though Qt5 (devel) is installed, you'll have to run qmake-qt5 Gammy.pro instead of qmake Gammy.pro.

Also, on some Linux distributions (e.g. Ubuntu 18.04, but not on Ubuntu 19.04), you may get an error when running qmake Gammy.pro, with a message complaining about an element called "PlaceholderText" - in such cases the Gammy readme mentions opening ui_mainwindow.h with a text editor and deleting the offending lines (the line numbers should be shown when you get the error).

The Gammy executable is installed to /opt/gammy/bin, so you'll need to type /opt/gammy/bin/gammy to run it. You can make a symbolic link for /opt/gammy/bin/gammy to /usr/local/bin/ so you can launch it by typing only the executable name, by using:

sudo ln -s /opt/gammy/bin/gammy /usr/local/bin/

After this you'll be able to launch Gammy by typing gammy in a terminal or run dialog (Alt + F2). You will not find Gammy in your applications menu!

3. [Optional] Add Gammy to startup.

In most cases you'll want Gammy running on startup, so it automatically adjusts your screen brightness as soon as you login. Add it to startup by opening Startup Applications (or equivalent) from your applications menu, click Add to add a new startup item, and use this as the command: /opt/gammy/bin/gammy (you may also use just "gammy" if you created a symbolic link for it somewhere in your $PATH).

You can also do this manually, by creating a file called gammy.desktop in ~/.config/autostart/ with the following contents:

[Desktop Entry]
Type=Application
Exec=/opt/gammy/bin/gammy
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Gammy adaptive screen brightness