ฉันไม่คิดว่าวิธีแก้ปัญหาที่คุณต้องการในการทำให้จอแสดงผลภายนอกของคุณ/sys/class/backlightทำงานได้ แต่ข่าวดีก็คือคุณสามารถสร้างภาพเคลื่อนไหวความสว่างที่ดีได้!
ลอง
notify-send " " -i notification-display-brightness-low -h int:value:50 -h string:x-canonical-private-synchronous:brightness &
ตอนนี้เราสามารถสร้างสคริปต์ที่จำลองการเปลี่ยนความสว่างของ Ubuntu:
#!/bin/bash
#get current brightness
presbright=$(ddccontrol -p | grep -A1 0x10 | tr -d '\n\t' | sed 's/.*value=\([^a-zA-Z]*\),.*/\1/')
#stepsize for the brightness change
stepsize=10
case "$1" in
        up)
          newbright=$(( ${presbright}+${stepsize} ))
          newbright=$(echo $newbright | awk '{if($1 < 100){if($1 > 0) print $1; else print 0;} else print 100;}')
          notify-send " " -i notification-display-brightness-low -h int:value:$newbright -h string:x-canonical-private-synchronous:brightness &
          ddccontrol -p -r 0x10 -w $newbright
        ;;
        down)
          newbright=$(( ${presbright}-${stepsize} ))
          newbright=$(echo $newbright | awk '{if($1 < 100){if($1 > 0) print $1; else print 0;} else print 100;}')
          notify-send " " -i notification-display-brightness-low -h int:value:$newbright -h string:x-canonical-private-synchronous:brightness &
          ddccontrol -p -r 0x10 -w $newbright            
        ;;
        status)
          echo $presbright
        ;;
        *)
          echo "Accepted arguments are: up, down, status."
        ;;
esac
exit 0
ตามที่คุณเห็นมันจะยึดค่าระหว่าง 0 ถึง 100 ตอนนี้คุณสามารถผูกupและdownเรียกสคริปต์ไปยังแป้นพิมพ์ลัดบางปุ่มที่คุณเลือกด้วยการตั้งค่าระบบ> คีย์บอร์ด> ทางลัดเช่นแนะนำ fotomonster
หมายเหตุ:
 
ฉันไม่ทราบว่าddccontrol -pต้องใช้เวลานานเท่าใดถ้ามันยาวเกินไปคุณสามารถเพิ่มsyncตัวเลือกในสคริปต์ซึ่งจะบันทึกค่าความสว่างของจอภาพเป็นไฟล์ จากนั้นแทนที่จะรับความสว่างปัจจุบันจากddccontrolคุณก็สามารถทำได้จากไฟล์ซึ่งควรจะเร็วกว่ามาก แน่นอนคุณจะต้องอัปเดตupและdownโทรเพื่อเขียนความสว่างใหม่ไปยังไฟล์ ...
สคริปต์แรงบันดาลใจจากการโพสต์เกี่ยวกับเรื่องนี้ ArchLinux