Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sony Vaio Laptop Utilities (sony-laptop-tools-0.8)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Thu May 15, 2008 8:39 am    Post subject: Sony Vaio Laptop Utilities (sony-laptop-tools-0.8) Reply with quote

Hi guys!

I've collected many tricks with Sony Vaio multimedia keys/brighness&sound control into a nice utility named sony-laptop-tools.

What's it does:
1) Brightness control (hybrid video cards system - nvidia+intel is supported).
2) Sound control - mute/unmute, sound up, sound down.
3) OSD notifications for sound/brighness control operations.
Screenshot is here.
4) Software can be used from command line:
Code:

Help
 sony-laptop-tools brightness or b|sound|hibernate|suspend [set|get|up|down|off|on|toogle]
For example:
 # sony-laptop-tools brightness up
 # sony-laptop-tools sound up
 # sony-laptop-tools b set 6
 # sony-laptop-tools suspend


5) There are no dependensies on big/fat packages, only small utilities:
* media-video/smartdimmer - smartdimmer
* x11-apps/xset - xset
* media-sound/alsa-utils - amixer
* sys-apps/pciutils - lspci
* sys-power/acpid - acpid

There are two config files stored in:
/etc/sony-laptop-tools folder

First - common.conf, allow to reassign keys to brightness/suspend/hibernate operations and control OSD's behaviour.
Default config file:
Code:

# Config file for sony-laptop-tools
# key=code default mapping (based on sony sz 460)
key_code_f1=0000000c
key_code_f5=00000010
key_code_f6=00000011
key_code_f7=00000012
key_code_s1=00000020
key_code_s2=00000021

# keys actions assigment
key_brightness_down=f5
key_brightness_up=f6
key_brightness_off=f7
key_suspend=s1
key_hibernate=s2

# Set 1 to enable OSD
osd_enable=1
# Set 1 of you want to be cleared previous OSD
# messages on the screen
osd_killprev=1
# Delay of OSD message
osd_delay=1

# Step for brighness bar
brightness_step=1
# Step for sound bar
sound_step=5

#osd_bar_color=gray
#osd_bar_font='-*-luxi*-*-*-*-*-32-*'
#osd_text_color=blue
#osd_text_font='-*-luxi*-*-*-*-*-32-*'


For example you want to assign F10 key to suspend, all you should todo - its update or add following lines:

key_code_f10=your_key_code
key_suspend=f10


Where "your_key_code" can be recieved using acpi_listen utility.

Currently, sound keys are customizable via separated config (because its not sony driver controlled keys) named software-keys.conf:
Code:

# This is a xbindkeys keys config, you can get
# key code using "xbindkeys -n -k -v" command

"sony-laptop-tools sound down"
        m:0x0 + c:174
        NoSymbol
...


In future, keys configuration should be entirely transparent using one config file.

Unfortunately, on newest notebooks with nvidia 8xxx brighness controll is not worked (because there is no known way to control it at this moment).

Feel free to discuss and test this program :D

There are no many hardcoded thinks in a program, it's a flexible bash script in mind, this is means what program idea can be populated to many others notebook vendors. To be or not be depends on you completely :D

Installation HowTo:

1) Unpack ebuilds into local overlay.
2) Setup program using «emerge app-laptop/sony-laptop-tools» or «paludis -i app-laptop/sony-laptop-tools».
3) Add sony-laptop-tools service into boot runlevel - «rc-update add sony-laptop-tools boot».
4) Restart acpid & sony-laptop-tools services («/etc/init.d/acpid restart && /etc/init.d/sony-laptop-tools restart»).
5) If you want to use OSD execute "xhost +local:root" command under not root user (user which you use in X11)
(Add "xhost +local:root" command into your xinitrc or .bashrc script to be OSD messages worked after reboot or X server restart. I've this command in my ~/.bashrc file and its enough)

Please pay atention to installtion messages, maybe will needed rebuild you kernel with SONY_LAPTOP or SONY_PI options (both are required for me, my model is - SZ 460).

PS. For russian users following link will explan everything on native language ;) . Here link to discussion on gentoo.ru.

Updates:

Version 0.4 released.
Changset:
* Theare are set of OSD localtion parameters added into common.conf - osd_bar_align/osd_bar_position/osd_bar_offset and the same for text.

Version 0.5 released.
Bugfixing only.
Intallation Notes section about "xhost +local:root" is updated.

Version 0.6 released.
Features:
* Hybrib video system is fully supported now!
Autoswitch of video cards (nvidia, intel) in boot-time
is implemented (new "hybridvideo" USE flag).
There are two Xorg config files is used. Paths should be
setted in /etc/sony-laptop-tools/common.conf
There are two examples in /etc/sony-laptop-tools/
- xorg.conf.intel.example
- xorg.conf.nvidia.example
* Suspend on LID colose added.
Use "suspend_on_lid_down" property to control behaviour.
Fixes:
* Fixed brightness control for Intel cards.
* Stupid errors spooled to console output suppressed.

This tool is very very usefull for Vaio SZ-series owners. For now, boot-time video cards switching is worked out of the box (hybridvideo should be enabled)! But be carefull with this feature, if it's enabled your xorg.conf will be replaced with one of two default configuration - /etc/sony-laptop-tools/xorg.conf.intel.example and /etc/sony-laptop-tools/xorg.conf.nvidia.example. Your can change this using xorg_conf_intel, xorg_conf_nvidia, xorg_conf_nvidia variables in common.conf.

Migration notes:
For now, sony-laptop-tools daemon should be in "boot" runlevel. Please remove in from "default" and add to "boot":
Code:

# rc-update del sony-laptop-tools
# rc-update add sony-laptop-tools boot


Unfortunately, nvidia 8xxx cards is not supported yet.

Version 0.7 released.
Features:

* There are few new cool options added into config file:
- brightness_default
- brightness_power_plugged
- brightness_power_unplugged
They are allow to set default brightness value (for X11 screens).
Value when power cable is plugged on and plugged off.
- brightness_osd_only
Should be setted to 1 if brightness control works on hardware level (only OSD will displayed).

* Automatic ACPI brightness device detection.
There is no hardcoded dependency on /sys/..sony/brightness now.
This is one of first steps to make this utility more portable
between different notebooks (asus, toshiba, etc.).

Version 0.8 released.
* Added support of plugged on/off power cable detection using /sys/class/power_supply/BAT*/status
* stop sony-laptop-tools service function fixed (all runned processed will be stopped correctly now)

Version 0.8-r1 released.
* Fixed bug with no OSD messages for sound-related events in some cases


Last edited by developer on Tue Sep 30, 2008 10:51 am; edited 21 times in total
Back to top
View user's profile Send private message
knefas
l33t
l33t


Joined: 21 Dec 2003
Posts: 828

PostPosted: Fri May 16, 2008 11:27 am    Post subject: Reply with quote

Nice work!

FYI, smartdimmer is deprecated for nvclock beta (in the tree), which has an option for setting brightness. :)
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Fri May 16, 2008 1:34 pm    Post subject: Reply with quote

ueszlo wrote:
Nice thread!

knefas wrote:
Nice work!

Thanks!

knefas wrote:

FYI, smartdimmer is deprecated for nvclock beta (in the tree), which has an option for setting brightness. :)


maybee.. but nvclock use smartdimmer too, currently :)
and.. i suppose what not lartest version, because:
Code:

# nvclock -S 10
Error!
Smartdimmer is only supported on laptops using a Geforce 6200Go. If you want support on your laptop contact the author.

( tested on media-video/nvclock-0.8_beta2 with nvidia-drivers-173.08-r10, nvidia 7400 )

But, smartdimmer from https://bugs.gentoo.org/show_bug.cgi?id=158685 (which used in sony-laptop-tools) is working correctly.
Code:

# smartdimmer -s 10


Let's, will waiting for new version of nvclock.

If somebody knowns some tricks for newest nvidia cards (8xxx) - don't keep secret ;)
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 388

PostPosted: Wed May 21, 2008 2:53 pm    Post subject: Re: Sony Vaio Laptop Utilities (sony-laptop-tools-0.4) Reply with quote

developer wrote:

Version 0.4 released.
Changset:
* Theare are set of OSD localtion parameters added into common.conf - osd_bar_align/osd_bar_position/osd_bar_offset and the same for text.


Says Version 0.4 but links is Version 0.1
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Thu May 22, 2008 4:49 pm    Post subject: Re: Sony Vaio Laptop Utilities (sony-laptop-tools-0.4) Reply with quote

imesg wrote:

Says Version 0.4 but links is Version 0.1


No, no, no. Follow link from my first post and get latest ebuilds (i'm think nobody needed old ebuild for version 0.1 ;) , it's replaced with new archive).

Let's check this:
# cd /tmp
# wget http://www.fileupyours.com/view/151518/gentoo/soft/ebuilds.sony-laptop-tools.tbz2
# tar xvjpf ebuilds.sony-laptop-tools.tbz2 | grep -e 'tools-'
app-laptop/sony-laptop-tools/sony-laptop-tools-0.4.ebuild

Enjoy ;)
Back to top
View user's profile Send private message
forceflow2
Guru
Guru


Joined: 16 Apr 2003
Posts: 464
Location: South Carolina

PostPosted: Thu May 22, 2008 6:39 pm    Post subject: Reply with quote

I think you might want to change your ebuild. You have the nvidia USE flag set, but it doesn't do anything and you have the hybridvideo without the ability to enable it. Granted I am not 100% on ebuilds and whatnot, but I think what I am saying is right.
_________________
That rank under my username doesn't mean I know everything, it just means I ask a lot of questions.
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Fri May 23, 2008 5:31 am    Post subject: Reply with quote

forceflow2 wrote:
I think you might want to change your ebuild. You have the nvidia USE flag set, but it doesn't do anything and you have the hybridvideo without the ability to enable it. Granted I am not 100% on ebuilds and whatnot, but I think what I am saying is right.


You absolutely right, hybridvideo flag is obsolete, nvidia should be used instead. Ebuild is updated.
This fix and some others included into version 0.5.

Try it and feel free to post any comments and suggestions ;)
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Thu May 29, 2008 9:11 pm    Post subject: Re: Sony Vaio Laptop Utilities (sony-laptop-tools-0.6) Reply with quote

Hey guys, can anybody try brightness control on nv8400 using smatrdimmer + nvidia-drivers-173.14.05 drivers?

(for 173.14.05 version renamed latest nvidia-drivers ebuild can be simply used, it works nice for me)

Small chance, but...
Back to top
View user's profile Send private message
Mover
n00b
n00b


Joined: 23 Jul 2008
Posts: 1
Location: Utrecht

PostPosted: Wed Jul 23, 2008 5:14 pm    Post subject: ebuild link is not working Reply with quote

After I installed the newest Sabayon 3.5 I wanted to install the sony-laptop-tools again. Unfortunately the link to upyours is not working anymore.
Any chance to activate it or is there another place to download the ebuild, because I really liked it.....
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Tue Aug 05, 2008 6:38 am    Post subject: Re: ebuild link is not working Reply with quote

Mover wrote:
After I installed the newest Sabayon 3.5 I wanted to install the sony-laptop-tools again. Unfortunately the link to upyours is not working anymore.
Any chance to activate it or is there another place to download the ebuild, because I really liked it.....


Sorry for this, give me one/two days to solve this problem (i just back from vocation :) ).
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Wed Aug 06, 2008 1:14 am    Post subject: Reply with quote

Cheers !

This sounds great :) i really liked this tool and i want to check how it works with my Vaio laptop !
And a small question ! Do you know if this will work with the VGN-AR Series ?

Thumbs up for the effort you put on this and i hope you had fun in your vacation !
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Thu Aug 07, 2008 6:59 am    Post subject: Reply with quote

Xerionn wrote:
Cheers !

This sounds great :) i really liked this tool and i want to check how it works with my Vaio laptop !
And a small question ! Do you know if this will work with the VGN-AR Series ?

Thumbs up for the effort you put on this and i hope you had fun in your vacation !


Information about download location is updated (see "Important message!" section on top of this tread).
There are no any reports about VGN-AR Series unfortunately, but i think problems can be only with brightness control function. Try it and contact with me. If result will be negative we can try to do something for support your model ;)
Back to top
View user's profile Send private message
teayourself
n00b
n00b


Joined: 09 Aug 2008
Posts: 2

PostPosted: Sat Aug 09, 2008 8:41 pm    Post subject: Reply with quote

I have a problem trying to emerge this nice packet.

Code:

emerge app-laptop/sony-laptop-tools

[...]
Saving to: `/usr/portage/distfiles/smartdimmer-0.1.tar.bz2'

100%[======================================>] 6,525       --.-K/s   in 0.05s   

2008-08-09 23:39:15 (127 KB/s) - `/usr/portage/distfiles/smartdimmer-0.1.tar.bz2' saved [6525/6525]

 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking smartdimmer-0.1.tar.bz2 ;-) ...                               [ !! ]

!!! Digest verification failed:
!!! /usr/portage/distfiles/smartdimmer-0.1.tar.bz2
!!! Reason: Filesize does not match recorded size
!!! Got: 6525
!!! Expected: 79329



Any ideas ?
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Sun Aug 10, 2008 6:26 am    Post subject: Reply with quote

For me a different problem with the ebuild of sony-laptop-tools

Code:
2008-08-10 16:25:10 (17,6 KB/s) - `/usr/portage/distfiles/sony-laptop-tools-0.7.tbz2' saved [4083/4083]

 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking sony-laptop-tools-0.7.tbz2 ;-) ...                            [ !! ]

!!! Digest verification failed:
!!! /usr/portage/distfiles/sony-laptop-tools-0.7.tbz2
!!! Reason: Filesize does not match recorded size
!!! Got: 4083
!!! Expected: 9444


I tried to ebuild sony-laptop-tools-0.7.tbz2 digest to create a new manifest file but then i had problem with the unpacking of the tbz2 file
Back to top
View user's profile Send private message
quadm
n00b
n00b


Joined: 10 Aug 2008
Posts: 1

PostPosted: Sun Aug 10, 2008 9:07 pm    Post subject: Reply with quote

EDIT: I am getting the same issue as Zerionn and teayourself. Any help would be greatly appreciated.
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Mon Aug 11, 2008 5:22 am    Post subject: Reply with quote

quadm wrote:
EDIT: I am getting the same issue as Zerionn and teayourself. Any help would be greatly appreciated.


Actually mine and teayourself are different issues.
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Mon Aug 11, 2008 3:00 pm    Post subject: Reply with quote

Xerionn wrote:
For me a different problem with the ebuild of sony-laptop-tools

Code:
2008-08-10 16:25:10 (17,6 KB/s) - `/usr/portage/distfiles/sony-laptop-tools-0.7.tbz2' saved [4083/4083]

 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking sony-laptop-tools-0.7.tbz2 ;-) ...                            [ !! ]

!!! Digest verification failed:
!!! /usr/portage/distfiles/sony-laptop-tools-0.7.tbz2
!!! Reason: Filesize does not match recorded size
!!! Got: 4083
!!! Expected: 9444


I tried to ebuild sony-laptop-tools-0.7.tbz2 digest to create a new manifest file but then i had problem with the unpacking of the tbz2 file


Dudes, i think that you are can safety rebuild digest for these ebuilds (using "ebuild sony-laptop-tools-0.7.ebuild digest" like command). I apology for this situation, i can't fix these bugs normally, bacause temporarily, i haven't persistent internet access and my online time is very limited. I think situation become more better at this thursday. If someone can/want help with maintenance of this package - contact with me (see contact information).
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Mon Aug 11, 2008 3:07 pm    Post subject: Reply with quote

As i told you i already tried that but i found another wall :)

Code:
sony-laptop-tools # ebuild sony-laptop-tools-0.7.ebuild digest
>>> Creating Manifest for /usr/portage/local/overlay/app-laptop/sony-laptop-tools
sony-laptop-tools # emerge sony-laptop-tools
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) app-laptop/sony-laptop-tools-0.7 to /
 * sony-laptop-tools-0.7.tbz2 RMD160 SHA1 SHA256 size ;-) ...             [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking sony-laptop-tools-0.7.tbz2 ;-) ...                            [ ok ]
 * Checking kernel options ... ...
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.25-gentoo-r7/build
 * Found sources for kernel version:
 *     2.6.25-gentoo-r7
>>> Unpacking source...
>>> Unpacking sony-laptop-tools-0.7.tbz2 to /var/tmp/portage/app-laptop/sony-laptop-tools-0.7/work
bzip2: /var/tmp/portage/app-laptop/sony-laptop-tools-0.7/distdir/sony-laptop-tools-0.7.tbz2 is not a bzip2 file.
tar: This does not look like a tar archive
tar: Error exit delayed from previous errors
 *
 * ERROR: app-laptop/sony-laptop-tools-0.7 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 3247:  Called unpack 'src_unpack'
 *               ebuild.sh, line  341:  Called die
 * The specific snippet of code:
 *                              assert "$myfail"
 *  The die message:
 *   failure unpacking sony-laptop-tools-0.7.tbz2
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-laptop/sony-laptop-tools-0.7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-laptop/sony-laptop-tools-0.7/temp/environment'.
 *

 * Messages for package app-laptop/sony-laptop-tools-0.7:

 *
 * ERROR: app-laptop/sony-laptop-tools-0.7 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 3247:  Called unpack 'src_unpack'
 *               ebuild.sh, line  341:  Called die
 * The specific snippet of code:
 *                              assert "$myfail"
 *  The die message:
 *   failure unpacking sony-laptop-tools-0.7.tbz2
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-laptop/sony-laptop-tools-0.7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-laptop/sony-laptop-tools-0.7/temp/environment'.
 *


Any idea ?
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Mon Aug 11, 2008 3:58 pm    Post subject: Reply with quote

Well in any case i found a work arround as i am not an expert with ebuilds ...
As i said i digested the ebuild to get the manifest file re-made...
Then i just changed the .tbz2 to tar.bz2 and of course i had to put a tar.bz2 in the /usr/portage/distfiles instead of yours .tbz2

As said this is only a work arround !
But hey now i can check what happens with my VGN AR model...


Yay !!! Shiny tool as it was expected....
Now i have some questions hehe of course whenever you have time to answer i am in no rush :)
Quote:
Value when power cable is plugged on and plugged off.

For some reason this does not work... From where do you get the status of the system if its plugged or unplugged ?
I can see that cat /sys/class/power_supply/BAT0/status says either charging or discharging for me i could get it from there maybe ? Any other idea would be welcome.

Quote:
- brightness_osd_only
Should be setted to 1 if brightness control works on hardware level (only OSD will displayed).

What do you mean if brightness works on hardware level

Last is that i cannot get to work my FN keys at all...minor problem as i can do anything via console but well buttons do it faster :D
acpi_listen returns nothing when i press F keys however xev returns somethings ... probably the sony_laptop does not support my model yet ?
This is for example the output of xev when i press F5
Quote:
KeyPress event, serial 28, synthetic NO, window 0x2e00001,
root 0x1a5, subw 0x0, time 2997068041, (209,-189), root:(213,364),
state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False


Anything i can use from that to the common.conf ? But i guess that if the sony laptop does not support my model yet i cant get Fn keys to work .

Thank you again for the tool that you provided :)
Back to top
View user's profile Send private message
teayourself
n00b
n00b


Joined: 09 Aug 2008
Posts: 2

PostPosted: Tue Aug 12, 2008 11:52 am    Post subject: Reply with quote

I have solved my problems as well. The actual problem is that whenever i tried to emerge that package emerge was looking for a download at "http://ftp.cc.uoc.gr/mirrors/linux/gentoo/". The package was not there ( probably it isnt hosted there) but emerge was saving the error-404 as "smartdimmer-0.1.tar.bz2" and then tried to untar it. Is that an emerge bug for not recognizing the 404 page from the mirror ?
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Wed Aug 13, 2008 3:49 am    Post subject: Reply with quote

Sony laptop utilities was moved to sourceforge hosting. Ebuild and post links was updated.
Back to top
View user's profile Send private message
developer
n00b
n00b


Joined: 23 May 2007
Posts: 20
Location: Russia

PostPosted: Wed Aug 13, 2008 5:35 am    Post subject: Reply with quote

teayourself wrote:
I have solved my problems as well. The actual problem is that whenever i tried to emerge that package emerge was looking for a download at "http://ftp.cc.uoc.gr/mirrors/linux/gentoo/". The package was not there ( probably it isnt hosted there) but emerge was saving the error-404 as "smartdimmer-0.1.tar.bz2" and then tried to untar it. Is that an emerge bug for not recognizing the 404 page from the mirror ?


I've seen this before and i think this is a file server wrong settings or a bug of wget (hardly).

Xerionn wrote:

Yay !!! Shiny tool as it was expected....


You've got nothing worked, but you say this.. you are a strong man :)

Xerionn wrote:

For some reason this does not work... From where do you get the status of the system if its plugged or unplugged ?
I can see that cat /sys/class/power_supply/BAT0/status says either charging or discharging for me i could get it from there maybe ? Any other idea would be welcome.


ACPI event is used to get the status of the system (if its plugged or unplugged).
/sys/class/power_supply/BATx/status is not used.
Are you've got a ACPI daemon running? (/etc/init.d/acpid status). And please note, what it should be restarted after utility setup. You can look there are any ACPI events or not when power cable is plugged/unplugged using acpi_listen command.

Xerionn wrote:

What do you mean if brightness works on hardware level

Oh.. just ignore it, this expiremental option for another laptop vendors (ASUS for example). Some laptops has brightness keys worked on hardware level and tool (in mind) should only display OSD notification and do nothing with system.

Xerionn wrote:

acpi_listen returns nothing when i press F keys however xev returns somethings ... probably the sony_laptop does not support my model yet ?


There are no any insurance arrangements from sony_laptop at all :)

Quote from official site:

This driver is not based on official documentation from Sony (because there is none), so there is no guarantee this driver will work at all, or do the right thing. Although this hasn't happened to me, this driver could do very bad things to your laptop, including permanent damage.

You can try to find any discussions about your model and sent me more information.

I'll test xev tool at this Saturday (but xev doesn't work in not graphical environment..).


Last edited by developer on Fri Aug 15, 2008 6:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Fri Aug 15, 2008 3:39 pm    Post subject: Reply with quote

Mhm i played arround a little bit with the /usr/src/linux/drivers/misc/sony-laptop.c so i am able to get ACPI events to acpi_listen

This means that all the shortcuts work :D FN+F5, FN+F6, S1, S2 plus some extra buttons such as AV mode so i can map anything to them hehe.
In addition i get ACPI messages when i plug in and out the power cord however the brightness does not change ...Any help on that ?
Actually according to acpi_listen plug and unplug produce the same code 00000000 and i checked at your code that you have 00000000 and 00000001

Now that i have kind of all working i wanted to set correctly the FN key... How can i get the above keys to work ?
Code:
FN+7 to 7
FN+U to 4
FN+I to 5
FN+M to 0

Just mentionning this as an example no need to write all the numbers...
I have done the maping of Play, Stop, Next, and so on with the xmodmap but for them i can get the keycodes but what is the actions of the press

For example
Code:
keycode 162 = XF86AudioPlay

is the button play and FN+u is 4 but what should i provide to xmodmap ?
Back to top
View user's profile Send private message
gruftie
Apprentice
Apprentice


Joined: 24 Sep 2002
Posts: 182

PostPosted: Tue Sep 09, 2008 5:26 pm    Post subject: Reply with quote

hey guys :)

i recently got my vgn-ar71s and after (with a big smile) removing vista and installing gentoo, i try to get it all to work :) so i found this thread and try it out.
acpid is running, but i get nothing with acpi_listen. well, actually sony-laptop-tools does nothing at all, as far as i can see...

Xerionn wrote:
Mhm i played arround a little bit with the /usr/src/linux/drivers/misc/sony-laptop.c so i am able to get ACPI events to acpi_listen


what did you do exactly to get events?

Quote:
This means that all the shortcuts work :D FN+F5, FN+F6, S1, S2 plus some extra buttons such as AV mode so i can map anything to them hehe.
In addition i get ACPI messages when i plug in and out the power cord however the brightness does not change ...Any help on that ?
Actually according to acpi_listen plug and unplug produce the same code 00000000 and i checked at your code that you have 00000000 and 00000001


the vgn-ar71s has the geforce 8600m gt. installed nvidia-drivers and nvidia-settings are both version 173.14.12. brightness-control works with nvidia-settings. so maybe there is a way to get it to work soon. i hope so :)

if i can provide any information, i would be glad to help. so tell me, what i can do.

cheers

daniel
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 16 Apr 2007
Posts: 68

PostPosted: Wed Sep 10, 2008 1:24 am    Post subject: Reply with quote

Well i edited /usr/src/linux/drivers/misc/sony-laptop.c actually....
You will find somewhere over there
Code:
/* SNC-only model map */
static struct dmi_system_id sony_nc_ids[] = {
        {
            .ident = "Sony Vaio FE Series",
            .callback = sony_nc_C_enable,
            .driver_data = sony_C_events,
            .matches = {
                DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
                DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FE"),
            },
        },


So then you can add your model.So this should be something like that. This is what i did at least. Just paste that below the previous model
Code:
 {
            .ident = "Sony Vaio AR Series",
            .callback = sony_nc_C_enable,
            .driver_data = sony_C_events,
            .matches = {
                DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
                DMI_MATCH(DMI_PRODUCT_NAME, "VGN-AR"),
            },
        },



Remember to make modules and make modules_install after the changes.

About the brightness... Thing is that brightness is a total different thing with the backlight. So changing the brightness does not get the same result as with the backlight dimming. So you need to get backlight dimming working hehe.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum