sony 笔记本Karmic Koala (9.10)添加亮度改变

笔记本/便携移动设备,手机平板等软硬件
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

sony 笔记本Karmic Koala (9.10)添加亮度改变

#1

帖子 yus253 » 2009-11-06 13:57

Sony笔记本安装Ubuntu可能会出现Fn+F5;Fn+F6调节屏幕颜色失败的状况,尤其像9.10,我发现在它的acpid支持文件夹里根本没有关于这部分的技术支持,对此我惨考opensuse下的解决办法,添加了3个文件,很好的解决了亮度不能改变这个问题(当然缺点也依然存在,就是显示的当前进度不正常)注意红色代码是在终端中输入的黄色代码在打开的gedit中输入输入后保存关闭就可以了。

1.首先安装nvclock Make sure nvclock is installed

Code:

代码: 全选

sudo apt-get install nvclock
[/color]

2. 然后 /etc/acpi/events中添加两个关于fn+F5;fn+F6亮度条件的文件,第一个叫做sony-brightness-up
In /etc/acpi/events create a file sony-brightness-up containing the following:


Code:

代码: 全选

sudo gedit  /etc/acpi/events/sony-brightness-up
//之后,把这段关于热键设置的代码粘如进去。

代码: 全选

# /etc/acpi/events/sony-brightness-up
event=sony/hotkey SNC 00000001 00000011
action=/etc/acpi/sonybright.sh up
3. 这是变暗的代码In /etc/acpi/events create a file sony-brightness-down containing the following:

Code:

代码: 全选

sudo gedit  /etc/acpi/events/sony-brightness-down

代码: 全选

# /etc/acpi/events/sony-brightness-down
event=sony/hotkey SNC 00000001 00000010
action=/etc/acpi/sonybright.sh down
4.然后在上层文件夹内添加sh,也就是acpi启动时要执行的文件sonybright.sh In /etc/acpi create a file sonybright.sh containing the following:

Code:

代码: 全选

 sudo gedit /etc/acpi/ sonybright.sh

代码: 全选

#!/bin/bash
if [ "x$1" = "xdown" ]; then
# Decrease brightness
        nvclock -S -10
elif [ "x$1" = "xup" ]; then
# Increase brightness
        nvclock -S +10
elif [ "x$1" = "xdim" ]; then
# Minimum brightness
        nvclock -S 15
elif [ "x$1" = "xbright" ]; then
# Maximum brightness
        nvclock -S 100
else
   echo >&2 Unknown argument $1 to nvclock in sonybright.sh
fi
之后我们来执行它,这时应该注意,在文件所在的目录下执行这些文件and make it executable

Code:

代码: 全选

cd  /etc/acpi/events
sudo chmod +x sony-brightness-up
sudo chmod +x sony-brightness-down
 cd /etc/acpi
sudo chmod +x sonybright.sh
5. 最后我们重启acpid Restart acpid

Code:

代码: 全选

sudo /etc/init.d/acpid restart
:em11 大功告成,万岁~
上次由 yus253 在 2009-11-08 17:41,总共编辑 9 次。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
kunkun0217
帖子: 441
注册时间: 2007-11-14 17:39
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#2

帖子 kunkun0217 » 2009-11-06 14:04

虽然也是用vaio,但是暂时用不上~ 先记录
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#3

帖子 yus253 » 2009-11-06 14:14

kunkun0217 写了:虽然也是用vaio,但是暂时用不上~ 先记录
什么型号?
之前我还看到过解决无线网卡LED闪烁的文章
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#4

帖子 yus253 » 2009-11-06 16:14

代码: 全选

#!/bin/bash
if [ "x$1" = "xdown" ]; then
# xbacklight -steps 10 -dec 10 2>/tmp/sonybright.log
        nvclock -S -10
elif [ "x$1" = "xup" ]; then
# xbacklight -steps 10 -inc 10 2>/tmp/sonybright.log
        nvclock -S +10
else
   echo >&2 Unknown argument $1
fi

这段代替第4步,尝试下是不是就能解决进度条问题了?
上次由 yus253 在 2009-11-08 17:44,总共编辑 1 次。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#5

帖子 yus253 » 2009-11-06 16:19

还是不能彻底解决~这个是我在8.10时发现的方法,当时,可以很好的实现亮度调节的问题。而且最暗可以把屏幕调黑。 :em01
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#6

帖子 yus253 » 2009-11-06 20:01

Linux下笔记本特殊按键设置
  • 关键字: ubuntu linux 笔记本 快捷键
不知这里用笔记本的兄弟界面们有没有发现Linux下很多按键都无法使用?很多笔记本都有一些快捷键,比如邮件、网页浏览器、搜索……,在Windows下都是通过驱动程序解决的,但是这些笔记本厂家没有提供Linux驱动,如何解决?

俺发现一个软件:acpi_listen,在acpid套件中有,如果您的acpid套件没有这个功能,建议您安装最新版本的acpid。

使用方法:
在终端执行:acpi-listen,然后一次按快捷键,不出以外的话可以看到“ATKD 00000051”这样的数字串,把这些都记录下来,俺把他理解为硬件信号(高手们不知道俺的说法是否正确?)。
然后在/etc/apci/events/ 下建立xxx.conf文件。
这个时候我们就要利用到刚才收集到的快捷键信号,xxx.cof的文件格式大致为:

代码: 全选

   event=hotkey ATKD 00000051
    action=/usr/bin/firefox
这个的意思就是说当遇到event指定的信号时执行/usr/bin/firefox 就是执行firefox啦!某位说是action后边的路径是什么RegExp规则的,俺不懂,写绝对路径得了,反正也就那么几个键!
上次由 yus253 在 2009-11-12 14:47,总共编辑 3 次。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#7

帖子 yus253 » 2009-11-07 0:38

up by myself
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#8

帖子 yus253 » 2009-11-07 14:01

4.然后在上层文件夹内添加sh,也就是acpi启动时要执行的文件sonybright.sh In /etc/acpi create a file sonybright.sh containing the following:

Code:

代码: 全选

sudo gedit /etc/acpi/ sonybright.sh

代码: 全选

#!/bin/bash
if [ "x$1" = "xdown" ]; then
# Decrease brightness
nvclock -S -10
elif [ "x$1" = "xup" ]; then
# Increase brightness
nvclock -S +10
elif [ "x$1" = "xdim" ]; then
# Minimum brightness
nvclock -S 15
elif [ "x$1" = "xbright" ]; then
# Maximum brightness
nvclock -S 100
else
echo >&2 Unknown argument $1 to nvclock in sonybright.sh
fi
************cd /etc/acpi************************
上次由 yus253 在 2009-11-08 17:42,总共编辑 1 次。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
yc_richard
帖子: 21
注册时间: 2008-04-04 12:33

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#9

帖子 yc_richard » 2009-11-08 0:31

装nvclock的方法确实可行。热键能用就好。
不过请问有没有让电脑开机自动为某一亮度的方法?每次开机都是最亮,还要手调回来。

另外向请教下楼主关于无线网卡的问题。闪灯到是小问题,可是很多时候在直接开机进ubuntu后,识别不到网卡,很郁闷。重启几道就又有了。或者每次直接从windows转到Ubuntu就有,只要是重启就有。关机后开机进就识别不到网卡。
你有这种情况吗?
我也在国外论坛看到有人提到过这种问题

ps:我的型号是fz37
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#10

帖子 yus253 » 2009-11-08 17:30

yc_richard 写了:装nvclock的方法确实可行。热键能用就好。
不过请问有没有让电脑开机自动为某一亮度的方法?每次开机都是最亮,还要手调回来。

另外向请教下楼主关于无线网卡的问题。闪灯到是小问题,可是很多时候在直接开机进ubuntu后,识别不到网卡,很郁闷。重启几道就又有了。或者每次直接从windows转到Ubuntu就有,只要是重启就有。关机后开机进就识别不到网卡。
你有这种情况吗?
我也在国外论坛看到有人提到过这种问题

ps:我的型号是fz37
网卡的问题我没有,LED闪烁可以用这个代码解决:
在终端进入 /etc/network/if-up.d 目录

代码: 全选

$cd /etc/network/if-up.d
建立一个文件 iwl-no-blink

代码: 全选

$sudo gedit iwl-no-blink
编辑里面的内容为

代码:

代码: 全选

#!/bin/sh
if [ "$IFACE" = "wlan0" ]; then
for dir in /sys/class/leds/iwl-phy*; do
echo none > $dir/trigger
done
fi
保存

设置权限

代码: 全选

$sudo chmod 755 /etc/network/if-up.d/iwl-no-blink
重启系统,再次连接,问题解决了。reboot
上次由 yus253 在 2009-11-08 17:43,总共编辑 1 次。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#11

帖子 yus253 » 2009-11-08 17:31

总的来说,9.10的驱动支持不是很好,也不太稳定。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
yus253
帖子: 389
注册时间: 2009-05-31 20:52
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#12

帖子 yus253 » 2009-11-08 17:33

亮度不能保存,是相关配置文档的信息,我还没有找到在哪里,爱默能住了。
The root of bioengineering is the desire to control the organic long enough to improve it. Domesticated plants and animals are examples of technos -- logic applied to life.
头像
kunkun0217
帖子: 441
注册时间: 2007-11-14 17:39
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#13

帖子 kunkun0217 » 2009-11-09 1:40

yus253 写了:
kunkun0217 写了:虽然也是用vaio,但是暂时用不上~ 先记录
什么型号?
之前我还看到过解决无线网卡LED闪烁的文章
VAIO VGN-N29VN
我的无线网卡灯长期不亮的~开关也无效~不过没有关系不影响使用~ 貌似只能在Vista上有效~其它windows版本都不行,win7也不行
头像
kunkun0217
帖子: 441
注册时间: 2007-11-14 17:39
联系:

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#14

帖子 kunkun0217 » 2009-11-09 1:42

默认亮度不是在电源管理里面设置的吗?不需要这样折腾吧?
头像
jiangkero
帖子: 704
注册时间: 2008-07-14 10:15

Re: sony 笔记本Karmic Koala (9.10)添加亮度改变

#15

帖子 jiangkero » 2009-11-09 15:17

我的sony本太老了,Fn键已经彻底死亡了,根本识别不了
回复