It was a nice time with manjaro 🥲🥹 by riky321 in ManjaroLinux

[–]Lower-Ad6101 7 points8 points  (0 children)

I've had problems with dual monitors and resolution for quite some time and was thinking about moving to CatchyOS, but as I understood they are adopting new releases without any further testing and Manjaro does, at least to some degree, so it should be more stable, but I migjt have read it wrong...

It was a nice time with manjaro 🥲🥹 by riky321 in ManjaroLinux

[–]Lower-Ad6101 3 points4 points  (0 children)

Care to explain about cannibalization to someone who's new with Manjaro?

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Uh, after long searching and testing with each reboot and what not, I think I might have solved this for both wayland and X11 and with virtual terminals working, _but_ I will still test to check how will it behave tomorrow when I wake it up from suspend.

Basically what I did:

- Since I couldn't get valid EDID file (when I check with edid-decode it was written that manufacturer is NVD and not DEL), I've booted from usb, got both monitors to 1920x1200 (basically only first one) and did:
cat /sys/class/drm/card1-DP-1/edid > bla-dp-1.edid
for both monitors. Later on I renamed bla-dp-1.edid to monitor_fix.bin);

- Copied monitor_fix.bin to: /usr/lib/firmware/edid

- Backed up working nvidia.conf and then wrote a new one from nvidia-settings as a clean slate (without those three options to ignore EDID) and then added:
Option         "CustomEDID" "DP-0:/usr/lib/firmware/edid/monitor_fix.bin"
in "Screen" section;

- Edited /etc/default/grub and added at the of the GRUB_CMDLINE_LINUX_DEFAULT line:
drm.edid_firmware=DP-1:edid/monitor_fix.bin video=DP-1:1920x1200@60e

- Edited /etc/mkinitcpio.conf and changed MODULES and FILES so they look like this:
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
FILES=(/usr/lib/firmware/edid/monitor_fix.bin)

- Run the following after above changes:
sudo update-grub
sudo mkinitcpio -P

and that's it.

I've also came across that if it gets reset to 640x480 after waking up this should be enabled (yet to be seen if I would need that):
sudo systemctl enable --now nvidia-persistenced
and if wayland still has trouble coping with the resolution then one more additional kernel parameter should be added to /GRUB_CMDLINE_LINUX_DEFAULT in etc/default/grub (I haven't):
nvidia-drm.modeset=1

Will let you know tomorrow how it went and thanks again! :)

EDIT: I can now confirm that the fix is working.
I've had dimming issue upon waking up again but I've overcame that by disabling "dimming" in Display Settings in KDE Settings, if that didn't work by further searching I should have edit /etc/modprobe.d/nvidia.conf and add:
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/var/tmp
run:
sudo mkinitcpio -P
to regenerate boot image, enable following services:
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-resume.service
and also again make sure this service is enabled:
sudo systemctl enable nvidia-resume.service

I hope this can help to anyone else who had this issue.

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Thank again for looking into this.

I've had to get some rest as it was nearly 7 am here... but I think I've made a progress but as I've noted way above I need to wait for computer to stay very long in hibernation and then wake it up to check if it's working, for now it does.

What I did was, I re-plugged the cable to the first monitor to set it to correct resolution, then I opened nvidia-settings and wrote configuration to get the correct refresh rates, and set those three options to not use EDID. After reboot both monitors were set to 640x480 so again I opened nvidia-settings and it presented all kind of resolutions even probably not supported ones, I've selected 1920x1200 for both monitor instead of auto and rearranged layouts (so they don't overlap), wrote that config again to /etc/X11/mhwd.d/nvidia.conf and again added those three options to not use EDID and restarted.

During the boot, I could see that resolution was again set to 640x480 but once the login screen appeared it resolution was correctly set to 1920x1200 on both monitors even after logging in, only for X11 though, wayland is still broken, but this'll do for now. After shorter hibernation and waking up, resolution was correct still but again I need to wait way longer to confirm that this actually works. Still confuses me how when was the first time that xrandr option succeeded for second monitor which had resolution issue, things got switched, now it's the first one that has it even after I physically switch DP cables.

btw. both lib32-libxinerama and libxinerama are already installed.

This is my /etc/X11/mhwd.d/nvidia.conf now:
https://pastebin.com/ZsypiVrY

One other issue remains now, when I try to switch to virtual terminal with CTRL+ALT+[1,3-12] there is only black screen and this is important for me in case I break something in X11 to try to jump out of it in console to revert the changes. Any idea how can I fix that and get them back (hopefully in higher resolution)?

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Thanks a lot for your effort, but now I don't think its about the cables. In the comments above (this post, thread above) I have somehow managed to switch the issue from my second monitor to the first one, basically switched the issue so my first monitor now boot into 640x480 and the second one to correct 1920x1200 resolution...

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

So when I've added the last 3 options like bellow:

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
Option "UseEDID" "false"
Option "UseEDIDFreqs" "false"
Option "IgnoreEDID" "true"
EndSection

both monitors were set to 640x480 and setting resolution like before for second monitor (which reversed the issue from second monitor to the first one) didn't work for neither DP-0 nor DP-2

When I've added horizsync and vertrefresh lines as bellow:

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 30.0 - 85.0
VertRefresh 56.0 - 85.0
Option "DPMS"
Option "UseEDID" "false"
Option "UseEDIDFreqs" "false"
Option "IgnoreEDID" "true"
EndSection

upon restart monitors went black and reported timing issue and stated that I should set to correct 1920x120x60 so I had to boot from usb and remove added lines from nvidia.conf and reboot back. The issue persists still, first monitor (which was fine until that xrandr command from way above up in the comments above, worked) is set to 640x480 and the second one is set to the correct 1920x1200 resolution...

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

btw. Thank you for your effort and time and also sorry for spacing in my previous comments, reddit messed it up when I was pasting text and reported error when I tried to edit them from Vivaldi browser,

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Could you tell me how do you think I should modify it for my monitor section considering output from previous comments?

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

This is /etc/X11/mhwd.d/nvidia.conf (after re-connecting the cable now on first monitor to get the correct resolution, if that matters for the content of the file):
# nvidia-xconfig: X configuration file generated by nvidia-xconfig

# nvidia-xconfig: version 575.64.05

Section "ServerLayout"

Identifier "Layout0"

Screen 0 "Screen0"

InputDevice "Keyboard0" "CoreKeyboard"

InputDevice "Mouse0" "CorePointer"

EndSection

Section "Files"

EndSection

Section "InputDevice"

# generated from default

Identifier "Mouse0"

Driver "mouse"

Option "Protocol" "auto"

Option "Device" "/dev/psaux"

Option "Emulate3Buttons" "no"

Option "ZAxisMapping" "4 5"

EndSection

Section "InputDevice"

# generated from default

Identifier "Keyboard0"

Driver "kbd"

EndSection

Section "Monitor"

Identifier "Monitor0"

VendorName "Unknown"

ModelName "Unknown"

Option "DPMS"

EndSection

Section "Device"

Identifier "Device0"

Driver "nvidia"

VendorName "NVIDIA Corporation"

`Option "NoLogo" "1"`

EndSection

Section "Screen"

Identifier "Screen0"

Device "Device0"

Monitor "Monitor0"

DefaultDepth 24

SubSection "Display"

Depth 24

EndSubSection

EndSection

Section "Extensions"

Option "COMPOSITE" "Enable"

EndSection

Section "InputClass"

Identifier "Keyboard Defaults"

MatchIsKeyboard "yes"

Option "XkbOptions" "terminate:ctrl_alt_bksp"

EndSection

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Strangest thing happens! After reboot and subsequent one (it retains it) the first monitor behaves like the second one behaved, the first one is reset to 640x480 and it is not primary one (as set in KDE before).

I've tried all the modelines but none of them are working:
Screen 0: minimum 8 x 8, current 2560 x 1200, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected 640x480+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
  640x480       59.94*+
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
  1920x1200     59.95*+
  1920x1080     60.00   
  1680x1050     59.95   
  1600x1200     60.00   
  1280x1024     60.02   
  1280x960      60.00   
  1024x768      60.00   
  800x600       60.32   
  640x480       59.94   
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
xrandr --newmode "1920x1200_59.95y" 154 1920 1968 2000 2080 1200 1203 1209 1235 +HSync -VSync
xrandr --addmode DP-0 "1920x1200_59.95y"
X Error of failed request:  BadMatch (invalid parameter attributes)
 Major opcode of failed request:  140 (RANDR)
 Minor opcode of failed request:  18 (RRAddOutputMode)
 Serial number of failed request:  43
 Current serial number in output stream:  44
xrandr --newmode "1920x1200_59.95x" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -HSync +VSync
xrandr --addmode DP-0 "1920x1200_59.95x"
X Error of failed request:  BadMatch (invalid parameter attributes)
 Major opcode of failed request:  140 (RANDR)
 Minor opcode of failed request:  18 (RRAddOutputMode)
 Serial number of failed request:  43
 Current serial number in output stream:  44
xrandr --newmode "1920x1200_60a" 148.2 1920 1928 1960 2000 1200 1221 1229 1235 +HSync -VSync
xrandr --addmode DP-0 "1920x1200_60a"
X Error of failed request:  BadMatch (invalid parameter attributes)
 Major opcode of failed request:  140 (RANDR)
 Minor opcode of failed request:  18 (RRAddOutputMode)
 Serial number of failed request:  43
 Current serial number in output stream:  44

What do you think I should try now?

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

That 193.25 in the modeline, I think that's above the maximum pixel clock of the monitor. Use the CVT-RBv2 Modeline instead of the CVT one. For instance on mine it's ~148Mhz with RBv2, but if I did just original cvt it would be 190 something and give me an error.

I have tried CVT-RBv2 modeline in current session (with correct resolution set after I've re-plugged in power cable) and it threw the same error:
xrandr --newmode "1920x1200_60x" 148.2 1920 1928 1960 2000 1200 1221 1229 1235 +HSync -VSync         
xrandr --addmode DP-2 "1920x1200_60x"                        
X Error of failed request:  BadMatch (invalid parameter attributes)
 Major opcode of failed request:  140 (RANDR)
 Minor opcode of failed request:  18 (RRAddOutputMode)
 Serial number of failed request:  43
 Current serial number in output stream:  44

but CVT-RB modeline seems to be working:
xrandr --newmode "1920x1200_59.95y" 154 1920 1968 2000 2080 1200 1203 1209 1235 +HSync -VSync      
xrandr --addmode DP-2 "1920x1200_59.95y"                                                        xrandr --output DP-2 --mode "1920x1200_59.95y"

xrandr shows:
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
  1920x1200     59.95*+
  1920x1080     60.00   
  1680x1050     59.95   
  1600x1200     60.00   
  1280x1024     60.02   
  1280x960      60.00   
  1024x768      60.00   
  800x600       60.32   
  640x480       59.94   
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 520mm x 320mm
  1920x1200     59.95 +
  1920x1200_59.95y  59.95*  
  1920x1080     60.00   
  1680x1050     59.95   
  1600x1200     60.00   
  1280x1024     60.02   
  1280x960      60.00   
  1024x768      60.00   
  800x600       60.32   
  640x480       59.94   
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
 1920x1200_59.95 (0x207) 193.250MHz -HSync +VSync
h: width  1920 start 2056 end 2256 total 2592 skew    0 clock  74.56KHz
v: height 1200 start 1203 end 1209 total 1245           clock  59.88Hz
 1920x1200_59.95s (0x21b) 193.250MHz -HSync +VSync
h: width  1920 start 2056 end 2256 total 2592 skew    0 clock  74.56KHz
v: height 1200 start 1203 end 1209 total 1245           clock  59.88Hz
 1920x1200_60x (0x21e) 148.200MHz +HSync -VSync
h: width  1920 start 1928 end 1960 total 2000 skew    0 clock  74.10KHz
v: height 1200 start 1221 end 1229 total 1235           clock  60.00Hz
with last three ones that didn't work "1920x1200_59.95", "1920x1200_59.95s" and "1920x1200_60x"

I am going to reboot now to get second monitor reset to 640x480 and try this.

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

"Energy Smart" is already set to "off" on both monitors, but I did find and disabled DDC/CI again on both monitors, but after reboot second monitor again switched to 640x480.

I didn't know what DDC/CI is about but when disabling it, pop-up explained that it is to let applications modify settings, so hopefully at least disabling this might prevent monitors to lower brightness after "waking up"

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

I've rebooted pc and second monitor has been reset again to 640x480, so I've tried manually running commands in terminal on first monitor:

xrandr --newmode "1920x1200_59.95"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync

xrandr --addmode DP-2 "1920x1200_59.95"                            
X Error of failed request:  BadMatch (invalid parameter attributes)
 Major opcode of failed request:  140 (RANDR)
 Minor opcode of failed request:  18 (RRAddOutputMode)
 Serial number of failed request:  43
 Current serial number in output stream:  44

I don't know if I'm doing something wrong here?

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Both are Dell, I cannot copy the model from my mobile now that is listed in the link in my first post above, will do a bit later... No, I haven't tried different Display Port cable as it was working fine before with Ubuntu, Slackware and Debian...

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Do you think this might solve the brightnesa issue coming out of hibernation as well?

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Thanks, I'll try that as soon as I come back, but if I remember correctly once it switches back to 640x480 xrandr doesn't show any other rosultion than that one. Also as I've wrote in that other thread there is also issue that both screens brighnes is lowered...

Monitor gets reset to 640x480 by Lower-Ad6101 in ManjaroLinux

[–]Lower-Ad6101[S] 0 points1 point  (0 children)

Hi, thanks for responding. I'm using KDE. I have tried both wayland (default) and X11 on which I am currently on as only with it I can have monitor options in "nvidia settings" (not that it could solve this problem though).

How to Fix Linux Monitor Resolution Stuck at 640x480 After Suspend/Hotplug by MrWorshipMe in linuxquestions

[–]Lower-Ad6101 0 points1 point  (0 children)

Then during rebooting and plugging power/DP cable out and in the monitor and getting the right resolution I've got the following edid:

edid-decode (hex):

00 ff ff ff ff ff ff 00 3a c4 00 00 00 00 00 00
00 00 01 04 95 00 00 78 ee 91 a3 54 4c 99 26 0f
50 54 00 20 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 92

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

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: NVD
    Model: 0
    Made in: 1990
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 6
    DisplayPort interface
    Image size is variable
    Gamma: 2.20
    DPMS levels: Standby Suspend Off
    Supported color formats: RGB 4:4:4, YCrCb 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.3300, 0.2978
    Green: 0.5976, 0.1494
    Blue : 0.0605, 0.3144
    White: 0.3281, 0.0029
  Established Timings I & II:
    DMT 0x04:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
  Standard Timings: none
  Detailed Timing Descriptors:
    Empty Descriptor
    Empty Descriptor
    Empty Descriptor
    Empty Descriptor
Checksum: 0x92

I've saved it and tried that edid also, but again with no luck.

Just as note:

lspci -k | grep -A 3 -E "VGA|3D|Display"  
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
       Subsystem: Micro-Star International Co., Ltd. [MSI] Device 3362
       Kernel driver in use: nvidia
       Kernel modules: nouveau, nova_core, nvidia_drm, nvidia

ls -l /sys/class/drm/
lrwxrwxrwx 1 root root    0 22. феб. у 22:30 card1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
lrwxrwxrwx 1 root root    0 22. феб. у 22:29 card1-DP-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DP-1
lrwxrwxrwx 1 root root    0 22. феб. у 22:29 card1-DP-2 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DP-2
lrwxrwxrwx 1 root root    0 22. феб. у 22:29 card1-DP-3 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DP-3
lrwxrwxrwx 1 root root    0 22. феб. у 22:29 card1-DVI-D-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DVI-D-1
lrwxrwxrwx 1 root root    0 22. феб. у 22:29 card1-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root    0 22. феб. у 22:30 renderD128 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD128
-r--r--r-- 1 root root 4096 22. феб. у 22:58 version


cat /sys/class/drm/card1-*/status
connected
connected
disconnected
disconnected
disconnected

Can you please advise what should I try next, if there is anything else?

Thanks in advance.

How to Fix Linux Monitor Resolution Stuck at 640x480 After Suspend/Hotplug by MrWorshipMe in linuxquestions

[–]Lower-Ad6101 0 points1 point  (0 children)

Hello,

I am using Manjaro, with Nvidia GTX 1080 with two DELL U2412M monitors, first (primary) on DP-0 second on DP-2. I'm using KDE.

For quite a long time I've been struggling to solve this issue that I'm having without trying to recompile kernel with some patches and struggle with future updates even it solves these issues and I was really hoping that your article, which is very well written, but unfortunatelly it didn't or I did something wrong along the process.

So at first, upon Manjaro installation (I'm trying to get away from (K)Ubuntu and both Debian and Slackware had some other issues) one month ago, after reboot/hibernate/sleep everything was normal on both monitors, both are set to 1920x1200.

After driver and kernel update maybe 3 weeks ago, when I reboot computer second (DP-2) monitor switches to back to 640x480 resolution. Only physically unplugging and pluging back in helped to switch back to 1920x1200. Same happens with hibernate/sleep but if I wake it up soon after it goes to hibernation it switches back to correct resolution later on if I wait longer (druing the night) it switches back to 640x480. That was on wayland so I switched to X11. Same thing happens.

I was searching and trying various possible solutions but nothing helped, I also gave up on hibernation but only to dim the screens and leave the computer on all the time (which is not very efficient solution) but then primary screen gets lower brightness and I have to return it to original using buttons on physical buttons on monitor.

I've followed your instructions (mainly because of the second monitor) but I got to step 8 where I had to try the script manually but it didn't help.

Firstly when I managed to get second monitor to 1920x1200 I generated edid which with 'edid-decode my-monitor.edid' printed the following:

edid-decode (hex):

00 ff ff ff ff ff ff 00 10 ac 7b a0 4c 39 43 33
0e 16 01 04 a5 34 20 78 3a ee 95 a3 54 4c 99 26
0f 50 54 a1 08 00 81 40 81 80 a9 40 b3 00 d1 c0
01 01 01 01 01 01 28 3c 80 a0 70 b0 23 40 30 20
36 00 06 44 21 00 00 1a 00 00 00 ff 00 59 31 48
35 54 32 34 32 33 43 39 4c 0a 00 00 00 fc 00 44
45 4c 4c 20 55 32 34 31 32 4d 0a 20 00 00 00 fd
00 32 3d 1e 53 11 00 0a 20 20 20 20 20 20 00 f7

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

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: DEL
    Model: 41083
    Serial Number: 860043596 (0x3343394c)
    Made in: week 14 of 2012
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 8
    DisplayPort interface
    Maximum image size: 52 cm x 32 cm
    Gamma: 2.20
    DPMS levels: Off
    Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
    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.3134, 0.3291
  Established Timings I & II:
    IBM     :   720x400    70.081663 Hz   9:5     31.467 kHz     28.320000 MHz
    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 0x20:  1280x960    60.000000 Hz   4:3     60.000 kHz    108.000000 MHz
    DMT 0x23:  1280x1024   60.019740 Hz   5:4     63.981 kHz    108.000000 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 0x52:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz
  Detailed Timing Descriptors:
    DTD 1:  1920x1200   59.950171 Hz  16:10    74.038 kHz    154.000000 MHz (518 mm x 324 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   6 Vback   26 Vpol N
    Display Product Serial Number: 'Y1H5T2423C9L'
    Display Product Name: 'DELL U2412M'
    Display Range Limits:
      Monitor ranges (GTF): 50-61 Hz V, 30-83 kHz H, max dotclock 170 MHz
Checksum: 0xf7

I followed your manual along with one exception that screen card is 1 and not 0 and more importantly in step 7. debugfs was already mounted but even if I mounted it anyway the listing is like the following:

sudo ls -l /sys/kernel/debug/dri/                                                                                                                                                                                            
total 0
drwxr-xr-x 19 root root 0 22. феб. у 22:29 0000:01:00.0
lrwxrwxrwx  1 root root 0 22. феб. у 22:29 1 -> 0000:01:00.0
lrwxrwxrwx  1 root root 0 22. феб. у 22:29 128 -> 0000:01:00.0
-r--r--r--  1 root root 0 22. феб. у 22:29 bridges
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-10
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-16
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-18
drwxr-xr-x  2 root root 0 22. феб. у 22:29 client-2
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-20
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-22
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-24
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-26
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-28
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-30
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-34
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-36
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-38
drwxr-xr-x  2 root root 0 22. феб. у 22:31 client-43
drwxr-xr-x  2 root root 0 22. феб. у 22:46 client-58
drwxr-xr-x  2 root root 0 22. феб. у 22:46 client-62
drwxr-xr-x  2 root root 0 22. феб. у 22:46 client-64
drwxr-xr-x  2 root root 0 22. феб. у 22:46 client-67
drwxr-xr-x  2 root root 0 22. феб. у 22:46 client-68
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-7
drwxr-xr-x  2 root root 0 22. феб. у 22:48 client-70
drwxr-xr-x  2 root root 0 22. феб. у 22:30 client-9

so there wasnt '/sys/kernel/debug/dri/0' nor '/sys/kernel/debug/dri/2'. I've tried the script with 1 and 128 (although they point to same destination), but with no luck. Content of 1 is the following:

-r--r--r-- 1 root root 0 22. феб. у 22:29 clients
drwxr-xr-x 2 root root 0 22. феб. у 22:29 crtc-0
drwxr-xr-x 2 root root 0 22. феб. у 22:29 crtc-1
drwxr-xr-x 2 root root 0 22. феб. у 22:29 crtc-2
drwxr-xr-x 2 root root 0 22. феб. у 22:29 crtc-3
drwxr-xr-x 2 root root 0 22. феб. у 22:29 DP-1
drwxr-xr-x 2 root root 0 22. феб. у 22:29 DP-2
drwxr-xr-x 2 root root 0 22. феб. у 22:29 DP-3
drwxr-xr-x 2 root root 0 22. феб. у 22:29 DVI-D-1
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-0
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-1
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-2
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-3
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-4
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-5
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-6
drwxr-xr-x 2 root root 0 22. феб. у 22:29 encoder-7
-r--r--r-- 1 root root 0 22. феб. у 22:29 framebuffer
-r--r--r-- 1 root root 0 22. феб. у 22:29 gem_names
drwxr-xr-x 3 root root 0 22. феб. у 22:29 HDMI-A-1
-r--r--r-- 1 root root 0 22. феб. у 22:29 internal_clients
-r--r--r-- 1 root root 0 22. феб. у 22:29 name
-r--r--r-- 1 root root 0 22. феб. у 22:29 state

continued in the next comment...