Can't create new custom resolution on Wayland

I am in the market for a new monitor. It would be helpful to find out what edid (displayid) is in the monitor firmware before I purchase. I don’t have much confidence in a pre-sales support request. It seems monitor manufactures many times just put the VESA standard minimum in the firmware so they pass VESA certification then supply drivers to ms and apple to add the other supported resolutions. I have not seen any monitor manufacturers publish the edid binary blobs, nor the parameter details, but wouldn’t that be useful.

It also seems that ms has multiple versions of custom edid drivers the manufacturers have to use over the years. I did find tools to dump edid in mswindows and I suppose macos also has ways. I do not have any mswindos or macos. Maybe someone who does can chime in.

Could you do it with a VM? If you can do it with a VM, I think it’s going to be easier. Else I have to find a device which can run windows (which is not that likely to happen). Another option would be to ask somenone who has MS windows. All my friends are using MS Windows, but they don’t really know anything about their computers, even less than me. So guiding them would take to long.

I’ve been experimenting with weston and ran across a qemu feature that makes generating edid easy. The qemu project added edid support and provide a utility qemu-edid that is quite interesting.

Experiment with settings

qemu-edid -v Custom -n Fix -s 1 -d 96 -x 2560 -y 1080 -X 3440 -Y 1440 | di-edid-decode 
Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: RHT
    Model: 4660
    Serial Number: 1
    Made in: week 42 of 2014
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 8
    DisplayPort interface
    Maximum image size: 67 cm x 28 cm
    Gamma: 2.20
    Supported color formats: RGB 4:4:4
    Default (sRGB) color space is primary color space
    First detailed timing includes the native pixel format and preferred refresh rate
  Color Characteristics:
    Red  : 0.6396, 0.3300
    Green: 0.2998, 0.5996
    Blue : 0.1503, 0.0595
    White: 0.3125, 0.3291
  Established Timings I & II:
    DMT 0x04:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
    DMT 0x09:   800x600    60.316541 Hz   4:3     37.879 kHz     40.000000 MHz
    DMT 0x10:  1024x768    60.003840 Hz   4:3     48.363 kHz     65.000000 MHz
  Standard Timings:
    DMT 0x54:  2048x1152   60.000000 Hz  16:9     72.000 kHz    162.000000 MHz (RB)
    DMT 0x52:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz
    DMT 0x45:  1920x1200   59.884600 Hz  16:10    74.556 kHz    193.250000 MHz
    DMT 0x33:  1600x1200   60.000000 Hz   4:3     75.000 kHz    162.000000 MHz
    DMT 0x3a:  1680x1050   59.954250 Hz  16:10    65.290 kHz    146.250000 MHz
    DMT 0x2f:  1440x900    59.887445 Hz  16:10    55.935 kHz    106.500000 MHz
    DMT 0x23:  1280x1024   60.019740 Hz   5:4     63.981 kHz    108.000000 MHz
    DMT 0x20:  1280x960    60.000000 Hz   4:3     60.000 kHz    108.000000 MHz
  Detailed Timing Descriptors:
    DTD 1:  2560x1080   74.998342 Hz  64:27    83.773 kHz    289.520000 MHz (677 mm x 285 mm)
                 Hfront  640 Hsync  76 Hback  180 Hpol N
                 Vfront    5 Vsync   5 Vback   27 Vpol N
    Established timings III:
      DMT 0x17:  1280x768    59.870228 Hz   5:3     47.776 kHz     79.500000 MHz
      DMT 0x27:  1360x768    60.015162 Hz  85:48    47.712 kHz     85.500000 MHz
      DMT 0x2a:  1400x1050   59.978442 Hz   4:3     65.317 kHz    121.750000 MHz
      DMT 0x3e:  1792x1344   59.999789 Hz   4:3     83.640 kHz    204.750000 MHz
      DMT 0x41:  1856x1392   59.995184 Hz   4:3     86.333 kHz    218.250000 MHz
      DMT 0x49:  1920x1440   60.000000 Hz   4:3     90.000 kHz    234.000000 MHz
    Display Range Limits:
      Monitor ranges (Bare Limits): 50-125 Hz V, 30-160 kHz H, max dotclock -1744 MHz
    Display Product Name: 'Fix'
  Extension blocks: 1
Checksum: 0xd4

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Native detailed modes: 0
  Video Data Block:
    VIC  89:  2560x1080   50.000000 Hz  64:27    56.250 kHz    185.625000 MHz
    VIC  31:  1920x1080   50.000000 Hz  16:9     56.250 kHz    148.500000 MHz
Checksum: 0x50

----------------

Failures:

Block 1, CTA-861 Extension Block:
  Padding: Contains non-zero bytes.
EDID conformity: FAIL

If that looks like it will work for you save it to a file

qemu-edid -v Custom -n Fix -s 1 -d 96 -x 2560 -y 1080 -X 3440 -Y 1440 -o /lib/firmware/edid/2560x1080@75.bin

And add to the kernel command line

drm.edid_firmware=DP-2:edid/2560x1080@75.bin
1 Like

I’m getting the same output like you, so it seems like it didn’t work. If it was right, how would you save it to a file? I didn’t have to deal with .bin files in the past, so do I have to create one before saving the edid to it?

I am not following you here. Wild guess: does the /lib/firmware/edid directory exist?

The second execution of the qemu-edid command includes a -o switch that saves the edid to a file rather than piping it to di-edid-decode like the first execution of the qemu-edid command.

In UNIX and Linux a .bin extension is nothing special like you get with MS OSs. It is more for the benefit of the user as a type of notation. Some of this notation has been so common that some commands recognize them but by convention not out of necessity.

Ok, thanks for that explanation. I created the edid directory and now I have the .bin file. How can I add it to the Kernel command line? (Btw sry that I didn’t answer, I haven’t been on my PC for a while)

see post #23

Can you also post the di-edid-decode output for what qemu-edid generated? I wonder if it would be different for systems with different GPUs. The GPU in mine does not have a very high clock rate.

At first, I tried it as you said in post 23, but it didnt’t work so I wanted to know if I had done it right. I tried adding it to the GRUB_CMDLINE_LINUX_DEFAULT as well (the one that you edit with grub customizer) but it didn’t work. If it was right it would show up in my settings, right?

My output:

Block 0, Base EDID:
EDID Structure Version & Revision: 1.4
Vendor & Product Identification:
Manufacturer: RHT
Model: 4660
Serial Number: 1
Made in: week 42 of 2014
Basic Display Parameters & Features:
Digital display
Bits per primary color channel: 8
DisplayPort interface
Maximum image size: 67 cm x 28 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4
Default (sRGB) color space is primary color space
First detailed timing includes the native pixel format and preferred refresh rate
Color Characteristics:
Red : 0.6396, 0.3300
Green: 0.2998, 0.5996
Blue : 0.1503, 0.0595
White: 0.3125, 0.3291
Established Timings I & II:
DMT 0x04: 640x480 59.940476 Hz 4:3 31.469 kHz 25.175000 MHz
DMT 0x09: 800x600 60.316541 Hz 4:3 37.879 kHz 40.000000 MHz
DMT 0x10: 1024x768 60.003840 Hz 4:3 48.363 kHz 65.000000 MHz
Standard Timings:
DMT 0x54: 2048x1152 60.000000 Hz 16:9 72.000 kHz 162.000000 MHz (RB)
DMT 0x52: 1920x1080 60.000000 Hz 16:9 67.500 kHz 148.500000 MHz
DMT 0x45: 1920x1200 59.884600 Hz 16:10 74.556 kHz 193.250000 MHz
DMT 0x33: 1600x1200 60.000000 Hz 4:3 75.000 kHz 162.000000 MHz
DMT 0x3a: 1680x1050 59.954250 Hz 16:10 65.290 kHz 146.250000 MHz
DMT 0x2f: 1440x900 59.887445 Hz 16:10 55.935 kHz 106.500000 MHz
DMT 0x23: 1280x1024 60.019740 Hz 5:4 63.981 kHz 108.000000 MHz
DMT 0x20: 1280x960 60.000000 Hz 4:3 60.000 kHz 108.000000 MHz
Detailed Timing Descriptors:
DTD 1: 2560x1080 74.998342 Hz 64:27 83.773 kHz 289.520000 MHz (677 mm x 285 mm)
Hfront 640 Hsync 76 Hback 180 Hpol N
Vfront 5 Vsync 5 Vback 27 Vpol N
Established timings III:
DMT 0x17: 1280x768 59.870228 Hz 5:3 47.776 kHz 79.500000 MHz
DMT 0x27: 1360x768 60.015162 Hz 85:48 47.712 kHz 85.500000 MHz
DMT 0x2a: 1400x1050 59.978442 Hz 4:3 65.317 kHz 121.750000 MHz
DMT 0x3e: 1792x1344 59.999789 Hz 4:3 83.640 kHz 204.750000 MHz
DMT 0x41: 1856x1392 59.995184 Hz 4:3 86.333 kHz 218.250000 MHz
DMT 0x49: 1920x1440 60.000000 Hz 4:3 90.000 kHz 234.000000 MHz
Display Range Limits:
Monitor ranges (Bare Limits): 50-125 Hz V, 30-160 kHz H, max dotclock -1744 MHz
Display Product Name: ‘Fix’
Extension blocks: 1
Checksum: 0xd4


Block 1, CTA-861 Extension Block:
Revision: 3
Native detailed modes: 0
Video Data Block:
VIC 89: 2560x1080 50.000000 Hz 64:27 56.250 kHz 185.625000 MHz
VIC 31: 1920x1080 50.000000 Hz 16:9 56.250 kHz 148.500000 MHz
Checksum: 0x50


Failures:

Block 1, CTA-861 Extension Block:
Padding: Contains non-zero bytes.
EDID conformity: FAIL

The decode of the edid generated by qemu-edid is different from what I get on my machine. That indicates to me that it does take into account hardware capabilities. Pretty cool.

What do you get when you

cat /proc/cmdline

Is there anything in the output of

dmesh -H

that shows the custom edid was used?

Did you mean sudo dmesg -H

First one (last Argument is because of corectrl):

BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.8.11-300.fc40.x86_64 root=UUID=a61897cb-df93-48f0-bf31-53b326f65db0 ro rootflags=subvol=root rhgb quiet drm.edid_firmware=DP-2:edid/2560x1080@75.bin amdgpu.ppfeaturemask=0xffffffff

I don’t know what you mean by

dmesh -H

but there isn’t anything that shows that the edid was used in

sudo dmesg -H

too. What does that command?

Running with root privileges is implied. Current fedora versions require root for dmesg.

My expectation is that every user should learn to figure stuff like this, where root privilege is required, out for themselves and continue the dialog in forums like this when more help is needed. I also think every driver should learn how to do basic automobile maintenence before they can get a driver’s license;-)

For me sudo would not work as I run as a user without sudo privileges. The instructions would need to be different yet again.

I have done many very detailed writeups on how to do various computer tasks as part of my employment. I found that nobody follows them and it turned out to be a waste of my time. There may be a balance between what to include and what is appropriate to leave to the user’s own devices. I am clueless on where that balance point really is.

looks reasonable

What do you get when you

ls -lZ /lib/firmware/edid/2560x1080@75.bin

dmesg - print or control the kernel ring buffer

The kernel messages go to the kernel ring buffer and dmesg prints them out. The loading of the edid should have generated a kernel message.

I get this.

-rw-r–r–. 1 root root unconfined_u:object_r:lib_t:s0 256 7. Jun 18:28 /lib/firmware/edid/2560x1080@75.bin

I follow :eyes:

After some experimenting I found that dmesg will only show a message when the kernel has an error loading the edid firmware. So I was wrong in directing you to look for a message indicating a successful loading of the edid firmware in the dmesg output.

On a test with a successful loading of the edid firmware I found the monitor connected

cat /sys/class/drm/card1-DP-2/status 
connected

And the decode of the edid

di-edid-decode /sys/class/drm/card1-DP-2/edid

matched the custom edid loaded via the drm.edid_firmware kernel parameter.

What make you think it did not work for you?

I couldn’t choose the resolution in the settings. But today, out of nowhere, it worked! I started my Computer and didn’t know what was going on. My resolution had changed. Then I realized that the edid worked. I don’t know why it suddently works, but I’m having a resolution of 2560x1080 with 75hz. Is there a way to have my old resolution (3440x1440) too and having 165hz?

I have a question: What does that command (#post 42) do

qemu-edid -v Custom -n Fix -s 1 -d 96 -x 2560 -y 1080 -X 3440 -Y 1440 | di-edid-decode

Generate an edid according to supplied parameters and then decode it.

qemu-edid --help

will show what each parameter is for.

Is seems the qemu-edid command does not have the option to support the higher resolution high refresh edid your monitor supports.

What is needed is to get a copy of the edid from some source Samsung does provide it for. From your earlier comments I conclude that Samsung does support MSWindows with all the modes you are interested in. I’ve provided links to MS articles on how to dump the edid while running MSWindows.

I do not have, nor do I want, any MS products. Maybe someone else who does will chime in.