@npjohnson
I'm looking to make the jump from stock Android 12.1 to LineageOS 19.1, however, I have concerns about the infamous green tint at low brightness issue.
Manual tweaking with the CleanSlate kernel on XDA has made a significant positive impact for my device's display - it's the only reason I've been using CleanSlate. Around 2020-10, I tried porting the CleanSlate color correction code onto the AOSP kernel, but I never got past the boot animation. I think I messed up the AOSP kernel build config.
Does LineageOS provide some means of brightness-dependent color calibration, e.g. "when below 15% brightness apply this R,G,B slider calibration, otherwise disable calibration"?
My Nexus 6 on LOS 15.1 has color calibration sliders in Live Display, but that applied regardless of screen brightness and I think Live Display was replaced with Google's Night Color.
I found one bug report from 2021-9-20 about the green tint which was closed without any mention of kernel workarounds:
I realize this is a workaround at best and I'd understand if this is too much effort to implement and maintain. And regardless, thank you for the effort on shamu (I plan to upgrade it to 18.1), and coral!
I'm looking to make the jump from stock Android 12.1 to LineageOS 19.1, however, I have concerns about the infamous green tint at low brightness issue.
Manual tweaking with the CleanSlate kernel on XDA has made a significant positive impact for my device's display - it's the only reason I've been using CleanSlate. Around 2020-10, I tried porting the CleanSlate color correction code onto the AOSP kernel, but I never got past the boot animation. I think I messed up the AOSP kernel build config.
repo start minimal-degreenify private/msm-google
cd private/msm-google/drivers/gpu/drm/msm/dsi-staging
# Modify "$HOME/Source/Android/Bulk/android-kernel/private/msm-google/arch/arm64/configs/floral_defconfig"
# And modify "$HOME/Source/Android/Bulk/android-kernel/private/msm-google/arch/arm64/configs/defconfig"
# Add after "CONFIG_AIRBRUSH_SM_DEBUGFS=y"...
CONFIG_UCI=y
CONFIG_UCI_NOTIFICATIONS_SCREEN_CALLBACKS=y
CONFIG_RELR=y
# See "android_kernel_msm_floral-master/arch/arm64/configs/cleanslate_defconfig"
# Copy the following...
# drivers/misc/uci
# include/linux/uci
# Modify drivers/misc/uci.c to comment out the callbacks in "static int __init uci_init(void) {}"
# Modify uci driver to stub out functions
# Copy the following...
# drivers/misc/notification
# include/linux/notification
# Copy in changed files from "drivers/gpu/drm/msm/dsi-staging"
dsi_backlight.c
dsi_custom_gamma.h
dsi_custom_gamma_op7pro.h
dsi_panel.c
dsi_panel.h
dsi_panel_switch.c
# Copy in changed files from "drivers/gpu/drm/msm/sde"
sde_color_processing.c
sde_hw_color_proc_v4.c
sde_hw_dspp.c
sde_plane.c
# Add in Makefile and Kconfig changes
> drivers/misc/Kconfig after... source "drivers/misc/airbrush/Kconfig"
# Added by digitalcircuit
source "drivers/misc/uci/Kconfig"
source "drivers/misc/notification/Kconfig"
> drivers/misc/Makefile at end of file
# Added by digitalcircuit
obj-$(CONFIG_UCI) += uci/
obj-$(CONFIG_UCI_NOTIFICATIONS) += notification/
# Modify defaults in "drivers/gpu/drm/msm/dsi-staging/dsi_backlight.c"
# Use values in "$HOME/Documents/Software/Android/Devices/Pixel 4 XL/uci_user_degreenify_tuned.cfg"
./build/build.sh
# Use Android Image Kitchen to unpack Magisk-patched boot image
./unpackimg.sh boot.img
cp "$HOME/Source/Android/Bulk/android-kernel/out/android-msm-floral-4.14/dist/Image.lz4" "$HOME/Documents/Software/Android/Tools/AIK-Linux/split_img/boot.img-zImage"
./repackimg.sh
cd private/msm-google/drivers/gpu/drm/msm/dsi-staging
# Modify "$HOME/Source/Android/Bulk/android-kernel/private/msm-google/arch/arm64/configs/floral_defconfig"
# And modify "$HOME/Source/Android/Bulk/android-kernel/private/msm-google/arch/arm64/configs/defconfig"
# Add after "CONFIG_AIRBRUSH_SM_DEBUGFS=y"...
CONFIG_UCI=y
CONFIG_UCI_NOTIFICATIONS_SCREEN_CALLBACKS=y
CONFIG_RELR=y
# See "android_kernel_msm_floral-master/arch/arm64/configs/cleanslate_defconfig"
# Copy the following...
# drivers/misc/uci
# include/linux/uci
# Modify drivers/misc/uci.c to comment out the callbacks in "static int __init uci_init(void) {}"
# Modify uci driver to stub out functions
# Copy the following...
# drivers/misc/notification
# include/linux/notification
# Copy in changed files from "drivers/gpu/drm/msm/dsi-staging"
dsi_backlight.c
dsi_custom_gamma.h
dsi_custom_gamma_op7pro.h
dsi_panel.c
dsi_panel.h
dsi_panel_switch.c
# Copy in changed files from "drivers/gpu/drm/msm/sde"
sde_color_processing.c
sde_hw_color_proc_v4.c
sde_hw_dspp.c
sde_plane.c
# Add in Makefile and Kconfig changes
> drivers/misc/Kconfig after... source "drivers/misc/airbrush/Kconfig"
# Added by digitalcircuit
source "drivers/misc/uci/Kconfig"
source "drivers/misc/notification/Kconfig"
> drivers/misc/Makefile at end of file
# Added by digitalcircuit
obj-$(CONFIG_UCI) += uci/
obj-$(CONFIG_UCI_NOTIFICATIONS) += notification/
# Modify defaults in "drivers/gpu/drm/msm/dsi-staging/dsi_backlight.c"
# Use values in "$HOME/Documents/Software/Android/Devices/Pixel 4 XL/uci_user_degreenify_tuned.cfg"
./build/build.sh
# Use Android Image Kitchen to unpack Magisk-patched boot image
./unpackimg.sh boot.img
cp "$HOME/Source/Android/Bulk/android-kernel/out/android-msm-floral-4.14/dist/Image.lz4" "$HOME/Documents/Software/Android/Tools/AIK-Linux/split_img/boot.img-zImage"
./repackimg.sh
Does LineageOS provide some means of brightness-dependent color calibration, e.g. "when below 15% brightness apply this R,G,B slider calibration, otherwise disable calibration"?
My Nexus 6 on LOS 15.1 has color calibration sliders in Live Display, but that applied regardless of screen brightness and I think Live Display was replaced with Google's Night Color.
I found one bug report from 2021-9-20 about the green tint which was closed without any mention of kernel workarounds:
90hz Smooth Display - green tint - Pixel 4 XL coral (#3987) · Issues · LineageOS / issues / android · GitLab
Expected Behavior Setting should only affect refresh rate. Current Behavior Setting affects...
gitlab.com
I realize this is a workaround at best and I'd understand if this is too much effort to implement and maintain. And regardless, thank you for the effort on shamu (I plan to upgrade it to 18.1), and coral!
Last edited: