Xpose is a tool that captures the screen, sorts the pixel values, and then configures the output to compensate for a dim picture.
Download the deb package from the releases page and install it.
xpose <output> [<framerate>] [<smoothing>] [<percentile>] [<width>] [<height>]