Public bug reported:

1. Summary of the Problem

Upon resuming from hibernation (and possibly also suspend), the display
backlight immediately maximizes to 100% brightness. User-level
brightness controls in KDE/Kubuntu are non-functional until a manual
action is performed.

Crucially, the file system reports the incorrect state: cat
/sys/class/backlight/amdgpu_bl1/brightness reports the last set low
value, while the physical screen is blindingly bright. This indicates a
disconnect between the amdgpu driver's internal state and the actual
hardware output.

2. System Information

    OS: Kubuntu 25.10 (Questing Quokka)

    Kernel Version: 6.17.0-6-generic

    Hardware: Laptop using AMD Ryzen 7 5825U with Radeon Graphics

    Backlight Device: /sys/class/backlight/amdgpu_bl1

    Max Brightness Value: 60395

3. Detailed Debugging Findings (The Race Condition Proof)

A system-level workaround was attempted using a custom systemd unit to
force a brightness write after resume. This exposed a critical timing
bug:

Failure at 0.0 seconds: Executing the brightness write command
immediately (sleep 0) fails. The screen remains at 100%, indicating the
driver's hardware channel is still locked or in an invalid state.

Success at 0.5 seconds: Executing the brightness write command with a
delay of sleep 0.5 reliably succeeds. The screen snaps to the correct
brightness.

Conclusion: The amdgpu driver's resume routine requires a precise window
between 0.0 and 0.5 seconds after the systemd resume targets are met
before it can successfully process a backlight write command. This
confirms a highly specific race condition that needs to be resolved
upstream in the driver.

4. Temporary Workaround Implemented

The issue is currently mitigated using a workaround which involves a
systemd service that:

Saves the brightness state before suspend.

Restores the brightness state after resume with a crucial sleep 0.5
delay in the restore script.

Thank you for your attention to this hardware-specific timing bug.

ProblemType: Bug
DistroRelease: Ubuntu 25.10
Package: linux-image-6.17.0-6-generic 6.17.0-6.6
ProcVersionSignature: Ubuntu 6.17.0-6.6-generic 6.17.1
Uname: Linux 6.17.0-6-generic x86_64
ApportVersion: 2.33.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Wed Nov  5 22:12:34 2025
HibernationDevice: resume=UUID=9664cfe6-fc8b-4760-bf89-3047f542c10a
InstallationDate: Installed on 2025-11-05 (0 days ago)
InstallationMedia: Kubuntu 25.10 "Questing Quokka" - Release amd64 (20251007)
MachineType: Acer Swift SF314-44
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.17.0-6-generic 
root=UUID=64838f96-48cf-410d-8004-70b887f742d9 ro quiet splash 
amdgpu.dcdebugmask=0x40000 resume=UUID=9664cfe6-fc8b-4760-bf89-3047f542c10a 
vt.handoff=7
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No 
PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 firmware-sof   N/A
 linux-firmware 20250901.git993ff19b-0ubuntu1.2
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/19/2024
dmi.bios.release: 1.18
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: V1.18
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: Dolphin_BCU
dmi.board.vendor: BCU
dmi.board.version: V1.18
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: Chassis Version
dmi.ec.firmware.release: 1.18
dmi.modalias: 
dmi:bvnInsydeCorp.:bvrV1.18:bd04/19/2024:br1.18:efr1.18:svnAcer:pnSwiftSF314-44:pvrV1.18:rvnBCU:rnDolphin_BCU:rvrV1.18:cvnAcer:ct10:cvrChassisVersion:sku0000000000000000:
dmi.product.family: Swift 3
dmi.product.name: Swift SF314-44
dmi.product.sku: 0000000000000000
dmi.product.version: V1.18
dmi.sys.vendor: Acer

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug questing wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2130759

Title:
  Critical Timing Bug: AMDGPU Backlight Stuck at 100% after
  Hibernate/Resume on AMD Ryzen 7 5825U (Driver fails to accept write
  commands before 0.5s)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2130759/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to