特殊:Badtitle/NS100:SonyVaioBrightness:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/SonyVaioBrightness}} {{Languages|UbuntuHelp:SonyVaioBrightness}} === Introduction === This page is a quick and brief guide to adjusting the brig... |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/SonyVaioBrightness}} | {{From|https://help.ubuntu.com/community/SonyVaioBrightness}} | ||
{{Languages|UbuntuHelp:SonyVaioBrightness}} | {{Languages|UbuntuHelp:SonyVaioBrightness}} | ||
=== Introduction === | === Introduction === | ||
This page is a quick and brief guide to adjusting the brightness on a Sony VAIO laptop using Ubuntu 6.06. | This page is a quick and brief guide to adjusting the brightness on a Sony VAIO laptop using Ubuntu 6.06. | ||
=== SONYPI Module === | === SONYPI Module === | ||
In order to adjust the brightness of a Sony VAIO laptop, the <code><nowiki>sonypi</nowiki></code> module needs to be loaded into the kernel. | In order to adjust the brightness of a Sony VAIO laptop, the <code><nowiki>sonypi</nowiki></code> module needs to be loaded into the kernel. | ||
==== Step 1: Checking for Module ==== | ==== Step 1: Checking for Module ==== | ||
At the command line issue the following command: | At the command line issue the following command: | ||
第15行: | 第11行: | ||
</nowiki></pre> | </nowiki></pre> | ||
If you receive a line of outpout, and it states that it is <code><nowiki>Live</nowiki></code>, then the module is loaded. If not, move on to step 2. | If you receive a line of outpout, and it states that it is <code><nowiki>Live</nowiki></code>, then the module is loaded. If not, move on to step 2. | ||
==== Step 2: Load the Module ==== | ==== Step 2: Load the Module ==== | ||
At the command line issue the following commands: | At the command line issue the following commands: | ||
第23行: | 第18行: | ||
</nowiki></pre> | </nowiki></pre> | ||
The first command adds the module to the customizable list of modules to load at startup in addition to the ones normally loaded by the system. The second command loads the module. If the module is already loaded, using this command will harmlessly and pointlessly re-load it. | The first command adds the module to the customizable list of modules to load at startup in addition to the ones normally loaded by the system. The second command loads the module. If the module is already loaded, using this command will harmlessly and pointlessly re-load it. | ||
Now test whether the module is loaded with the grep command used above. This time there should be a line of output. | Now test whether the module is loaded with the grep command used above. This time there should be a line of output. | ||
=== Spicctrl Application === | === Spicctrl Application === | ||
Spicctrl is an app that can be used to measure the battery life, and adjust the brightness of a Sony laptop. Spicctrl is known to work on some Sony laptops, but not all. If this method does not work, read the '''If Spicctrl Doesn't Work''' following these initial steps. | Spicctrl is an app that can be used to measure the battery life, and adjust the brightness of a Sony laptop. Spicctrl is known to work on some Sony laptops, but not all. If this method does not work, read the '''If Spicctrl Doesn't Work''' following these initial steps. | ||
==== Step 1: Install Spicctrl ==== | ==== Step 1: Install Spicctrl ==== | ||
Issue the following command: | Issue the following command: | ||
第34行: | 第26行: | ||
# sudo apt-get install spicctrl | # sudo apt-get install spicctrl | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Step 2: Run Spicctrl ==== | ==== Step 2: Run Spicctrl ==== | ||
Wait for the app to download and install. Once completed issue the following command: | Wait for the app to download and install. Once completed issue the following command: | ||
第41行: | 第32行: | ||
</nowiki></pre> | </nowiki></pre> | ||
This will output the options of the program. | This will output the options of the program. | ||
Issue the following command and read the output: | Issue the following command and read the output: | ||
<pre><nowiki> | <pre><nowiki> | ||
第47行: | 第37行: | ||
</nowiki></pre> | </nowiki></pre> | ||
This should return a number between 0 and 255. Choose a number between 0 and 255 '''THAT IS DIFFERENT''' from the number outputed by the command. | This should return a number between 0 and 255. Choose a number between 0 and 255 '''THAT IS DIFFERENT''' from the number outputed by the command. | ||
Replace the # symbol in the following command with that number: | Replace the # symbol in the following command with that number: | ||
<pre><nowiki> | <pre><nowiki> | ||
# sudo spicctrl -b# | # sudo spicctrl -b# | ||
</nowiki></pre> | </nowiki></pre> | ||
Once that command is completed, issue the following: | Once that command is completed, issue the following: | ||
<pre><nowiki> | <pre><nowiki> | ||
第58行: | 第46行: | ||
</nowiki></pre> | </nowiki></pre> | ||
If the number has changed to the one you chose, then Spicctrl is working correctly. What you did, was manually change the number for the display's brightness control. You can change those brightness settings however you want to change the brightness. An added bonus is that Spicctrl can be sucessfully used by any user. | If the number has changed to the one you chose, then Spicctrl is working correctly. What you did, was manually change the number for the display's brightness control. You can change those brightness settings however you want to change the brightness. An added bonus is that Spicctrl can be sucessfully used by any user. | ||
=== If Spicctrl Doesn't Work === | === If Spicctrl Doesn't Work === | ||
If the previous steps did not work for you or your Sony VAIO, continue reading. | If the previous steps did not work for you or your Sony VAIO, continue reading. | ||
==== Manual Brightness Editing ==== | ==== Manual Brightness Editing ==== | ||
'''NOTE:''' Changing the <code><nowiki>brightness</nowiki></code> or <code><nowiki>brightness_default</nowiki></code> file's data to anything other than a number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>, could possibly prevent your linux system from succesfully interacting with the monitor, meaning no screen image at all. | '''NOTE:''' Changing the <code><nowiki>brightness</nowiki></code> or <code><nowiki>brightness_default</nowiki></code> file's data to anything other than a number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>, could possibly prevent your linux system from succesfully interacting with the monitor, meaning no screen image at all. | ||
To change the brightness manually, issue the following command: | To change the brightness manually, issue the following command: | ||
<pre><nowiki> | <pre><nowiki> | ||
第70行: | 第55行: | ||
</nowiki></pre> | </nowiki></pre> | ||
You can replace the number <code><nowiki>4</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>. The numbers <code><nowiki>1</nowiki></code> through <code><nowiki>8</nowiki></code> can be used to adjust the brightness. <code><nowiki>1</nowiki></code> == dim. <code><nowiki>8</nowiki></code> == bright. The 'brightness' file changes the current brightness to the level you want. The brightness will stay that way until you change it again or until you shut down the computer. | You can replace the number <code><nowiki>4</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>. The numbers <code><nowiki>1</nowiki></code> through <code><nowiki>8</nowiki></code> can be used to adjust the brightness. <code><nowiki>1</nowiki></code> == dim. <code><nowiki>8</nowiki></code> == bright. The 'brightness' file changes the current brightness to the level you want. The brightness will stay that way until you change it again or until you shut down the computer. | ||
==== Retaining Manual Brightness Edits ==== | ==== Retaining Manual Brightness Edits ==== | ||
The default level of brightness that Ubuntu uses whenever it boots up is stored in <code><nowiki>brightness_default</nowiki></code>. No matter what you change the brightness file entry to, the next time you start your computer, it's going to use the default brightness again. To change this default brightness to the level you want, issue the following command, replacing the <code><nowiki>#</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>: | The default level of brightness that Ubuntu uses whenever it boots up is stored in <code><nowiki>brightness_default</nowiki></code>. No matter what you change the brightness file entry to, the next time you start your computer, it's going to use the default brightness again. To change this default brightness to the level you want, issue the following command, replacing the <code><nowiki>#</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>: | ||
第76行: | 第60行: | ||
# sudo echo "#" > /proc/acpi/sony/brightness_default | # sudo echo "#" > /proc/acpi/sony/brightness_default | ||
</nowiki></pre> | </nowiki></pre> | ||
=== Shortcuts === | === Shortcuts === | ||
The following will aid you in creating shell scripts that will allow you to issue script command instead of typing out the entire command that would change the brightness. | The following will aid you in creating shell scripts that will allow you to issue script command instead of typing out the entire command that would change the brightness. | ||
==== Bright Script ==== | ==== Bright Script ==== | ||
The following code snipplets are to be copied and pasted into a command line. You can paste into a terminal command line by holding <code><nowiki>SHIFT</nowiki></code> and pressing the <code><nowiki>INSERT</nowiki></code> key on your keyboard. The following command will create a file in the <code><nowiki>/usr/sbin/</nowiki></code> directory called <code><nowiki>bright</nowiki></code>. Copy and paste the following: | The following code snipplets are to be copied and pasted into a command line. You can paste into a terminal command line by holding <code><nowiki>SHIFT</nowiki></code> and pressing the <code><nowiki>INSERT</nowiki></code> key on your keyboard. The following command will create a file in the <code><nowiki>/usr/sbin/</nowiki></code> directory called <code><nowiki>bright</nowiki></code>. Copy and paste the following: | ||
第85行: | 第67行: | ||
sudo echo -e '#!/bin/bash \n syntax="\\n \\t SYNTAX: bright # \\n \\t Where # is any whole number from 1 to 8.\\n"; \n if [ 1$1 -gt 10 ]; \n then \n if [ 1$1 -lt 19 ]; \n then \n echo $1 > /proc/acpi/sony/brightness; \n else \n echo -e $syntax; \n fi; \n else \n echo -e $syntax; \n fi;' > /usr/sbin/bright; chmod a+x /usr/sbin/bright; | sudo echo -e '#!/bin/bash \n syntax="\\n \\t SYNTAX: bright # \\n \\t Where # is any whole number from 1 to 8.\\n"; \n if [ 1$1 -gt 10 ]; \n then \n if [ 1$1 -lt 19 ]; \n then \n echo $1 > /proc/acpi/sony/brightness; \n else \n echo -e $syntax; \n fi; \n else \n echo -e $syntax; \n fi;' > /usr/sbin/bright; chmod a+x /usr/sbin/bright; | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Brightdefault Script ==== | ==== Brightdefault Script ==== | ||
Do the same as the <code><nowiki>Bright Script</nowiki></code> above. The following command will create a file in the <code><nowiki>usr/sbin/</nowiki></code> directory called <code><nowiki>brightdefault</nowiki></code>. Copy and paste the following: | Do the same as the <code><nowiki>Bright Script</nowiki></code> above. The following command will create a file in the <code><nowiki>usr/sbin/</nowiki></code> directory called <code><nowiki>brightdefault</nowiki></code>. Copy and paste the following: | ||
第91行: | 第72行: | ||
sudo echo -e '#!/bin/bash \n syntax="\\n \\t SYNTAX: brightdefault # \\n \\t Where # is any whole number from 1 to 8.\\n"; \n if [ 1$1 -gt 10 ]; \n then \n if [ 1$1 -lt 19 ]; \n then \n echo $1 > /proc/acpi/sony/brightness_default; \n else \n echo -e $syntax; \n fi; \n else \n echo -e $syntax; \n fi;' > /usr/sbin/brightdefault; chmod a+x /usr/sbin/brightdefault; | sudo echo -e '#!/bin/bash \n syntax="\\n \\t SYNTAX: brightdefault # \\n \\t Where # is any whole number from 1 to 8.\\n"; \n if [ 1$1 -gt 10 ]; \n then \n if [ 1$1 -lt 19 ]; \n then \n echo $1 > /proc/acpi/sony/brightness_default; \n else \n echo -e $syntax; \n fi; \n else \n echo -e $syntax; \n fi;' > /usr/sbin/brightdefault; chmod a+x /usr/sbin/brightdefault; | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Running the Scripts ==== | ==== Running the Scripts ==== | ||
Now, to run the <code><nowiki>Bright Script</nowiki></code> you can issue the following command: | Now, to run the <code><nowiki>Bright Script</nowiki></code> you can issue the following command: | ||
第98行: | 第78行: | ||
</nowiki></pre> | </nowiki></pre> | ||
This will set the brightness ''temporarily'' to <code><nowiki>4</nowiki></code>. You can replace the <code><nowiki>4</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>. | This will set the brightness ''temporarily'' to <code><nowiki>4</nowiki></code>. You can replace the <code><nowiki>4</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>. | ||
To run the <code><nowiki>Brightdefault Script</nowiki></code> to change the default brightness, issue the following command: | To run the <code><nowiki>Brightdefault Script</nowiki></code> to change the default brightness, issue the following command: | ||
<pre><nowiki> | <pre><nowiki> | ||
第104行: | 第83行: | ||
</nowiki></pre> | </nowiki></pre> | ||
This will set the default brightness to <code><nowiki>3</nowiki></code>. You can replace the <code><nowiki>3</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>. | This will set the default brightness to <code><nowiki>3</nowiki></code>. You can replace the <code><nowiki>3</nowiki></code> with any number between <code><nowiki>1</nowiki></code> and <code><nowiki>8</nowiki></code>. | ||
---- | ---- | ||
[[category:CategoryCleanup]] | [[category:CategoryCleanup]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 21:32的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/SonyVaioBrightness }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/af | • {{#if: UbuntuHelp:SonyVaioBrightness|Afrikaans| [[::SonyVaioBrightness/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ar | • {{#if: UbuntuHelp:SonyVaioBrightness|العربية| [[::SonyVaioBrightness/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/az | • {{#if: UbuntuHelp:SonyVaioBrightness|azərbaycanca| [[::SonyVaioBrightness/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/bcc | • {{#if: UbuntuHelp:SonyVaioBrightness|جهلسری بلوچی| [[::SonyVaioBrightness/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/bg | • {{#if: UbuntuHelp:SonyVaioBrightness|български| [[::SonyVaioBrightness/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/br | • {{#if: UbuntuHelp:SonyVaioBrightness|brezhoneg| [[::SonyVaioBrightness/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ca | • {{#if: UbuntuHelp:SonyVaioBrightness|català| [[::SonyVaioBrightness/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/cs | • {{#if: UbuntuHelp:SonyVaioBrightness|čeština| [[::SonyVaioBrightness/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/de | • {{#if: UbuntuHelp:SonyVaioBrightness|Deutsch| [[::SonyVaioBrightness/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/el | • {{#if: UbuntuHelp:SonyVaioBrightness|Ελληνικά| [[::SonyVaioBrightness/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/es | • {{#if: UbuntuHelp:SonyVaioBrightness|español| [[::SonyVaioBrightness/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/fa | • {{#if: UbuntuHelp:SonyVaioBrightness|فارسی| [[::SonyVaioBrightness/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/fi | • {{#if: UbuntuHelp:SonyVaioBrightness|suomi| [[::SonyVaioBrightness/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/fr | • {{#if: UbuntuHelp:SonyVaioBrightness|français| [[::SonyVaioBrightness/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/gu | • {{#if: UbuntuHelp:SonyVaioBrightness|ગુજરાતી| [[::SonyVaioBrightness/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/he | • {{#if: UbuntuHelp:SonyVaioBrightness|עברית| [[::SonyVaioBrightness/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/hu | • {{#if: UbuntuHelp:SonyVaioBrightness|magyar| [[::SonyVaioBrightness/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/id | • {{#if: UbuntuHelp:SonyVaioBrightness|Bahasa Indonesia| [[::SonyVaioBrightness/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/it | • {{#if: UbuntuHelp:SonyVaioBrightness|italiano| [[::SonyVaioBrightness/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ja | • {{#if: UbuntuHelp:SonyVaioBrightness|日本語| [[::SonyVaioBrightness/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ko | • {{#if: UbuntuHelp:SonyVaioBrightness|한국어| [[::SonyVaioBrightness/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ksh | • {{#if: UbuntuHelp:SonyVaioBrightness|Ripoarisch| [[::SonyVaioBrightness/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/mr | • {{#if: UbuntuHelp:SonyVaioBrightness|मराठी| [[::SonyVaioBrightness/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ms | • {{#if: UbuntuHelp:SonyVaioBrightness|Bahasa Melayu| [[::SonyVaioBrightness/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/nl | • {{#if: UbuntuHelp:SonyVaioBrightness|Nederlands| [[::SonyVaioBrightness/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/no | • {{#if: UbuntuHelp:SonyVaioBrightness|norsk| [[::SonyVaioBrightness/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/oc | • {{#if: UbuntuHelp:SonyVaioBrightness|occitan| [[::SonyVaioBrightness/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/pl | • {{#if: UbuntuHelp:SonyVaioBrightness|polski| [[::SonyVaioBrightness/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/pt | • {{#if: UbuntuHelp:SonyVaioBrightness|português| [[::SonyVaioBrightness/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ro | • {{#if: UbuntuHelp:SonyVaioBrightness|română| [[::SonyVaioBrightness/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/ru | • {{#if: UbuntuHelp:SonyVaioBrightness|русский| [[::SonyVaioBrightness/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/si | • {{#if: UbuntuHelp:SonyVaioBrightness|සිංහල| [[::SonyVaioBrightness/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/sq | • {{#if: UbuntuHelp:SonyVaioBrightness|shqip| [[::SonyVaioBrightness/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/sr | • {{#if: UbuntuHelp:SonyVaioBrightness|српски / srpski| [[::SonyVaioBrightness/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/sv | • {{#if: UbuntuHelp:SonyVaioBrightness|svenska| [[::SonyVaioBrightness/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/th | • {{#if: UbuntuHelp:SonyVaioBrightness|ไทย| [[::SonyVaioBrightness/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/tr | • {{#if: UbuntuHelp:SonyVaioBrightness|Türkçe| [[::SonyVaioBrightness/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/vi | • {{#if: UbuntuHelp:SonyVaioBrightness|Tiếng Việt| [[::SonyVaioBrightness/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/yue | • {{#if: UbuntuHelp:SonyVaioBrightness|粵語| [[::SonyVaioBrightness/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/zh | • {{#if: UbuntuHelp:SonyVaioBrightness|中文| [[::SonyVaioBrightness/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/zh-hans | • {{#if: UbuntuHelp:SonyVaioBrightness|中文(简体)| [[::SonyVaioBrightness/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SonyVaioBrightness | UbuntuHelp:SonyVaioBrightness | {{#if: | :}}SonyVaioBrightness}}/zh-hant | • {{#if: UbuntuHelp:SonyVaioBrightness|中文(繁體)| [[::SonyVaioBrightness/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:SonyVaioBrightness|:SonyVaioBrightness|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :SonyVaioBrightness/zh | | {{#ifexist: SonyVaioBrightness/zh | | {{#ifeq: {{#titleparts:SonyVaioBrightness|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:SonyVaioBrightness|1|-1|}} | zh | | }}
Introduction
This page is a quick and brief guide to adjusting the brightness on a Sony VAIO laptop using Ubuntu 6.06.
SONYPI Module
In order to adjust the brightness of a Sony VAIO laptop, the sonypi
module needs to be loaded into the kernel.
Step 1: Checking for Module
At the command line issue the following command:
# grep -E "^sonypi" /proc/modules
If you receive a line of outpout, and it states that it is Live
, then the module is loaded. If not, move on to step 2.
Step 2: Load the Module
At the command line issue the following commands:
# sudo echo "sonypi" >> /etc/modules # sudo modprobe sonypi
The first command adds the module to the customizable list of modules to load at startup in addition to the ones normally loaded by the system. The second command loads the module. If the module is already loaded, using this command will harmlessly and pointlessly re-load it. Now test whether the module is loaded with the grep command used above. This time there should be a line of output.
Spicctrl Application
Spicctrl is an app that can be used to measure the battery life, and adjust the brightness of a Sony laptop. Spicctrl is known to work on some Sony laptops, but not all. If this method does not work, read the If Spicctrl Doesn't Work following these initial steps.
Step 1: Install Spicctrl
Issue the following command:
# sudo apt-get install spicctrl
Step 2: Run Spicctrl
Wait for the app to download and install. Once completed issue the following command:
# sudo spicctrl
This will output the options of the program. Issue the following command and read the output:
# sudo spicctrl -B
This should return a number between 0 and 255. Choose a number between 0 and 255 THAT IS DIFFERENT from the number outputed by the command. Replace the # symbol in the following command with that number:
# sudo spicctrl -b#
Once that command is completed, issue the following:
# sudo spicctrl -B
If the number has changed to the one you chose, then Spicctrl is working correctly. What you did, was manually change the number for the display's brightness control. You can change those brightness settings however you want to change the brightness. An added bonus is that Spicctrl can be sucessfully used by any user.
If Spicctrl Doesn't Work
If the previous steps did not work for you or your Sony VAIO, continue reading.
Manual Brightness Editing
NOTE: Changing the brightness
or brightness_default
file's data to anything other than a number between 1
and 8
, could possibly prevent your linux system from succesfully interacting with the monitor, meaning no screen image at all.
To change the brightness manually, issue the following command:
# sudo echo 4 > /proc/acpi/sony/brightness
You can replace the number 4
with any number between 1
and 8
. The numbers 1
through 8
can be used to adjust the brightness. 1
== dim. 8
== bright. The 'brightness' file changes the current brightness to the level you want. The brightness will stay that way until you change it again or until you shut down the computer.
Retaining Manual Brightness Edits
The default level of brightness that Ubuntu uses whenever it boots up is stored in brightness_default
. No matter what you change the brightness file entry to, the next time you start your computer, it's going to use the default brightness again. To change this default brightness to the level you want, issue the following command, replacing the #
with any number between 1
and 8
:
# sudo echo "#" > /proc/acpi/sony/brightness_default
Shortcuts
The following will aid you in creating shell scripts that will allow you to issue script command instead of typing out the entire command that would change the brightness.
Bright Script
The following code snipplets are to be copied and pasted into a command line. You can paste into a terminal command line by holding SHIFT
and pressing the INSERT
key on your keyboard. The following command will create a file in the /usr/sbin/
directory called bright
. Copy and paste the following:
sudo echo -e '#!/bin/bash \n syntax="\\n \\t SYNTAX: bright # \\n \\t Where # is any whole number from 1 to 8.\\n"; \n if [ 1$1 -gt 10 ]; \n then \n if [ 1$1 -lt 19 ]; \n then \n echo $1 > /proc/acpi/sony/brightness; \n else \n echo -e $syntax; \n fi; \n else \n echo -e $syntax; \n fi;' > /usr/sbin/bright; chmod a+x /usr/sbin/bright;
Brightdefault Script
Do the same as the Bright Script
above. The following command will create a file in the usr/sbin/
directory called brightdefault
. Copy and paste the following:
sudo echo -e '#!/bin/bash \n syntax="\\n \\t SYNTAX: brightdefault # \\n \\t Where # is any whole number from 1 to 8.\\n"; \n if [ 1$1 -gt 10 ]; \n then \n if [ 1$1 -lt 19 ]; \n then \n echo $1 > /proc/acpi/sony/brightness_default; \n else \n echo -e $syntax; \n fi; \n else \n echo -e $syntax; \n fi;' > /usr/sbin/brightdefault; chmod a+x /usr/sbin/brightdefault;
Running the Scripts
Now, to run the Bright Script
you can issue the following command:
# sudo bright 4
This will set the brightness temporarily to 4
. You can replace the 4
with any number between 1
and 8
.
To run the Brightdefault Script
to change the default brightness, issue the following command:
#sudo brightdefault 3
This will set the default brightness to 3
. You can replace the 3
with any number between 1
and 8
.