I am missing an OS-wide feature that would suppress emission of blue light after sunset. This is a critical feature dearly missing from an operating system whose UX design is one of the main seling points otherwise!
(Not to mention that every competing OS, as well as the desktop ones have had this feature for years.)
If you are not going to implement it yourself please open up what is necessary so that the community can.
Is this something that could be implemented in the lipstick wayland compositor or has it to be done by poking at a few GPU registers? The only implementation of it I’ve seen the source code of did in in the latter way, but to be fair, that was on a 3DS which doesn’t have a compositor.
EDIT: My proposal in that case would be for lipstick to handle the actual tinting of the screen and have the settings application send the configuration, like KDE’s Kwin does: https://phabricator.kde.org/R108:82d286046907c07050ebb8c8f5c09cb60079c3ae. Sadly, this is licensed under the GPLv2.0 and Lipstick is licensed under the LGPLv2.1, which means that you probably cannot use the code in lipstick without licensing it under the GPLv2 as well.
So many good ideas were brought forward at the start of the system’s launch. Such a shame they don’t have enough resources to implement some of these.
Agreed, a filter was the first thing I looked for (for me, would be on all the time).
Just in case you weren’t aware, a cludge solution (found it via TJC) is using TintOverlay by coderus - if you’re more capable than me this will be a cinch to set up (maybe not in the background, though!) Auto-Start good, Background Launch bad (Tint Overlay)
I’ve done some more research and apparently the way kwin and Redshift work is by using DRM to adjust gamma curves. I’m wondering if DRM is available on Sailfish OS devices using a libhybris-adaptation, and if not, if there’s a way to apply some form of gamma correction on those devices.
A small workaround I can think of is to apply a shader over the entire output to filter out the blue colours. Since the compositor that Sailfish OS uses, lipstick, uses QtQuick for drawing most of these things to a screen, it simply would need to attach a shader to the root element.
The last one could likely also be implemented as a patch using PatchManager, since the desired effect could be reached by simply patching QML files.
I just wanted to say that there is absolutely no scientific evidence that blue light emitted from screens is bad for the eyes . Blue light is even relaxing. Blue light ha the ability to cause apoptosis in retinal pigment epithelial cells, but only in high intensity, like the light a dentist uses to harden composite fillings.
It was rather a PR thing for new features.
f.ex.:
Yes the blue light hazard to eyes might be only at higher intensities, otherwise this portion of spectra might be harmless to vision aparatus. This is not the case with the impact of blue light at night to the circadian clock. Even weak intensities of blue light at evening (or worse at night) might disrupt circadian clock if the person had not had enough exposure of blue-rich strong daylight during the day, or if his circadian aparatus is genetically more sensitive. This disruption of circadian clock leads to various health problems over the years.
Sure, we can choose to follow the lighting hygiene and do not use electronic devices with led screens an hour or two before sleep.
Yes, some studies claim that blue light prevents melatonine production at night, some others do not. So if one has insomnia, that as you say can really be a severe health issue, it can help. Personally I do not like the amber modes on phones as they seem brighter, for me. Blue light has a calming effect on me but that is pure psychology.
(faith can move mountains. Yet an A-nuke can, too )
ConfigurationGroup {
id: nightlightConfig
path: "/desktop/lipstick-jolla-home/patches/nightlight"
property bool enabled: false
property real gammaR: 1.0
property real gammaG: 1.0
property real gammaB: 1.0
}
I’ve tried applying them on server items, like the Compositor in compositer.qml (file names are relative to /usr/share/lipstick-jolla-home-qt5/, but that doesn’t work since Compositor is a C++ type which doesn’t inherit from QQuickItem. It doesn’t work in the LayersParent (first child of Compositor that inherits Item) either, for a reason unknown to me.
If someone wants to hack further on it, you can grab a copy of what I was working on here
(I don’t want to put this piece of non-working “art” on my public GitHub profile and I don’t want to give people the impression that I’m planning on maintaining it, so please copy it to your own repository and enjoy the beautiful wonders of maintaining a software project yourself ).
I’ve attached some instructions on how to restore your phone if you break your homescreen. Trust me, you will eventually.
After some busy weeks and some more research (I’m not quite familiar with the graphics subsystem in Linux and all, I can draw a triangle on screen with OpenGL, but that’s about it), it seems like the “wglext.h” file I linked above only contains Windows-specific code, so that likely won’t work either.