Victus 15 Fa0xxx Freezing After Suspend Fix
Preface
THIS DIDN'T ACTUALLY FIX IT FOR ME
I have a Victus 15 fa0xxx laptop that fails to wake up from suspend. When waking up, something happens with the Alder Lake Integrated GPU that causes the screen to flicker on and off and ALL graphics to be incredibly laggy.
The DMESG log is flooded with these errors while the post-suspend lags happens:
[ 340.318790] i915 0000:00:02.0: [drm] *ERROR* [ENCODER:235:DDI A/PHY A][DPRX] Failed to enable link training
[ 343.109774] i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
[ 347.748749] i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
[ 351.453727] i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
[ 356.114702] i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
And the journalctl log…
Sep 02 23:06:04 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
Sep 02 23:06:05 fedora NetworkManager[1667]: <info> [1693721165.5382] dhcp4 (wlp4s0): state changed new lease, address=192.168.81.105
Sep 02 23:06:05 fedora systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Sep 02 23:06:05 fedora systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Sep 02 23:06:05 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 02 23:06:08 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
Sep 02 23:06:13 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
Sep 02 23:06:15 fedora systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Sep 02 23:06:15 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 02 23:06:19 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to write source OUI
Sep 02 23:06:25 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* [ENCODER:235:DDI A/PHY A][DPRX] Failed to enable link training
Sep 02 23:06:28 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
Sep 02 23:06:33 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
Sep 02 23:06:38 fedora kernel: i915 0000:00:02.0: [drm] *ERROR* Failed to read DPCD register 0x92
I found a post on the Arch forums with someone reporting the same problem. I guess the Alder Lake IGPUs Video BIOS incorrectly reports which ports are connected to the GPU which causes Linux to freakout.
The solution is to apply a patch to the Linux Kernel for the Intel Drivers. This post shows how to do that using Fedora.
Overview
We're going to be downloading the packages needed to build RPM packages. After downloading the Linux sources from Fedora, we'll apply the patch and build the kernel into installable RPM files
Install Dependencies
sudo dnf install fedpkg fedora-packager rpmdevtools ncurses-devel pesign
RPM Build Folder
This will create a template folder in $HOME/rpmbuild
which sets up
the directory structure needed when creating RPM packages. It'll have
folders like BUILD, BUILDROOT, SPECS, SOURCES, etc.
rpmdev-setuptree
cd ~/rpmbuild
Downloading kernel sources
This will download the kernel sources for the same version of Linux you're currently running. The file will be saved locally to an RPM file
cd $HOME
koji download-build --arch=src kernel-$(uname -r | sed "s/\.$(arch)//").src.rpm
Unpack the sources
By default this will extract the files into our rpmbuild
folder
rpm -Uvh kernel-5.1.16-300.fc30.src.rpm
Adding patch file
In the rpmbuild/SOURCE folder, create a file named
intel_display.c.patch
. Paste the following in there.
From: Email <[email protected]>
Subject: [PATCH] Victus Suspend Fix
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8835,7 +8835,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
intel_ddi_init(dev_priv, PORT_TC1);
} else if (IS_ALDERLAKE_P(dev_priv)) {
intel_ddi_init(dev_priv, PORT_A);
- intel_ddi_init(dev_priv, PORT_B);
+ // intel_ddi_init(dev_priv, PORT_B);
intel_ddi_init(dev_priv, PORT_TC1);
intel_ddi_init(dev_priv, PORT_TC2);
intel_ddi_init(dev_priv, PORT_TC3);
Editing Kernel Spec File
The kernel.spec file contains metadata, build configurations, build dependencies, and other information for building the linux kernel. Its used by Fedora's build process specifically. In that file we can also specify which patches we want to apply.
Navigate to the SPECS
folder and run these commands
cd ~/rpmbuild/SPECS/
sudo dnf builddep kernel.spec
Edit the file and change the line
# define buildid .local
TO
%define buildid .intel_display
Now just before the END OF PATCH DEFINITIONS
line, add the following:
Patch9001: intel_display.c.patch
Building
This will start compiling the kernel. For myself it took about 20 minutes to complete. On my slower machines it can take well over an hour.
rpmbuild -bb --without debug --target=x86_64 kernel.spec
Installing the new kernel
After your kernel has compiled you can install it by doing a couple of commands.
cd ~/rpmbuild/RPMS/x86_64/
sudo dnf install kernel*
Updating Grub
After everything is installed you need to update grub.
sudo grub2-mkconfig -o /etc/grub2-efi.cfg