You are not logged in.

#1 2019-06-15 23:56:10

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

No options for increasing visual saturation for AMD cards

I haven't been able to find a way to increase saturation or 'digital vibrance' on Arch Linux for AMD video cards. I searched through the wiki pages for AMDGPU and ATI but didn't see anything that would enable me to increase saturation. Prior to this I adjusted the 'contrast' on my monitor, however the effect provided is insufficient for CSGO. I believe I am using the ATI driver currently and a solution for this driver is what I am looking for. I would like to avoid installing Catalyst Drivers because it seems tedious and difficult to get working right, and I'm not sure that installing Catalyst Drivers would even help with digital vibrancy enhancement. Catalyst is also apparently:

Note: Catalyst packages are no longer offered in the official repositories. It is no longer updated by AMD and does not support the latest Xorg. Installing an old Xorg is required.

  Ideally, I would find a program that works like the Catalyst Control Center or 'VibranceGUI'. I have looked in adjusting the gamma with xrandr, but the effect isn't right.

My card is a Radeon HD 7850.

Offline

#2 2019-06-16 13:16:10

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: No options for increasing visual saturation for AMD cards

Are you using the correct ICC profile for your monitor ?
check https://wiki.archlinux.org/index.php/ICC_profiles


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-06-16 18:48:51

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

Lone_Wolf wrote:

Are you using the correct ICC profile for your monitor ?
check https://wiki.archlinux.org/index.php/ICC_profiles

My monitor (Asus VH232H) did not have any ICC profiles available, which I assume is in the form of a .icm file. I plugged it into a friends windows PC and it was defined as a "Generic PnP Monitor". I looked up what that meant and the article I read said that my monitor most likely uses the (Default?) sRGB ICC profile. I haven't changed the ICC profile since I got the monitor in 2013. Online I searched and did not find any ICC profile for my monitor either.

I saw this and downloaded the driver .exe from ASUS, which I was able to extract somewhat. I ended up with several .msi files, when opened in WINE they were just different languages for the installer. I think there is no more to find in the .exe however.

Offline

#4 2019-06-17 00:19:58

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: No options for increasing visual saturation for AMD cards

I have found a way to do this with amdgpu:

In the output of "xrandr --verbose", there's a property "CTM" that apparently means "color transformation matrix". Tweaking its values can change saturation.

About how to set the values of that CTM property, the only thing I could find is a small experimental program by the same person that also wrote the patches that added that CTM thing into the driver. You can get that program through this git URL:

git://people.freedesktop.org/~hwentland/color-demo-app

You'd run the following command line to download it:

git clone 'git://people.freedesktop.org/~hwentland/color-demo-app'

Then go into the new sub-folder and run "make" and you'll get a program "cmdemo" that you can run:

$ ./cmdemo
Usage: cmdemo -o OUTPUT_NAME [-d DEGAMMA_OPTS] [-c CTM_OPTS] [-r REGAMMA_OPTS] [-h] [-v]

Now about changing saturation with it, after googling about matrices and colors and experimenting a bit, I came up with the following perl script:

#!/bin/perl
use strict;
use warnings FATAL => 'all';
use 5.010;

use Scalar::Util qw(looks_like_number);

my ($output, $saturation) = @ARGV;

if (not scalar @ARGV == 2 or not looks_like_number $saturation) {
    my $name = $0 =~ s{.*/}{}r;
    print <<END;
Usage: $name <output> <number>

Examples:
    $name DisplayPort-0 1.2
    $name DisplayPort-0 1
END
    exit 1;
}

my $s = (1.0 - $saturation) / 3;
my @ctm = (
    $s + $saturation,
    $s,
    $s,
    $s,
    $s + $saturation,
    $s,
    $s,
    $s,
    $s + $saturation
);

my $path = $0 =~ s{(.*/)?.*}{$1}r;
system
    "$path"."cmdemo",
    "-o", $output,
    "-c", join(":", @ctm);

I used the file name "cmsaturation.pl". This script has to be put into the same folder as where the "cmdemo" program is. Then call it like this with the correct output name for your monitor as printed by 'xrandr':

./cmsaturation.pl DisplayPort-0 1     # this resets colors to default
./cmsaturation.pl DisplayPort-0 1.2   # this increases saturation
./cmsaturation.pl DisplayPort-0 0     # this makes everything grayscale!

Last edited by Ropid (2019-06-17 00:22:51)

Offline

#5 2019-06-17 02:00:18

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

Ropid wrote:

I have found a way to do this with amdgpu:

In the output of "xrandr --verbose", there's a property "CTM" that apparently means "color transformation matrix". Tweaking its values can change saturation.

About how to set the values of that CTM property, the only thing I could find is a small experimental program by the same person that also wrote the patches that added that CTM thing into the driver. You can get that program through this git URL:

git://people.freedesktop.org/~hwentland/color-demo-app

You'd run the following command line to download it:

git clone 'git://people.freedesktop.org/~hwentland/color-demo-app'

Then go into the new sub-folder and run "make" and you'll get a program "cmdemo" that you can run:

$ ./cmdemo
Usage: cmdemo -o OUTPUT_NAME [-d DEGAMMA_OPTS] [-c CTM_OPTS] [-r REGAMMA_OPTS] [-h] [-v]

Now about changing saturation with it, after googling about matrices and colors and experimenting a bit, I came up with the following perl script:

#!/bin/perl
use strict;
use warnings FATAL => 'all';
use 5.010;

use Scalar::Util qw(looks_like_number);

my ($output, $saturation) = @ARGV;

if (not scalar @ARGV == 2 or not looks_like_number $saturation) {
    my $name = $0 =~ s{.*/}{}r;
    print <<END;
Usage: $name <output> <number>

Examples:
    $name DisplayPort-0 1.2
    $name DisplayPort-0 1
END
    exit 1;
}

my $s = (1.0 - $saturation) / 3;
my @ctm = (
    $s + $saturation,
    $s,
    $s,
    $s,
    $s + $saturation,
    $s,
    $s,
    $s,
    $s + $saturation
);

my $path = $0 =~ s{(.*/)?.*}{$1}r;
system
    "$path"."cmdemo",
    "-o", $output,
    "-c", join(":", @ctm);

I used the file name "cmsaturation.pl". This script has to be put into the same folder as where the "cmdemo" program is. Then call it like this with the correct output name for your monitor as printed by 'xrandr':

./cmsaturation.pl DisplayPort-0 1     # this resets colors to default
./cmsaturation.pl DisplayPort-0 1.2   # this increases saturation
./cmsaturation.pl DisplayPort-0 0     # this makes everything grayscale!

I saw the reference to CTM in the output of "xrandr --verbose" so I entered the command. I searched through the output but there was no "CTM" anywhere. Still, I decided I might have missed it and completed the steps. I copied the perl script and after changing the permissions, it executed. However, it sent me th output:

[ben@ben-pc .color-demo-app]$ ./cmsaturation.pl HDMI-1 1.2
Using custom CTM:
    1.1333:-0.0667:-0.0667
    -0.0667:1.1333:-0.0667
    -0.0667:-0.0667:1.1333
Property key 'CTM' not found.
Failed to set CTM. 5

It seems my monitor or GPU is missing the ability to set the CTM, or I need to enable it somehow? I also tried inputing a valid matrix into cmdemo, but I had the same result as with cmsaturation.pl.

Offline

#6 2019-06-17 02:12:53

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: No options for increasing visual saturation for AMD cards

I guess the two things that are needed are (1) the "amdgpu" kernel module, (2) the "xf86-video-amdgpu" Xorg output driver.

For your card, the amdgpu kernel module isn't enabled by default. You might currently be using the "radeon" module instead. How to force the use of the amdgpu module is described in the AMDGPU wiki article. It involves setting certain kernel command line parameters (or I guess doing it in /etc/modprobe.d/ would work as well).

About the Xorg output driver, you might currently be using "modesetting" which is part of the xorg-server package. That "xf86-video-amdgpu" driver is in a separate Arch package. Or you might be using the driver that's inside a package named "xf86-video-ati" which I don't really know about (perhaps related to the radeon kernel module?).

Offline

#7 2019-06-17 03:59:53

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

Ropid wrote:

I guess the two things that are needed are (1) the "amdgpu" kernel module, (2) the "xf86-video-amdgpu" Xorg output driver.

For your card, the amdgpu kernel module isn't enabled by default. You might currently be using the "radeon" module instead. How to force the use of the amdgpu module is described in the AMDGPU wiki article. It involves setting certain kernel command line parameters (or I guess doing it in /etc/modprobe.d/ would work as well).

About the Xorg output driver, you might currently be using "modesetting" which is part of the xorg-server package. That "xf86-video-amdgpu" driver is in a separate Arch package. Or you might be using the driver that's inside a package named "xf86-video-ati" which I don't really know about (perhaps related to the radeon kernel module?).

I have installed and configured AMDGPU as (I saw) in the wiki. I also installed the xf86-video-amdgpu package and removed the xf86-video-ati package.

However, about modesetting: I believe it is necessary for AMDGPU because on the wiki it says:

Make sure you do not have nomodeset or vga= as a kernel parameter, since amdgpu requires KMS.

The nomodeset would disable modesetting as you describe, but then AMDGPU wouldn't function as it needs KMS.

After this and rebooting, I find the

 [ben@ben-pc .color-demo-app]$ ./cmsaturation.pl HDMI-A-0 1.2
Using custom CTM:
    1.1333:-0.0667:-0.0667
    -0.0667:1.1333:-0.0667
    -0.0667:-0.0667:1.1333
Property key 'CTM' not found.
Failed to set CTM. 5

(I had to change "HDMI-1" to "HDMI-A-0" due to properly enabling AMDGPU.)
So, I don't know why ./cmsaturation works for you and not for me. My configuration/installation seems correct. Is there some Xorg configuration I need but don't have?

Offline

#8 2019-06-17 04:20:28

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: No options for increasing visual saturation for AMD cards

This here should show which kernel module is used for the device:

lspci -k | grep -A3 VGA

And then for Xorg you can look inside the Xorg log file:

/var/log/Xorg.0.log

I don't know how to best search for it in there, perhaps like this:

$ grep 'loading driver' /var/log/Xorg.0.log
[     5.329] 	loading driver: amdgpu
[     5.329] 	loading driver: (null)

Or you could just look inside because the driver that's in use will print many lines where it describes things like your monitor's resolutions and whatnot. Those lines will mention the driver's name, for example "AMDGPU" or "modeset" or "NVIDIA" or "fglrx".

Offline

#9 2019-06-17 11:58:39

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: No options for increasing visual saturation for AMD cards

kinru wrote:

However, about modesetting: I believe it is necessary for AMDGPU because on the wiki it says:

    Make sure you do not have nomodeset or vga= as a kernel parameter, since amdgpu requires KMS.

The nomodeset would disable modesetting as you describe, but then AMDGPU wouldn't function as it needs KMS.

Kernel Mode Setting (KMS) and Xorg modesetting driver are two separate things.

https://www.reddit.com/r/archlinux/comm … m/djsc8at/ has a good explanation of linux graphics stack.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2019-06-17 13:12:36

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

Output of

lspci -k | grep -A3 VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850 / R7 265 / R9 270 1024SP]
	Subsystem: Hightech Information System Ltd. Pitcairn PRO [Radeon HD 7850 / R7 265 / R9 270 1024SP]
	Kernel driver in use: amdgpu
	Kernel modules: radeon, amdgpu

Xorg.0.log

There is something weird here, since Xorg tries to load the ATI driver but fails. Later it doesn't try to load anything with AMDGPU.
It uses 'modesetting' a lot in the log, so I assume that's what it is using instead of xf86-video-amdgpu. I forgot to add I am using dual monitors. One on HDMI and one on DVI. The driver that appears to be in use is modeset.

Also, I decided to see what

lspci -k | grep -A3 HDMI

would give me:

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]
	Subsystem: Hightech Information System Ltd. Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

In /etc/X11 I have only "xinit xorg.conf.d xsession.d" there is no xorg.conf present. Maybe I need to make one here? In xorg.conf.d I do have an AMDGPU file and one I didn't add manually for mouse acceleration.


EDIT: I want to add that I configured AMDGPU with SI support but not CIK support. I think this is right for a GCN1 Card (Radeon HD7850). Or is this not correct?

Last edited by kinru (2019-06-17 13:15:39)

Offline

#11 2019-06-17 13:30:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: No options for increasing visual saturation for AMD cards

Post these config files. Given that xf86-video-amdgpu is installed xorg should use that and not the built-in modesetting driver and that should be default without explicit reconfiguration on your part.

Last edited by V1del (2019-06-17 13:31:28)

Offline

#12 2019-06-17 13:38:47

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

V1del wrote:

Post these config files. Given that xf86-video-amdgpu is installed xorg should use that and not the built-in modesetting driver and that should be default without explicit reconfiguration on your part.

20-amdgpu.conf:

Section "Device"
     Identifier "AMD"
     Driver "amdgpu"

     
 EndSection

50-mouse-acceleration.conf:

Section "InputClass"
	Identifier "My Mouse"
	MatchIsPointer "yes"
	Option "AccelerationProfile" "-1"
	Option "AccelerationScheme" "none"
	Option "AccelSpeed" "-1"
EndSection

Not sure of other config files. No Xorg.conf in /etc or /etc/X11.

Offline

#13 2019-06-17 13:50:49

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

V1del wrote:

As hinted at, did you install xf86-video-amdgpu? Output of

pacman -Qs amdgpu

?

I do think I installed xf86-video-amdgpu. Output of "pacman -Qs amdgpu" :

 local/xf86-video-amdgpu 19.0.1-1 (xorg-drivers)
    X.org amdgpu video driver 

Offline

#14 2019-06-17 13:54:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: No options for increasing visual saturation for AMD cards

That xorg log you posted looks old, how are you starting xorg? Check possible log locations: https://wiki.archlinux.org/index.php/Xorg#General

Offline

#15 2019-06-17 14:28:19

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

V1del wrote:

That xorg log you posted looks old, how are you starting xorg? Check possible log locations: https://wiki.archlinux.org/index.php/Xorg#General

I start xorg automatically after login from tty. If I remember right, I start X with xinit.

The log ~/.local/share/xorg/Xorg.0.log
The log ~/.local/share/xorg/Xorg.0.log.old
The log ~/.local/share/xorg/Xorg.1.log
The log ~/.local/share/xorg/Xorg.1.log.old

From what I can see in the correct log file, xorg correctly loads xf86-video-amdgpu, however I still get:

    1.1333:-0.0667:-0.0667
    -0.0667:1.1333:-0.0667
    -0.0667:-0.0667:1.1333
Property key 'CTM' not found.
Failed to set CTM. 5

with ./cmsaturation.pl HDMI-A-0 1.2

Also here is my .xinitrc

I can also see in the output of "xrandr --verbose" that there is a value "transform" but this appears to be only a spacial transformation matrix; it has nothing to do with color. After this is still see no CTM value as described. Does anyone else not find the CTM value or is this only me?

Last edited by kinru (2019-06-17 15:03:20)

Offline

#16 2019-06-17 16:35:41

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

I think the problem is with with randr. According to the code of cmdemo:

/**
 * Create a DRM color transform matrix using the given coefficients, and set
 * the output's CRTC to use it.
 */
static int set_ctm(Display *dpy, RROutput output, double *coeffs)
{
        size_t blob_size = sizeof(struct _drm_color_ctm);
        struct _drm_color_ctm ctm;
        long padded_ctm[18];

        int i, ret;

        coeffs_to_ctm(coeffs, &ctm);

        /* Workaround:
         *
         * RandR currently uses long types for 32-bit integer format. However,
         * 64-bit systems will use 64-bits for long, causing data corruption
         * once RandR parses the data. Therefore, pad the blob_data to be long-
         * sized. This will work regardless of how long is defined (as long as
         * it's at least 32-bits).
         *
         * Note that we have a 32-bit format restriction; we have to interpret
         * each S31.32 fixed point number within the CTM in two parts: The
         * whole part (S31), and the fractional part (.32). They're then stored
         * (as separate parts) into a long-typed array. Of course, This problem
         * wouldn't exist if xserver accepted 64-bit formats.
         *
         * A gotcha here is the endianness of the S31.32 values. The whole part
         * will either come before or after the fractional part. (before in
         * big-endian format, and after in small-endian format). We could avoid
         * dealing with this by doing a straight memory copy, but we have to
         * ensure that each 32-bit element is padded to long-size in the
         * process.
         */
        for (i = 0; i < 18; i++)
                /* Think of this as a padded 'memcpy()'. */
                padded_ctm[i] = ((uint32_t*)ctm.matrix)[i];

        ret = set_output_blob(dpy, output, PROP_CTM, &padded_ctm,
                              blob_size, FORMAT_32_BIT);

        if (ret)
                printf("Failed to set CTM. %d\n", ret);
        return ret;
}

hmm

Offline

#17 2019-06-17 23:10:46

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: No options for increasing visual saturation for AMD cards

I found out what the problem about CTM missing is. The CTM feature only exists in the "dc" = "display core" part of the amdgpu kernel module code. This DC part can be enabled/disabled with the "amdgpu.dc=1" or "0" module option.

What's happening here is that the amdgpu module has two different versions of code for driving monitors. It has an old version, and a new version which is named "display core". For older cards it uses the old version by default, and for the newest cards it uses the new version.

I guess you could try to see what happens if you add "amdgpu.dc=1" to your kernel command line.

If I reboot and add "amdgpu.dc=0" to my kernel command line to disable that DC stuff, then the output of "xrandr --prop" looks like this, with CTM missing:

DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
	EDID: 
...
	TearFree: off 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 51 
		supported: 51
	non-desktop: 0 
		range: (0, 1)
...

Here is how things look like with DC enabled:

DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
	EDID: 
...
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
		0 1 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: off 
		supported: off, on, auto
	vrr_capable: 1 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 59 
		supported: 59
	non-desktop: 0 
		range: (0, 1)
...

Last edited by Ropid (2019-06-17 23:11:08)

Offline

#18 2019-06-18 01:10:34

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

I enabled the "amdgpu.dc" module option with the configuration file "/etc/modprobe.d/amdgpu.conf". Then I ran

 sudo mkinitcpio -p linux

to regenerate the intramfs. Then I rebooted and wanted to confirm that the module options loaded right. I ran

 modprobe -c amdgpu 

and near the top was

options amdgpu amdgpu.dc=1

so I know that it was loaded right. So I tried to run the "./cmsaturation HDMI-A-o 1.2" but the output was still

Using custom CTM:
    1.1333:-0.0667:-0.0667
    -0.0667:1.1333:-0.0667
    -0.0667:-0.0667:1.1333
Property key 'CTM' not found.
Failed to set CTM. 5

Also my output of "xrandr --prop"

Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 16384 x 16384
DisplayPort-0 disconnected primary (normal left inverted right x axis y axis)
	TearFree: on 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 51 
		supported: 51
	non-desktop: 0 
		range: (0, 1)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
	TearFree: on 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 53 
		supported: 53
	non-desktop: 0 
		range: (0, 1)
HDMI-A-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
	EDID: 
		00ffffffffffff000469f123646a0000
		2416010380341d782ac720a455499927
		135054bfef00714f010181809500b300
		d1c001010101023a801871382d40582c
		450009252100001e000000ff0043394c
		4d54463032373233360a000000fd0037
		4b1e5510000a202020202020000000fc
		0041535553205648323332480a200140
		020322714f0102031112130414050e0f
		1d1e1f10230907018301000065030c00
		10008c0ad08a20e02d10103e96000925
		21000018011d007251d01e206e285500
		09252100001e011d00bc52d01e20b828
		554009252100001e8c0ad09020403120
		0c405500092521000018000000000000
		00000000000000000000000000000073
	TearFree: on 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 55 
		supported: 55
	non-desktop: 0 
		range: (0, 1)
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1440x576      50.00  
   1024x768      75.03    70.07    60.00  
   1440x480      60.00    59.94  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DVI-I-0 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 376mm x 301mm
	EDID: 
		00ffffffffffff0022f0112652353030
		040e010381251e78ea0920a2574b9724
		185054bdeb8081800101010101010101
		010101010101302a009851002a403070
		1300782d1100001e000000fd00384c1e
		520e000a202020202020000000fc0068
		702066313930330a20202020000000ff
		00434e42343034303035520a20200036
	TearFree: on 
		supported: off, on, auto
	load detection: 1 
		range: (0, 1)
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 57 
		supported: 57
	non-desktop: 0 
		range: (0, 1)
   1280x1024     60.02*+  75.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
DVI-D-1 disconnected (normal left inverted right x axis y axis)
	TearFree: on 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 60 
		supported: 60
	non-desktop: 0 
		range: (0, 1)

Perhaps my hardware is too outdated to work with CTM and I will just have to invest in a newer card. Where are you finding all this information on CTM? I could not find anything.

Last edited by kinru (2019-06-18 01:12:13)

Offline

#19 2019-06-18 02:23:13

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: No options for increasing visual saturation for AMD cards

If you want to set it through modprobe.d and not the kernel command line, then write it like this in your config file:

options amdgpu dc=1

Writing "amdgpu.dc=1" is how it's done on the kernel command line. The actual name of the option is just "dc", it's not "amdgpu.dc".

Also, perhaps do not do this with a config file at first! Maybe just try it through the command line editor that's built into your boot loader by manually editing the kernel command line at boot. This is just  because I'd be a bit worried that you'll end up with a black screen where not even the text console works if that dc=1 stuff doesn't work on your card.

Checking the current settings used by the amdgpu module can be done with this command here:

grep . /sys/module/amdgpu/parameters/*

It will show "-1" if the setting is at default, and it will show a "0" or a "1" if a config explicitly sets it.

EDIT:

About where I found this color transformation matrix stuff, I stumbled onto it through a post on www.phoronix.com. That post linked to a mail where things were explained by the person that did the work for this in the driver:

https://lists.freedesktop.org/archives/ … 22007.html

There's a link to the source of that "color-demo-app" tool in that mail.

I had originally found this color transformation matrix stuff because I was looking at how to change and reduce the "color gamut" of my monitor. My monitor has a color space that's slightly larger than the standard sRGB color space. This makes colors on the desktop look a bit too intense. Basically, I kind of have the reverse problem that you have: I would like to have a bit less saturation (except more complicated because not for all colors, just some of them).

About those ICC color profiles that were mentioned earlier, here's what I learned about those and why they can't help with this:

The ICC files have two differently working parts in them: there is first a set of calibration curves that correct gamma. Those calibration curves are for the graphics driver, they can be loaded into the GPU and the whole screen then gets gamma correction applied to it. What the calibration curves can do is fix problems about a weird color tint in gray tones. They can make a grayscale gradient look like it should if there's a problem with that. The calibration curves cannot fix problems about color saturation. You found that out already when you played with the gamma values in xrandr.

Then second, there's a monitor "profile" part of the ICC file. That monitor profile part is a description of the color space of the monitor. It's the part of the ICC file that could in theory change something about color saturation, but in practice it can't be used for that. The profile is not getting loaded into the GPU hardware when you apply an ICC file to your desktop's color management settings. The profile half of the ICC file is only used by certain programs that have support for it, for example Gimp. Those programs will then change the colors they output to their window. There's currently no way to apply a profile to the whole desktop on Linux or Windows (I heard OS X can do it).

Last edited by Ropid (2019-06-18 03:14:20)

Offline

#20 2019-06-18 14:32:08

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

I set the module option to "dc=1" in "/etc/modprobe.d/amdgpu.conf". It booted fine, however I have a spare USB drive loaded with the Arch Linux "install media", so I can access my system when I inevitably prevent it from booting, therefore the fear of a black screen should not be a factor here. I checked the module options, as you said with

grep . /sys/module/amdgpu/parameters/*

One line says:

/sys/module/amdgpu/parameters/dc:1

So is loaded. However when I run the:

xrandr --verbose -q

or the

xrandr --prop

There is still no CTM. ./cmsaturation still returns the same error as before.

Besides dc, maybe dcfeaturemask would have a relevant effect. I couldn't find online what it did or what values I could enter for the options (the values are said to be "uint"). Booting with the dcfeaturemask set to 1 however yield no visible effects. The name leads me to believe it could be useful to enabling some features like CTM and LUT (although I don't need LUT). When booted with dcfeaturemask set to 1,

 xrandr --verbose -q

says nothing about CTM.

Another thing I think might be to blame for some of the xrandr properties being disabled is the DDX driver because the phoronix article https://www.phoronix.com/scan.php?page= … -Color-Man talks about how the update enabled all these properties I am missing. Maybe this update isn't applied right? These links (you may have already seen) might help: https://lists.freedesktop.org/archives/ … 20573.html https://lists.freedesktop.org/archives/ … 22007.html I can edit which CRTC my monitors use with xrandr.

Offline

#21 2019-06-20 14:53:21

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

I am attempting to draft a bug report for this. It looks very much like a bug. However, there is something of interest within
https://lists.freedesktop.org/archives/ … 22007.html

3. The three color management properties (Degamma LUT, Color Transform Matrix
   (CTM), and Gamma LUT) are hard-coded into the DDX driver, to be listed (as
   disabled) regardless of whether a CRTC is attached on the output, or whether
   the kernel driver supports it.

    * If kernel driver does not support color management, the properties will
      remain disabled. A `xrandr --set` will then error.

Here is how I think these terms align:

DDX Driver --> xf86-video-amdgpu
Kernel Driver --> amdgpu
Kernel DRM --> (I am not sure what integrates Direct Rendering Management here)

I also don't know what package version this patch was first applied to.
I think perhaps my "kernel driver does not support color management". How could I enable this? Is it enabled by default?

Should I post a bug report or is this user error, and if so, what package should be specified?

Offline

#22 2019-06-20 20:44:02

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: No options for increasing visual saturation for AMD cards

Perhaps the driver only supports it on certain cards and not all cards? If that's the case then maybe it isn't a bug?

I also wondered if maybe there's no hardware support for this in your card, but that can't be right because the Windows driver can do saturation changes.

About user error, there's just that "dc=1" module parameter to take care of and you managed to do that because you see a "1" inside /sys/module/amdgpu/parameters/dc.

About versions, what might be interesting is that I tried it with the "linux-lts" kernel as well which is a 4.19.x kernel, and it works there as well. I see the CTM property here when using the old kernel, and the color-demo-app program can change it.

Last edited by Ropid (2019-06-20 20:45:41)

Offline

#23 2019-06-20 21:18:52

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

I believe I read somewhere (I can't remember) that the non-legacy color management is enabled for all cards GCN1 and up, but I could be remembering wrong.
About the kernels, I loaded linux-lts and it still was missing these non-legacy color management properties.

I don't know what the steps to reproduce this are though, so I can't really make a bug report.
My journalctl: http://sprunge.us/5QGiMf

Journalctl directly after trying the cmsaturation script: http://sprunge.us/2yOlCW

Last edited by kinru (2019-06-20 21:38:40)

Offline

#24 2019-06-30 01:53:14

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: No options for increasing visual saturation for AMD cards

In another forum post somebody else seemed to think the output of "glxinfo" was important, here it is: http://sprunge.us/VLnDgM

Offline

Board footer

Powered by FluxBB