Wrong Colors #854
-
|
I have a small problem with HyperHDR. Some of the colors don't match. What do I have to set to get them right? Sometimes light sources are also shifted. The lamp is further to the left than HyperHDR shows |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 17 replies
-
|
Hi |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hello all, i had the same problem and with help chatGPT i have a little solution its not perfect but it's work Fix V4L2 Colors for HyperHDR on Raspberry PiIf you are using HyperHDR on a Raspberry Pi with Debian 12 / Kernel 6.12+, you may notice that your Ambilight LED colors are wrong after a system update. Brightness, contrast, saturation, and hue defaults are often completely out of range, causing color shifts. This repository provides a simple script and systemd service to permanently fix V4L2 color issues. Symptoms
SolutionWe will force the correct values for brightness, contrast, saturation, and hue at boot using a script and a systemd service. 1️⃣ Create the Fix ScriptCreate #!/bin/bash
# fix_v4l2_colors.sh
# Script to fix V4L2 colors on Raspberry Pi for HyperHDR
VIDEO_DEV="/dev/video0"
MAX_WAIT=15 # max wait in seconds
WAIT_INTERVAL=1
echo "Waiting for $VIDEO_DEV..."
WAITED=0
while [ ! -e "$VIDEO_DEV" ]; do
sleep $WAIT_INTERVAL
WAITED=$((WAITED+WAIT_INTERVAL))
if [ $WAITED -ge $MAX_WAIT ]; then
echo "Error: $VIDEO_DEV not found after $MAX_WAIT seconds."
exit 1
fi
done
echo "$VIDEO_DEV detected. Applying color settings..."
v4l2-ctl -d $VIDEO_DEV --set-ctrl=brightness=0
v4l2-ctl -d $VIDEO_DEV --set-ctrl=contrast=128
v4l2-ctl -d $VIDEO_DEV --set-ctrl=saturation=128
v4l2-ctl -d $VIDEO_DEV --set-ctrl=hue=0
# Optional: force video format if necessary
# v4l2-ctl -d $VIDEO_DEV --set-fmt-video=width=1920,height=1080,pixelformat=YUYV
echo "V4L2 colors fixed for $VIDEO_DEV."2️⃣ Make It Executable3️⃣ Create the Systemd ServiceCreate /etc/systemd/system/fix-v4l2-colors.service: 4 Create the Systemd ServiceCreate /etc/systemd/system/fix-v4l2-colors.service: ###3️⃣ Enable the Service ✅ This will ensure the colors are correct every boot, before HyperHDR starts capturing. Optional TweaksAdjust brightness, contrast, saturation, and hue in the script if your grabber behaves differently. Force the video format (YUYV/MJPEG/NV12) if necessary to match your grabber. The script waits up to 15 seconds for the grabber to be ready; adjust MAX_WAIT if needed. |
Beta Was this translation helpful? Give feedback.
-
|
This is a workaround only for one featured grabber and reporting the issue to RPi might take 1-2 minutes and would probably solve the problem once and for all... but as can be seen we've been where we are for almost a year. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, has this kernel bug been resolved already? I am having this issue with several hyperhdr images or normal pi os. |
Beta Was this translation helpful? Give feedback.














I've learned a lesson for the future: no matter how many exclamation marks I use in a pinned topic's subject, people won't read it anyway 😉
Not a HyperHDR issue, it is a kernel bug: #848