Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does it work? #2

Open
nextlevelshit opened this issue Oct 20, 2018 · 2 comments
Open

How does it work? #2

nextlevelshit opened this issue Oct 20, 2018 · 2 comments

Comments

@nextlevelshit
Copy link

@udifuchs I am not sure, if I got you wrong. First, thank you for handing us a solution for that missing feature in any linux distribution for OLED displays.

I am using a Lenovo Yoga X1, 1. Gen and Ubuntu 18.04. Additionally I have installed a gnome shell, but using it rarly.

So I stumbeled upon your code, but I am not sure, if I understood the installation instructions:

  1. Clone, Copy or download that repository
  2. Change directory to your code
  3. Hit make in the console
  4. Execute your script ./icc-brightness

That's it? What does the output say about the success? For my configuration it is not working. So, could you please describe what your script is doing? So, I could find out whats going wrong.

Thank you! Kudos!

@yulolimum
Copy link

@nextlevelshit

Executing the icc-brightness command by itself doesn't do anything. I believe it just outputs available commands.

You have to either use one of the commands in the output (e.g. ./icc-brightness watch) or setup and autostart script as described in the readme.

@masterleo
Copy link

PLEASE UPDATE THE README.md FILE TO EXPLAIN HOW GIT WORKS :

ICC Brightness

Control OLED display brightness by applying ICC color profiles.

Introduction

This tool is a work-around for displays whose brightness contol is not
supported by the linux kernel. It preforms well on OLED displays,
since these have very dark black point and their power consumption is
relative to the brightness of the viewed content.

This tool can be used on an LCD display, but in that case you really want
to control the brightness directly using the display backlight.

Specifically icc-brightness was developed for the
Lenovo ThinkPad X1 Yoga OLED display.

Download

You can install Git for easily keeping your copy up to date.
If you don’t want Git, read below on how to get the source without Git.
This is an example for installing Git on Debian/Ubuntu:

sudo apt install git

For Fedora users:

sudo dnf install git

Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:

$ mkdir Apps
$ cd Apps
$ git clone https://github.com/udifuchs/icc-brightness.git

$ cd Apps/icc-brightness

Build and install

The build requires the liblcms2 development package:

$ sudo apt install liblcms2-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  liblcms2-dev
...

Build and run the tool to see all options:

$ make
gcc -W -Wall icc-brightness-gen.c -l lcms2 -o icc-brightness-gen
$ ./icc-brightness
Control OLED display brightness by applying ICC color profiles.
  
icc-brightness brightness max-brightness - set brightness manually
icc-brightness apply - apply brightness from system setting
icc-brightness watch - continuously update to system setting
icc-brightness clean - remove all profiles generated by us

You can install to auto-start a daemon when logging-in to a Gnome session:

$ sudo make install
cp icc-brightness-gen /usr/local/bin/
cp icc-brightness /usr/local/bin/
cp icc-brightness.desktop /usr/share/gnome/autostart/

The daemon will start on your next login.
You can change brightness using the brightness key or any other method
that controls the display "backlight".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants