******************************************************************************* ** Copyright (c) 2002 Scott Little ** ** File Name : my_sony.txt ** Author : Scott Little ** E-mail : little@eng.utah.edu ** Date Created : 03/23/2002 ** ** Description : My howto for getting the hardware on my laptop ** working under Linux. ** ** ToDo : ** ******************************************************************************* ** CVS HOOKS ** ** $Source: /home/little/srl_cvs/howtos/my_sony.txt,v $ ******************************************************************************* ** $Id: my_sony.txt,v 1.7 2002/05/05 23:53:38 little Exp $ ******************************************************************************* ** $Log: my_sony.txt,v $ ** Revision 1.7 2002/05/05 23:53:38 little ** Added X configuration. ** ** Revision 1.6 2002/04/01 02:36:49 little ** Added information about support for an additional USB mouse. ** ** Revision 1.5 2002/03/27 13:45:45 little ** Updated and readied it for publication on my web site. ** ** ** ******************************************************************************* Well, I purchased my Sony PCG-GR370 the middle of January 2002. The first night I loaded a standard laptop load of Red Hat 7.2 on the machine and things worked quite well. The X configuration acted like it wasn't going to work during the install, but it came up beautifully on the first boot. I guess a few people may have a question about disk partitioning or dual booting at this point. Sony laptops typically (always?) come with the hard drive partitioned into two parts. There was nothing on the second partition so I just used the RedHat Disk Druid to delete that partition and create the Linux partitions in my preferred configuration. Not too hard. I use Grub as my boot loader because it just seems a bit nicer to me. It works fine and I can dual boot without any problems. The laptop is a relatively new revision, so I didn't expect that everything would work immediately under Linux. Slowly I have been getting different components working. Hopefully everything will be functioning in the near future :) This document is my attempt to document how I managed to get things working properly. Linux-sony list home http://returntonature.com/mailman/listinfo/linux-sony A howto on the GR series that is based on a lot of information from this document can be found at: http://www.prongs.org/linux/sony/ *********************************************** **The sonypi kernel module & jogdial support ** *********************************************** This is a simple module that gives access to the Sony Progammable I/O Control device taht can be found in many (all?) Sony Vaio Laptops. Since kernel version 2.4.7, it has been a part of the official tree and can be found in the character devices section of the kernel configuration. A bit more information about the kernel driver can be found in Documentation/sonypi.txt in the kernel source. The utilities and daemons described below can be found on the web page at . To create the proper permissions add the following lines to /etc/security/console.perms. Under the #device classes section add: =/dev/sonypi Then under the permission definitions section add: 0600 0600 root Then execute the following command where 250 is where the location for the allocated minor device. If sonypi is built into the kernel then this can be found in /var/log/dmesg. If you are loading sonypi as a module then you can specify it as follows: alias char-major-10-250 sonypi options sonypi minor=250 fnkeyinit=1 Now we need to create the node in /dev for the device. Use the following command as explained above. mknod /dev/sonypi c 10 250 Now you can start the sonypid which is the sonypi daemon. On Red Hat I just added a line to execute sonypid & to my .Xclients file. On other distributions you might want to try adding that line to .xinitrc. The gr370 comes equipped with a back button. The ability to use the back button can be enabled by using the correct #define in the sonypid source code. Just scan the code for the #define (it shouldn't be hard to find). If you like the functionality of the jogdial utility under Windows then you can try the s-jog utility for Linux. It can be found at http://sjog.sourceforge.net/. I haven't tried this utility yet, but I am considering using it. *************************** *Adding a Second USB Mouse* *************************** Well, I finally decided that I wanted the ability to sometimes use an external USB mouse. I now have it working so that I can use either the touchpad or the USB mouse. It is great! If I feel like using a real mouse I now have the option! First, support needs to be compiled into the kernel. This is done by enabling mouse support in the input core section of the kernel config. Then I also enabled USB Human Interface Device Support (full HID) in the USB support section of the kernel config. I recompiled and attached the mouse which was promptly detected correctly. I just check /var/log/dmesg to see if things went well on boot. If that seems a bit daunting to you or you just want to make sure that things are working then you can cat /dev/input/mice and if you receive a bunch of funny characters when you move the mouse then things should be up and running. Now, I am running XFree 4.0 or > so I editted my /etc/X11/XF86Config-4 file by adding the following section: Section "InputDevice" Identifier "USB Mouse" Driver "mouse" Option "Device" "/dev/input/mice" Option "Protocol" "IMPS/2" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection This section has support for a 3 button mouse (if you don't happen to be using a 3 button mouse then you can remove the ZAxisMapping line and change the Emualte3Buttons value to yes if you want support for 3 buttons). I also added a line to the ServerLayout section. The line is: InputDevice "USB mouse" "SendCoreEvents" If you want to replace the touchpad with the USB mouse you can remove the CorePointer line. That should be it. A very nice little addition to your laptop! *********************** **Memory Stick Reader** *********************** Okay, I now have the memory stick slot working with the latest acpi patch(03082002 works, but it isn't working again under 03292002). There do seem to be some problems with PCMCIA still. These problems have been mentioned on the acpi list, but I haven't had time to play with the patches yet. After the slot was detected, it was addded to /etc/fstab and a /mnt/memstick directory was created. I like to have a lot of freedom in mounting my devices so I changed the mount options in /etc/fstab from owner to users so that anyone can mount or umount the device. Things appear to be working well. The following items are required for the memory stick to work. The following modules should be loaded or built into the kernel. uhci - uhci (Intel PIIX4, VIA, ...) (usb support menu) usb-storage - usb mass storage support (usb support menu) sd_mod - scsi disk support (scsi menu) vfat - vfat (windows-95) fs support (file systems menu) **************** **Network Card** **************** Well, the eepro100 driver in the kernel worked great on my DSL connection at home. I did have a terrible time with timeouts when I tried to connect on the 10M network at school. On the net I found out that the linux driver doesn't like the sleep mode being turned on (From the reading that I have done, this will most likely change with some future drivers (maybe it works with the current Intel drivers, but as of now they aren't in the official kernel source, so I haven't bothered to test them). I would check this before going ahead and disabling the sleep mode on the card.). I found a program called eepro100-diag and was able to turn off sleep mode. To do it though I had to boot up the machine w/out starting the network and then run the utility (using the -G0 -www flags). I am sure that single user mode would work as well. Link to eepro100-diag source code http://www.scyld.com/diag/index.html Intel driver source code http://downloadfinder.intel.com//scripts-df/Detail_Desc.asp?ProductID=60&DwnldID=2896 ***************************** **ACPI and Power Management** ***************************** The acpi stuff seems to be coming along well. It is making progress little by little. The current version doesn't quite work properly on my laptop, but it is getting closer. Currently the battery and most other components are properly detected. It appears that acpid development has fallen behind such that the acpid doesn't work as advertised. I did compile ospmd and play with that for a bit. It works okay, but functionality is quite limited. I have also tried some recent patches to make S3 and S4 suspend work on my laptop, but haven't had any success quite yet. Sourceforge page (latest patches) http://sourceforge.net/projects/acpi/ Main page for acpi-devel list http://lists.sourceforge.net/lists/listinfo/acpi-devel A nice searchable archive of acpi-devel http://marc.theaimsgroup.com/?l=acpi4linux& Intel's page http://developer.intel.com/technology/iapc/acpi/downloads.htm ********* **Sound** ********* Under the default RedHat 7.2 install my sound worked just fine. When I rebuilt my kernel for 2.4.17 I only had intermittent success. As of 2.4.18-pre8 sound is working fine under the standard Linux kernel drivers. It is an Intel 810 card. Just enable that in the kernel configuration and things should work. ********* **Modem** ********* I rarely use the modem, so this may not be perfect. MBSI was mandated by Conexant Systems Inc. to provide assistance in developing and distributing the drivers for the Conexant HSF (softmodem) family. The drivers can be found at: http://www.mbsi.ca/hsflinux/ I have installed the latest driver and things appear to be working great now. I used rp3-config under RH 7.2 to configure the modem. ******************* **X Configuration** ******************* My X configuration (/etc/X11/XF86Config-4) is shown below in its full glory. It would probably make sense to edit out the comments and garbage, but maybe they will be instructive. # File generated by anaconda. Section "ServerLayout" Identifier "Anaconda Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" #SRL added the following line InputDevice "USB mouse" "SendCoreEvents" EndSection Section "Files" # The location of the RGB database. Note, this is the name of the # file minus the extension (like ".txt" or ".db"). There is normally # no need to change the default. RgbPath "/usr/X11R6/lib/X11/rgb" # Multiple FontPath entries are allowed (they are concatenated together) # By default, Red Hat 6.0 and later now use a font server independent of # the X server to render fonts. FontPath "unix/:7100" EndSection Section "Module" Load "GLcore" Load "dbe" Load "extmod" Load "fbdevhw" Load "pex5" Load "dri" Load "glx" Load "pex5" Load "record" Load "xie" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "keyboard" # Option "AutoRepeat" "500 5" # when using XQUEUE, comment out the above line, and uncomment the # following line # Option "Protocol" "Xqueue" # Specify which keyboard LEDs can be user-controlled (eg, with xset(1)) # Option "Xleds" "1 2 3" # To disable the XKEYBOARD extension, uncomment XkbDisable. # Option "XkbDisable" # To customise the XKB settings to suit your keyboard, modify the # lines below (which are the defaults). For example, for a non-U.S. # keyboard, you will probably want to use: # Option "XkbModel" "pc102" # If you have a US Microsoft Natural keyboard, you can use: # Option "XkbModel" "microsoft" # # Then to change the language, change the Layout setting. # For example, a german layout can be obtained with: # Option "XkbLayout" "de" # or: # Option "XkbLayout" "de" # Option "XkbVariant" "nodeadkeys" # # If you'd like to switch the positions of your capslock and # control keys, use: # Option "XkbOptions" "ctrl:nocaps" Option "XkbRules" "xfree86" Option "XkbModel" "pc104" Option "XkbLayout" "us" Option "XkbVariant" "basic" #Option "XkbOptions" "" EndSection Section "InputDevice" Identifier "Mouse0" # Modified by mouseconfig Driver "mouse" Option "Device" "/dev/mouse" Option "Protocol" "PS/2" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection #my section (SRL) Section "InputDevice" Identifier "USB Mouse" Driver "mouse" Option "Device" "/dev/input/mice" Option "Protocol" "IMPS/2" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" HorizSync 31.5-48.5 VertRefresh 50-70 Option "dpms" # -- 1400x1050 -- # 1400x1050 @ 60Hz, 65.8 kHz hsync Modeline "1400x1050" 129 1400 1464 1656 1960 1050 1051 1054 1100 +HSync +VSync # 1400x1050 @ 70Hz, 76.8 kHz hsync Modeline "1400x1050" 151 1400 1464 1656 1960 1050 1051 1054 1100 +HSync +VSync # 1400x1050 @ 75Hz, 82.3 kHz hsync Modeline "1400x1050" 162 1400 1464 1656 1960 1050 1051 1054 1100 +HSync +VSync # 1400x1050 @ 85Hz, 93.2 kHz hsync Modeline "1400x1050" 184 1400 1464 1656 1960 1050 1051 1054 1100 +HSync +VSync EndSection Section "Device" Option "nodri" Identifier "ATI Radeon (generic)" Driver "radeon" VendorName "ATI Radeon (generic)" BoardName "ATI Radeon (generic)" #BusID EndSection Section "Screen" Identifier "Screen0" Device "ATI Radeon (generic)" Monitor "Monitor0" DefaultDepth 16 Subsection "Display" Depth 16 Modes "1024x768" EndSubsection EndSection Section "DRI" Mode 0666 EndSection