Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
A
amd
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,023
    • Issues 1,023
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • drm
  • amd
  • Issues
  • #1242

Closed
Open
Opened Jul 30, 2020 by Flo@bocki

Backlight values are a mixture of 16 bit and 8 bit and break saving and restoring levels

Brief summary of the problem:

With a change in the amdgpu kernel module, actual_brightness in /sys/class/backlight/amdgpu_bl0 returns a 5-digit value to allow for more precision. However, both brightness and max_brightness return 8 bit values. With a recent commit to systemd, restoring backlight levels on boot is broken: The value in actual_brightness will be stored, and restored to brightness on boot. As brightness only is 8 bit, and a 16 bit value is restored, numbers will be clamped and in turn always return maximum brightness.

Hardware description:

  • CPU: AMD Ryzen 7 Pro 4750U
  • GPU: AMD Radeon RX Vega 7
  • System Memory: 16GB
  • Display(s): IPS 1920x1080
  • Type of Diplay Connection: eDP
  • Laptop: Thinkpad X13

System infomration:

  • Distro name and Version: Arch Linux
  • Kernel version: 5.8.0-rc7

How to reproduce the issue:

  • Read 16 bit value from /sys/class/backlight/amdgpu_bl0/actual_brightness
  • Write value into /sys/class/backlight/amdgpu_bl0/brightness
  • "Invalid argument" is returned because value is > 255.

Issues on other sites

  • Lennart Poettering said this is a kernel issue, max_brightness and brightness apparently are expected to be in the same range as actual_brightness
  • There is an issue on the Kernel.org bugzilla opened in 2019 dealing with this, however I suspect not many people have witnessed this issue since the change to systemd only happened a few weeks ago.

Any help would be appreciated :) Please let me know if you need more information.

Edited Jul 30, 2020 by Flo
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: drm/amd#1242