Skip to content

Instantly share code, notes, and snippets.

@Soulwest
Last active April 21, 2024 20:25
Show Gist options
  • Save Soulwest/b889d61056b3d72a47e069e86e7bb9fe to your computer and use it in GitHub Desktop.
Save Soulwest/b889d61056b3d72a47e069e86e7bb9fe to your computer and use it in GitHub Desktop.
POP OS Lenovo legion 5 pro (linux, ubuntu 21.10)

Backlight

Add to boot optins to control bightness. For disable control for amd gpu

kernelstub -a  amdgpu.backlight=0

Nvidia driver bug with backlight. You may install 460 driver, but it doesn't work with new kernel 5.13+(?) https://forums.developer.nvidia.com/t/laptop-backlight-control-regression-with-465-24-02/175585/48 Temporary solution for backlight

xrandr --output DP-4 --brightness 0.5

Display at 165Hz

First of all you need kernel at least 5.15.5-76051505-generic (?)

be sure to enable freesync BEFORE XRANDR, to enable freesync create /etc/X11/xorg.conf.d/20-amdgpu.conf (!) Note what second monitor may be turn off because of amdgpu and mux switch

Section "Monitor"
Identifier "eDP"
Modeline "2560x1600_165.00" 777.340 2560 2608 2640 2720 1600 1603 1609 1732 -hsync -vsync
Option "PreferredMode" "2560x1600_165.00"
EndSection
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "VariableRefresh" "true"
Option "TearFree" "1"
Option "DRI" "3"
EndSection

Then

xrandr --newmode "2560x1600_165.00" 777.340 2560 2608 2640 2720 1600 1603 1609 1732 -hsync -vsync
xrandr --addmode eDP "2560x1600_165.00"
xrandr --output eDP --mode 2560x1600_165.00

Other

If you have troubles with WIFI or bluetooth, so Create a file named /etc/module.d/50-rtw89.conf. In this file, create a line that says

options rtw89pci disable_aspm_l1=y

and reload modlue

sudo modprobe -rv rtw89pci
sudo modprobe -v rtw89pci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment