针对 ubuntu 13.04 设置屏幕亮度无法保存问题的解决方案

本文介绍了一种解决Ubuntu系统中屏幕亮度重启后恢复默认值的方法。通过修改/etc/rc.local文件并添加一行用于设置亮度的脚本,可以在每次启动时自动调整到所需的亮度级别。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

装过 Ubuntu 的童鞋可能都遇到过这种问题,设置好合适的屏幕亮度关机重新启动后屏幕亮度又变为最大值。

针对这种情况,我上网找了一些资料,经过个人的尝试后问题得到解决!稍微整理了一下分享给大家:

1、首先我们打开这个文件 sudo gedit /etc/rc.local  内容如下

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0

2、我们在exit 0前面插入一段脚本

echo 5 > /sys/class/backlight/acpi_video0/brightness 内容变为

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 5 > /sys/class/backlight/acpi_video0/brightness
exit 0

3、重启即可

注意:

在此处需要注意一下上面红字描述的部分,部分笔记本电脑可能不一样,需要自己查看一下。如果不一样,替换成你的文件名即可。

cd /sys/class/backlight/
ls
acpi_video0  radeon_bl0


echo 5 > /sys/class/backlight/acpi_video0/brightness 中的数字5代表屏幕亮度系数,5代表50%亮度!改成自己需要的数值即可。



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值