Gammy: Adaptive Screen Brightness Tool For Linux

Gammy adaptive Linux screen 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 allows 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.

If you expand the Gammy settings window by dragging its bottom right-hand side corner, some hidden settings are revealed, which allow setting the speed (how fast the brightness changes), threshold (how much the screen has to change in order to trigger a brightness change), and polling rate in milliseconds (the time to wait before taking a screenshot).

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 only 11 days ago, so expect to find some bugs. On my Ubuntu 19.04 desktop (but not on Ubuntu 18.04), its settings window can't be moved unless holding the Super key, then dragging the window. Also, closing the settings window also closes Gammy so you'll have to minimize the settings instead (with the minimize button basically working as a close button), though this is apparently the intended behavior, and not a bug. [Update] These issues have been fixed in the "develop" branch. The actual screen brightness adjustment works with no issue though.

The Gammy dev made a post on r/Linux yesterday, 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

  • 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

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