165hz internal screen stuck at 40hz

Hello,

I have installed 495.44 NVIDIA driver from .run file.

My Laptop Specs:
GPU-1: Intel i7-10875H with UHD Graphics
GPU-2: NVIDIA RTX 3070

Screen-1: Internal Laptop Screen, 165hz, 2K (eDP-1)
Screen-2: External Samsung Monitor, 144hz, 2K (DP-0)

My Problem:
If I use intel drivers to render screen, it has stuck at 40hz and doesn’t recognize the External Monitor(DP-0).
If I use NVIDIA drivers to render screen, it works perfectly 144hz with external monitor(DP-0) but nothing on internal monitor(eDP-1) even it isn’t recognizing it.

What I want:
NVIDIA Driver should run both screen with 165hz and 144hz, I don’t want intel because intel drivers is stuck at 40hz even if I set from display settings and xrandr to 165hz, nothing changes. It says 165hz but glxgears and my eyes see slow 40hz refresh rate only.

If some solution to fix to intel 40hz stuck drivers too, I will be very very thankful.

Can you help me to fix this problem please?

Here is my bug_report:
nvidia-bug-report.log.gz (454.5 KB)

Have a nice day!

First of all, using the runfile installer is not recommended, especially on a hybrid graphics system. Also, you’re not using dkms so you will have to reinstall the driver on any kernel update. Rather use the debian repo driver. Ths will also come with basic config.
As a first step, you will have to get your intel igpu working correctly, it being stuck at the lowest refresh rate seems to be a lon standing edid parsing bug in the i915 driver, latest bug reports:
https://bugzilla.kernel.org/show_bug.cgi?id=214011
https://gitlab.freedesktop.org/drm/intel/-/issues/2939

The work-arounds seem to be either loading a custom edid or adding a special modeline:
https://forums.gentoo.org/viewtopic-p-8286220.html#8286220

once you get your internal display running, you can configure both gpus for render offload and nvidia output sink for external monitors:
https://download.nvidia.com/XFree86/Linux-x86_64/495.44/README/primerenderoffload.html
Enabling output sink

xrandr --setprovideroutputsource NVIDIA-G0 modesetting && xrandr --auto

Edit: fixed incorrect command.

Thanks for your answer,

If I inspect the EDID of the laptop screen, it’s Maximum Horizontal Frequency(max_Hfreq) is less than my screen needs. I have edited it with wxedid app.

Here is the cvt 2560 1440 165:

 # 2560x1440 164.90 Hz (CVT) hsync: 261.86 kHz; pclk: 938.50 MHz
Modeline "2560x1440_165.00"  938.50  2560 2792 3072 3584  1440 1443 1448 1588 -hsync +vsync

It requres 261.86 kHz but edid only supports max to 255 kHz, maybe this is the problem.

I have tried with 2560x1440@144hz on edid and applied this stages but it doesn’t work:

Also when I installed nvidia-driver from Debian repos and applied your xrandr command, I can use dual screens but both are at 40hz. So external monitor’s hertz is wrong too but it seems 144hz on display settings.

I don’t know if there is a solution to make it work besides that waiting for new kernel driver which fixes this…

So I removed the nvidia-driver package and installed from .run file again, now using 144hz on external monitor but no internal monitor.

By the way it works perfectly on Windows with dual screen with intel drivers.

Edit: Here is my eDP-1 EDID Config:

ef@monster-pardus:~$ cat /sys/devices/pci0000\:00/0000\:00\:02.0/drm/card0/card0-eDP-1/edid | edid-decode
edid-decode (hex):

00 ff ff ff ff ff ff 00 09 e5 74 09 00 00 00 00
1b 1e 01 04 a5 22 13 78 07 01 25 a5 53 4b a0 27
0e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 40 3f 00 af a0 a0 28 50 30 20
36 00 58 c2 10 00 00 18 00 00 00 fd 00 30 a5 f4
f4 43 01 0a 20 20 20 20 20 20 00 00 00 fe 00 42
4f 45 20 43 51 0a 20 20 20 20 20 20 00 00 00 fe
00 4e 45 31 35 36 51 48 4d 2d 4e 59 32 0a 01 26

70 13 79 00 00 03 01 14 e5 04 01 84 ff 09 ae 00
2f 00 1f 00 9f 05 27 00 02 00 05 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 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 18 90

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

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: BOE
    Model: 2420
    Made in: week 27 of 2020
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 8
    DisplayPort interface
    Maximum image size: 34 cm x 19 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
    Display is continuous frequency
  Color Characteristics:
    Red  : 0.6445, 0.3242
    Green: 0.2929, 0.6259
    Blue : 0.1523, 0.0566
    White: 0.3134, 0.3291
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  2560x1440   40.002 Hz  16:9    59.203 kHz 161.920 MHz (344 mm x 194 mm)
                 Hfront   48 Hsync  32 Hback  95 Hpol N
                 Vfront    3 Vsync   6 Vback  31 Vpol N
  Display Range Limits:
    Monitor ranges (Bare Limits): 48-165 Hz V, 244-244 kHz H, max dotclock 670 MHz
    Alphanumeric Data String: 'BOE CQ'
    Alphanumeric Data String: 'NE156QHM-NY2'
  Extension blocks: 1
Checksum: 0x26

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

Block 1, DisplayID Extension Block:
  Version: 1.3
  Extension Count: 0
  Display Product Type: Extension Section
  Video Timing Modes Type 1 - Detailed Timings Data Block:
    DTD:  2560x1440  165.003 Hz  16:9   244.205 kHz 667.900 MHz (aspect 16:9, no 3D stereo, preferred)
               Hfront   48 Hsync  32 Hback  95 Hpol N
               Vfront    3 Vsync   6 Vback  31 Vpol N
  Checksum: 0x18
Checksum: 0x90

Please check if this modeline works:

2560x1440_170 687.21 2560 2608 2640 2735 1440 1443 1449 1480 -hsync +vsync

Unfortunately It didn’t work. It is stuck. Never changes with xrandr or any settings program. I can’t understand why.

Please see this for a workaround:
https://gitlab.freedesktop.org/drm/intel/-/issues/125#note_1068317
The issue report also contains some background, the i915 driver is always using only one mode from edid, then uses gpu scaling for other refresh rates but the logic which mode to pick is broken.

Oh I have found this error on dmesg:

[    1.971126] platform eDP-1: firmware: failed to load /lib/firmware/edid/edid-custom.bin (-2)
[    1.971128] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[    1.971130] platform eDP-1: Direct firmware load for /lib/firmware/edid/edid-custom.bin failed with error -2
[    1.971152] [drm:edid_load [drm]] *ERROR* Requesting EDID firmware "/lib/firmware/edid/edid-custom.bin" failed (err=-2)

And this is my drm-info output (it says EDID is immutable):

├───Connectors
│   └───Connector 0
│       ├───Object ID: 95
│       ├───Type: eDP
│       ├───Status: connected
│       ├───Physical size: 340x190 mm
│       ├───Subpixel: unknown
│       ├───Encoders: {0}
│       ├───Modes
│       │   ├───2560x1440@165.00 preferred driver nhsync nvsync 
│       │   └───2560x1440@40.00 preferred driver nhsync nvsync 
│       └───Properties
│           ├───"EDID" (immutable): blob = 104
│           ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│           ├───"link-status": enum {Good, Bad} = Good
│           ├───"non-desktop" (immutable): range [0, 1] = 0
│           ├───"TILE" (immutable): blob = 0
│           ├───"CRTC_ID" (atomic): object CRTC = 51
│           ├───"panel orientation" (immutable): enum {Normal, Upside Down, Left Side Up, Right Side Up} = Normal
│           ├───"Broadcast RGB": enum {Automatic, Full, Limited 16:235} = Automatic
│           ├───"max bpc": range [6, 12] = 12
│           ├───"Colorspace": enum {Default, RGB_Wide_Gamut_Fixed_Point, RGB_Wide_Gamut_Floating_Point, opRGB, DCI-P3_RGB_D65, BT2020_RGB, BT601_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, BT2020_CYCC, BT2020_YCC} = Default
│           └───"scaling mode": enum {Full, Center, Full aspect} = Full aspect

I think I can’t give an EDID file to use to drm.

You need to embed the edid in the initrd, when the i915 driver loads, the rootfs is not mounted.
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1814938/comments/5

1 Like

It worked! You are amazing! @generix

Conclusion:

  • The problem is about Intel Driver’s EDID information processing. It doesn’t see 165hz extension block.

Solution:

  • Create a custom EDID file and make minimum pixel rate value like 144hz or something. But the real solution is intel driver should fix this problem.

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