Score:3

Setting 10bit color per channel in ubuntu inverts blue and red colors without giving actual 10bit per channel colors

cn flag

Been struggling to set up my machine Thinkpad P52s ( Intel UHD 620 (i7 8550U)+ Nvidia Quadro P500) - running Ubuntu 20.04 to show proper 10bit per channel (RGB) on a compatible display ( ASUS PA329C - cheapest true 10 bit per channel compatible panel).

When I set up xorg ( a file in /usr/share/X11/xorg.conf.d/30-screensetup.conf as in https://linuxreviews.org/HOWTO_enable_10-bit_color_on_Linux) my red and blue colors get inverted. Even though my Xorg log says "using depth/fbpp 30/32" It is still not true 10 bit color.

Ref: I used the guide/files from below:
https://www.avsforum.com/threads/10-bit-gradient-test-patterns.2269338/
https://www.eizo-apac.com/support-service/tech-library/monitor-test
and several others...

All drivers appear correctly installed... Nvidia-Xserver also shows XScreen 0 setup with correct color depth

lshw -c display: 
  GNU nano 4.8                                                                                                 lshwout.txt                                                                                                            
  *-display
       description: VGA compatible controller
       product: UHD Graphics 620
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 07
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:159 memory:e7000000-e7ffffff memory:c0000000-cfffffff ioport:e000(size=64) memory:c0000-dffff
  *-display
       description: 3D controller
       product: GP108GLM [Quadro P500 Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list
       configuration: driver=nvidia latency=0
       resources: irq:168 memory:e8000000-e8ffffff memory:70000000-7fffffff memory:80000000-81ffffff ioport:d000(size=128)

Xorg.0.log

    13.740]    ABI class: X.Org ANSI C Emulation, version 0.4
[    13.740] (II) Loading sub module "ramdac"
[    13.740] (II) LoadModule: "ramdac"
[    13.740] (II) Module "ramdac" already built-in
[    13.741] (WW) Falling back to old probe method for modesetting
[    13.751] (WW) Falling back to old probe method for fbdev
[    13.751] (II) Loading sub module "fbdevhw"
[    13.751] (II) LoadModule: "fbdevhw"
[    13.751] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    13.751] (II) Module fbdevhw: vendor="X.Org Foundation"
[    13.751]    compiled for 1.20.9, module version = 0.0.2
[    13.751]    ABI class: X.Org Video Driver, version 24.1
[    13.767] (II) modeset(G0): using drv /dev/dri/card0
[    13.767] (II) NVIDIA(0): Creating default Display subsection in Screen section
        "Default Screen" for depth/fbbpp 30/32
[    13.767] (**) NVIDIA(0): Depth 30, (--) framebuffer bpp 32
[    13.767] (==) NVIDIA(0): RGB weight 101010
[    13.767] (==) NVIDIA(0): Default visual is TrueColor
[    13.767] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    13.768] (II) Applying OutputClass "nvidia" options to /dev/dri/card1
[    13.768] (II) Applying OutputClass "Nvidia Prime" options to /dev/dri/card1
[    13.768] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration"
[    13.768] (**) NVIDIA(0): Enabling 2D acceleration
[    13.768] (II) Loading sub module "glxserver_nvidia"
[    13.768] (II) LoadModule: "glxserver_nvidia"
[    13.768] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/libglxserver_nvidia.so
[    13.790] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[    13.790]    compiled for 1.6.99.901, module version = 1.0.0
[    13.790]    Module class: X.Org Server Extension
[    13.790] (II) NVIDIA GLX Module  460.80  Fri May  7 06:50:15 UTC 2021
[    13.791] (II) NVIDIA: The X server supports PRIME Render Offload.
[    13.792] (II) NVIDIA(0): NVIDIA GPU Quadro P500 (GP108GL-A) at PCI:2:0:0 (GPU-0)
[    13.792] (--) NVIDIA(0): Memory: 2097152 kBytes
[    13.792] (--) NVIDIA(0): VideoBIOS: 86.08.28.00.63
[    13.792] (II) NVIDIA(0): Detected PCI Express Link width: 4X
[    13.792] (II) NVIDIA(0): Validated MetaModes:
[    13.792] (II) NVIDIA(0):     "NULL"
[    13.792] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[    13.792] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[    13.792] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[    13.792] (II) modeset(G0): Creating default Display subsection in Screen section
        "Default Screen" for depth/fbbpp 30/32

xwininfo shows below. Funny that it shows same /similar in 24 bit depth. Sometimes depth 30 sometimes 32.. not sure if it includes alpha channel and shows buffer size instead? Can I change framebuffer size to 40 to ensure I get RGBA as each 10 bit and would that solve it?

xwininfo as run in depth = 24 xorg session:

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x3e0000a "rime@RimezWorkstation: ~"

  Absolute upper-left X:  39
  Absolute upper-left Y:  12
  Relative upper-left X:  39
  Relative upper-left Y:  12
  Width: 2596
  Height: 1487
  Depth: 32
  Visual: 0xa2
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x3e00009 (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +39+12  -1205+12  -1205-661  +39-661
  -geometry 230x63+39+12

nvidia-smi gives :

Sun Jun 20 15:05:58 2021       
+---------------------------------------------+
| NVIDIA-SMI 460.80       Driver Version: 460.80       CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro P500         Off  | 00000000:02:00.0 Off |                  N/A |
| N/A   63C    P0    N/A /  N/A |    358MiB /  2002MiB |     18%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+---------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1528      G   /usr/lib/xorg/Xorg                246MiB |
|    0   N/A  N/A      2149      G   /usr/bin/gnome-shell              111MiB |
+---------------------------------------------+

nvidia-prime.conf inside xorg.conf.d is like below:

Section "OutputClass"
    Identifier "Nvidia Prime"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "IgnoreDisplayDevices" "CRT"
    Option "PrimaryGPU" "Yes"
    ModulePath "/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

gpu manager log looks like:

  GNU nano 4.8                             /var/log/gpu-manager.log                                        
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/5.4.0-74-generic/updates/dkms
Looking for amdgpu modules in /lib/modules/5.4.0-74-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? no
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:5917
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:1d33
BusID "PCI:2@0:0:0"
can't open /sys/bus/pci/devices/0000:02:00.0/boot_vga
Is boot vga? no
can't open /sys/bus/pci/devices/0000:02:00.0/boot_vga
can't access /etc/u-d-c-nvidia-runtimepm-override file
Found json file: /usr/share/doc/nvidia-driver-460/supported-gpus.json
Looking for device ID "0x1d33" in json file
Device ID 0x1D33 found in json file
Device name: Quadro P500
Looking for availability of "runtimepm" feature
"runtimepm" feature not found
Linux 5.4 detected.
Is nvidia runtime pm supported for "0x1d33"? no
Checking power status in /proc/driver/nvidia/gpus/0000:02:00.0/power
Runtime D3 status:          Disabled
Is nvidia runtime pm enabled for "0x1d33"? no
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Found "/dev/dri/card0", driven by "i915"
output 0:
        card0-eDP-1
output 1:
        card0-DP-1
Number of connected outputs for /dev/dri/card0: 2
Does it require offloading? yes
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
Intel IGP detected
NVIDIA hybrid system
Creating /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
Setting power control to "on" in /sys/bus/pci/devices/0000:02:00.0/power/control

I must say that color inversion is problem only when under PRIME Profiles NVIDIA Xserver settings are set to high performance ( i.e. NVIDIA as primary GPU?) When switching to 'on demand' profile color inversion issue goes away but it takes away my control of setting X Screen depth from Nvidia card. I only get GPU settings and no X Screen Display configuration settings anymore.

But in any case not getting true 10 colors :( . Please help.

PeriscopeOnStack avatar
cn flag
If this set up is doomed due to Intel integrated graphics.. Would an external GPU help? I am not a gamer and it would be overkill. I just want 10 bit for creative color work.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.