Ubuntu 12.04가 설치된 Sony VAIO VPCCW15FL이 있습니다.
안타깝게도 밝기 측정기는 밝기 증가/감소 키 누르기에 반응하지만 밝기 키는 기본적으로 작동하지 않습니다.
어제 xbacklight를 설치하고 터미널에서 사용해보았습니다. 예를 들어 sudo가 없는 일반 사용자로서 를 실행하면 xbacklight -40
백라이트가 어두워집니다. 잘 작동합니다.
그런 다음 키보드 설정을 열고 백라이트 밝기를 제어하기 위한 두 가지 사용자 정의 단축키를 설정해 보았습니다. 나는 xbacklight +10
그 명령으로 하나를 "밝기 증가"로 명명했습니다 . 그런 다음 키 설정을 클릭했는데 "모니터 밝기 높이기"가 (키로) 나타나서 감지되었습니다. 그러나 재부팅 후에도 작동하지 않았습니다. 명령을 다음으로 변경해 보았 /usr/bin/xbacklight +10
으나 작동하지 않았습니다.
이게 무슨 문제야? 또한 밝기 측정기가 기본값 대신 xbacklight 명령을 사용하도록 할 수 있는지 알고 싶습니다. 이를 위해 변경할 수 있는 파일이 있나요? 밝기 바와 통합되므로 바로가기를 정의하는 것보다 훨씬 낫다고 생각합니다. 감사해요 :)
답변1
좋아, VAIO뿐만 아니라 다른 노트북에서도 작동하는 다른 솔루션을 찾았습니다.
xbacklight 및 inotify-tools가 설치되어 있는지 확인하고 방금 sudo apt-get install xbacklight inotify-tools
.
다음 스크립트를 구성하고 bash 스크립트로 저장한 후(예: backlight_control.sh로 저장) chmod +x backlight_control.sh
.
그런 다음 시작 애플리케이션에 추가하세요(화면 오른쪽 상단에 있는 메뉴 항목을 클릭하여 12.04에서 수행할 수 있음). 백라이트 수준이 이전 설정으로 복원되고 컨트롤이 작동하기 시작해야 합니다.세션에 로그인한 후. 밝기 측정기도 올바른 값을 표시합니다.
다른 사람이 같은 문제를 겪고 있는 경우에 도움이 되기를 바랍니다. 성능이나 기타 어떤 의견이라도 환영합니다.
#!/bin/bash
# Script for setting the correct brightness for the backlight.
# Depends on: xbacklight and inotify-tools,
# Which can be installed by running:
# `sudo apt-get install xbacklight inotify-tools`
#
# Author: Esteban Serrano Roloff <e.serrano.r (at) me.com>
#
# Tested on a Sony VAIO VPCCW15FL
# running Ubuntu 12.04
# 2013-03-27 (YYYY-MM-DD)
# Setup the correct paths (look inside /sys/class/backlight/)
current_brightness_path="/sys/class/backlight/sony/brightness"
max_brightness_path="/sys/class/backlight/sony/max_brightness"
# To find the correct value for min_brightness, make the
# brightness meter go to its minimum (by repeatedly pressing
# the brightness down key), even if the actual brightness stays
# the same, and then run on a terminal:
# `cat /sys/class/backlight/sony/brightness`
min_brightness=0
#### No editing needed beyond this line (I hope) ####
max_brightness=`cat $max_brightness_path`
range=${max_brightness-min_brightness}
# Set the correct brightness level on start up.
current_brightness=`cat $current_brightness_path`
let current_brightness_pctg=100*$current_brightness/$range
xbacklight =$current_brightness_pctg
# Listen for brightness changes, forever.
while inotifywait -e close_write $current_brightness_path; do
current_brightness=`cat $current_brightness_path`
let current_brightness_pctg=100*$current_brightness/$range
xbacklight =$current_brightness_pctg
done