View previous topic :: View next topic |
Author |
Message |
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Thu Jul 21, 2005 10:44 am Post subject: Sony Vaio S4 Series |
|
|
This HOWTO is out to date.
For the actual maintained one please move to the wiki and feel free to contribute
We'll keep this thread for discussion and support
So let's write (in what I hope will be some kind of English, forgive me ) something about this laptop. I have a S4M/S but it is called S460 S480 etc in USA and probabily they use the same configuration. Let me know if this works with your laptop!
NOTE: many of the urls that I've linked works only if you cut the url and paste them in you address bar.
0. Before we start
I think you want to remove the "Designed for Ms Windows XP" sticker, I did. It's one of the most difficult part of the installation, but just take your time and use your nails. Ok, seriously:
1. Basic System
Select "MPENTIUMM" in kernel config. I have this in my make.conf Code: | CFLAGS="[...] -march=i686 [...]"
USE="[...] sse sse2 mmx [...]" |
2. Disk
Disk is a S-ATA disk, so you need SATA support built-in in the kernel.
N.B. hdparm has no support for sata disks at the moment.
There is a big (10GB) recover partition at the beginnig of the disk. Make recover DVDs from Vaio Recover Utility in Win and wipe it, if you want. I did. Just remeber the bootable DVD is actually the *second* you burn.
3. Frame buffer
At the moment I'm using gentoo-sources-2.6.12-r9 and splashutils-1.1.9.9. I could manage to get the 1280x800 framebuffer, so I stay with 1024x768 (vga=791). vesafb-tng is doing strange things with my display, so I stayed with vesafb.
4. X
Nvidia 6200 Turbocache and a 13.3'' TFT widescreen. You need ~x86 nvidia-gfx and nvidia-kernel or it won't work. So unmask them (/etc/portage/package.unmask), add them to /etc/portage/package.keywords and finally emerge them. Echo "nvidia" >> /etc/modules.autolad/kernel-2.6 to have it load at boot.
In Xorg.conf we need something like Code: | Section "Device"
Identifier "Card0"
VendorName "nVidia Corporation"
BoardName "GeForce Go 6200"
BusID "PCI:1:0:0"
Driver "nvidia"
Option "RenderAccel" "true"
#Option "NoLogo" "true"
Option "NvAGP" "1"
EndSection | and disable the kernel dri
Code: | Section "Module"
...
# Load "dri"
|
We also need to set the display properly, and something like this will do it
Code: | Section "Monitor"
Identifier "Monitor0"
VendorName "Sony"
ModelName "X-Black"
Option "dpms"
HorizSync 29-60
VertRefresh 0-60
DisplaySize 285 179 #important to set dpi properly
Modeline "1280x800" 68.56 1280 1336 1472 1664 800 801 804 824 -HSync +Vsync
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800"
EndSubSection
EndSection
|
Touchpad Code: | emerge x11-misc/synaptics |
Code: | Section "InputDevice"
Identifier "Touchpad"
Driver "synaptics"
Option "Protocol" "event"
Option "Device" "/dev/input/event2"
Option "ZAxisMapping" "Y"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "100"
# Next line required only if you want to disable the mousepad while typing:
Option "SHMConfig" "on"
# Tweak this option as you like, it works anyway, have a look in
# /usr/share/doc/synaptics*/README.gz for more options
Option "LeftEdge" "60"
Option "RightEdge" "830"
Option "TopEdge" "70"
Option "BottomEdge" "650"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "50"
Option "EmulateMidButtonTime" "75"
Option "VertScrollDelta" "50"
Option "HorizScrollDelta" "50"
Option "MinSpeed" "0.50"
Option "MaxSpeed" "0.9"
Option "AccelFactor" "0.02"
Option "EdgeMotionSpeed" "40"
Option "UpDownScrolling" "1"
Option "TouchpadOff" "0"
EndSection
|
5. Network
The network adapter is Code: | 0000:06:08.0 Ethernet controller: Intel Corporation 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile (rev 03) | so you need CONFIG_E100 enabled in you kernel. If you put is as module remember to echo "e100 >> /etc/modules.autoload/kernel-2.6"
Code: | 0000:06:0b.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05) | So we need piw2200 drivers Code: | emerge net-wireless/ipw2200 | N.B. I have not yet tested it, but it should work.
6. Sound
Yes, the sound is really poor. But anyway we want it working. So enable
Code: | Symbol: SND_HDA_INTEL [=m]
Prompt: Intel HD Audio
Defined at sound/pci/Kconfig:517
Depends on: !M68K && SOUND!=n && PCI && SND
Location:
-> Device Drivers
-> Sound
-> Advanced Linux Sound Architecture
-> Advanced Linux Sound Architecture (SND [=m])
-> PCI devices
Selects: SND_PCM |
and edit /etc/modules.d/alsa with something like
Code: | alias snd-card-0 snd-hda-intel | and Code: | rc-update add alsasound default | If you prefer using alsa-driver then put Code: | ALSA_CARDS="hda-intel" | in /etc/make.conf.
It seems that adding Code: | options snd-hda-intel position_fix=1 | in /etc/modules.d/alsa (remeber to run modules-update after any changes) you get better results. Try also with position_fix=2. But to do this you need ~x86 alsa-drivers, since hda-intel is quite new and still under developement. I didn't try yet.
(Thanks to pijalu for this tweak)
7. ACPI
ACPI at least works. You get the power button event and the lid open/close. You also get ATF0 themperature. You can switch on/off the dvdrw device with sony_acpi.
Frequencies: I don't have yet understood if we have 4 or 8 clock steps. But just follow the Power Management Guide. I use cpufreqd and it works quite well.
8. LCD Brightness
The brightness isn't acpi governed, but it uses something in nvidia interface. There is a workaround (thanks Erik Waling!) for this, just use smartdimmer for linux . This is the very first release, so expect enchanchements, it will probabily be integrated in nvclock. I wrote a quick and dirty ebuild for it, just download it (copy&paste the url) and set put it in your $PORTDIR_OVERLAY/media-video/smartdimmer. Then remeber to (See the docs for more[ info) Code: | ebuild $PORTDIR_OVERLAY/media-video/smartdimmer/smartdimmer-0.1.ebuild digest
emerge -av smartdimmer
| See what you can do with
9. Fn key
Now they work, really thanks again to Erik Waling for this. To make them work you need to:
patch your kernel (HOWTO) with this patch. Hopefully this will be integrated in the next relase of sonypi, but for the moment (01/08/2005) this step is needed.
then configure sonypi, read the doc (/usr/src/linux/Documentation/sonypi.txt), but mainly you need to do something like Code: | echo -e "alias char-major-10-250 sonpi \noptions sonypi minor=250" > /etc/modules.d/sonypi
mknod /dev/sonypi c 10 250
modules-update |
Then set SONYPI (-> Device Drivers -> Character devices) as module and Code: | make modules modules_install |
Then you need some kind of daemon to grab the keys and do something. I've "upgraded" for our Vaio a quite old project, sonykeyd, you can get the ebuild here (copy&paste). Put it in $PORTDIR_OVERLAY/app-laptop/sonkeyd, remeber to regenerate the digest, and emerge it. Code: | rc-update add sonypi default
/etc/init.d/sonypi | will run it and add it to the default runlevel.
The script run when an event occurs is /usr/local/sbin/sonykey.sh, in this version it enables audio (with alsa) and brightness control (you need smartdimmer, read section 8. This is far from perfect, and will be probabily updated with your help.
Oh. If you want to use the events that occurs by pressing the fn key (i.e. fn+F1) in X you need to translate the event to the X event interface. That can be done in several ways, one of them is using evrouter. (see [1]) But I fond easier to edit sonykeyd (you find the ebuild in this 3d) and add an XTestFakeKeyEvent routine. I'll post the patch as I find the time to check it, just mail me if you're interested meanwhile
If you want some kind of on-screen-display you can (use the ~x86 version, the stable one is too old) and edit your sonykey.sh. I use this commands (put them in the relevant secion of sonykey.sh) Code: | CATCOM="osd_cat -f -*-aquafont-*-*-*-*-17-*-*-*-*-*-*-uni -c red -s 1 -d 1 -o 30 -i 150 -p bottom"
${CATCOM} -b percentage -P $(amixer sset 'Front' 5- | awk '{if(match($5,/[0-9]+%/)){ print substr($5,RSTART,RLENGTH-1)}}') -T Volume #volume +5
${CATCOM} -b percentage -P $(amixer sset 'Front' 5+ | awk '{if(match($5,/[0-9]+%/)){ print substr($5,RSTART,RLENGTH-1)}}') -T Volume #volume -5
${CATCOM} -b slider -P $(smartdimmer -g | awk '{print $3*100/21}') -T Brightness #brightness status
echo mute | ${CATCOM} # displays what you "echo" |
Ok, that's all for now, I'll add as I we find something more!
Hints are always welcome
EDIT1: you can see some other interesting notes [1] here
EDIT2: added sect. 0
EDIT3: ACPI news...
EDIT7: Brightness control now works!
EDIT11: Added smartdimmer ebuild
EDIT13: Now FN key works, added ebuild.
EDIT15: Some more news on FN keys.
EDIT18: xosd part
(the other edits are just typos or minor things!)
Last edited by knefas on Fri Aug 26, 2005 7:25 am; edited 21 times in total |
|
Back to top |
|
|
LoDown Apprentice
Joined: 26 Oct 2004 Posts: 189 Location: Louisville, Ky
|
Posted: Thu Jul 21, 2005 1:20 pm Post subject: Thanks |
|
|
Very nice...is extremely helpful... |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Sat Jul 23, 2005 9:52 pm Post subject: |
|
|
I don't understand why, if this works on the new FS laptops, with the same videocard, Why would they go out of there way to reimplement it differently, I'm sure whatever controls the acpi probably is not a size or heat concern.
It doesn't make sense, especially since the keys have the same setup, two S keys, and the same FN setup. it just boogles my mind.
Silly Sony, it would be nice if you could keep this tread posted with any info you find. |
|
Back to top |
|
|
pijalu Guru
Joined: 04 Oct 2004 Posts: 365
|
Posted: Sun Jul 24, 2005 2:03 am Post subject: |
|
|
For the poor sound, found a way on my FS series to get better results:
Add to /etc/modules.d/alsa
Code: |
options snd-hda-intel position_fix=1
|
This fixed all my troubles...
(i am using latest ~x86 alsa-driver, not the one from kernel) |
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Sun Jul 24, 2005 1:41 pm Post subject: |
|
|
Thanks for the hint for sound, pijalu, I'll try ASAP.
blinksilver: the patch for sony_acpi will not work on our S, since it uses a GHKE method that is not supported on S.
I have a modified (cut&past the url)sony_acpi.c (thanks to J. Jordens) that implements all the method supported by the S4. But it is useful only for cdpower, since the brightness is not working and the other methods (avaible if you modprobe sony_acpi debug=1) are unknow.
I've seen that the two S buttons are catched by sonypi (but as "unknown") and by the kernel event interface, but I don't have any idea of how to use this...but it makes me hoping. |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Sun Jul 24, 2005 10:58 pm Post subject: |
|
|
okay knefas, I am just really not happy about the whole thing, in anycase, if you need any help I will try my best.
Good luck and keep this posted with any info that comes up. |
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Mon Jul 25, 2005 8:25 am Post subject: |
|
|
NOW IT WORKS.
Thanks again to J.Jordens, he found this tool http://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2. That's amazing, just try it, we now have 21 levels of brightness. Thanks.
I've also seen that S1 and S2 keys are catched by the kernel event interface and by sonypid, so there's probabily a way to use them.
|
|
Back to top |
|
|
pijalu Guru
Joined: 04 Oct 2004 Posts: 365
|
Posted: Mon Jul 25, 2005 11:46 am Post subject: |
|
|
just for curiosity, can you send me your DSDT ?
Code: |
gzip -c /proc/acpi/dsdt > /tmp/dsdt.gz
|
|
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Mon Jul 25, 2005 12:10 pm Post subject: |
|
|
I have put my dsdt here (cut&paste the url if it doesn't work), so everyone can see it. It is slightly modified, because otherwise it wouldn't compile. If you're interested I can find the original version, but I've done really little modify
(I'm goin on holyday, so see you in a couple of weeks. I hope to come back and discover someone has made fn keys working!) |
|
Back to top |
|
|
mserms Apprentice
Joined: 13 Jan 2005 Posts: 162 Location: Edinburgh
|
Posted: Tue Jul 26, 2005 2:53 pm Post subject: |
|
|
I have just tried using smartdimmer with my S3XP (also a 6200 turbocache card), but am getting errors. Does anyone have any ideas about this? |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Wed Jul 27, 2005 1:20 am Post subject: |
|
|
oh mother of god you are my hero, I am dancing a little dance just for you right now. Okay that was just weird and I was just joking, I am going to grab the nearest linux distro to me and give it a shot. |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Wed Jul 27, 2005 2:47 am Post subject: |
|
|
oh and i was wondering can I get a list of what your kernel setting are?? |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Wed Jul 27, 2005 8:25 pm Post subject: |
|
|
its works fine, as long as i run it as root.
[soganess@localhost ~]$ smartdimmer -i
init_nvclock() failed!
what happens when I try to run it as a regular user |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Fri Jul 29, 2005 7:50 am Post subject: |
|
|
one more thing (sorry i ask alot of question ), any luck with S3 suspend ? I have tried everything i know, but the screen never comes back, |
|
Back to top |
|
|
erikw n00b
Joined: 30 Jul 2005 Posts: 1
|
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Mon Aug 01, 2005 1:01 pm Post subject: |
|
|
erikw: thanks a lot, it works perfectly!
I've written an ebuild to make all easier to install, if someone who understands c better than me wants to have a look at sonykeyd...that would be great.
I've seen that there are still problems with the two S buttons, and with fn+ Code: | u i o p j m 3 4 5 7 8 9 0 | while Code: | 1 2 e s d f b f1-f12 | do work.
I'm thinking about putting all this on the wiki, but I'll wait for some more feedback
Pietro |
|
Back to top |
|
|
notgmx n00b
Joined: 22 Aug 2005 Posts: 1
|
Posted: Mon Aug 22, 2005 12:56 pm Post subject: |
|
|
Well, figured I might as well get a a GentooForums account even though I don't use it. I write the notes-s4hp.txt by the way (see above for link).
As this forum seems to be the largest gathering of linux + sony s4 series people I was wondering whether anyone has made more progress than I've made with powermanagement on these laptops: In short, swsusp works well when on AC but fails when on Battery. swsusp2 works on Battery, too, but does not play together nicely with the nvidia modules. S3 sleep/resume only worked with the latest ACPI patch and kernel, and even that only to some degree: The screen didn't come back on.
Initially, I suspected that the BIOS changes the disk's powermanagement flags when on battery which in turn messes up the kernel on resume but as swsusp2 worked this seems less likely now. On that note, there is a BIOS update available (PHBSYS-00877815-UN.exe): Has anyone managed to flash this on without Windows? I couldn't extract the image with phnxdeco and do not have Windows installed. If you are using this update, has anything changed for the better/worse?
Also, emperorlinux claims they got hibernate working on it. I used their kernel, patches and .config but ran into the ususal problems described above.
Thanks for any input.
BTW knefas: Your problem with the u i o p j keys etc can be fixed with evrouter and/or xmodmap remappings, but suit yourself The only issue I still have with the keys related to the S1 and S2 keys. When pressed, two identical key events are generated instead of one unique, no big deal.
[edit]Oh, and I suppose no one has found patched firmware for the UJ-832D to make it rpc-1/regionfree? www.rpc1.org doesn't have it yet[/edit]
cheers
jj
Last edited by notgmx on Mon Aug 22, 2005 1:20 pm; edited 1 time in total |
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Mon Aug 22, 2005 1:16 pm Post subject: |
|
|
I have updated the BIOS (via Windows). The changelog says
Code: | This BIOS Update fixes following issue :
- Update of the Graphical Card Intel to Fix the No image on LCD even if Backlight is ON
- System sometime hangs up after system booting or running 3D application | but I've not seen any better for sleep. I'll continue to test... |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Wed Aug 24, 2005 4:10 pm Post subject: |
|
|
I don'r know if this will help at all but
Suspend to RAM does not work. I think I've tried all the possible ACPI, framebuffer, and console/X combinations. All of the ACPI kernel command line options seem to fail on wakeup: acpi_sleep=s3_mode, acpi_sleep=s3_bios, acpi_sleep=s3_mode,s3_bios. However, acpi_sleep=s3_mode suceeded in waking up properly except for the video. The screen remained dark but all other system functionality was present (tested via ssh). All the other combinations failed completely.
http://www.beyondabstraction.net/sonyfs660/
from this guys FS660, I can't SSH into my(currently not near another machine) S so I cant try it, it may work. Also, I don't know much about this stuff, but couldn't we use a script, (assuming the above works) that would call the command used to turn the screen off when inactive, and call the command that turns it back on when active, to see if it reinitializes the screen.
Oh and if anyone is interesting I have adapted a patch I fouund, it now allows you to undervolt your PM (sanoma) CPU, its currently only setup for my 1.73GHz PM, but adding support for other sanoma(Dothan C0) CPUs is trival. Older Dothan B0 are supported as well, the only catch is that you need to recompile your kernel for every change you make to your voltage table. |
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Wed Aug 24, 2005 7:09 pm Post subject: |
|
|
Thanks blinksilver, I've tried with acpi_sleep=s3_mode and 2.6.12-gentoo-r9, but it doesn't work. I'll try with other kernels later...
Would you mind to mail me the cpu patch? I'll test it and put online for everyone.
BTW, how you get your current voltages? I didn't succed to make lm_sensors working... |
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Wed Aug 24, 2005 7:27 pm Post subject: |
|
|
knefas wrote: | Thanks blinksilver, I've tried with acpi_sleep=s3_mode and 2.6.12-gentoo-r9, but it doesn't work. I'll try with other kernels later...
Would you mind to mail me the cpu patch? I'll test it and put online for everyone.
BTW, how you get your current voltages? I didn't succed to make lm_sensors working... |
Um sure, I am kinda busy now, just give me a day or two, to get it setup for all the CPUs. Yeah, the way I know my voltage is kinda simple, when i run cpuspeed and my computer stops responding, i know the voltage is too low. ;D The lm sensor app have not been implemented for whats inside the Sony S.
When posting it t make sure the proper credits go(i don't want credit for stuff i did not do), it was orignally developed my some debian devel and just I modified it abit to modernize so it works with the sanoma cpu. he gets most the credit, it patches speedstep-centrino which currently only works for banias(that does mean that if you have a banias you can edit the tables and undervolt), it was submited upstream but never made it into the kernel, but hey as long as it gets out there. |
|
Back to top |
|
|
knefas l33t
Joined: 21 Dec 2003 Posts: 828
|
Posted: Wed Aug 24, 2005 8:04 pm Post subject: |
|
|
- I'm looking forward to it BTW, on Win I can run 1600 with 12x1.000 volt. But I've not sperimented a lot, so I'll be glad to gather your experiecies. Here's the gentoo 3d about undervolting
- I've added to the Howto some lines about using xosd to display on the screen things like volume and brightness changes.
|
|
Back to top |
|
|
blinksilver n00b
Joined: 23 Jul 2005 Posts: 13
|
Posted: Thu Aug 25, 2005 12:19 am Post subject: |
|
|
That Patch that you linked above is almost exaclty what I did, haha, it just prove that there are only a few ways to skin a cat. You will notice that in linux you don't get the same undervolt you do it windows, (probably means that my windows undervolt is unstable). for reference,
in windows .716-1.068
in linux .796-1.084 |
|
Back to top |
|
|
|
|
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
|
|