Skip to content

linux-cachyos: add fix-amdgpu-pageflip-timeout.patch to resolve Issue #959 - #966

Open
darkKnight386 wants to merge 2 commits into
CachyOS:masterfrom
darkKnight386:fix-amdgpu-pageflip
Open

darkKnight386 wants to merge 2 commits into
CachyOS:masterfrom
darkKnight386:fix-amdgpu-pageflip

Conversation

@darkKnight386

Copy link
Copy Markdown

linux-cachyos: add fix-amdgpu-pageflip-timeout.patch to resolve Issue #959

Add fix-amdgpu-pageflip-timeout.patch to linux-cachyos/PKGBUILD to resolve Issue #959.

Problem

In Linux kernel 7.1.6, an upstream DRM Display Core regression in amdgpu_dm causes acrtc->pflip_status to remain stuck in AMDGPU_FLIP_SUBMITTED after vblank completion events. This leads to continuous pageflip timeouts and display freezes under Wayland/KWin on laptops using AMD iGPUs:

kwin_wayland: Pageflip timed out! This is a bug in the amdgpu kernel driver
amdgpu 0000:06:00.0: [drm] *ERROR* [CRTC:369:crtc-0] flip_done timed out

Fix

Include fix-amdgpu-pageflip-timeout.patch which resets acrtc->pflip_status to AMDGPU_FLIP_NONE upon vblank completion, allowing pageflips to process normally.

Fixes #959
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5567

Raghu Kolli added 2 commits August 8, 2026 18:12
…te corruption

Problem:
In script.sh, script-znver4.sh, script-v3-v4.sh, and srcinfo.sh, directory navigation inside PKGBUILD processing loops relies on `cd $d` followed by `cd ..`. This pattern suffers from critical flaws:
1. It assumes $d is always exactly one directory level below the root. If find returns nested directory paths (e.g., ./dir1/dir2/PKGBUILD), `cd ..` steps back only one level instead of returning to the repository root.
2. If `cd $d` fails for any reason (e.g., unquoted variables or missing permissions), `cd ..` executes from the wrong working directory, causing all subsequent loop iterations to run in invalid paths and corrupting the build process.

Solution:
Wrap each package build and metadata generation step inside a subshell block `( cd "$d" || exit 1; ... )`. Because working directory modifications inside subshell processes do not persist after subshell termination:
- The main shell context remains securely in the repository root directory at all times.
- Eliminates the need for manual `cd ..` calls.
- Properly quotes path variables `"$d"` to safely handle paths containing spaces.
…achyOS#959

Add `fix-amdgpu-pageflip-timeout.patch` to `linux-cachyos/PKGBUILD` to resolve Issue CachyOS#959.

### Problem
In Linux kernel 7.1.6, an upstream DRM Display Core regression in `amdgpu_dm` causes `acrtc->pflip_status` to remain stuck in `AMDGPU_FLIP_SUBMITTED` after vblank completion events. This leads to continuous pageflip timeouts and display freezes under Wayland/KWin on laptops using AMD iGPUs:
```text
kwin_wayland: Pageflip timed out! This is a bug in the amdgpu kernel driver
amdgpu 0000:06:00.0: [drm] *ERROR* [CRTC:369:crtc-0] flip_done timed out
```

### Fix
Include `fix-amdgpu-pageflip-timeout.patch` which resets `acrtc->pflip_status` to `AMDGPU_FLIP_NONE` upon vblank completion, allowing pageflips to process normally.

Fixes CachyOS#959
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5567
@garethpitchfordLF

garethpitchfordLF commented Aug 31, 2026

Copy link
Copy Markdown

I've had this exact issue with a few games.
Im going to get this built and give it a test run.

CPU: 9800X3D
GPU: 7900XT

@kernelOfTruth

Copy link
Copy Markdown

actually the following really does seem to fix various flip_done timeout triggered states in a noticeable way:

https://gitlab.freedesktop.org/drm/amd/-/work_items/5616#note_3631449

@garethpitchfordLF

Copy link
Copy Markdown

actually the following really does seem to fix various flip_done timeout triggered states in a noticeable way:

https://gitlab.freedesktop.org/drm/amd/-/work_items/5616#note_3631449

Yeah I've not had a single crash since applying it

@kitkat6464

Copy link
Copy Markdown

Who do I contact to get this patch into arch vanilla kernel??? Had this issue all morning and became so frustrating and unbearable, having to use LTS 6.18 atm.

@kernelOfTruth

kernelOfTruth commented Sep 5, 2026

Copy link
Copy Markdown

first of all, does it apply cleanly to 6.18 and work ?

there's only 7.2 and 7.1 variants of it so far

better ask Leo Li (author of the patch / flip_done timeout patches) first, if there's backports already in the pipeline and how the feedback status is

then CC: Mario Limonciello, https://lore.kernel.org/amd-gfx/, Greg KH (linux stable kernels), etc.
[search for those names via https://lore.kernel.org/amd-gfx/]

@kernelOfTruth

kernelOfTruth commented Sep 16, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] linux-cachyos 7.1.6: Plasma login screen freezes and turns black due to amdgpu pageflip timeouts; LTS kernel works

4 participants