How to set 165Hz refresh rate in hybrid mode in Lenovo Legion 5i pro?

Hello,

Couple of days ago I bought Lenovo Legion 5i pro and installed manjaro + bspwm.
Now the problem is I can not set the screen refresh rate to 165Hz. It is capped at 60Hz.
Resolution according to xrandr is 2560x1600_60.00, also confirmed with glxgears.
Here is relevant info.

$ inxi -Fazy

System:
  Kernel: 6.0.10-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.0-x86_64
    root=UUID=fe14985f-5d1e-4f23-97e5-b8e636bcd72c rw
    resume=UUID=548d8d18-aa95-45d8-afb4-4bbd79d8ca5d udev.log_priority=3
    apparmor=1 security=apparmor ibt=off acpi_backlight=video
  Desktop: Xfce v: 4.16.1 tk: Gtk v: 3.24.34 info: polybar wm: bspwm
    v: 0.9.10 vt: 7 dm: LightDM v: 1.32.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82RF v: Legion 5 Pro 16IAH7H
    serial:  Chassis: type: 10 v: Legion 5 Pro 16IAH7H
    serial: 
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: 
    UEFI: LENOVO v: J2CN40WW date: 04/15/2022
Battery:
  ID-1: BAT0 charge: 82.4 Wh (100.0%) condition: 82.4/80.0 Wh (103.0%)
    volts: 17.5 min: 15.4 model: Sunwoda L21D4PC1 type: Li-poly serial: 
    status: full cycles: 3
CPU:
  Info: model: 12th Gen Intel Core i9-12900H bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x9A (154) stepping: 3
    microcode: 0x424
  Topology: cpus: 1x cores: 14 mt: 6 tpc: 2 st: 8 threads: 20 smt: enabled
    cache: L1: 1.2 MiB desc: d-8x32 KiB, 6x48 KiB; i-6x32 KiB, 8x64 KiB
    L2: 11.5 MiB desc: 6x1.2 MiB, 2x2 MiB L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 2900 min/max: 400/4900:5000:3800 scaling:
    driver: intel_pstate governor: powersave cores: 1: 2900 2: 2900 3: 2900
    4: 2900 5: 2900 6: 2900 7: 2900 8: 2900 9: 2900 10: 2900 11: 2900 12: 2900
    13: 2900 14: 2900 15: 2900 16: 2900 17: 2900 18: 2900 19: 2900 20: 2900
    bogomips: 116780
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics vendor: Lenovo driver: i915
    v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+ ports:
    active: eDP-1 empty: DP-1,DP-2 bus-ID: 00:02.0 chip-ID: 8086:46a6
    class-ID: 0300
  Device-2: NVIDIA GA104M [Geforce RTX 3070 Ti Laptop GPU] vendor: Lenovo
    driver: nvidia v: 520.56.06 alternate: nouveau,nvidia_drm non-free: 520.xx+
    status: current (as of 2022-10) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s lanes: 8
    link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:24e0 class-ID: 0300
  Device-3: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 3-6:4 chip-ID: 04f2:b67d class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 compositor: Picom v: git-7e568 driver:
    X: loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa dri: iris
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1600 s-dpi: 96 s-size: 677x423mm (26.65x16.65")
    s-diag: 798mm (31.43")
  Monitor-1: eDP-1 model: BOE Display 0x0a1f built: 2021 res: 2560x1600
    hz: 60 dpi: 189 gamma: 1.2 size: 344x215mm (13.54x8.46") diag: 406mm (16")
    ratio: 16:10 modes: 2560x1600
  API: OpenGL v: 4.6 Mesa 22.2.3 renderer: Mesa Intel Graphics (ADL GT2)
    direct render: Yes
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_tgl
    bus-ID: 00:1f.3 chip-ID: 8086:51c8 class-ID: 0403
  Device-2: NVIDIA GA104 High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 8
    link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:228b class-ID: 0403
  Sound API: ALSA v: k6.0.10-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:51f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8168 v: 8.050.03-NAPI modules: r8169 pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 34:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp52s0 state: down mac: 
Bluetooth:
  Device-1: Intel type: USB driver: btusb v: 0.8 bus-ID: 3-10:6
    chip-ID: 8087:0033 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 953.87 GiB used: 8.21 GiB (0.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVL21T0HCLR-00BL2
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial:  rev: CL1QGXA7 temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 42 GiB size: 41.04 GiB (97.72%) used: 7.15 GiB (17.4%)
    fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 4.3 MiB (0.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 903.4 GiB size: 888.14 GiB (98.31%)
    used: 1.06 GiB (0.1%) fs: ext4 dev: /dev/nvme0n1p3 maj-min: 259:3
Swap:
  Kernel: swappiness: 5 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 7.97 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p4 maj-min: 259:4
Sensors:
  System Temperatures: cpu: 33.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 300 Uptime: 18m wakeups: 1 Memory: 31.08 GiB used: 1.26 GiB (4.0%)
  Init: systemd v: 252 default: graphical tool: systemctl Compilers:
  gcc: 12.2.0 Packages: pm: pacman pkgs: 615 libs: 197 tools: yay Shell: Zsh
  v: 5.9 running-in: xfce4-terminal inxi: 3.3.23
$ glxinfo | grep 'OpenGL'

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.3
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 22.2.3
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 22.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
$ prime-run glxinfo | grep 'OpenGL'

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3070 Ti Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 520.56.06
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 520.56.06
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 520.56.06
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
$ mhwd

0000:01:00.0 (0300:10de:24e0) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
          video-nvidia            2021.11.04               false            PCI
    video-nvidia-470xx            2021.11.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI
0000:34:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI
0000:00:02.0 (0300:8086:46a6) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI
$ mhwd -a pci nonfree 0300

Skipping already installed config 'video-hybrid-intel-nvidia-prime' for device: 0000:01:00.0 (0300:10de:24e0) Display controller nVidia Corporation
Skipping already installed config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:46a6) Display controller Intel Corporation

If you need anything else please feel free to ask :slight_smile:
Is there manjaro way of doing this ??
I’ve looked around the forum and found this topic and tired some of the commands

in hope that I can get to 165Hz :slight_smile:

Tried commands from that post

xrandr --newmode "2560x1600x165.00" # this successfully appends the mode
xrandr --addmode  eDP-1 "2560x1600_165.00" # this successfully adds the mode
xrandr --output eDP-1  --mode "2560x1600_165.00" # this fails with xrandr: Configure crtc 0 failed. 

Also tired without the " ".

Worth mentioning nvidia x server settings app can’t see the laptop display.
There is no section X server display settings.

Any ideas ??

I have almost the same laptop (Legion 5) and I can run at 165Hz with no issues (no configuration needed).
I’m using KDE Plasma and the video-hybrid-amd-nvidia-prime driver if that helps you (I have AMD, not Intel like you).

I am not a good help, but feel free to ask about my config (regarding graphics, I only installed the driver above and optimus-manager in order to make HDMI output work).

Hello,

This is not about HDMI it about the laptop panel. The laptop monitor is capped at 60Hz.
I am still looking for solution on google :slight_smile:

Thanks for trying to help though.

I know its not about HDMI sorry, I said that to justify my optimus-manager install (in case you wouldn’t understand why I did that).

Have you tried KDE Plasma just to check if the problem persists?

Nope, but you can open terminal and write xrandr -q if you have xrandr installed or check via gui the laptop monitor refresh rate if you are in hybird mode and tell me :slight_smile:

As told above, I can use 165Hz with no special configuration needed (I’m actually capping at 120Hz because no need for that much lol).

> xrandr -q                                                                                                                                                                                                                   Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    165.01 + 120.04*   96.01    72.01    60.00    60.01    59.97    59.96    59.93  
(...)

Glad for helping.

This is strange… if you are on integrated graphics and you have these options than I am missing something…

Could you post the output of ??

$ grep 'GRUB_CMDLINE_LINUX_DEFAULT' /etc/default/grub

I need to see the whole line…

I’m in hybrid graphics, but would also work in integrated graphics.

Sure:

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=(...) udev.log_priority=3 console=tty3"

I only added the console=tty3 btw.

I am obviously missing something… I will recheck everything again… tomorrow.

I now remember that when I first installed Manjaro, I only had 60Hz as an option too in the GUI.
Are you on a full updated (including kernel) install?

Hello, yes, I am on kernel 6.0.10 which I believe is still in unstable. So yes.

I don’t know how to help then sorry, but again feel free to ask.

Edit: while searching for unrelated stuff, I found this article, where they state the same problem as you: Lenovo LEGION 5i PRO 16ITH6 Review [82JF002RUS] | ORDINATECHNIC

They are also using a Legion 5i Pro like you. Read the section “Screen” pls.