[求助]deepin的亮度配置文件
Tofloor
poster avatar
ksplite
deepin
2019-05-03 04:54
Author
ubuntu的5.0 kernel中,华为热键问题极大。
按下F2后,屏幕完全熄灭,切tty也没有显示。
求告知deepin中屏幕亮度的配置文件位置,我想用Windows或liveISO修改一下
谢谢!

Reply Favorite View the author
All Replies
avatar
deepinuser17
deepin
2019-05-03 20:05
#1
屏幕亮度在0和1000之间。 在深度不完全支持的机器上,亮度被初始设为1000, 即最大亮度。

你可以运行下列命令查看当前亮度设定值
  1. cat /sys/class/backlight/gmux_backlight/brightness
Copy the Code


运行下列命令来调节亮度,以改到250为例:
  1. echo 250 > /sys/class/backlight/gmux_backlight/brightness
Copy the Code


如果想要机器在启动时自动设定理想的屏幕亮度,写一个shell脚本。比如 /usr/local/sbin/set_display_brightness.sh
  1. #!/bin/sh
  2. echo 250 > /sys/class/backlight/gmux_backlight/brightness
Copy the Code

  1. $ sudo chmod +x /usr/local/sbin/set_display_brightness.sh
Copy the Code


然后创建一个启动文件/etc/systemd/system/set_display.service,并设为机器启动时自动运行。
  1. $ sudo vi /etc/systemd/system/set_display.service
  2. $ sudo systemctl daemon-reload
  3. $ sudo systemctl enable set_display.service
Copy the Code


/etc/systemd/system/set_display.service的内容如下:
  1. [Unit]
  2. Description=Set Display Brightness
  3. After=graphical.target

  4. [Service]
  5. Type=simple
  6. ExecStart=/usr/local/sbin/set_display_brightness.sh

  7. [Install]
  8. WantedBy=graphical.target
Copy the Code


Reply View the author