i915 driver stuck at 40hz on 165hz screen
I have i7-10875H processor on my laptop. I have disabled the NVIDIA dGPU, so the problem is only about intel drivers.
I’m using Debian 11.
Tested with Kernels:
- 5.10.0-9-amd64
- 5.14.0-0.bpo.2-amd64
I have used both Xorg and Wayland, the notebook screen is stuck at 40hz.
But the screen is 165hz.
I think it is something about driver level because it doesn’t matter about the Xorg configs or xrandr settings. Even if I set the hertz value 165 on xrandr, the screen still runs at 40hz.
How can I make it run at 165hz like on Windows?
Here is my lshw -c video:
*-display
description: VGA compatible controller
product: CometLake-H GT2 [UHD Graphics]
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
logical name: /dev/fb0
version: 05
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list fb
configuration: depth=32 driver=i915 latency=0 mode=2560x1440 visual=truecolor xres=2560 yres=1440
resources: iomemory:600-5ff iomemory:400-3ff irq:138 memory:6002000000-6002ffffff memory:4000000000-400fffffff ioport:6000(size=64) memory:c0000-dffff
Here is my lspci -k:
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
DeviceName: Onboard - Video
Subsystem: Tongfang Hongkong Limited UHD Graphics
Kernel driver in use: i915
Kernel modules: i915
Here is my glxinfo:
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.5
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.5
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
I have solved this after long hours of struggling.
Solution:
Real solution is: Intel Graphics(i915) driver should update
Temporary solution is editing the laptop screen’s EDID file and change pixel rate to something near 655Mhz limit.
How to change EDID file:
- Get EDID binary of your monitor:
cp /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/edid ~/edid.bin
(eDP-1 is screen, 0000:00:02.0 is Intel driver’s PCIe Bus ID. You can uselspci
vexrandr
to get them.) - Open the edid.bin file with Windows or Wine with this program: https://www.analogway.com/americas/products/software-tools/aw-edid-editor/
- From "Detailed Data" tab, use "CVT 1.2 Wizard" and write something like 144hz refresh rate. (Because of 165hz’s pixel rate is above 655Mhz, it is not accepting 165hz. So you should enter something smaller.)
- Copy the edited
edid.bin
file to/lib/firmware/edid/edid.bin
- On file
/etc/default/grub
, changequiet splash
like this:
quiet splash drm.edid_firmware=eDP-1:edid/edid.bin
- Save this script to
/etc/initramfs-tools/hooks/edid
and runchmod +x /etc/initramfs-tools/hooks/edid
to make it executable:
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
mkdir -p "${DESTDIR}/lib/firmware/edid"
cp -a /lib/firmware/edid/edid.bin "${DESTDIR}/lib/firmware/edid/edid.bin"
exit 0
- Run
sudo update-initramfs -u
andsudo update-grub
- Done! Reboot..
Sources:
https://forums.developer.nvidia.com/t/165hz-internal-screen-stuck-at-40hz
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1814938/comments/5
https://gitlab.freedesktop.org/drm/intel/-/issues/125#note_1068317
If you’re on Arch, replace eminfedar’s step 6 & 7 with the following:
Instead of saving the script to /etc/initramfs-tools/hooks/edid
, save it to /etc/initcpio/install/edid
.
The script:
#!/bin/bash
build() {
add_file /lib/firmware/edid/edid.bin
}
help() {
cat <<HELPEOF
This hook add support for 165Hz
HELPEOF
}
Make it executable with chmod +x /etc/initcpio/install/edid
.
Now add edid to the end of the array of hooks in /etc/mkinitcpio.conf
like this HOOKS=(... fsck edid)
.
Finally, regenerate the initramfs with sudo mkinitcpio -P
and update grub with sudo grub-mkconfig -o /boot/grub/grub.cfg
.
P.S. Make sure that the refresh rate in edid.bin
has really been changed, I had mine in read only and I wasn’t aware.
PLEASE share this solution with more people, very effective fix for a widespread problem on laptops.