https://bugs.kde.org/show_bug.cgi?id=521915

            Bug ID: 521915
           Summary: Left 90* Rotation introduces rendering errors
    Classification: Plasma
           Product: kwin
      Version First 6.7.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 193477
  --> https://bugs.kde.org/attachment.cgi?id=193477&action=edit
Photo of rendering artifcats

# KDE Bug Report Draft

Reporter: Luke Austin <[email protected]>

Bug tracker: https://bugs.kde.org/
Classification: Plasma
Product: KWin
Suggested component: platform-drm
Version: 6.7.0
Severity: major

## Summary

Right-rotated HDMI output on AMD eGPU partially/stale-renders in Plasma Wayland
6.7; screenshot is correct but physical monitor scanout is corrupt

## Description

After upgrading to Plasma 6.7 on CachyOS, the left portrait monitor connected
as `HDMI-A-1` through an AMD eGPU renders only partially on the physical
display. Moving windows to the monitor causes parts of the window to appear as
a smaller/stale rectangle while other regions show old wallpaper or unrefreshed
content.

A screenshot of `HDMI-A-1` is complete and correct, while a phone photo of the
physical monitor shows the broken partial scanout. This suggests KWin's
logical/composited image is correct and the failure is in
presentation/scanout/damage handling for that output.

The issue is rotation-specific:

- Intended state: `HDMI-A-1` at `rotation.right` / 270 degrees -> physical
output is partially/stale rendered.
- Diagnostic: `kscreen-doctor output.HDMI-A-1.rotation.left` -> physical output
becomes complete but upside down.
- Diagnostic: `rotation.flipped90` and `rotation.flipped270` -> output changes
but is geometrically wrong/mirrored, not a usable workaround.
- Matching HannStar monitor on `DP-10` at the opposite portrait rotation works
normally.

## Steps To Reproduce

1. Start a Plasma Wayland session with the display layout below.
2. Use an AMD integrated GPU plus AMD Navi 22 eGPU outputs.
3. Configure `HDMI-A-1` as a 1920x1080 monitor in portrait orientation with
`rotation.right`, logical geometry `0,1080 1080x1920`.
4. Move an application window, for example Brave/Chromium, onto `HDMI-A-1`.
5. Compare a KWin/Spectacle screenshot of the output with the physical monitor.

## Observed Result

The screenshot is complete and correct, but the physical monitor shows
partial/stale scanout. The window appears as an incorrectly placed smaller
region, with stale wallpaper/old content around it. KWin logs repeated
framebuffer creation errors while reproducing.

Relevant KWin log excerpt:

```text
kwin_wayland[1934]: 0x3: GL_INVALID_VALUE in glTexStorage2D(width, height or
depth < 1)
kwin_wayland[1934]: Invalid framebuffer status:
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
kwin_wayland[1934]: Failed to create an offscreen framebuffer
```

## Expected Result

The physical scanout for `HDMI-A-1` should match the screenshot and fully
render the output at the configured right/270-degree portrait rotation.

## Regression / Timing

This started after updating to Plasma 6.7. The system was updated on
2026-06-20. A later `yay -Syu` on 2026-06-21 did not change the relevant
package versions before reboot:

```text
plasma-desktop 6.7.0-1.1
plasma-workspace 6.7.0-1.1
kwin 6.7.0-3.1
kscreen 6.7.0-1.1
libkscreen 6.7.0-1.1
kscreenlocker 6.7.0-1.1
mesa 3:26.1.2-1
vulkan-radeon 3:26.1.2-1
linux-cachyos 7.1.1-2
```

After a clean reboot on 2026-06-21 at about 09:47 BST with the same package
versions, the issue still reproduces.

The laptop also hangs during boot if the eGPU is already connected. In this
boot, the user had to interrupt boot and connect/initialize the eGPU after the
system started. KWin started before the eGPU completed initialization, then
logged DRM render-node open failures when the eGPU appeared:

```text
09:47:20 kwin_wayland: No backend specified, automatically choosing drm
09:47:28 kernel: thunderbolt 1-2: Razer Core X
09:47:31 kernel: amdgpu 0000:64:00.0: [drm] Initialized amdgpu ... for Navi 22
09:47:31 kwin_wayland: Failed to open /dev/dri/renderD129 device (No such
device)
09:47:31 kwin_wayland: Failed to open drm device /dev/dri/renderD129
09:47:31 kwin_wayland: Failed to open drm device
```

## System Information

```text
Operating System: CachyOS Linux
Kernel: 7.1.1-2-cachyos
KWin: 6.7.0
Qt: 6.11.1
Session: Wayland
Compositor: KWin Wayland, OpenGL
OpenGL renderer: AMD Radeon 890M Graphics (radeonsi, strix1, ACO, DRM 3.64,
7.1.1-2-cachyos)
Mesa: 26.1.2
```

GPU/display hardware:

```text
Internal GPU:
c2:00.0 Display controller: AMD/ATI Strix [Radeon 880M / 890M], driver amdgpu

External GPU:
Razer Core X / Thunderbolt path
64:00.0 VGA compatible controller: AMD/ATI Navi 22 [Radeon RX 6700/6700 XT/6750
XT / 6800M/6850M XT], driver amdgpu
```

Notable eGPU link log:

```text
pci 0000:64:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe
x1 link at 0000:00:01.2
```

However, the failure is rotation-specific on one output, not a general
bandwidth failure.

## Display Layout

```text
DP-11: enabled, connected, 1920x1080@60, geometry 2089,0 1920x1080, rotation
none
DP-10: enabled, connected, 1920x1080@60, geometry 3128,1080 1080x1920, rotation
left
HDMI-A-1: enabled, connected, 1920x1080@60, geometry 0,1080 1080x1920, rotation
right
DP-9: enabled, connected, 1920x1080@60, geometry 169,0 1920x1080, rotation none
eDP-1: enabled, connected, 2560x1600@165, geometry 1080,1080 2048x1280, scale
1.25, rotation none
```

Problem output:

```text
HDMI-A-1 145dd07a-6ad4-47d3-8712-8497dc085642
Geometry: 0,1080 1080x1920
Scale: 1
Rotation: 8
Mode: 1920x1080@60
Color resolution: automatic (16), range [8;16]
```

Working comparison output:

```text
DP-10 0101ff0e-face-4eea-a298-d63f7cd04720
Geometry: 3128,1080 1080x1920
Scale: 1
Rotation: 2
Mode: 1920x1080@60
```

`DP-10` and `HDMI-A-1` are the same HannStar monitor model/EDID class, but
opposite portrait rotations.

## Diagnostics / Workarounds Tried

- Forced `HDMI-A-1` max bpc to 8: no improvement.
- Unloaded KWin effects `blur`, `translucency`, and `diminactive`: no
improvement.
- Changed `HDMI-A-1` from `rotation.right` to `rotation.left`: physical output
becomes complete but upside down.
- Tried `rotation.flipped90` and `rotation.flipped270`: output not usable;
mirrored or otherwise geometrically wrong.
- Practical physical workaround: rotate the monitor the opposite way and run
`HDMI-A-1` at `rotation.left`, which avoids the broken `rotation.right` scanout
path.
- Prepared but removed before clean reboot: `KWIN_USE_BUFFER_AGE=0`, to test
later if the reboot/update does not fix the issue.

## Attachments To Include

- Screenshot of `HDMI-A-1` showing correct full rendered output.
- Phone photo of the same physical monitor showing partial/stale scanout.
- Full output of `qdbus6 org.kde.KWin /KWin supportInformation`.
- Full output of `kscreen-doctor -o`.
- KWin journal around reproduction:
  `journalctl --user -b -u plasma-kwin_wayland.service -o short-precise`

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to