icc-brightness
icc-brightness copied to clipboard
Support for Archlinux
Thank you so much for this tool, it saved my eyes!
On Archlinux, the last step isn't correct, the .destkop file should be copied to /etc/xdg/autostart or ~/.config/autostart (path usr/share/gnome/autostart/ doesn't exist)
@ncharles did you manage to get it to work on your arch installation?
in my case I am getting the following errors when I set the icc-brightness watch to run:
$ icc-brightness watch
ERROR: device-make-profile-default
Traceback (most recent call last):
File "/usr/local/bin/icc-brightness", line 136, in main
icc_brightness_apply()
File "/usr/local/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/local/bin/icc-brightness", line 85, in icc_brightness
subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_24000_24000.icc']' returned non-zero exit status 1.
ERROR: Error during call to icc_brightness
Traceback (most recent call last):
File "/usr/local/bin/icc-brightness", line 114, in handler
icc_brightness_apply()
File "/usr/local/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/local/bin/icc-brightness", line 85, in icc_brightness
subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_22800_24000.icc']' returned non-zero exit status 1.
ERROR: b'The profile was not added in time\n'
ERROR: Error during call to icc_brightness
Traceback (most recent call last):
File "/usr/local/bin/icc-brightness", line 114, in handler
icc_brightness_apply()
File "/usr/local/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/local/bin/icc-brightness", line 85, in icc_brightness
subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_2400_24000.icc']' returned non-zero exit status 1.
ERROR: b'The profile was not added in time\n'
ERROR: Error during call to icc_brightness
Traceback (most recent call last):
File "/usr/local/bin/icc-brightness", line 114, in handler
icc_brightness_apply()
File "/usr/local/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/local/bin/icc-brightness", line 85, in icc_brightness
subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_24000_24000.icc']' returned non-zero exit status 1.
ERROR: b'The profile was not added in time\n'
the way I am installing it is with the following personally made PKGBUILD:
pkgname=icc-brightness
pkgver=1.0
pkgrel=0
pkgdesc="Adjust OLED screen brightness."
arch=("any")
url="https://github.com/udifuchs/icc-brightness.git"
license=('MIT')
depends=('lcms2')
source=("https://github.com/udifuchs/icc-brightness.git")
sha1sums=('SKIP')
build() {
git clone "$source"
cd "$pkgname"
make
}
package() {
cd "$pkgname"
mkdir -p $pkgdir/usr/local/bin
install ./icc-brightness-gen $pkgdir/usr/local/bin/
install ./icc-brightness $pkgdir/usr/local/bin/
install ./icc-brightness.desktop $pkgdir/etc/xdg/autostart
}
ok it seems that problem solved by installing the colord-kde package
i manually made it work (make, and then copy to the final location) I didn't use colord-kde (i'm on gnome+wayland), but i think it was gnome-color-manager
yes, you need either colord-kde or gnome-color-manager or any other icc profile loading application e.g. xiccd in order to work. In any case I have added it as a dependency on the above PKGBUILD. Thanks for the feedback.
I am also attaching the PKGBUILD here in case someone else wants to use it. I am not creating any autostart file though. This can be done from the user depending which desktop manager is using since the one in the source code is dedicated to gnome environment.
# Maintainer: TheodoreT
pkgname=icc-brightness
pkgver=1.0
pkgrel=0
pkgdesc="Adjust OLED display brightness by applying ICC color profiles."
arch=("any")
url="https://github.com/udifuchs/icc-brightness.git"
license=('MIT')
depends=('lcms2' 'colord-kde')
optdepends=('gnome-color-manager: Set of graphical utilities for color management to be used in the GNOME desktop.'
'xiccd: A simple bridge between colord and X. It allows non-Gnome and non-KDE desktop environment to load and apply icc profiles.')
source=("https://github.com/udifuchs/icc-brightness.git")
sha1sums=('SKIP')
build() {
git clone "$source"
cd "$pkgname"
make
}
package() {
cd "$pkgname"
mkdir -p $pkgdir/usr/local/bin
install ./icc-brightness-gen $pkgdir/usr/local/bin/
install ./icc-brightness $pkgdir/usr/local/bin/
}
@TheodoreT I improved your PKGBUILD and added it to AUR. See https://aur.archlinux.org/packages/icc-brightness-gnome-git
Note that I created a hard dependency on GNOME, because I don't have KDE and could not verify if it works there. Somebody has to create a separate icc-brightness-kde package, then.
@udifuchs I think this issue is solved now (at least for the GNOME folks) and could be closed.