Hello!
I got NixOs on my laptop recently. But the performance when browsing the web sucks. I can feel the latency when typing and moving the mouse in Chrome (firefox feels right though).
I’m not sre I got hardware acceleration right, or it is something else. Or it is just chrome being chrome.
The laptop is a Thinkpad L14 AMD:
- AMD Ryzen 7 PRO 5875U with Radeon Graphic
- 16 G RAM
- 500 G nvme
- NixOs
Where should I start debugging this?
I have these in my configuration.nix
:
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelParams = [
# Force use of the thinkpad_acpi driver for backlight control.
# This allows the backlight save/load systemd service to work.
"acpi_backlight=native"
# AMD CPU scaling
# https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html
# https://wiki.archlinux.org/title/CPU_frequency_scaling#amd_pstate
# On recent AMD CPUs this can be more energy efficient.
"amd_pstate=guided"
# Load amdgpu at stage 1
"amdgpu"
];
# AMD GPU
hardware.opengl.extraPackages = with pkgs; [
# VA-API and VDPAU
vaapiVdpau
# AMD ROCm OpenCL runtime
rocmPackages.clr
rocmPackages.clr.icd
# AMDVLK drivers can be used in addition to the Mesa RADV drivers.
#amdvlk
];
hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
environment.variables = {
# VAAPI and VDPAU config for accelerated video.
# See https://wiki.archlinux.org/index.php/Hardware_video_acceleration
"VDPAU_DRIVER" = "radeonsi";
"LIBVA_DRIVER_NAME" = "radeonsi";
};
# Most software has the HIP libraries hard-coded. Workaround:
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
glxgears
gives me ~36 FPS on my external monitor and ~45 on the laptop screen.
I can dump here the output of {glx,vdpau,vaapi,vulkan,opencl-}info
, is that useful or just spam right now?