Is there anyway to enable Blue Light Filter without having to install RedShift on Dom0? I study/work for long hours everyday and the blue light its so annoying. If there’s a way, please, let me know. And i think it would be a good idea to add this function.
get a better monitor.
turn on 45K colourset
Why don’t you want to install redshift? It’s small and effective
Because they only have to set their colour range on their monitor, don’t need to install extra software to have more overhead for no reason.
There is a whole family of codes named ‘sct’.
A very lightweight one was discussed here in 2024 (https://forum.qubes-os.org/t/study-this-38-and-85-lines-of-sctd-sh-and-sct-c-to-see-if-it-is-or-make-it-safe-to-be-used-in-dom0-a-solution-to-the-much-code-redshift-used-by-many-qubes-users/28175)
There seem to be several more on GitHub.
I have not tested any of them, but the one above looks harmless… (although I am not an expert, and am not to be trusted!)
Not possible on a laptop. There are filters to put on the screen for this though, or glasses (you do not need to need “real” glasses to use those).
It is possible on some laptops. It’s set either in the BIOS, or through software that runs on Windows or Linux. Literally tells the hardware what to do.
I agree that it is rare to see, but it is out there. Some manufacturers have it, but just don’t tell you about it or how to do it. But it can still be done.
Hi , well i have the same issue so i use a different approach to this, since the game is to not install anything in
dom0
i pass of to install/use redshift or sct and i instead use xrandr
to change the brightness
and gamma
of my monitor since xrandr
come with the system so i make a funny icon close to the clock, with a click the brightness
and gamma
is adjusted if you click again changes to default values, i make a tiny script to accomplish this and the icon execute the script.
In this example you have 2 monitors you can adjust the script to your equipment:
#!/bin/bash
mon1="HDMI-1"
mon2="HDMI-2"
gamma="1.0:0.9:0.7"
brightness="0.5"
state="/tmp/switch_mon"
if [ -f "$state" ] ; then
xrandr --output "$mon1" --brightness 1 --gamma 1:1:1 --output "$mon2" --brightness 1 --gamma 1:1:1
rm -f "$state"
else
xrandr --output "$mon1" --brightness "$brightness" --gamma "$gamma" --output "$mon2" --brightness "$brightness" --gamma "$gamma"
touch "$state"
fi
exit 0
You need to save like .sh and in permissions check “allow this file to run as a program”
variables
mon1
; is one of your monitors and to know what to put in you need run in terminal of dom0
this command xrandr | grep "connected"
this show you a list of your monitors ports and connected.
gamma
; default value is 1:1:1
(or 1.0:1.0:1.0
) witch one means R:G:B
and you need to reduce the value of B
, like the script is put in 0.7
.
brightness
; default value is 1
.
state
; in the folder /tmp
is make a temp file call switch_mon
(offcourse you can change the name)
code
The script first look for the temp file, if exist, change to default the values and delete the temp file, if not, set the new values and generate the temp file.
regards
Thank you so much for your solution! It worked fine. I didn’t want to install Redshift to avoid adding unnecessary attack surface. Also, my monitor’s color range is not good enough.
I have an updated version of your script here, just thought it may help.
I have it so it can be forced on or off, as well as other small modifications.
Now it doesn’t matter how many monitors a person has, it will work.
#!/bin/bash
gamma="1.0:0.9:0.7"
brightness="0.5"
forceon=0
forceoff=0
if [[ "$1" == 'force' && "$2" == 'on' ]]; then
forceon=1
elif [[ "$1" == 'force' && "$2" == 'off' ]]; then
forceoff=1
fi
xrandr --listactivemonitors | awk '{print $4}' | while read -r line; do
state="/tmp/switch_mon_$line"
if [[ $forceoff -eq 1 ]]; then
echo "Blue mode switching off for $line"
xrandr --output "$line" --brightness 1 --gamma 1:1:1
rm -f "$state"
elif [[ ! -e "$state" || $forceon -eq 1 ]]; then
echo "Blue mode switching on for $line"
xrandr --output "$line" --brightness "$brightness" --gamma "$gamma"
touch "$state"
else
echo "Blue mode switching off for $line"
xrandr --output "$line" --brightness 1 --gamma 1:1:1
rm -f "$state"
fi
done
exit 0
Doesn’t have to have the echos, I just have them there for use when doing initial testing. So when you run the script you will see what it’s actually doing, then can remove the echos if you want.
Personally I have 3 monitors normally, sometimes 4 or 5, so only allowing for 2 or having it hardcoded isn’t that great.
This just allows for all connected displays to be set.