Different RGB values from expected at output from Jetson Xavier NX Developer Kit

I am using a Nvidia Jetson Xavier NX Developer Kit with Jetpack 4.5.1.
I want to code some data on the RGB values, so I need to be able to set specific color values and receive them from the Jetson’s output exactly as I set.
After I tried to do some testing I found color values that are drifted by 1, for example:
When I set a full screen with the following color:
R = 12, G = 12, B = 12
I receive:
R = 11, G = 11, B = 11
For receiving the output, I am using a frame grabber, which I tested with PC output with the same values and received them as expected.
I configured the output to be a full color range for RGB in xorg.conf file:

Section “Module”
Disable “dri”
SubSection “extmod”
Option “omit xfree86-dga”

Section “Device”
Identifier “Tegra0”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration” “true”
Option “ColorSpace” “RGB”
Option “ColorRange” “Full”

I searched for the same issue and fount this post:

I tried the workaround in the post:

echo 0 | sudo tee /sys/class/graphics/fb0/device/cmu_enable
echo 1 | sudo tee /sys/kernel/debug/tegradc.common/tegra_win.0/degamma/force_user_degamma

And it fixed the issue at the HDMI output.
But I need to use Display Port output and these commands don’t do anything at the DP output:
meaning the value of cmu_enable and force_user_degamma changed, but there isn’t any influence on the color values.
I tried to find in Xavier TRM another registers for DP, but no luck.
So i have 2 questions:

  1. Is there another workaround for DP output?
  2. Does Nvidia plan to fix this issue?


Are you sure the display port is on fb0? The CMU part should be same for DP and HDMI.

Also, DP case does not need that full range config in xorg.conf. If the TV supports full range, it shall go to full range.

First of all thanks for the answer.

You’re right, the DP is on fb1. So i tried to change the command to fb1, aka:
echo 0 | sudo tee /sys/class/graphics/fb1/device/cmu_enable
echo 1 | sudo tee /sys/kernel/debug/tegradc.common/tegra_win.0/degamma/force_user_degamma
After the first command (writing “0” to cmu_enable of fb1) the screen became darker, exactly like it was with HDMI after the first command (writing “0” to cmu_enable of fb0).
But after the second command nothing changed, the screen stays darker than usual and the value of the pixels is still different from the expected.

And i returned to the regular xorg.conf file without full range coding (and in DP output i see full range colors as you wrote) and repeat the process below and got the same results.


I guess you missed another thing here… Are you sure your DP is using tegra_win.0?

i saw there are 6 tegra_windows, how can i check what is the right one?
I assumed that tegra_win_0 is the default and the right one.

The nvdisplay is using win-mask to assign the 6 windows to each display controller.

Each window is labeled as A~F. On NX devkit, with the default device tree setting, window ABC are assigned to head1 while DEF are assigned to head 2 because there are only 2 heads on NX devkit.

Thus, for DP, you can start to change tegra_win_3. Or you can just configure all of them at once to make sure the right one is really gets changed by you.

So i found the right commands thanks to you. tegra_win_3 is the right one.
The commands for fixing the colors for DP output are:

echo 0 | sudo tee /sys/class/graphics/fb1/device/cmu_enable
echo 1 | sudo tee /sys/kernel/debug/tegradc.common/tegra_win.3/degamma/force_user_degamma

Thanks for the help

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.