Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Sony Vaio FS series FN keys
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
B2382F29
n00b
n00b


Joined: 08 Sep 2004
Posts: 12

PostPosted: Wed May 10, 2006 2:17 pm    Post subject: Reply with quote

Here's the output:

Quote:
May 10 16:00:24 vaio fsfn[11321]: Setting default configuration
May 10 16:00:24 vaio fsfn[11321]: Configuration: DEVICE=AUTO
May 10 16:00:24 vaio fsfn[11321]: Configuration: ALSA_NAME=Front
May 10 16:00:24 vaio fsfn[11321]: Configuration: SOUND_STEP=10
May 10 16:00:24 vaio fsfn[11321]: Configuration: F12_CMD=/bin/hibernate
May 10 16:00:24 vaio fsfn[11321]: Configuration: OSD_VCOLOR=red
May 10 16:00:24 vaio fsfn[11321]: Configuration: OSD_VCOLORZ=red
May 10 16:00:24 vaio fsfn[11321]: Configuration: OSD_BCOLOR=blue
May 10 16:00:24 vaio fsfn[11321]: Configuration: OSD_FONT=-*-*-*-*-*-*-20-*-*-*-*-*-*-*
May 10 16:00:24 vaio fsfn[11321]: Configuration: OSD_TIMEOUT=3
May 10 16:00:24 vaio fsfn[11321]: Configuration: BRT_SETDEFAULT=0
May 10 16:00:24 vaio fsfn[11321]: Configuration: BRT_HACK_FJS=0
May 10 16:00:24 vaio fsfn[11321]: default configuration done
May 10 16:00:24 vaio fsfn[11321]: Loading config file /etc/fsfn.conf
May 10 16:00:24 vaio fsfn[11321]: error opening config file: No such file or directory
May 10 16:00:24 vaio fsfn[11322]: autodevice determines /dev/input/event2 as keyboard event
May 10 16:00:24 vaio fsfn[11322]: fsfn loaded
May 10 16:00:41 vaio atkbd.c: Unknown key pressed (translated set 2, code 0xf6 on isa0060/serio0).
May 10 16:00:41 vaio atkbd.c: Use 'setkeycodes e076 <keycode>' to make it known.May 10 16:00:42 vaio atkbd.c: Unknown key released (translated set 2, code 0xf6 on isa0060/serio0).
May 10 16:00:42 vaio atkbd.c: Use 'setkeycodes e076 <keycode>' to make it known.May 10 16:00:45 vaio atkbd.c: Unknown key pressed (translated set 2, code 0xf6 on isa0060/serio0).
May 10 16:00:45 vaio atkbd.c: Use 'setkeycodes e076 <keycode>' to make it known.May 10 16:00:45 vaio atkbd.c: Unknown key released (translated set 2, code 0xf6 on isa0060/serio0).
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Wed May 10, 2006 2:33 pm    Post subject: Reply with quote

B2382F29 wrote:
Here's the output:
[snip]


Hmm... I don't see any loading problems and the logs seems fine (fsfn determined right event) - I will need to send you some test file to launch in order to see why the hell fsfn don't react to keypress... But for this I still need to get back home (and I am now on travel). I hope to be able to look at this friday evening...
(btw, fsfn should work with your laptop since.... it's quite the same model as mine :-) )
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Sat May 13, 2006 11:04 am    Post subject: Reply with quote

Ok
First, reboot, go into the bios and check that your hotkey is "Type 1" (if not, check if fsfn is not working, if not continue)

Please download this file: http://users.skynet.be/muaddib/fsfn/evtest.c

Then, compile it using
Code:

gcc -o evtest evtest.c


Then, as root, launch it with the correct keyboard event... eg, my keyboard is mapped on /dev/input/event0
Code:

# evtest /dev/input/event0


It will start to give lots of information on the device... then press Fn+F3,Fn+F4 (press couple of Fn function) and check you actually see output...
eg:
Code:

# ./evtest /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x1 product 0x1 version 0xab41
Input device name: "AT Translated Set 2 keyboard"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 0 (Reserved)
[snip]
Event: time 1147517489.844776, -------------- Report Sync ------------
Event: time 1147517489.939011, type 4 (Misc), code 4 (ScanCode), value f5
Event: time 1147517489.939034, type 1 (Key), code 245 (?), value 0
[snip]

(to exit -> Ctrl+c)

All the different keys should return same info lines.... (if not, then it's interesting :-) )

Now, still as root, do:
Code:

# killall fsfn
# fsfn -n

(try to put brightness to max then to min... ==> couple of Fn-F6 / Fn-F5 - fsfn SHOULD not return to prompt and btw, you should see any REAL change on your brigthness, if you see brightness change, then fsfn is working)
Back to top
View user's profile Send private message
B2382F29
n00b
n00b


Joined: 08 Sep 2004
Posts: 12

PostPosted: Mon May 15, 2006 3:13 pm    Post subject: Reply with quote

Working now, the Event Type in BIOS was on Type 2
(that was set when i bought the laptop, is that the default?. If Type 2 is the default setting then maybe you could put a warning in syslog or manpage or something...)

Setting it on Type 1 made it work.

Thanks!!
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Mon May 15, 2006 6:49 pm    Post subject: Reply with quote

B2382F29 wrote:
Working now, the Event Type in BIOS was on Type 2
(that was set when i bought the laptop, is that the default?. If Type 2 is the default setting then maybe you could put a warning in syslog or manpage or something...)

Setting it on Type 1 made it work.

Thanks!!

The main problem is to find a sure way to know what is the current type....
All I know is what I learned from my machine... where type was factory set on 1 :-)
(if you got your entry at Sony then feel free to ask them info ;-) )

Currently, fsfn is defaulted to type 1 and don't know what the bios settings... emerging it with moreconf use flag allows a redefinition of these mapping in /etc/fsfn.conf ... (it's documented in man 5 fsfn - intended for supporting "strange laptops" - this can still be used for different types)...

If you still dual-boot to windows, please check your keys are still working... if not, tell me (==> then I will change fsfn codes to supports the 3 types)
Back to top
View user's profile Send private message
B2382F29
n00b
n00b


Joined: 08 Sep 2004
Posts: 12

PostPosted: Sun May 21, 2006 11:38 am    Post subject: Reply with quote

keys are still working in windows ...
thanks again.
Back to top
View user's profile Send private message
B2382F29
n00b
n00b


Joined: 08 Sep 2004
Posts: 12

PostPosted: Wed May 24, 2006 6:54 pm    Post subject: Reply with quote

Is there a possibility to use Gnome OSD instead of XOSD for fsfn?
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Wed May 24, 2006 7:03 pm    Post subject: Reply with quote

B2382F29 wrote:
Is there a possibility to use Gnome OSD instead of XOSD for fsfn?


Sure, but it will needs you to code a little bit ;-)

osd stuff is stored in osd.h and osd.c...
fsfn first call osd_load to create/init OSD
then it call osd_brightness / osd_volume with new levels when needed
Finally, when fsfn finish, it calls osd_unload...

Check osd.c to see implementation with XOSD (there you can see how to get config values as well)

Have phun and if working well, send me the patch ;-)
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Sun May 28, 2006 3:06 pm    Post subject: Reply with quote

recently xosd is not working anymore on my machine, while fsfn still works.

Code:
* x11-libs/xosd
     Available versions:  2.2.8-r1 ~2.2.10 ~2.2.14
     Installed:           2.2.8-r1


even trying with osd_cat does anything. :(
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Sun May 28, 2006 4:50 pm    Post subject: Reply with quote

Hum....
by fsfn still working, do you say the osd part of fsfn ?

osd_cat, do you get errors ?
if nope, try something like
Code:

echo Hello World | osd_cat -f "-*-lucida-*-*-*-*-24-*-*-*-*-*-iso8859-1" -p middle -A center


If not working, try latest testing one, i don't have any troubles with it, even if i am running Xgl ;-)
Code:

* x11-libs/xosd
     Available versions:  2.2.8-r1 2.2.10 2.2.14
     Installed:           2.2.14
     Homepage:            http://www.ignavus.net/
     Description:         Library for overlaying text/glyphs in X-Windows X-On-Screen-Display plus binary for sending text from command line


Good luck :)
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Sun May 28, 2006 9:34 pm    Post subject: Reply with quote

pijalu wrote:
Hum....
by fsfn still working, do you say the osd part of fsfn ?

osd_cat, do you get errors ?
if nope, try something like
Code:

echo Hello World | osd_cat -f "-*-lucida-*-*-*-*-24-*-*-*-*-*-iso8859-1" -p middle -A center


this example works!
(my tryouts didn't work 'cause I didn't read the man :P )
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Sun May 28, 2006 10:05 pm    Post subject: Reply with quote

So I think the problem lies in your fonts....
If fsfn osd got problems, the solution can be to add(or create if needed) in /etc/fsfn.conf
Code:

OSD_FONT=-*-lucida-*-*-*-*-24-*-*-*-*-*-iso8859-1
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Sun May 28, 2006 10:58 pm    Post subject: Reply with quote

pijalu wrote:
So I think the problem lies in your fonts....
If fsfn osd got problems, the solution can be to add(or create if needed) in /etc/fsfn.conf
Code:

OSD_FONT=-*-lucida-*-*-*-*-24-*-*-*-*-*-iso8859-1


ok, created the file, restarted /etc/init.d/fsfn, and still no display :-?
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Mon May 29, 2006 5:57 pm    Post subject: Reply with quote

ok, first thing to try is to rebuild xosd then fsfn to be sure you don't have some build problems,
next step will be to do a "killall fsfn" (as user - only to kill the osd client) - then do a
Code:

tail -f /var/log/messages | grep fsfn

(check fsfn syslog messages)

and launch fsfn "osd" as user:
Code:

fsfn -o


Then play a little bit with fn keys and check for "some errors" on syslog
(if the brightness/volume don't work, then you did a killall as root... restart fsfn service and start fsfn "osd")
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Tue May 30, 2006 10:08 am    Post subject: Reply with quote

hi, I've done all you've suggested and it seems like the init script isn't working well, infact:
Code:
$ killall fsfn
fsfn(31914): Operation not permitted
fsfn: no process terminated

and then did
Code:
$ fsfn -o



while with root:
Code:
# tail -f /var/log/messages | grep fsfn
May 30 12:01:19 lemontree fsfn[2209]: Loading config file /etc/fsfn.conf
May 30 12:01:19 lemontree fsfn[2209]: Setting default configuration
May 30 12:01:19 lemontree fsfn[2209]: Configuration: DEVICE=AUTO
May 30 12:01:19 lemontree fsfn[2209]: Configuration: ALSA_NAME=Front
May 30 12:01:19 lemontree fsfn[2209]: Configuration: F12_CMD=/bin/hibernate
May 30 12:01:19 lemontree fsfn[2209]: Configuration: OSD_VCOLOR=red
May 30 12:01:19 lemontree fsfn[2209]: Configuration: OSD_BCOLOR=blue
May 30 12:01:19 lemontree fsfn[2209]: Configuration: OSD_FONT=-*-*-*-*-*-*-20-*-*-*-*-*-*-*
May 30 12:01:19 lemontree fsfn[2209]: default configuration done
May 30 12:01:19 lemontree fsfn[2209]: Configuration: OSD_FONT=-*-lucida-*-*-*-*-24-*-*-*-*-*-iso8859-1


Am I missing some step? should I have to launch the fsfn osd "by hand"? isn't this launched automatically with the init scipt?

(thanks for your great support)
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Tue May 30, 2006 7:06 pm    Post subject: Reply with quote

Peach wrote:
hi, I've done all you've suggested and it seems like the init script isn't working well, infact:
Code:
$ killall fsfn
fsfn(31914): Operation not permitted
fsfn: no process terminated


The operation not permitted is normal since killall was run as normal user ==> you cannot kill the daemon but only the client

Peach wrote:

[snip]
Am I missing some step? should I have to launch the fsfn osd "by hand"? isn't this launched automatically with the init scipt?

(thanks for your great support)


The init script only launch the daemon part (the one in charge of changing volume/brightness) - the osd part rely on the deamon to do everything except "showing a graphical output".

Since the output is X centric (and for some security reason), the client must run with same priviledge as the X user (aka: you user).

So the "fsfn -o" must be added in your GUI (kde,gnome) session - this will allows OSD to work (otherwise, fn key will still work but without output)

Just to be sure, when you start "fsfn -o" and play with fn-key, do you have some OSD output and is the fn key or nothing ?
If not, do you see any "error" output in syslog (fsfn and "osd" should output errors on syslog - The previously posted output are "normal") and last but not least, fsfn -o must not go back to command line (it does not daemonize... if you come back to command line ==> it dies)

Btw, for the support, lets wait you got it working ;)
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Tue May 30, 2006 9:14 pm    Post subject: Reply with quote

ok
launching fsfn -o in the terminal works well, without problems.

I've checked everything and found where my problem relies. I just realized and feeled dumb.
I'm using xfce4 and entrance as login manager. as you may know creating ~/.xsession does not work if you forget, or don't want to use the specific /etc/X11/Session/Xsession , instead you have to modify the current startup session and add what you need.

And now it comes the problem (me).
I did update the correct Xfce session starter, duplicating it.
Now, once updated entrance, I forget to use the correct one.

I do feel idiot.

I must congrat for your great support.

Thanks again.
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Wed May 31, 2006 8:35 am    Post subject: Reply with quote

I won't be the one who will blame you for a misconfiguration...
Good to hear your problem is fixed :-)
Back to top
View user's profile Send private message
QuimaxW
n00b
n00b


Joined: 08 Jun 2006
Posts: 4
Location: Waukesha, WI

PostPosted: Thu Jun 08, 2006 3:33 am    Post subject: FSFN with Suse 10.1 Reply with quote

I've decided to quit being an information leech, and start contributing back to the community! :) I've been using SuSE since 8.2...

Getting FSFN to work with SuSE 10.1 on my Sony FS742/W

Extra Packages to install via yast

Xosd
alsa-devel
gtk2-devel
kernel source

Download, and install manually xosd from http://www.ignavus.net/software.html For some reason, with the xosd rpm, the development headers aren't installed, and for me, fsfn wouldn't compile without this step.

install fsfn per the instructions, it should work as advertised

(I rebooted, don't know if it's necessary...)

AS ROOT run fsfn there is no output, no nothing that tells you it's working.
then run fsfn --osd & (& tells bash to run in background as a daemon), and you'll get the on screen pretty when you push a function button. :)

After this, I havn't gotten anywhere...my to do list includes:
FN_12 to hibernate...command is powersave --suspend-to-disk -U but my fsfn seems to be ignoring my /etc/fsfn.conf file.
S1 & S2, I don't know what to do with those quite yet...

Have the programs start at boot, I havn't figured out where to put the commands to have this happen yet.
_________________
Jesus said to him, "I am the way, the truth, and the life. No one comes to the Father except through Me."
Back to top
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Thu Jun 08, 2006 6:15 pm    Post subject: Re: FSFN with Suse 10.1 Reply with quote

QuimaxW wrote:
I've decided to quit being an information leech, and start contributing back to the community! :)

Nice.. Welcome aboard and thanks ;)
QuimaxW wrote:

[snip]
(I rebooted, don't know if it's necessary...)
[/snip]

No but not really bad
Code:

# modprobe sony_acpi
# rmmod sony_acpi
# modprobe sony_acpi

Should do the trick in most of the case (for some reason, the first time sony acpi loads the /proc/acpi/sony is not complete...)
QuimaxW wrote:

AS ROOT run fsfn there is no output, no nothing that tells you it's working.

Actually there is, in the syslog (/var/log/messages) - who say syslog is not user friendly ? ;-)

QuimaxW wrote:

After this, I havn't gotten anywhere...my to do list includes:
FN_12 to hibernate...command is powersave --suspend-to-disk -U but my fsfn seems to be ignoring my /etc/fsfn.conf file.
S1 & S2, I don't know what to do with those quite yet...

Have the programs start at boot, I havn't figured out where to put the commands to have this happen yet.


For programs you need to run as root: put them in /etc/fsfn.conf - there is one limitation: It can only launch program without parameters --> you need to create a script if the program you need to lauch has parameters... When loading the deamon, you should see what command fsfn will use
For "user space" program, $HOME/.fsfn.conf, this will be used only by OSD (output still in syslogs) (only latest version - the one posted in this forums)

If you want to debug, kill and restart the deamon in "interactive mode" ==>
Code:

# fsfn --nodeamon

The output of the execution should go to the console

For S1 I use the script given by one user (blank screen) in my $HOME/.fsfn.conf
Code:

#!/bin/bash
xset dpms force off


For S2 --> a gdm-stop command in /etc/fsfn.conf .... only for the moment when X die badly on me (Xgl powered ;) )

And once again, thanks for the how-to for SuSE :)
Back to top
View user's profile Send private message
QuimaxW
n00b
n00b


Joined: 08 Jun 2006
Posts: 4
Location: Waukesha, WI

PostPosted: Mon Jun 12, 2006 1:35 am    Post subject: SuSE Service Script Reply with quote

A Runlevel (system services) script can be found here: http://qplace.homelinux.net/fsfn Theoretically, one can place it in their /etc/init.d folder and the system will find it, it just needs to be enabled via YaST (in SuSE anyways). I'm hoping someone with more expertise then myself can look through it. I got it to work, without the on screen display eye candy which I still have to start manually. Perhaps I should just add fsfn --osd to a KDE login script. Course, I don't know where that is either, but one can find many things via google.
_________________
Jesus said to him, "I am the way, the truth, and the life. No one comes to the Father except through Me."
Back to top
View user's profile Send private message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Tue Jun 13, 2006 2:05 am    Post subject: Reply with quote

Hi!
i modified a patch (http://www.popies.net/sonypi/) in order to work with gentoo-sources 2.6.16-gentoo-r9 (should work with 2.6.16 rX) and in order to have /proc/acpi/sony/*.
So you don't have to re-emerge sonyacpi everytime you rebuild your kernel...

this is the first time, so please test it and report me if you got errors.

Code:

# cp sony_acpi-<version>.patch /usr/src/linux
# patch -p1 < sony_acpi-<version>.patch
(new item under ACPI (Advanced Configuration and Power Interface) Support)


for 2.6.16-r*
here: http://digilander.libero.it/gremo_registration/sony_acpi-2.6.16.patch
for new 2.6.17
here: http://digilander.libero.it/gremo_registration/sony_acpi-2.6.17.patch


Last edited by Gremo on Tue Jun 20, 2006 1:31 am; edited 1 time in total
Back to top
View user's profile Send private message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Tue Jun 13, 2006 2:55 pm    Post subject: Reply with quote

you can also delete the line "sonyacpi" under "DEPEND" in your fsfn-1.1.ebuild overlay and unmerge sonyacpi.
Back to top
View user's profile Send private message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Tue Jun 20, 2006 1:32 am    Post subject: Reply with quote

new 2.6.17 kernel gentoo-source, new patch here:
http://digilander.libero.it/gremo_registration/sony_acpi-2.6.17.patch
Back to top
View user's profile Send private message
brfsa
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2005
Posts: 121
Location: Brazil

PostPosted: Sun Jun 25, 2006 1:34 pm    Post subject: Reply with quote

I finished a new version of sonypid
A modified version of the original sonypid source code plus some code from the project in this thread.

The first version features:
* OSD screen bar
* Brightness control
* Volume control
* Mute control

Requirements:
* x11-libs/xosd
* kernel 2.6 with the default sony ACPI support compiled in. (Not the patched one)
* kernel headers

Get it here:
ftp://iele.au.edu/sonypid-ng/sonypid-ng-0.1.tar.bz2

ftp://iele.au.edu/sonypid-ng

hope it can be useful.
suggestions and changes are very welcome!
:p
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 6 of 9

 
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