/tags/oBacklight 0.3.0/oBacklight_0.3.0.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.0/src/changelog.txt |
---|
0,0 → 1,9 |
oBacklight Version 0.3 (2010-05-01) |
=============================================== |
Features: |
* Backlight functionality for Sony Laptops |
in combination with nvidia_bl driver. |
Tested with Sony VAIO VPCCW1S1E. |
Bugs: |
* None at this time. |
/tags/oBacklight 0.3.0/src/oBacklight.sh |
---|
0,0 → 1,78 |
#!/bin/bash |
##################################################### |
# Simple script to catch the changes to backlight # |
# events on sony laptops in combination with # |
# nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 but # |
# should work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Author: Marcus Udenhed # |
# Version: 0.3 # |
# Last Modified 2010-05-01 14:30 # |
# # |
##################################################### |
### BEGIN INIT INFO |
# Provides: Sony Backlight |
# Default-Start: 3 5 |
# Default-Stop: 0 1 2 6 |
# Short-Description: Provides connector for nvidia_bl |
# Description: Provides a connector between the |
# standard Sony backlight interface and nvidia_bl |
# interface. Captures all backlight events from |
# /sys/class/backlight/sony. |
### END INIT INFO |
start() { |
/etc/init.d/oBacklight.sh run & |
} |
stop() { |
killall -r oBacklight |
} |
run() { |
DVAR=$(cat /sys/class/backlight/sony/brightness) |
while [ exit != 130 ] |
do |
sleep 1 |
GVAR=$(cat /sys/class/backlight/sony/brightness) |
if [ "$GVAR" != "$DVAR" ] |
then |
echo $GVAR > /sys/class/backlight/nvidia_backlight/brightness |
DVAR=$(cat /sys/class/backlight/sony/brightness) |
fi |
done |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.0/src/readme.txt |
---|
0,0 → 1,30 |
oBacklight |
========== |
Simple script to catch the changes to backlight events on Sony laptops in |
combination with the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Tested with a Sony Vaio VPCCW1S1E Laptop. |
This has been tested on openSUSE 11.2 but should work on any distributions. |
Features: |
* Backlight functionality for Sony Laptops |
in combination with nvidia_bl driver. |
Tested with Sony VAIO VPCCW1S1E. |
Requirements: |
* nvidia_bl (http://www.nvnews.net/vbulletin/showthread.php?t=143025) |
Installation: |
1. Copy the script to /etc/init.d/ |
$ sudo cp oBacklight.sh /etc/init.d/ |
2. Add script to your startup sequence. |
This how you do it in openSUSE. |
$ sudo yast runlevel add service=oBacklight.sh |
3. To start the script either reboot your computer or start the script like this. |
$ sudo /etc/init.d/oBacklight.sh start |
Please report any bugs to the following address: bugs@osource.se. |
/tags/oBacklight 0.3.1/oBacklight_0.3.1.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.1/src/changelog.txt |
---|
0,0 → 1,16 |
oBacklight Version 0.3.1 (2010-06-15) |
=============================================== |
Changes: |
* Added license file. |
Bugs: |
* None at this time. |
oBacklight Version 0.3 (2010-05-01) |
=============================================== |
Features: |
* Backlight functionality for Sony Laptops |
in combination with nvidia_bl driver. |
Tested with Sony VAIO VPCCW1S1E. |
Bugs: |
* None at this time. |
/tags/oBacklight 0.3.1/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.1/src/oBacklight.sh |
---|
0,0 → 1,78 |
#!/bin/bash |
##################################################### |
# Simple script to catch the changes to backlight # |
# events on sony laptops in combination with # |
# nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 but # |
# should work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Author: Marcus Udenhed # |
# Version: 0.3 # |
# Last Modified 2010-05-01 14:30 # |
# # |
##################################################### |
### BEGIN INIT INFO |
# Provides: Sony Backlight |
# Default-Start: 3 5 |
# Default-Stop: 0 1 2 6 |
# Short-Description: Provides connector for nvidia_bl |
# Description: Provides a connector between the |
# standard Sony backlight interface and nvidia_bl |
# interface. Captures all backlight events from |
# /sys/class/backlight/sony. |
### END INIT INFO |
start() { |
/etc/init.d/oBacklight.sh run & |
} |
stop() { |
killall -r oBacklight |
} |
run() { |
DVAR=$(cat /sys/class/backlight/sony/brightness) |
while [ exit != 130 ] |
do |
sleep 1 |
GVAR=$(cat /sys/class/backlight/sony/brightness) |
if [ "$GVAR" != "$DVAR" ] |
then |
echo $GVAR > /sys/class/backlight/nvidia_backlight/brightness |
DVAR=$(cat /sys/class/backlight/sony/brightness) |
fi |
done |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.1/src/readme.txt |
---|
0,0 → 1,32 |
oBacklight |
========== |
Simple script to catch the changes to backlight events on Sony laptops in |
combination with the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Tested with a Sony Vaio VPCCW1S1E Laptop. |
This has been tested on openSUSE 11.2 but should work on any distributions. |
Features: |
* Backlight functionality for Sony Laptops |
in combination with nvidia_bl driver. |
Tested with Sony VAIO VPCCW1S1E. |
Requirements: |
* nvidia_bl (http://www.nvnews.net/vbulletin/showthread.php?t=143025) |
Installation: |
1. Copy the script to /etc/init.d/ |
$ sudo cp oBacklight.sh /etc/init.d/ |
2. Add script to your startup sequence. |
This how you do it in openSUSE. |
$ sudo yast runlevel add service=oBacklight.sh |
3. To start the script either reboot your computer or start the script like this. |
$ sudo /etc/init.d/oBacklight.sh start |
================================================================ |
Visit us at http://dev.osource.se/ for support and bug reporting |
/tags/oBacklight 0.3.2/oBacklight_0.3.2.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.2/src/changelog.txt |
---|
0,0 → 1,21 |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.2/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.2/src/oBacklight |
---|
0,0 → 1,136 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 & 11.3 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.2 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2010-06-24 13:21 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidia_bl |
# Description: Provides a backlight event handler for nvidia_bl. |
# Captures all backlight events from ACPI Events. |
### END INIT INFO |
init() { |
# Default parameters |
BBL="2" # Default brightness level when on battery(0-7). |
SCB="sony" # Set which system ACPI is used. |
# run 'sudo ls /sys/class/backlight' to determine your type. |
# Available options: sony |
# Set correct value to /sys/class/backlight/nvidia_backlight/brightness |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
if [ "$GVAR" > "7" ] |
then |
echo "7" > /sys/class/backlight/nvidia_backlight/brightness |
fi |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "7" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
GVAR=$(cat /root/oBacklight.def) |
echo $GVAR > /sys/class/backlight/nvidia_backlight/brightness |
if [ "$SCB" = "sony" ] |
then |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "00000001 00000010" ] |
then |
if [ "$GVAR" != "0" ] |
then |
SVAR=$(($GVAR - 1)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "00000001 00000011" ] |
then |
if [ "$GVAR" != "7" ] |
then |
SVAR=$(($GVAR + 1)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "00000081 00000000" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
fi |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.2/src/readme.txt |
---|
0,0 → 1,22 |
Release notes for oBacklight v0.3.2 2010-06-29 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidia_bl and FN brightness keys. |
Issue Summary: |
* Totally rewritten core functionality to use ACPI events instead of folder monitoring. |
Notes: |
This script has been tested on openSUSE 11.2 & 11.3 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.3/oBacklight_0.3.3.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.3/src/changelog.txt |
---|
0,0 → 1,29 |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.3/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.3/src/oBacklight |
---|
0,0 → 1,141 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 & 11.3 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.3 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2010-07-03 20:26 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidia_bl |
# Description: Provides a backlight event handler for nvidia_bl. |
# Captures all backlight events from ACPI Events and feeds the to nvidia_bl. |
### END INIT INFO |
init() { |
# Default parameters |
BBL="2" # Default brightness level when on battery. |
SCB="sony" # Set which system ACPI is used. |
# Run 'sudo ls /sys/class/backlight' to determine your type. |
# Available options: sony |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
DVOE="7" # Default value to set when startup value is wrong, |
# should be your max brightness level. |
MBV="7" # Max brightness value possible on your system. |
# Set correct value to /sys/class/backlight/nvidia_backlight/brightness |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
if [ "$GVAR" > "$DVOE" ] |
then |
echo "$DVOE" > /sys/class/backlight/nvidia_backlight/brightness |
fi |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$DVOE" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
GVAR=$(cat /root/oBacklight.def) |
echo $GVAR > /sys/class/backlight/nvidia_backlight/brightness |
if [ "$SCB" = "sony" ] |
then |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "00000001 00000010" ] |
then |
if [ "$GVAR" != "0" ] |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "00000001 00000011" ] |
then |
if [ "$GVAR" != "$MBV" ] |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "00000081 00000000" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
fi |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.3/src/readme.txt |
---|
0,0 → 1,22 |
Release notes for oBacklight v0.3.3 2010-07-03 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidia_bl and FN brightness keys. |
Issue Summary: |
* Fixed som static values so they are easily changable. |
Notes: |
This script has been tested on openSUSE 11.2 & 11.3 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.4/oBacklight_0.3.4.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.4/src/changelog.txt |
---|
0,0 → 1,33 |
2010-07-04 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added a control to prevent brightness changes generating out of range values. Thanks again to damdim at nvnews.com forum for spotting this issue. |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.4/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.4/src/oBacklight |
---|
0,0 → 1,151 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 & 11.3 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.4 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2010-07-03 20:26 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidia_bl |
# Description: Provides a backlight event handler for nvidia_bl. |
# Captures all backlight events from ACPI Events and feeds the to nvidia_bl. |
### END INIT INFO |
init() { |
# Default parameters |
BBL="2" # Default brightness level when on battery. |
SCB="sony" # Set which system ACPI is used. |
# Run 'sudo ls /sys/class/backlight' to determine your type. |
# Available options: sony |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
DVOE="7" # Default value to set when startup value is wrong, |
# should be your max brightness level. |
MBV="7" # Max brightness value possible on your system. |
# Set correct value to /sys/class/backlight/nvidia_backlight/brightness |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
if [ "$GVAR" > "$DVOE" ] |
then |
echo "$DVOE" > /sys/class/backlight/nvidia_backlight/brightness |
fi |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$DVOE" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
GVAR=$(cat /root/oBacklight.def) |
echo $GVAR > /sys/class/backlight/nvidia_backlight/brightness |
if [ "$SCB" = "sony" ] |
then |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "00000001 00000010" ] |
then |
if [ "$GVAR" -ge "$DID" ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR="0" |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "00000001 00000011" ] |
then |
if [ "$GVAR" -le $(($MBV-$DID)) ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR=$MBV |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "00000081 00000000" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
fi |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.4/src/readme.txt |
---|
0,0 → 1,22 |
Release notes for oBacklight v0.3.4 2010-07-04 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidia_bl and FN brightness keys. |
Issue Summary: |
* Fixed possibly out of range values on brightness change. |
Notes: |
This script has been tested on openSUSE 11.2 & 11.3 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.5/oBacklight_0.3.5.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.5/src/changelog.txt |
---|
0,0 → 1,37 |
2010-07-05 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (startup): Added so that max brightness value gets inserted into nvidia_bl driver configuration since it starts on max anyway. |
2010-07-04 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added a control to prevent brightness changes generating out of range values. Thanks again to damdim at nvnews.com forum for spotting this issue. |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.5/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.5/src/oBacklight |
---|
0,0 → 1,141 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 & 11.3 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.5 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2010-07-05 22:27 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidia_bl |
# Description: Provides a backlight event handler for nvidia_bl. |
# Captures all backlight events from ACPI Events and feeds the to nvidia_bl. |
### END INIT INFO |
init() { |
# Default parameters |
BBL="2" # Default brightness level when on battery. |
SCB="sony" # Set which system ACPI is used. |
# Run 'sudo ls /sys/class/backlight' to determine your type. |
# Available options: sony |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
MBV="7" # Max brightness value possible on your system. |
# Set correct value in /sys/class/backlight/nvidia_backlight/brightness on startup |
echo "$MBV" > /sys/class/backlight/nvidia_backlight/brightness |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$MBV" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
if [ "$SCB" = "sony" ] |
then |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "00000001 00000010" ] |
then |
if [ "$GVAR" -ge "$DID" ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR="0" |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "00000001 00000011" ] |
then |
if [ "$GVAR" -le $(($MBV-$DID)) ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR=$MBV |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "00000081 00000000" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
fi |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.5/src/readme.txt |
---|
0,0 → 1,22 |
Release notes for oBacklight v0.3.5 2010-07-05 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidia_bl and FN brightness keys. |
Issue Summary: |
* Fixed startup brightness issue in combination with nvidia_bl driver where nvidia_bl starts at max value no matter what it has in it's configuration file. |
Notes: |
This script has been tested on openSUSE 11.2 & 11.3 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.6/oBacklight_0.3.6.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.6/src/changelog.txt |
---|
0,0 → 1,41 |
2010-07-06 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Fixed bug resulting in random brightness changes. |
2010-07-05 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (startup): Added so that max brightness value gets inserted into nvidia_bl driver configuration since it starts on max anyway. |
2010-07-04 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added a control to prevent brightness changes generating out of range values. Thanks again to damdim at nvnews.com forum for spotting this issue. |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.6/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.6/src/oBacklight |
---|
0,0 → 1,142 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidia_bl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2 & 11.3 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.6 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2010-07-06 00:06 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidia_bl |
# Description: Provides a backlight event handler for nvidia_bl. |
# Captures all backlight events from ACPI Events and feeds the to nvidia_bl. |
### END INIT INFO |
init() { |
# Default parameters |
BBL="2" # Default brightness level when on battery. |
SCB="sony" # Set which system ACPI is used. |
# Run 'sudo ls /sys/class/backlight' to determine your type. |
# Available options: sony |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
MBV="7" # Max brightness value possible on your system. |
# Set correct values in configuration files on startup |
echo "$MBV" > /sys/class/backlight/nvidia_backlight/brightness |
echo "$MBV" > /root/oBacklight.def |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$MBV" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
if [ "$SCB" = "sony" ] |
then |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "00000001 00000010" ] |
then |
if [ "$GVAR" -ge "$DID" ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR="0" |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "00000001 00000011" ] |
then |
if [ "$GVAR" -le $(($MBV-$DID)) ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR=$MBV |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "00000081 00000000" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
fi |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.6/src/readme.txt |
---|
0,0 → 1,22 |
Release notes for oBacklight v0.3.6 2010-07-06 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidia_bl and FN brightness keys. |
Issue Summary: |
* Fixed bug resulting in random brightness changes. |
Notes: |
This script has been tested on openSUSE 11.2 & 11.3 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.7/oBacklight_0.3.7.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.7/src/changelog.txt |
---|
0,0 → 1,50 |
2011-03-22 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added the possibillity to use predefined settings. |
* oBacklight (core): Added some predefined settings. |
* oBacklight (core): Added ACPI events for Dell Vostro 3700 |
* readme.txt (text): Minor changes in readme.txt |
2010-07-06 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Fixed bug resulting in random brightness changes. |
2010-07-05 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (startup): Added so that max brightness value gets inserted into nvidia_bl driver configuration since it starts on max anyway. |
2010-07-04 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added a control to prevent brightness changes generating out of range values. Thanks again to damdim at nvnews.com forum for spotting this issue. |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.7/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.7/src/oBacklight |
---|
0,0 → 1,176 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidiabl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2, 11.3 & 11.4 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.7 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2011-03-22 21:35 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidiabl |
# Description: Provides a backlight event handler for nvidiabl. |
# Captures all backlight events from ACPI Events and feeds the to nvidiabl. |
### END INIT INFO |
init() { |
## Default parameters |
BMT="1" # Set Brightness Mode Type. |
# Available types: 1, 2, 3 |
ACPIS="1" # Set System ACPI. |
# 1 = Sony Vaio VPCCW1S1E |
# 2 = Dell Vostro 3700 |
## Various brightness modes |
# Type 1 (Default) |
if [ "$BMT" == "1" ] |
then |
BBL="2" # Default brightness level when on battery. |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
MBV="7" # Max brightness value possible on your system. |
fi |
# Type 2 |
if [ "$BMT" == "2" ] |
then |
BBL="40" |
DID="10" |
MBV="127" |
fi |
# Type 3 |
if [ "$BMT" == "2" ] |
then |
BBL="4" |
DID="1" |
MBV="32" |
fi |
## ACPI Codes for various systems. |
# Sony Vaio VPCCW1S1E (Default) |
if [ "$ACPIS" == "1" ] |
then |
ACBU="00000001 00000011" # ACPI brightness up event |
ACBD="00000001 00000010" # ACPI brightness down event |
ACOB="00000081 00000000" # ACPI brightness on battery event |
fi |
# Dell Vostro 3700 |
if [ "$ACPIS" == "2" ] |
then |
ACBU="00000086 00000000" |
ACBD="00000087 00000000" |
ACOB="00000080 00000000" |
fi |
# Set correct values in configuration files on startup |
echo "$MBV" > /sys/class/backlight/nvidia_backlight/brightness |
echo "$MBV" > /root/oBacklight.def |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$MBV" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "$ACBD" ] |
then |
if [ "$GVAR" -ge "$DID" ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR="0" |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "$ACBU" ] |
then |
if [ "$GVAR" -le $(($MBV-$DID)) ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR=$MBV |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "$ACOB" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.7/src/readme.txt |
---|
0,0 → 1,24 |
Release notes for oBacklight v0.3.7 2011-03-22 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidiabl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidiabl and FN brightness keys. |
Issue Summary: |
* Added the possibillity to use predefined settings. |
* Added some predefined settings. |
* Added ACPI events for Dell Vostro 3700 |
Notes: |
This script has been tested on openSUSE 11.2, 11.3 & 11.4 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.8/oBacklight_0.3.8.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.8/src/changelog.txt |
---|
0,0 → 1,55 |
2011-03-28 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Fixed duplicate options for BMT variable |
* oBacklight (core): Added more ACPI code templates. |
2011-03-22 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added the possibillity to use predefined settings. |
* oBacklight (core): Added some predefined settings. |
* oBacklight (core): Added ACPI events for Dell Vostro 3700 |
* readme.txt (text): Minor changes in readme.txt |
2010-07-06 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Fixed bug resulting in random brightness changes. |
2010-07-05 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (startup): Added so that max brightness value gets inserted into nvidia_bl driver configuration since it starts on max anyway. |
2010-07-04 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added a control to prevent brightness changes generating out of range values. Thanks again to damdim at nvnews.com forum for spotting this issue. |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.8/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.8/src/oBacklight |
---|
0,0 → 1,185 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidiabl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2, 11.3 & 11.4 but should # |
# work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.8 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2011-03-28 22:01 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidiabl |
# Description: Provides a backlight event handler for nvidiabl. |
# Captures all backlight events from ACPI Events and feeds the to nvidiabl. |
### END INIT INFO |
init() { |
## Default parameters |
BMT="1" # Set Brightness Mode Types. |
# Available types: 1, 2, 3 |
ACPIS="1" # Set correct System ACPI codes. |
# Available settings: 1, 2, 3 |
## Various brightness modes |
# Mode 1 (Default) |
if [ "$BMT" == "1" ] |
then |
BBL="2" # Default brightness level when on battery. |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
MBV="7" # Max brightness value possible on your system. |
fi |
# Mode 2 |
if [ "$BMT" == "2" ] |
then |
BBL="40" |
DID="10" |
MBV="127" |
fi |
# Mode 3 |
if [ "$BMT" == "3" ] |
then |
BBL="4" |
DID="1" |
MBV="32" |
fi |
## ACPI Codes for various systems. |
# ACPIS 1(Default) |
# Works on some Sony Vaio VPCCW1S1E |
if [ "$ACPIS" == "1" ] |
then |
ACBU="00000001 00000011" # ACPI brightness up event |
ACBD="00000001 00000010" # ACPI brightness down event |
ACOB="00000081 00000000" # ACPI brightness on battery event |
fi |
# ACPIS 2 |
# Works on some Sony Vaio VPCCW1S1E |
if [ "$ACPIS" == "2" ] |
then |
ACBU="00000086 00000000" |
ACBD="00000087 00000000" |
ACOB="00000081 00000000" |
fi |
# ACPIS 3 |
# Works on Dell Vostro 3700 |
if [ "$ACPIS" == "3" ] |
then |
ACBU="00000086 00000000" |
ACBD="00000087 00000000" |
ACOB="00000080 00000000" |
fi |
# Set correct values in configuration files on startup |
echo "$MBV" > /sys/class/backlight/nvidia_backlight/brightness |
echo "$MBV" > /root/oBacklight.def |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$MBV" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "$ACBD" ] |
then |
if [ "$GVAR" -ge "$DID" ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR="0" |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "$ACBU" ] |
then |
if [ "$GVAR" -le $(($MBV-$DID)) ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR=$MBV |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "$ACOB" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.8/src/readme.txt |
---|
0,0 → 1,23 |
Release notes for oBacklight v0.3.8 2011-03-28 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidiabl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidiabl and FN brightness keys. |
Issue Summary: |
* Fixed duplicate options for BMT variable |
* Added more ACPI code templates. |
Notes: |
This script has been tested on openSUSE 11.2, 11.3 & 11.4 but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |
/tags/oBacklight 0.3.9/oBacklight_0.3.9.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/oBacklight 0.3.9/src/changelog.txt |
---|
0,0 → 1,58 |
2012-04-13 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added new brightness mode settings. |
2011-03-28 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Fixed duplicate options for BMT variable. |
* oBacklight (core): Added more ACPI code templates. |
2011-03-22 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added the possibillity to use predefined settings. |
* oBacklight (core): Added some predefined settings. |
* oBacklight (core): Added ACPI events for Dell Vostro 3700 |
* readme.txt (text): Minor changes in readme.txt |
2010-07-06 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Fixed bug resulting in random brightness changes. |
2010-07-05 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (startup): Added so that max brightness value gets inserted into nvidia_bl driver configuration since it starts on max anyway. |
2010-07-04 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Added a control to prevent brightness changes generating out of range values. Thanks again to damdim at nvnews.com forum for spotting this issue. |
2010-07-03 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (core): Changed static values for max brightness, increase & decrease to variables to enable easier modification and system adaptation. thanks to damdim at nvnews.com forum for this input. |
2010-07-02 Marcus Uddenhed <marcus@osource.se> |
* oBacklight (init): Fixed faulty LSB header information. |
2010-06-29 Marcus Uddenhed <marcus@osource.se> |
* oBacklight.sh (file): Removed .sh file ending for startup script conformance. |
* oBacklight (core): Rewritten entire core to use ACPI calls instead of folder monitoring. |
* changelog.txt (text): Fixed faulty changelog format & missing changes from 2010-06-15. |
* readme.txt (text): Minor text changes. |
2010-06-15 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (text): Added contact information. |
* license.txt (file): Added License file. |
2010-05-01 Marcus Uddenhed <marcus@osource.se> |
* readme.txt (file): Created. |
* oBacklight.sh (file): Created. |
/tags/oBacklight 0.3.9/src/license.txt |
---|
0,0 → 1,20 |
Copyright (c) 2010, oSource Development |
All rights reserved. |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer |
in the documentation and/or other materials provided with the distribution. |
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products |
derived from this software without specific prior written permission. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
/tags/oBacklight 0.3.9/src/oBacklight |
---|
0,0 → 1,192 |
#!/bin/bash |
##################################################################### |
# Simple script to catch the changes to backlight events on sony # |
# in combination with nvidiabl. # |
# # |
# Tested with a Sony Vaio VPCCW1S1E Laptop. # |
# # |
# This has been tested on openSUSE 11.2, 11.3 & 11.4 and # |
# Ubuntu 11.10 but should work on any distributions. # |
# # |
# Released under the BSDL Licens # |
# # |
# Developer: oSource Development # |
# DevTeam: Marcus Uddenhed # |
# Version: 0.3.9 # |
# # |
# Web: http://dev.osource.se/software/obacklight/ # |
# Rss: http://dev.osource.se/category/obacklight/feed/ # |
# # |
# Last Updated: 2012-04-13 20:08 # |
# # |
##################################################################### |
### BEGIN INIT INFO |
# Provides: oBacklight |
# Required-Start: $acpid |
# Required-Stop: |
# Default-Start: 5 |
# Default-Stop: 0 1 2 3 6 |
# Short-Description: Provides a backlight event handler for nvidiabl |
# Description: Captures all backlight events from ACPI Events and feeds them to nvidiabl. |
### END INIT INFO |
init() { |
## Default parameters |
BMT="1" # Set Brightness Mode Types. |
# Available types: 1, 2, 3, 4 |
ACPIS="1" # Set correct System ACPI codes. |
# Available settings: 1, 2, 3 |
## Various brightness modes |
# Mode 1 (Default) |
if [ "$BMT" == "1" ] |
then |
BBL="2" # Default brightness level when on battery. |
DID="1" # The amount of steps to increase/decrease with on backlight changes. |
MBV="7" # Max brightness value possible on your system. |
fi |
# Mode 2 |
if [ "$BMT" == "2" ] |
then |
BBL="40" |
DID="10" |
MBV="127" |
fi |
# Mode 3 |
if [ "$BMT" == "3" ] |
then |
BBL="4" |
DID="1" |
MBV="32" |
fi |
# Mode 4 |
# Tested on a VPCCW15FL, thanks to Esteban |
if [ "$BMT" == "4" ] |
then |
BBL="40" |
DID="17" |
MBV="120" |
fi |
## ACPI Codes for various systems. |
# ACPIS 1(Default) |
# Works on some Sony Vaio VPCCW1S1E |
if [ "$ACPIS" == "1" ] |
then |
ACBU="00000001 00000011" # ACPI brightness up event |
ACBD="00000001 00000010" # ACPI brightness down event |
ACOB="00000081 00000000" # ACPI brightness on battery event |
fi |
# ACPIS 2 |
# Works on some Sony Vaio VPCCW1S1E |
if [ "$ACPIS" == "2" ] |
then |
ACBU="00000086 00000000" |
ACBD="00000087 00000000" |
ACOB="00000081 00000000" |
fi |
# ACPIS 3 |
# Works on Dell Vostro 3700 |
if [ "$ACPIS" == "3" ] |
then |
ACBU="00000086 00000000" |
ACBD="00000087 00000000" |
ACOB="00000080 00000000" |
fi |
# Set correct values in configuration files on startup |
echo "$MBV" > /sys/class/backlight/nvidia_backlight/brightness |
echo "$MBV" > /root/oBacklight.def |
# Check if oBacklight.def exists |
if [ ! -e "/root/oBacklight.def" ] |
then |
echo "$MBV" > /root/oBacklight.def |
fi |
} |
start() { |
/etc/init.d/oBacklight run & |
} |
stop() { |
echo $(cat /sys/class/backlight/nvidia_backlight/brightness) > /root/oBacklight.def |
killall -r oBacklight |
} |
run() { |
while [ exit != 130 ] |
do |
GVAR=$(cat /sys/class/backlight/nvidia_backlight/brightness) |
CMD=$(acpi_listen -c 1 | egrep -o " [0-9].+" | egrep -o "[0-9].+") |
# Brightness down acpi event |
if [ "$CMD" == "$ACBD" ] |
then |
if [ "$GVAR" -ge "$DID" ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR - $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR="0" |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# Brightness up acpi event |
if [ "$CMD" == "$ACBU" ] |
then |
if [ "$GVAR" -le $(($MBV-$DID)) ] # Thanks to damdim @ nvnews forum for this fix. |
then |
SVAR=$(($GVAR + $DID)) |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
else |
SVAR=$MBV |
echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness |
echo $SVAR > /root/oBacklight.def |
fi |
fi |
# AC to battery change |
if [ "$CMD" == "$ACOB" ] |
then |
if [ "$GVAR" > "$BBL" ] |
then |
echo $BBL > /sys/class/backlight/nvidia_backlight/brightness |
echo $BBL > /root/oBacklight.def |
fi |
fi |
done |
} |
case $1 in |
start) |
start |
;; |
stop) |
stop |
;; |
run) |
init |
run |
;; |
*) |
echo "start|stop|run" |
;; |
esac |
/tags/oBacklight 0.3.9/src/readme.txt |
---|
0,0 → 1,25 |
Release notes for oBacklight v0.3.9 2012-04-13 |
============================================== |
Overview: |
Simple script to catch the changes to backlight events on laptops in combination with |
the nvidiabl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025 |
Purpose: |
Provide bridge between nvidiabl and FN brightness keys. |
Issue Summary: |
* Fixed duplicate options for BMT variable |
* Added more ACPI code templates. |
Notes: |
This script has been tested on openSUSE 11.2, 11.3 & 11.4 and Ubuntu 11.10 |
but should work on any distribution and with Sony Vaio VPCCW1S1E Laptop. |
Disclaimer: |
This software is released with the BSDL license and the license is in the license.txt |
file that should accompany this software. |
Contact: |
http://dev.osource.se/ |
http://dev.osource.se/software/obacklight/ |