项目作者: lvm

项目描述 :
A duct-tape solution to a very annoying bug
高级语言: Python
项目地址: git://github.com/lvm/amdgpu-backlight.git
创建时间: 2020-09-21T03:15:25Z
项目社区:https://github.com/lvm/amdgpu-backlight

开源协议:BSD 3-Clause "New" or "Revised" License

下载


amdgpu-backlight

Recently acquired a new laptop with an AMD Ryzen 5 PRO 3500U processor that provides an AMD Radeon RX Vega 8. Long story short, there’s a bug that prevents from setting xbacklight values… but it’s still possible to echo values from 0 to 255 to the amdgpu_bl0 brightness file, so this script was born.

Remember, this software is provided AS IS. Run at your own risk

help

  1. usage: amdgpu-backlight [-h] [-s] [-q] [--confirm] [percent]
  2. A duct-tape solution to a very annoying bug.
  3. positional arguments:
  4. percent Set brightness to this percentage.
  5. optional arguments:
  6. -h, --help show this help message and exit
  7. -s, --step Increase/Decrease brightness by a step instead.
  8. -q, --query Get current brightness percentage.
  9. --confirm This software is provided AS IS. Please, confirm that you're completely sure that you want to run this script. This argument is required.

i3

There’s also a companion script for i3status: i3status-amdgpu-backlight, which you can use like so:

  1. bar {
  2. status_command i3status | /path/to/bin/i3status-amdgpu-backlight
  3. ...
  4. }

sudoers.d

You might want to create a file named /etc/sudoers.d/amdgpu-backlight with this content:

  1. YOU ALL = (ALL:ALL) NOPASSWD: /usr/bin/amdgpu-backlight

Bugs?

If you find one, report it please.

License

see LICENSE