This document is updated regularly. First version was written in
January 2004 and concerned mostly installation on Mandrake 9.2. It has
been revised in May 2004 for Mandrake 10.0 Official. In October 2004,
when Mandrake 10.1 Official went out it has been revised again and
many sections are outdated, sent to the appendices and then
removed. But outdated information may wrongly be here. Standard Linux
distributions, not only Mandrake, do not allow the full hardware of
this laptop to run on Linux, and experimental kernels and
corresponding patches are published on the Internet and sometimes
related in this web page.
Last revision: $Id: index.htm,v 1.38 2004/11/24 00:15:49 brouard Exp $
You can find a lot of people having installed more or less successfully GNU/Linux on a laptop Sony: enter 'sony Z1 linux' on Google. In particular you can have a look at http://home.arcor.de/enton/vaioz1.html.
This computer is tagged as "thin and light". You can get an overview of this computer at http://www.notebookreview.com/default.aspx?newsID=1871.
The first thing to do before installing GNU/Linux on a new desktop or laptop is probably to use a so called Live-CD like knoppix 3.4 (http://www.knoppix.org/), kanotix (http://kanotix.de/), PCLinuxOS (http://www.pclinuxonline.com/) or MandrakeMove etc. You need enough ram (about 256Mb) to test one or all of these Live CDs. You should first download the ISO file (about 700Mb each) and burn it, 'as an ISO file' on a new CD. Then you can "boot" on it. It will not harm your computer neither your hard disk. By booting on the CD, your computer creates a virtual disk on your RAM and decompress and install quite a complete GNU/Linux system. Again, it doesn't touch your hard disk. You can stop your computer at any time because none of your hard disk files are opened. If you can't boot from your CD, change your bios at boot time.
On Knoppix, your first screen asks you to type F2 in order to get a more complete list of boot options. For example you can set a specific keyboard (and language) by typing knoppix lang=fr (on a French keyboard and with the German Knoppix you should type lqng0fr because the 'a' letter is on the 'q' and the '=' on the '0' digit) and return.
After two to three minutes and if everything works fine, you will get a full operating system. It means that Linux should have recognized your sound card, your video card, your LCD, your mouses (keypad and additional USB mouses), your memory card, your DVD and or CDROM etc. If your are on a network you can directly type http://www.google.com in the already open browser to access Google. Or you can type smb:/// to access your local Windows network. While navigating on your network you can listen to your MP3 files, view your AVI files or your JPG photos or PDF files. Go to your own PowerPoint presentations (.ppt) and click on one of it. It will open OpenOffice presenter and you will be able to test the compatibility of this clone. Do the same thing with your .doc and .xls files.
Access to gaim and setup your MSN messenger account to chat (if you are using MSN messenger).
Then you are ready either to stop installing Linux or to go further by installing it.
Then you can choose manual partitioning to see what is already on your hard disk. If your laptop is new you will see your Windows XP partitions C: and D:. Hilight first D: and ask for shrinking this partition. If your disk has been highly used before (then your computer is not new) Mandrake will ask you to go back to Windows, to do a Windows scandisk and even a defragmentation of your drive.
Let us suppose that your are again at the 'partioning' step. You can shrink your partition to the size that you want. Linux can be installed on a few Gbs. Mandrake is pretty safe and I am confident. Mandrake can ask you to reboot just after you wrote the new partition on disk.
If you want a quick install you only need a swap partition and a root ("/") partition. Thus, from the new free partition inherited from the former D: drive, you can choose a swap partition of about 800Mb (about 3/2 times your RAM) and second partition for / . Mandrake installation asks you for a confirmation before formatting your new drives.
If you do not care about what is on your entire hard disk or simply on one of your drive, you can tell Mandrake to make its best default patitioning choices.
Mandrake is not difficult to install. And you will be successful. It
it doesn't work at first pass try again to reinstall. The installation
scripts are not enough tested for all the configurations. You can
switch to different "terminals" by typing CTL_ALT_F2 or F3 or F4 or F5
to see what is on. Your installation started on F1 and the windowing
is on F7, so type CTL_ALT_F7 to go back to the standard installation
window. Most error messages are more meaningful on these other
terminals. If your installation hangs you can have a free terminal and
type df -k to see if the problem doesn't come from a lack of
space. fdisk -l is also useful to see the partitions.
Mandrake installs KDE Desktop by default but I prefer GNOME Desktop as
my default Window manager!
Half an hour later (I don't remember exactly) your will be able to reboot, choose Linux (or verify that Windows is still working) and googling if you are already on a wired network.
But if you want to test new services like wireless network (centrino), speedstep or other facilities like battery status, suspend mode, switching from your LCD to a VGA external monitor, closing your lid while on a replicator port, then it is not be finished!
Now, on new laptops like the Sony Z1, bios options are rather scarce (hardware is fixed, software can evolve!).
With Mandrake 9.2 kernel I haven't been able to suspend on RAM but to suspend on hard disk. But you need to go to the website of swsusp in order to install the "hibernate" script.
You will be able to suspend by typing "sudo /usr/local/sbin/hibernate". This command is designed on Fn F12 on your Sony keyboard. But in order to link this command to this key combination you need some softwares which are not all in the standard Mandrake 9.2 distribution. Also, using Mandrake 10 Official with kernel 2.6.3 does not allow you to use any suspend mode, neither on RAM (S3) neither on disk (S4). It is a pity, but suspend on disk with swsusp took a long time (more than a minute) which it is too long in comparison to a simple reboot. With a more recent kernel 2.6.7 from Mandrake Cooker, you will be able to suspend to disk, with swsusp2, in a very nice way (even under Win4lin), see below this section. Also, on recent kernels, 2.6.8, distributed by Mandrake 10.1 Official (mid October 2004), you can use the standard S4 suspend to disk (see modprobe sonypi and then lsmod |grep sony to confirm that the module is loaded.
Stelian Pop has written two programs, sonypid, and spicctrl which are both included in his sonypid package. As explained on his website, sonypid gives you access to sony function keys or battery status while spicctrl lets you control the brightness of your screen. But in order to have something functioning you need another daemon, sonypidd, which activates sonypid.
At last, and in order to have sonypidd daemon activated, you need a sonypiddd service (with 3 'd'). You will access to these 3 (4 with spicctrl) new RPM packages below.
This service, as any service on Mandrake distribution, can be started or stopped by the command (on a root shell) /etc/rc.d/init.d/sonypiddd start (or stop or status) or more briefly service sonypiddd start.
You can also access to the Mandrake Control Center => System => DrakXservices and activate sonypiddd and perhaps permanently (i.e. at boot time). But you won't see the service sonypiddd until you already installed the sonypid perl script.
In order to simplify the installation, I tried to package my sonypiddd service including Craig DeForest's sonypid perl script into an rpm for Mandrake. You can get the binary sonypidd-1.0.2-1mdk.i586.rpm and it sources sonypidd-1.0.2-1mdk.src.rpm.
Meanwhile I also tried to adapt Stelian's own rpm for Mandrake users. Therefore for sonypid, sources are sonypid-1.9.1-1mdk.src.rpm and binary are sonypid-1.9.1-1mdk.i586.rpm and for spictrl sources are spicctrl-1.6.1-0mdk.src.rpm and binary spicctrl-1.6.1-0mdk.i586.rpm .
In order to use them (your need the 3 binaries) you must first download them on a directory.
For the installation of the binaries, you have to cd to this directory, type "su" to grant root privileges and then type for example rpm -iv sonypid-1.9.1-1mdk.i586.rpm . If your current installation is set correctly you can install directly without saving it to disk and you will get a prompt to enter your root passwd.
If you want to suppress the package type rpm -e sonypid . Once the three binaries are installed don't forget to start sonypidd (which loads the sonypi modules and starts sonypid daemon) by typing the following command /etc/rc.d/init.d/sonypiddd start .
If everything worked you should be able by typing simultaneously on Fn and F6 (but only once) to decrease the brightness to its minimum (the key is not designed on a Sony keyboard, I know) . By typing one or more times on FN F5 you will increase progressively the brightness (key is designed on the Sony keyboard).
Play music and then key on Fn F3 and it will mute the sound (but it previously saved the settings on ~/.aumixrc). Typing Fn F4 will unmute at the preceding sound level and wil give you access to the aumix windows where you can adjust not only the main sound but others too. Typing twice on Fn F4 will unfortunately popup two aumix windows which you should cancel. These features work on Xwindows but not satisfactorily with a tty terminal. Type simultaneously on CTRL_ALT_F2 to access a new terminal, then type Fn F6 or Fn F5 it will work. But for sound it doesn't always work. Type CTRL_ALT_F7 to go back to Xwindows (for Mandrake only because for other distros it can be CTRL_F8, try them).
Let say that you want to improve the sonypid perl script, to test it and to offer a new RPM to the `community'. You must first download the src.rpm on a local directory. Then you have to create a ~/rpm directory with a SPECS and a few other directories. Go to http://qa.mandrakesoft.com/twiki/bin/view/Main/RpmHowTo to know exactly how to set up your local rpm laboratory (just a few commands to create local sub-directories.
In order to build a rpm you should never work as root anymore.
Doing rpm -iv sonypidd-1.0.2-1mdk.src.rpm will expand the
package under various subdirectories of your ~rpm. Then goto
~/rpm/SPECS to should see sonypidd.spec and look at
~/rpm/SOURCES to see the compressed sources files. File
sonypidd-1.0.0.tar.bz2 is the original perl script from Craig,
sonypidd-sonypidd.patch.bz2 is my patch and
sonypiddd.rc.bz2 is the new service to launch the sonypidd
daemon.
But in order to apply the patch and to decompress everything, you
should cd ~/rpm/SPECS and type rpmbuild -bc
sonypiddd.spec. Then you will have access to the current
sonypidd perl script in the newly created
~/rpm/BUILD/sonypidd-1.0.2 directory and see the man page
too sonypiddd.8.bz2.
Here are my modified lines from the original perl script:
$bright_steps = 10; $spicctrl = '/usr/sbin/spicctrl'; $aumix = '/usr/bin/aumix'; ########## # Table of function-key actions. List ref containing strings # executes strings as shell commands; code ref gets executed in situ. @fcmds = (undef # 0 , undef # 1 , undef # 2 , ["$aumix -Sv0"] # 3 - mute , ["$aumix -LI >/dev/null"] # 4 - modify volume , $brighter # 5 - increase brightness , ["$spicctrl -b 0"] # 6 - minimum brightness , ["$radeontool dac on&& $radeontool light off"] # 7 - LCD/VGA - , ["$radeontool light on && $radeontool dac off"] # 8 , undef # 9 , undef # 10 , undef # 11 , ["sudo /usr/local/sbin/hibernate"] # 12 software suspend swsusp doesn't work with kernel 2.6.3 );They slightly differ from the DeForest's original perl script:
$bright_steps = 10; $spicctrl = '/usr/local/bin/spicctrl'; $aumix = '/usr/local/bin/aumix'; $click = "/usr/bin/sox /usr/share/sounds/KDE_Click.wav -r 48000 -t raw /dev/audio"; ########## # Table of function-key actions. List ref containing strings # executes strings as shell commands; code ref gets executed in situ. @fcmds = (undef # 0 , undef # 1 , ["aumix -v-10","$click"] # 2 - reduce volume , ["$aumix -v0"] # 3 - mute , ["$aumix -v+10","$click"] # 4 - increase volume , $brighter # 5 - increase brightness , ["$spicctrl -b 0"] # 6 - minimum brightness , undef # 7 - LCD/VGA - not yet , undef # 8 , undef # 9 , undef # 10 , undef # 11 , undef # 12 );If you want to change them again, stop the daemons by entering in a root shell /etc/rc.d/init.d/sonypiddd stop and modify (on root) the already installed /usr/sbin/sonypidd script.
Once your are satisfied with your modified perl script, integrate it on your ~/rpm/BUILD/sonypidd-1.0.2 tree by doing tar jcf ~/rpm/SOURCES/sonypidd1.0.0.tar.bz2 sonypidd-1.0.2
Modify your ~/rpm/SPECS/sonypidd.spec file by adding 1 to the release Mandrake's number and commentating the changelog with your changes.
Then save a copy of your sonypidd.spec somewhere with also a safe copy of your modifed tar file (be careful).
Then, under ~/rpm/SPECS do rpmbuild -bb sonypidd.spec . It will create a new binary rpm on ~/rpm/RPMS that you could install (you need to be root for installation not for building).
Do rpmbuild -bs sonypidd.sepc to build the src-rpm.
Now you can bootstrap (take a safe copy of your modifications) by making a rpmbuild -ba sonypidd.spec.
In order to have a real Mandrake contrib rpm, I think that you should do an rpmbuild --sign -ba --clean sonypidd.spec to integrate your digital signature. Some of my rpms are now distributed within the Mandrake contribs (thank you to Lenny).
The Ipw2100 driver requires a modification of the kernel and can't be used with a standard Mandrake 9.2 or Mandrake 10.0 distribution (as for other non Mandrake distributions). See the corresponding section below under the 2.6.7 kernel.
If you are running on 9.2 or even on Mandrake 10.0 you can use ndiswrapper at ndiswrapper but I am no longer using it and suppressed this section.
Let me say that if you have access to the adsl, the easiest solution is probably to buy a wifi-router-NAT-firewall-DHCPserver small box for less than 100 euros. If your adsl provider did not give you an ADSL modem for free, you may consider a similar box which will also include a compatible (with your provider) ADSL modem. You can also use an old PC which will offer the same kinfd of services but then you have to buy a WIFI pci card.
The advantage of this solution is that your router establishes a permanent connection to the Internet and shares Internet among many potential users either by wired connections (4 in simple boxes) or wireless. So you can access to any PC (Mac, Windows, Linux) of your home, and each of them will have access to Internet. You can also give an Internet access to your neighbours wirelessly (some ADSL providers are against that, so change your provider). The firewall lets choose which of your PCs will serve as web server or IMAP server or whatever server. Your router has an internal web server which lets you configure the firewall and set a port like 80 for http (web) to a particular internal IP address of the PC which will serve as a WEB server. In order to receive your mails your network needs a permanent DNS name. You don't need a permanent numeric IP address. Look at dyndns.org to have up to 5 free subdomains. Some providers are giving a fixed IP and even a reverse DNS (adsl.free.fr) which lets you work at home with the same facilities as at work (or even better) and give email addresses to yourself as to other members of your family or friends. In order to install an IMAP server at home, on one of your PC you need again to set up the firewall by forwarding the IMAP port to the internal IP adress of the dedicated PC.
If you travel with your laptop or do not have access to ADSL, you can have a connection using a standard 56k modem. Mandrake installation detects your modem and let you install all if you know the specifications given by your provider.
Today (April 2004), Knoppix 3.4 is out but it is hard to get it
outside Germany, but you can get Kanotix http://kanotix.de which is even a better
(currently) clone of Knoppix 3.4 . As explained at the beginning of
this page you should burn the Kanotix iso file and boot on it before
installing Linux. After some tests you will know what GNU/Linux is
offering today.
Upgrading to Mandrake 10.0 from Mandrake 9.2 on a Sony Vaio wasn't
difficult at all. Just be careful to have enough place on your
partitions before upgrading. For example you can suppress some big
packages like OpenOffice which can be reinstalled later.
The main advantage of Mandrake 10.0 over 9.2 is that it is based on
kernel 2.6 instead of 2.4 . It means that you can take advantage of
the speedfreq feature on the Intel Pentium of your Sony, avoiding
permanent use of the fan and the potential risk of overheating. Also
with kernel 2.6 you can use CPUFREQ which may adapt the CPU frequency
to specific needs (you can slow the speed from 1.5GHz to 600Mhz with
cpufreqd when the AC adapter is off)). Then you could use your battery
up to 5 hours like on Windows, but unfortunately even with best
optimizations, Linux is currently more power consuming and you will be
able to run on battery up to 3 or 4 hours only.
Also, with the new version of Mandrake, I am able to use the
replicator in a safe way.
The bad thing of kernel 2.6 and particularly of kernel 2.6.3 which is
used by Mandrake 10.0 official is that software-suspend is no more
working at all. According to swsusp developpers, there was some hope
with kernel 2.6.2 which vanished with the upgrade.
Cyril Wattebled
But anyhow, acpi is quite simple.
Using a standard Mandrake 10.0 installation the ACPI will probably not
be setup and you will have to set it in your lilo.conf. Here is my
Mandrake 10.0 (kernel 2.6.3) lilo.conf line (it will be very different with kernel
2.6.7 (Cooker Mandrake 10.1, see the corresponding section)
append=" nolapic devfs=mount splash=silent acpi=on resume=/dev/hda8"which includes acpi on. 'nolapic' was necessary in order to halt the power of my sony (on kernel 2.6.7 the nolapic option hangs the laptop at boot and a kernel without APIC has to be built as explained in the corresponding section). The resume is useless because suspend doesn't work (it was working on Mandrak 9.2 for swsusp and it works with kernel 2.6.7 and swsusp2 see the corresponding section. - NEW - It also works again with 10.1 Official). But you can keep it, it will not harm (here hda8 has to be replaced by your swap partition).
Verify that acpid is working. And if not, download it with the simple command (on root) urpmi acpid and activate it with service acpid start . Then you can look at /var/log/acpid.log where all the acpi events are recorded. For example I set up a file named 'lid' in /etc/acpi/events which looks like:
event=button/lid LID action=/etc/acpi/lidonoffAnd each time I open or close the lid, an acpi event is created and the script /etc/acpi/lidonoff is executed. lidonof may look like this:
#!/bin/sh # Adapted from http://www.littleredbat.net/~mk/vaio.html status=`sed "s/state: *//" /proc/acpi/button/lid/LID0/state` case $status in "open") echo "Opens the light of the lid (radeon driver bug)" /usr/local/sbin/radeontool light on > /dev/null 2>&1 exit 0 ;; "closed") echo "Shuts the light of the lid (radeon driver bug)" /usr/local/sbin/radeontool light off > /dev/null 2>&1 exit 0 ;; esacAs you can read it, this script uses 'radeontool'. Radeontool is a very useful tool which hacks the memory of the video card to modify some of its features.
In fact, with the latest version of Mandrake 10.0 the brightness of the screen was shut down correctly while closing the lid (try on yours, it was not true with Mandrake 9.2). Therefore radeontool is no more fundamental for this purpose. But it is still useful to switch from the LCD to an external monitor or to use a replicator. I set up 'radeontool ligth off' on Fn F7 and 'radeontool dac on' on Fn F8 using sonypidd but it is still not satisfactorily (we need to have single command which will roll over the sequences LCD - LCD & CRT - CRT ) .
I also use acpi to manage battery with the following /etc/acpi/battery script:
#!/bin/sh # http://www.littleredbat.net/~mk/vaio.html status=`sed "s/state: *//" /proc/acpi/ac_adapter/ACAD/state` case $status in "on-line") echo "Setting HD spindown to 10" /sbin/hdparm -S 10 /dev/hda > /dev/null 2>&1 /usr/sbin/spicctrl -b 220 exit 0 ;; "off-line") echo "Setting HD spindown to 1" /sbin/hdparm -S 1 /dev/hda > /dev/null 2>&1 /usr/sbin/spicctrl -b 100 exit 0 ;; esacThus, when the alternative-current adapter is unplugged, the brightness of the screen decreases and the hard disk is set to suspend mode to save the battery (and vice-versa when the adapter is on).
And I didn't look at other softwares until a developper from Debian pointed me to `powernowd' http://www.deater.net/john/powernowd.html. Its philosophy is clear. Powernowd changes the CPU frequency according to the CPU load. Even if you are running on battery you may need the full CPU for a short time. Powernowd is documented on the website and in particular in the http://n-dimensional.de/projects/cpufreq/algorithms document from Hans Ulrich Niedermann.
Let us explain the algorithm in the case of a processor which can switch
only between two fixed frequencies.
If you run at the lowest
CPU frequency of this laptop, 600MHz, and if your CPU load is 80% you
will stay at this frequency, but if your activity is slightly higher than
80%, you will switch to the highest frequency, 1.5GHz, and your
CPU load will be slightly higher than (80% x 600) / 1500 = 480 /
1500 = 32% .
Now let us suppose that your activity
decreases to a lower limit of 20%, (i.e at 20%X1500=300MHz 'effective'), you will
switch back to the lowest frequency of 600 Mhz with a corresponding
CPU load percentage of 50%. Right?
Powernowd needs two percentage limits, one for the lowest frequency
(80%) and a second for the highest frequency (20%), that's all. If you
don't want that powernowd change continuously, you have to verify that
the lower percentage limit (20%) times the highest frequency (1.5GHZ)
is lower than the higher percentage limit (80%) times the lowest
frequency (600MHz). And this is true.
Here we took the example a CPU with 2 fixed frequencies (1.5GHz and
600MHz) but in the case of the Pentium IV M you have other
intermediate or continuous frequencies (you should see them with
cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies)
and the processus is therefore identical with two contiguous
frequencies. Powernowd changes by increasing or decreasing the
frequency by steps of 100MHz.
Powernowd uses the so-called
"userspace" CPUFreq governor.
I just built (early June 2004) an Mandrake RPM for powernowd with
sources powernowd-0.90-5mdk.src.rpm and binary powernowd-0.90-5mdk.i586.rpm. Hans Ulrich Niedermann apparently
made patches but I think thay they concern other kinds of CPU and I
only packaged the original version. Powernowd takes its name from the
AMD powernow processor but powernowd works with many other processors
and, according to John Clemens, might change its name in the future
(the sooner, the better otherwise it will be too late).
Please
check at Mandrake Contrib before using this RPM because my RPM has
been updated by a newer version and is now available at contribs (and
their .spec file is more orthodox than mine). I also get answers from
Hans Ulrich and John; they will merge into a unique version soon. Check
their site if powernowd is not working with your processor.
Powernowd needs sysfs, please verify that your /etc/fstab
file has a line (it didn't appear with kernel 2.6.7):
none /sys syfs defaultsand mount -a.
I also looked at cpudyn http://mnm.uib.es/~gallir/cpudyn/. It looks similar in the sense that it changes the frequency according to CPU load too. But it also tries to stop the disk for battery saving if you unplug the AC adapter. But 'running on battery' is clearly another matter which has to be analyzed separately.
Even if you are using the AC adpater you may need a lower CPU frequency, at least because it will prevent fans to run as often as if you were running at a higher CPU frequency.
Cpuspeed is again an other tool which changes the cpu frequency http://carlthompson.net/Software/CPUSpeed. But I haven't tried it and documentation on the algorithm is inexistant.
If you want to access a scientific document on processor and CPU frequency you can have a look at http://www.arm.com/pdfs/vertigo-OSDI2002.pdf
Many programs with different philosophy are competing. We need more
experiences to know which is best and for what goal. But for me, CPU
frequency is a different matter than running on battery or not. We
need a daemon like powernowd to lower the CPU frequency if unnecessary
(parcimony philosophy). We need also better tools with more
flexibility that a fixed script like /etc/acpi/battery (described
above) to save the power of the battery but at the price of less ease,
like a reduced brightness of your LCD.
I heard that KDE has by
default an applet for CPU frequency. But again, mixing CPU concerns
and AC considerations is not mandatory.
Gnome has a very low consuming applet for
CPU frequency only. Here is a first example when running on battery and at
1.5GHz because of a high CPU load and here a second when
running with the AC adapter but at 600MHz because of an important idle time
.
Most of times I use Windows without rebooting. It means that we need Windows running under Linux. I mostly need to run my former licensed program (like Stata or Sas etc.) and thus I bought 'win4lin' http://www.netraverse.com. Win4lin is very boring to install not because of win4lin itself but because of Windows 98 which is always hard to install and requires at least 15 reboots!
But once you installed win4lin, you can have Windows in a small
window.
A win4lin session under Gnome snapshot
Win4lin requires a modification of the kernel and thus you
need to get new patches each times you upgrade your kernel. The
win4lin installer is very well done and people there are ready to
help. I read that Mandrake and Win4lin have engaged commercial
discussions together (May 2004).
Win4lin is safe. When Windows 98 hangs, just kill the Windows window
and reboot win4lin while clicking on the win4lin icon (it lasts a few
seconds). But Win4lin is not able to play midi neither to use usb
ports nor to play games with DirectX, but for softwares which do not
need these devices or features it is terrific because they are running
at even a better performance than native Windows!
I also installed cygwin on Win4lin in order to compile linux
programs for Windows users. You can get an example of such a
scientific program at "http://euroreves.ined.fr/imach
with the corresponding scientific
article.
An alternative to Win4Lin isVmware, but I don't have any experience with vmware but know that it is slower to run programs and more expansive.
Please sign the petition at http://www.petitiononline.com/linuxswp/petition.html by searching for shockwave.
Currently the only alternative is to buy (again) "crossover plugin" (about 30 euros). You can test the program for a month before buying it. Again it is a long process to download all the free plugins from the Windows world but then you can display shockwave presentations and PowerPoint presentations (you can only display them, not modify them or you need CrossoverOffice and the Microsoft Office licences) without the ever non full compatibility of OpenOffice products. CrossOver plugin uses Wine, which is a GPL, and run Windows natively without the need of a Windows licence.
On May 11 2004, Crossover plugin is no more distributed but included in Crossoveroffice at a slightly increased price. Crossoveroffice lets you run Microsoft Office softwares without the need of a Windows licence (but you need to have Microsoft Office licences!). I have not experience with it. Crossover needs Wine to run. Wine is GPL licensed (free) and is (partly?) supported by the paid licences of Crossover. I don't understand how these people from Codeweavers can improve Wine if they know that once Wine will be able to run most of Microsoft programs, Crossoveroffice will be useless. I would prefer the donation support approach..
You can get former Crossoverplugin from MandrakeClub at 25 euros (June 2004).
The command pdfLaTeX allows you to directly get a pdf file without the need of dvi anymore.
For bibliography, OpenOffice, like Microsoft Office, is very
poor. But some third parties are offering commercial powerful
bibliography tools like Endnote for Microsoft Word (and other word
processors for Windows but currently none for Linux).
BiBTeX is still my favorite bibliography tool. But in order to access
to Medline (in Xml format) you can get Jabref (which recently merged with
JBibtexManager and is working on Windows too).
OpenOffice has a bibliographic project, mostly based on xml, and which will give access to Z39.50 databases too. You can check at http://bibliographic.openoffice.org what is the current situation. Support for BibTeX is apparently here in test phase.
I am still using gnuplot (version 4 is out) for my figures with the help of xfig for `handwriting' figures. One of the facility of gnuplot on Windows was the fact that you could save a figure and paste it into PowerPoint or whatever other tool. On linux, apparently, you have to open a pdf (or whatever file format), replot and use the saved graph with an other tool.
Free Acrobat reader can be used to read pdf files but full Acrobat is not
available for Linux. It is a pity because it is often an
excellent alternative to PowerPoint with its zoom facility on
vectorial graphics and hypertext ability too.
On Linux Acrobat reader you can still select a portion (rectangle) of a page and
save it but I don't know how to paste your save into a file or into another tool.
On Windows you could paste on most tools.
There are many other PDF viewers based on Ghostscript. Kpdf is one
of the nicest one. Scribus seems to be an important project for pdf
forms. Pdf plugins are available for Mozilla linux browser and can be
used by Galeon, gnome default browser. Such a plugin allows you to
visualize a pdf file within your browser page, instead of opening it
on a separated windows with Acrobat reader itself. It has some
advantages. The so-useful 'google bar' is available for Mozilla. In
the Galeon bookmarks you can access to google directly too (i.e
without having to load the main www.google.com window). I am using Mozilla-firefox
now (October 2004) and the google bar is included by default. You can
also have "Live bookmarks": live bookmarks let you access the
headlines of many newspapers or web sites. A clickable "Rss" icon
appears on the down right corner of the browser when the Web site is
compliant to this mozilla feature. If you click on it the bookmark is
stored. My favorite RSS feeder, Evolution, doesn't include this
facility any more and I am using mozilla-firefox.
You may have a look at http://www.atlantictechsolutions.com/scribusdocs/wine.html for another view of using Windows products with Wine and CrossOverOffice (which I never tested).
- I never have had problem with any USB key on Mandrake 10: once you plug the USB key you get automatically a new icon on your desktop as 'removable_media'. You can click on it and drag from or to another window any file. To unplug, just unplug the USB key without any special caution (ok if you are still writing on it don't do that). And the icon will disappear. This is a point where Mandrake spent a lot of time to have something working well. And apparently with a great success.
- Memory cards like the memory stick from the Sony Z1 are permanent
drives and it is not clear for me how you can mount you memory stick.
You can always switch to root and mount your drive manually, but I got
some problems and sometimes needed to use 'fuser' in order to know
which process was blocking the drive.
The memory stick is
recognized as an scsi device and is located (on my system) on
/dev/sda1 .
# ls -l /dev/sda1 lr-xr-xr-x 1 root root 34 jun 23 12:36 /dev/sda1 -> scsi/host0/bus0/target0/lun0/part1 mount -t vfat /dev/sda1 /mnt/memstickIt should be recognized as a memory_card but it does not work easily.
- Same problem with an external camera connected to an USB port or even for a printer (like the HP Photosmart) which allows a direct insertion of a memory card into the printer. I am never sure to get an easy access to my photos. Sometimes it seems that the problem comes from fat partition of the memory card which is not readable under Linux.
- I have had a recent experience with an external USB drive. This drive did contain 3 NTFS partitions but they did not pop on my main window like for an USB key. I just look at the syslog and verified that they were recognized. But I got: the following confusing messages
Jun 9 09:39:00 localhost perl: drakupdate_fstab called with --auto --add /dev/scsi/host1/bus0/target0/lun0/part6 Jun 9 09:52:47 localhost kernel: FAT: invalid media value (0xb9) Jun 9 09:52:47 localhost kernel: VFS: Can't find a valid FAT filesystem on dev sdb. Jun 9 09:53:12 localhost kernel: NTFS-fs error (device sdb): read_ntfs_boot_sector(): Primary boot sector is invalid. Jun 9 09:53:12 localhost kernel: NTFS-fs error (device sdb): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover. Jun 9 09:53:12 localhost kernel: NTFS-fs error (device sdb): ntfs_fill_super(): Not an NTFS volume. [root@localhost RPMS]# ls -l /dev/sdb lr-xr-xr-x 1 root root 33 jun 9 09:38 /dev/sdb -> scsi/host1/bus0/target0/lun0/discand I gave up by booting on Windows, and I simply did not try to mount them one by one. Next time I will tell you.
- The Sony Z1 does not have any floppy drive anymore (you can still have a floppy drive on an USB port).
You can compile a new kernel 2.6 with a NTFS `write' option. I did it. But it is not done by default with Mandrake 10.0 Official, not because it is unsafe (it is very safe, look at the kernel documentation) but probably because its use is very limited: with this NTFS write option, you can only modify an already created file but can't create a new one!
NEW October 2004. There is a ntfs patch in Mandrake 10.1 Official which lets you have NTFS-write option has a "module". It seems to say that you don't need to build a new kernel, but the NTFS write limitations will still be there (I haven't tested it yet).
In order to get a full write access of your NTFS partition, you
need to use your proprietary native Windows drivers and the so-called
captive
software (Knoppix 3.4 uses captive, so you can try). I did not
install it on my laptop (until now) because I read that Captive is CPU
and memory consuming. But I can change my mind. I think that there is
still no captive rpm for Mandrake.
I changed my mind and
installed Captive, directly from the binary rpm from their site. It was
supposed to work with Mandrake 9.1 but is also working with Mandrake
10.0 Official. There is a shell script that you must run or you have
to copy two important Windows binaries which are on your original
Windows installation. In order to access them, the ntfs drive has to
be mounted (usually on /dev/hda1 by standard ntfs linux
driver (read only). Once these binaries are installed, you can unmount
/dev/hda1 and mount it with mount -t captive-ntfs
/dev/hda1 /mnt/windows. The installation script is still
approximative and you have to check what has been added in
/etc/fstab. Nothing harmful at all.
Limitations of Captive NTFS
On Windows I was used to share my calendar with my secretary with Outlook, but it sometimes failed (with duplicated items) and at the end I only used the readonly way. Now whith Evolution, I simply sync my calendar on my web server using standard calendar formats (ics format as for MacIntosh). Remember doing evolution --force-shutdown before syncing. You can find a Windows tool which enables you to import all your former Outlook shares to Evolution.
X11 is the way how graphical windows and mouses are managed under Unix/Linux. When your runlevel in /etc/inittab is set to 3 (and not to 5) you can log on a 'terminal' (no window manager) and get a 'terminal login' prompt. You can get a second terminal with CTL-ALT-F2 or F3 etc. It can be necessary to have two terminals in order to test X11. On the first terminal just type X and return. The main Xwindow must open and your mouse should be working too but the screen is blue without any other window or program working.
If the resolution doesn't fit you, you can cancel X by simultaneously pressing CTL_ALT_BACKSPACE (may be twice). If it doesn't work, you can jump to the second terminal, log and kill X. Then, on root you can have a look at /var/log/XFree86.0.log to see what is wrong. You can edit the XF86Config-4 with emacs -nw /etc/XF86Config-4, modify it and try again by jumping back to terminal 1 (CTL_ALT_F1). If X is working you can jump to it with CTL_ALT_F7 which is the standard 'terminal' for X-windows.
The Sony Z1RMP uses an ATI Radeon Mobility M6 LY (AGP) video card with a
1400x1050 resolution. Somebody from ATI worked during the summer 2003
on a new radeon driver for X11 and made important improvements. Before
I found the 'radeontool light off' command which is a dirty hack but very useful,
I was using the new PanelOff option of the radeon driver in order to
start X with an external monitor (when I use the replicator I
have to shut the lid and the LCD screen must be black) but I wasn't able to
dynamically (with FN_F7 for example) switch to the LCD again.
At that time I had two different XF86Config-4 which were started
either with the standard startx command either with a private
startx-ext script which loaded a special XF86Config-4 including the
PanelOff option to off. It is no more useful now with radeontool.
Here you can find the XF86Congfig-4 XF86Config-4-sonyZ1.txt file that I used on Mandrake 10 (On Cooker Mandrake 10.1 I use synaptics and a different config file [see kernel 2.6.7 below]) (see also the Xorg section if using Mandrake 10.1 Official). By using Control_Alt-Fn-+ or - (yes the + is on the simulated numpad and can be accessed via the function key; the + is closed to the right shift on this laptop) I am able to switch the resolution in order to satisfy any older video projector. But my preferred resolution is 1400x1050. If your external monitor doesn't have the corresponding resolution you can look at /var/log/XFree86.0.log or /var/log/Xorg.0.log what are the resolutions accepted for your monitor (I think that it is only possible if it is DDC compliant). My external monitor is able to have 1280x1024 instead of 1400x1050 and thus I added a CloneMode option in the "Device" section Option "CloneMode" "1280x1024" .
According to a developper of XFree, latest versions of XFree86 give an access to the drivers and allow switching dynamically from an LCD to an external monitor (and thus will make radeontool hack useless) but nobody has currently written any code in that direction.
The standard way at boot is to have an id set to 5 in /etc/inittab . Then not only X11 but a window manager like KDE or GNOME is launched automatically. I prefer the Gnome Display Manager (gdm) over KDM (kdm).
Version 4.4 of XFree86 has changed the license of its distribution and many distributors are refusing the new status (or can't use it?) but I am not able to understand what it really means for an end-user (not for a distributor). XFree wasn't apparently GPL. Xorg looks as a valuable alternative (http://www.x.org/), not GPL either. In October 2004, and as most distributors, Mandrake 10.1 adopted XOrg. See the corresponding new section.
I never used ext2resize with mounted filesystems (ext2online) but
if you use the very useful diskdrake tool of Mandrake, you have to
unmount the partition prior to resize. .
In the above example, I first hilighted the brouvg 'partition' which,
being a Logical Volume partition, is echoed by diskdrake as if it was
a standard disk like hda. Its name is brouvg (for volume group) and
all the inner partitions (logical volumes) are displayed. Choosing /opt (I needed a
separated growing /opt because of win4lin and crossover)
you will access to its size of 128Mb and type (ext3). Then you can
click on unmount (d�monter in French).
If you can't unmount, this is probably because the partition is
accessed by another process. You will know which process is using it
by typing:
fuser -m
/dev/yourvolumegroupname/yourlogicalpartname. Then you can stop
it or kill it!
.
Thus you can resize your partition at whatever size. Once it is
resized, you remount your partition by clicking on mount.
You can also create a new partition easily. Let's say that you have a subdirectory named /home/myname/photos (which is equivalent to ~/myname/photos) for your photos on your home partition. But as your photos are more and more numerous, you may decided to put them on a separate partition. Thus you have to rename the directory photo to photo2 for example. You can compute the current size of photo2 by entering the command du -sk ~/photo2 (in K bytes) and, from diskdrake, create a slightly bigger partition and mount it on ~/photos. Then, with the rsync command rsync -av ~/photo2/ ~/photos you can copy all your former directory to the new partition. Once it is done, you have to delete your ~/photo2 directory (first by unaliasing your 'rm' command if there is an alias on it):
$ alias rm alias rm='rm -i' $ unalias rm $ rm -r ~/photo2You can also enter a backslash before 'rm' like '\rm -r' and it will discard the alias.
Then you get more space on your /home partition while having a
specialized partition for your photos. Mandrake will ask if you want
to save the inclusion of the new partition 'photos' in /etc/fstab, in
order to have it mounted at boot, say yes.
If, as soon as you buy a new hard disk, you want to mount the
entire disk even if you don't need such a space, then LVM is useless,
but if you think that you don't know how your needs will evolve in the
future, you can use LVM and design your initial partioning at your
current need (I mean just 10 or 30% bigger size than the current
occupied space but not 500% bigger) with a big empty LVM
partition. Even if you don't create an entire LVM partition but keep
some free space, you may later create a second LVM partition and "add"
it to your first LVM partition (this can be done with diskdrake
too). Then you will see what will grow quicker, will it be /usr,
/var/log, /usr/local, /home/foo, /opt or /home/foo/mp3 ?
The main advantage of LVM is also that you can have a volume group (like brouvg here) which, in fact is on two different physical disks (not very useful on laptop with a single disk). LVM can also be used to switch the content of a disk to another disk transparently. You must be able to mount both disks simultaneously. Then the new (bigger) physical disk have to be included in your current volume group by vgextend (see for example http://tldp.org/HOWTO/LVM-HOWTO/) . And before you will remove the former (smaller disk) you will use vgreduce to transfer physically all the partitions from the older physical disk to the new one (it will require some time). On IBM AIX you even could do that online! Here I made it from a booted rescue disk or in single user mode. It is simpler that copying all the partitions to a new disk.
In order to set up LVM, you have to create a volume group (name brouvg here) on a disk with a lot of free space for all your Linux partitions but / and swap have to be standard partitions (you need to have a standard swap partition for resuming after a suspend). Then inside this volume group, you can create logical volumes, i.e. partitions. A volume group has to be set by fdisk with an id of '8e' for Logical Volume partition. Thus, instead of creating many fixed ext3 partitions for /, /usr, /var, /home etc, you can create a small fixed partition of 250Mb for / (including /boot and /etc) and a big LVM parition of 30Gb or more for all other partitions. Here is my current partitioning:
fdisk -l /dev/hda Disque /dev/hda: 60.0 Go, 60011642880 octets 255 t�tes, 63 secteurs/piste, 7296 cylindres Unit�s = cylindres de 16065 * 512 = 8225280 octets P�riph�rique Boot Start End Blocks Id System /dev/hda1 * 1 1904 15293848+ 7 HPFS/NTFS /dev/hda2 1905 7296 43311240 f W95 Ext'd (LBA) /dev/hda5 1905 1936 257008+ 83 Linux /dev/hda6 1937 2573 5116671 b W95 FAT32 /dev/hda7 3649 7296 29302528+ 8e Linux LVM /dev/hda8 2574 2674 811251 82 Linux swapAs you can see I have 15Gb for Windows XP (NTFS), 5GB for exchanging data in a FAT32 partition, and a LVM partition of about 30Gb. The / partition is /dev/hda5, the swap is /dev/hda8 and that's all. But inside the LVM partition I have many logical volumes (i.e partitions):
[root@localhost brouard]# lvm lvm> vgdisplay --- Volume group --- VG Name brouvg System ID localhost.localdomain1070056175 Format lvm1 VG Access read/write VG Status resizable MAX LV 256 Cur LV 8 Open LV 6 Max PV 256 Cur PV 1 Act PV 1 VG Size 27,91 GB PE Size 32,00 MB Total PE 893 Alloc PE / Size 707 / 22,09 GB Free PE / Size 186 / 5,81 GB VG UUID uYuPBa-6BDP-ScZ1-4zBZ-iAhY-HZJc-kZEb0f lvm>Even if Mandrake 10.0 uses by default LVM2, my volume group was created in LVM1 under Mandrake 9.2 . It can be useful to convert it to LVM1 type by doing:
vgconvert -M2 brouvgand you will be able to import new LVM2 partition into your first partition which is now converted to LVM2.
[root@localhost brouard]# df -k Sys. de fich. 1K-blocs Occup� Disponible Capacit� Mont� sur /dev/ide/host0/bus0/target0/lun0/part5 248895 162227 73818 69% / /dev/mapper/brouvg-5 10288760 6525404 3763356 64% /home /dev/mapper/brouvg-9 2580272 2165688 414584 84% /home/brouard/Documents/Recherches /dev/ide/host0/bus0/target0/lun0/part6 5106676 1299640 3807036 26% /home/brouard/echange /dev/mapper/brouvg-8 3289448 2674484 614964 82% /home/brouard/win /dev/ide/host0/bus0/target0/lun0/part1 15293844 8661548 6632296 57% /mnt/windows /dev/mapper/brouvg-4 1193328 33120 1099588 3% /tmp /dev/mapper/brouvg-2 4031680 2966408 860472 78% /usr /dev/mapper/brouvg-3 476012 405468 45968 90% /varYou can see that I created a partition for win4lin and some others for the system /usr, /tmp, /var.
Unfortunately you can't have '/' as a logical volume because at boot your system doesn't know how to read Logical Volume Manager partition. Thus your '/' partition must be standard ext3.
If you have a problem at boot (usually simple problems) you will need to enter a rescue disk, but usually you will not be able to access your logical volumes. In order to have access to them, you have to load the dm-mod module (or lvm-mod on Mandrake 9.2 LVM1) by typing modprobe dm-mod and to activate your volume group by (look at /etc/rc.sysinit) typing:
/sbin/lvm2 vgmknodes (it may already be done) /sbin/lvm2 vgchange -a yThen you can display your logical volumes by typing lvm lvdisplay and mount them.
telinit 1 umount /var resize2fs /dev/brouvg/varlv NB_OF_TOTAL-NEWBLOCK lvreduce -L-1G /dev/brouvg/varlv mount /vare2fsadm which did a contraction of resize2fs and lvreduce doesn't exist anymore with LVM2.
All of this might look difficult at first reading but the
alternative of copying and moving partitions to get more contiguous
space in order to resize a partition is much harder in my view.
Usually, main problems of configurations are in the '/etc'
directory which, in my case, is part of the '/' partition, so you don't
need to load the LVM module but if you want to access your '/home'
partition you have to verify if your rescue disk includes the dm-mod
module and the lvm2 binary. Mandrake first CD can be used as a rescue
disk and includes the modules and programs. First PCLinuxOS CD did not.
If you use the rescue disk which corresponds to your kernel version you can probably do sophisticated things like mkinitrd or things like that but in most cases you can use any kind of Live-CD in order to rescue another operating system like Windows.
With a recent version of Live-CD like Knoppix 3.4 you can use the Live-CD in a more sophisticated way that a readonly mode but can also write on your disks (see documentation). Even, your Windows partitions can be mounted in write mode (and NTFS partitions too by using 'captive') and you can apply a free Virus scanner, like clamAVhttp://www.clamav.net/ , to clean a Windows system of a friend. Look http://www.inside-security.de/INSERT_en.html to burn a rescue disk (50Mb which fits on credit card sized CD).
Insert CD is not easy to use for a newbie user but it is very powerful.
Once you have started booting, you type F2 for help as
usual on Knoppix, and you enter a different language if you like (no
French!) or enter to boot. You will get a light window manager and
menus can be accessed by letting the mouse cursor in the main window
and using a right click.
Enter a root terminal and type use-captive. This small script
will copy (after mounting read-only your /dev/hda1 partition using the
standard ntfs driver) from your NTFS partition (which is supposed to
be on /dev/hda1) the copyrighted binary files from Microsoft which are
on your NTFS partitions (c:\WINDOWS\system32\ntoskrnl.exe and
c:\WINDOWS\system32\drivers\ntfs.sys) into the directory
/var/lib/captive (which on RAM and not on your hard disk). This script
will also unmount your /dev/hda1 drive and remount it using the
command mount /dev/hda1 /mnt/hda1 -t captive-ntfs . If your
dirve is anything else than /dev/hda1 you have to change it by hand in
the script.
Then you can copy whatever file to your NTFS partition. Use their file browser 'emelfm' or 'midnight commander' to browse your files. You can edit them but apparently using ASCII characters only with nano.
To scan your Windows NT partitions for viruses right click on ClamAV super user to load it as root and download the latest antivirus database. Again, they will be stored on your RAM not on your disk. Don't be afraid, start scanning your NTFS partition mounted as /mnt/hda1 .
All these antivirus programs and databases are GPL (free) and very powerful (clamav was ranked 4 recently, before most famous commercial antivirus softwares, in the sense that the 'community' reports more rapidly). Such antiviruses can currently be used only to scan and delete files from an infected partition but it can't detect 'online' the use of a virus. You need to be on Windows for that.
Linux is less vulnerable to virus (no .pif .exe etc which can be clickable) than windows but servers like httpd or any server may be attacked. On Mandrake it is wiseable to use Mandrake Update and to update rpms which are classified as having security problems. It is similar as Windows update but you don't need to reboot.
The Windows GNU version of ClamAV can be accessed either at http://www.sosdg.org/clamav-win32/index.php or, with a GUI, at http://www.clamwin.net/
Be aware that many Live-CDs are not fully GPL and contain proprietary drivers. Knoppix 3.3 is expunged from proprietary softwares (somebody of the Free Software Foundation told me that). These proprietary softwares are freely available, you are not using stolen softwares, but the sources are not available and not GPL licensed. Look at http://www.gnu.org/copyleft/gpl.html) to understand the differences between GPL, LGPL, opensource and other kinds of licences.
On Linux, as on Windows, you will receive by mail a lot of spams, viruses, mails returned because of identity usurpations etc. It is hard to fight against them but you can move more than 95% of these mails in a trash bin. For example, you can use spamassassin to score your mails from 1 to 10 according to various criteria like lack of correct HEADERS in your mails and decide to mark as a SPAM a mail with a score higher than 5 for example. Once these mails are marked by SPAMASSASSIN you can move them automatically to a folder with your favorite mail tool. Do a simple urpmi spamassassin.
You can also filter your mails from attached viruses, mostly if your linux box is a mail server for Windows users. These viruses will not harm on Linux but it is important to delete them for Windows users. I am using Amavis http://www.amavis.org/) which a frontend to clamav. You can even have a software which shows on your web site the chronological histogram of each type of virus like 'blaster' that your received (http://mrtg.uv.es/correo/numclamdmil.html).
If you are interested in the theory of the dynamics of viruses spreaded by mails I gave an oral exam on this subject for a national exam in 2001 in France, just after the spread of the first famous 'I love you' virus, ("Messages �lectroniques, virus et chaperon rouge" at pages 56-68 of a document that you can access, in French, at http://sauvy.ined.fr/~brouard/enseignement/agreg/Agreg-ss-2000.pdf).
Today many more people are 'vaccinated' in the sense that they know
that, under Windows, they should not click on an unsafe
attachment. Recent viruses are spreading in another way, by finding a
vulnerability in a server (running or Windows or Linux), installing a
small program on the host which, from there, will attack other hosts in
order to spread.
Antiviruses are inefficient to detect a recent spreading virus,
the main solution is to update, before being attacked, your softwares
in order to suppress the vulnerability. But if you have been attacked,
the safest solution is to make a complete reinstallation of Linux (trying
to understand which files have been altered is useless because you
will miss something and be revisited soon or later). It can be very
quick if you use a standard distribution with rpm packages (or .deb
from Debian distribution). Your configuration files (usually in
/etc only) will not be destroyed and Mandrake will ask you to
check the old and new configuration files. You also need to backup
your /home directory regularly. We haven't been successfully attacked
since a while on Linux (fingers crossed). But a reinstallation will
not alter your home directory (don't ask the installation to format
your home partition!) and usually your home partition doesn't interest
hackers.
Standard Mandrake 10.0 Official, even with its latest kernel update,
runs on kernel 2.6.3 . And some hardwares, like the Alps touchpad
will not work satisfactorily with a kernel prior to 2.6.7. Version 2.6.7 seems to be the
future kernel version of Mandrake (and many other distributions) 10.1
. Thus, it looked interesting to try to compile a recent kernel. This
can be done by looking on any Kernel-howto www.tldp.org/HOWTO/Kernel-HOWTO.html.
But in order to have a kernel which can be used by other people,
I subscribed to the Mandrake cooker mailing list, and discovered that,
at least two people, Thomas Backlund and Svetoslav Slavtchev, are
offering sources kernel so-called nosrc rpm. They are called nosrc
presumably because they do not include the huge main kernel sources which
can be downloaded from kernel.org . These packages are very
up-to-date, include most of the latest patches and do not have any
warranty of booting and working correctly (but do other officical
versions have?). When you use Cooker, you are supposed to update
regularly all your packages and report bugs to the cooker mailing
list. About every 6 months, the cooker directory is frozen and gives
birth to a Mandrake release.
There is not detailed documentation on the nosrc rpm and
particularly on the kernel.spec but you can read the page of Thomas
Bakclund http://www.netikka.net/tmb/Cooker/
which describes how to download and compile the latest kernel. In
particular, you can read the latest Changelog, http://www.netikka.net/tmb/Cooker/CHANGELOG-cooker-tmb26
and see if your favourite packages or patch is included or not.
In Thomas Backlund's kernel, Win4lin and ipw2100 were
included but unfortunately swsusp2 wasn't. So I looked at Svetoslav Slavtchev changelog
http://mandrake.contactel.cz/people/svetljo/mandrake/kernel/CHANGELOG.txt
and discovered that swsusp2 was included. It also included the first
patch for Alps touchpad.
The idea was just to pick up the official latest sources (before any
patch) linux-2.6.7.tar.bz2
at http://www.kernel.org/
and to compile with a command like rpm --rebuild
nosrc_rpm_name --with uponly
--with win4lin
--with swsusp2
in order to build only for i586 (up) with win4lin and swsusp2.
But unfortunately the Sony Z1 will not power off on a kernel 2.6.7
which is compiled with the APIC. The "nolapic" option that made the
laptop power off under Mandrake 10.0 (kernel 2.6.3) doesn't work
anymore. The unique solution, as reported by a few Sony users, is to
compile without APIC. The "noapic" lilo option is not equivalent to a
complete rebuild without APIC and the laptop won't power off with the
simple noapic lilo option. Svetljo has incoporated this feature (July 20) into
his next releases but on kernel-sds18 we can't add option --without apic.
And there are other problem with latest version kernel-sds23.
alps.c: E6 report: 00 00 64 alps.c: E7 report: 73 02 0a alps.c: E6 report: 00 00 64 alps.c: E7 report: 73 02 0a alps.c: Status: 15 01 0a ALPS Touchpad (Glidepoint) detected Disabling hardware tapping alps.c: Status: 11 01 0a hub 1-2:1.0: 3 ports detected input: AlpsPS/2 ALPS TouchPad on isa0060/serio1the Alps touchpad has also to be recognized by the X server...
On release sds23 (July 19) and after, Svetljo told me that the DI80_alps.patch hasn't been deleted but replaced by the content of "my" DI81_alps.patch .
On Sat, 2004-07-17 at 08:43, Dmitry Torokhov wrote: > I am inclined to say that it's swsusp2 problem. I briefly looked over > the code and I could not find a place where device_power_up would be > called; swsusp2 goes straight to device_resume. This causes system > devices (and i8042 is currently a system device) not be resumed and > thus your touchpad is left id default PS/2 hardware emulation mode.and Nigel Cunningham (swsusp2) replied that it will be incorporated soon.
UnloadModules psmouse evdev LoadModules autoin file /etc/hibernate/hibernate.conf
# rpm -ivh --nodeps ipw2100-0.44-1mdk.i586.rpm
Documentation is available at http://ipw2100.sourceforge.net/README.ipw2100 In order to have your wifi working you should setup a file named /etc/sysconfig/network-scripts/ifcg-eth1 which should look like:
DEVICE=eth1 BOOTPROTO=dhcp ONBOOT=yes NETMASK=255.255.255.0 ESSID=BRTRY25TYU KEY="restricted[1] e15de61021"where the ESSID and KEY should correspond to yours and not to this example.
To make the connection, you must:
If your device is here, then a simple ifup eth1 will setup the device and make the connection. In my example I am supposing that my network have a DHCP server (which can be a PC or a simple router/nat/adsl/dhcp server/ box).
To unload the module do modprobe -r ipw2100. And you are back to the earlier state.
If you want to save power you should add other options to wlan. I am
not very familiar with wireless so please tell me.
If you don't use bluetooth you save your battery by unsetting
bluetooth via spicctrl --setbluetoothpower=0 (on root). But
I don't have any bluetooth device to test them but some other people
have reported successful use of bluetooth devices.
As mentioned earlier I rebuilt, from Svetljo nosrc rpm, a kernel distribution which incorporate Win4lin, swsusp2 (until 96 patch), NOAPIC (in order to power off) and ipw2100 (centrino wifi). You can look at the config-2.6.7.txt, get the sources rpm at kernel-swsusp2-2.6.7-1.sds.31mdk-1-1mdk.src.rpm and the binary at kernel-swsusp2-2.6.7-1.sds.31mdk-1-1mdk.i586.rpm So, just download the binary and install it with rpm -ivh kernel-swsusp2-2.6.7-1.sds.31mdk-1-1mdk.i586.rpm on root. Don't use the -Uvh option (update) because if there is a problem in the kernel and if you can't boot this kernel you will still be able to boot with your previous kernel. If you get an error at installation, look at your /etc/lilo.conf to see if the new kernel is correctly set and in /boot. In my case here is my lilo section concerning kernel 2.6.7:
image=/boot/vmlinuz-2.6.7-1.sds.31mdk label=267-1sds31 root=/dev/hda5 read-only optional vga=788 append=" devfs=mount splash=silent acpi=on resume2=swap:/dev/hda8" initrd=/boot/initrd-2.6.7-1.sds.31mdk.imgLook at /boot to see if the image and initrd are there. Verify that the symbolic links of the default kernel at boot are still pointing to your former kernel. Here is the section of my former Mandrake 10.0 official kernel (patched for Win4Lin too).
image=/boot/win4lin-2.6.3-13mdk label=263-13w4l root=/dev/hda5 read-only optional vga=788 append=" nolapic devfs=mount splash=silent acpi=on resume=/dev/hda8" initrd=/boot/initrd-win4lin-2.6.3-13mdk.img
If you have difficulties to get the ethernet card running please verify that the eepro100 module is loaded. Otherwise load it (modprobe eepro100) before ifup eth0
If you have difficulties with powernowd and the new kernel 2.6.7 verify that the cpufreq-userspace module is looaded (lsmod |grep cpufreq and load it.
I also included the Alps touchpad patch (the full patch of Dmitry) but also the sonypi patches which lets the sonypi module suspend and resume correctly.
In order to be able to use Win4lin I also included the mkiadapter 1.3.7 patch and _Kernel-win4lin-2.6.8.1 patch.
Let me remember how to get this new binary and src rpm. First
download kernel-2.6.8.1.20-1-1mdk.src.rpm from a Mandrake mirror server on
your local directory like ~/RPMS/. You should never act as
root but as a user login. Install the src by doing rpm -ivh
kernel-2.6.8.1.20-1-1mdk.src.rpm. It will expand kernel-2.6.spec
on ~/rpm/SPECS/, linux-2.6.8.1-q20.tar.bz2 (patches
and scripts) and linux-2.6.8.1.tar.bz2 (standard kernel
sources) on ~/rpm/SOURCES (some additional README files can also be expand there).
In order to add a patch, you have to untarred the patches by
doing, from ~/rpm/SOURCES tar jxvf
linux-2.6.8.1-q20.tar.bz2. Then, rename the directory ~/rpm/SOURCES/2.6.8.1-q20 created as
~/rpm/SOURCES/2.6.8.1-q20yourinitialsyourversionw4l (w4l
stands for Win4lin but you can supress it if you don't need it) and
add the first 4 patches CA52-1_nolapic.patch and DB19_alps-0136.patch (and ZZ83_mki_adapter26_1_3_7.patch
and ZZ84_Kernel-win4lin-2.6.8.1.patch
for win4lin.
Under kernel 2.6.8 you will also need sonypi-268-269 reverse patch
which makes the transition for sonypi.c and sonypi.h back from 2.6.9
to 2.6.8 (minor patches) in order for other patches to
apply. sonypi_rppwoftwo-kernel and sony-kfifo are the missing codes of
the new functions introduced in 2.6.10 for sonypi. They are 8
additional patches for sonypi named sony-18 up to sony-88.
Meanwhile, it has been reported that S3/ACPI (ie suspending to RAM) was partly working on kernel 2.6.9, thus I tried to incorporated the latest and final ACPI patches against 2.6.8 (some patches were already incorporated in Mandrake 10.1 Official patches and have been removed from ACPI patches). We are close to have S3 resuming correctly but there is some magic missing in 2.6.8.1 which is incorporated in 2.6.9. The ACPI patches do hot harm. All the patches for 2.6.8.1-mdk are there.
Now you should tar bzip2 the directory and give it a new name:
cd ~/rpm/SOURCES/ tar jcf linux-2.6.8.1-q20nb1w4l.tar.bz2Edit kernel-2.6.spec and update mdkrelease by %define mdkrelease 20nb1w4l pr whatever name you gave for your initials (nb here) and version (1 here). Go at the end of the spec file, to the %changelog section and the new date, your name and your email and a few sentences explaining the patches.
cd ~/rpm/SPECS rpmbuild -ba kernel-2.6.spec --without smp --without secure --without enterprise \ --without BOOT --without i586up1GB --without doc --without sourceand wait for a long time until finished (45 minutes on a 3GHZ). You will get the new binary on ~/rpm/RPMS/i586 and the new src on ~/rpm/SRPMS/.
In order install the new kernel you must be root and do:
rpm -ivh ~/rpm/RPMS/i586/kernel-2.6.8.1-20nb1w4lmdk.rpmPlease check that file /etc/lilo.conf has been updated correctly and run lilo -q to see if your former boot option is still here in case of a problem. You must update the lilo.conf by adding the "nolapic" option as below.
You can also get the rpm from this site: link to kernel-2.6.8.1.20nb2w4lmdk-1-1mdk.i586.rpm and to kernel-2.6.8.1.20nb2w4lmdk-1-1mdk.src.rpm.
image=/boot/vmlinuz-2.6.8.1-20nb2w4lmdk label="2681-20nb2w4l" root=/dev/hda5 initrd=/boot/initrd-2.6.8.1-20nb2w4lmdk.img append="nolapic acpi=on resume=/dev/hda8 splash=silent" vga=788 read-onlyEven if udev (from IBM) seems more powerful to assign dynamically devices (/dev), we probably have to change some configuration files. For example, in order to sync my pilot I changed /dev/usb/tts0 with /dev/USB0 . Just look at the syslog when syncing and you will see that the Pilot is recognized on a Kernel device ttyUSB0.
KERNEL="tty", NAME="%k", SYMLINK="vc/0 tty0" KERNEL="tty[0-9]*", SYMLINK="vc/%n" KERNEL="ttyS[0-9]*", SYMLINK="tts/%n" KERNEL="ttyUSB[0-9]*", SYMLINK="tts/USB%n"
echo shutdown >/sys/power/disk; echo disk > /sys/power/statebut it works similarly.
#/bin/bash -x # #laptop-mode stop service usb stop modprobe -r usb-storage modprobe -r usbhid hwclock --systohc sync echo Suspending.... echo 4 > /proc/acpi/sleep # let's resuming echo Resuming! hwclock --hctosys # sleep 1 service usb startYou may use a more sophisticated script. Mandrake 10.1 Official gives one into suspend-scripts but I prefer the script used by swsusp2 which I slightly changed to suspend with echo 4 > /proc/acpi/sleep instead of echo >/proc/swsusp/activate .
chvt 1 && echo mem > /sys/power/state && /usr/sbin/video_post && chvt 7as well as suspend to disk. New command (equivalent to S4) is:
echo shutdown >/sys/power/disk; echo disk > /sys/power/state
hibernate -F /etc/hibernate/susptodisk.conf and hibernate -F /etc/hibernate/susptoram.conf
UseSysfsPowerState mem ### modules UnloadModules usb-storage ehci-hcd ### xhacks SwitchToTextMode yes # UseDummyXServer yes UseVideoPost yesThe latter UseVidePost can be commented for Intel video card. But for radeon cards such as on a Sony Z1RMP, it seems to be mandatory. With video_post you can't use framebuffer and the vga=788 or whatever option has to be removed in your lilo or grub. In addition you must set the LCD expansion to "no" in your bios (type F2 at boot). Your screen will be smaller but, you will be able to work on your vt console.
UseSysfsPowerDisk shutdown UseSysfsPowerState disk ### clock SaveClock yes ### modules UnloadModules usb-storage usbhid usblp ehci-hcd uhci-hcd battery ac usbkbd ### xhacks # SwitchToTextMode yes # UseDummyXServer yes # UseVideoPost yesSaveClock is still mandatory on 2.6.9 kernel.
Andre Roth proposed to link susptoram to Fn_Esc. Therefore, I made a newer version of sonyxosd rpm with this new link. I also changed the "hibernate" name to "susptodisk". It is no more useful to use "sudo hibernate" because of PAM.
The real command, hibernate, susptodisk or susptoram, should reside on
/usr/sbin (or /sbin) which are not in the path of a standard
user (and thus non responding when typed).
You need to add a file named respectively hibernate, susptodisk
and susptoram as a link to consolehelper in /usr/bin:
cd /usr/bin ln -s consolehelper hibernate ln -s consolehelper susptoram ln -s consolehelper susptodiskThen you need three other (identical) files, respectively hibernate, susptodisk and susptoram files in /etc/pam.d/:
cat /etc/pam.d/hibernate #%PAM-1.0 auth sufficient pam_rootok.so auth required pam_console.so #auth required pam_stack.so service=system-auth account required pam_permit.so
cat /etc/security/console.apps/susptoram #USER=root PROGRAM=/usr/sbin/susptoram #GUI=true #FALLBACK=falseYou need to restart the service saslauthd, by doing service saslauthd restart, in order to be able to launch susptoram, susptodisk or hibernate as a non-root user.
cpan X11::Protocol cpan X::Osd cpan Term::ANSIColor cpan Term::Size cpan Term::ANSIScreenAnd for XOsd I also needed libxosd2-devel to get the included files needed by the installation launched by cpan.
If you decided to patch your kernel in order to be able to power off (nolapic option will not work on a standard Mandrake kernel), to use the Alps touchpad, to resume correctly after suspending to disk (without unloading sonypi), you can download a binary rpm from this site or even build it yourself with the given patches (you can also download a kernel including also the win4lin patches).
If you need to suspend to disk, you will need a 2.6.9 kernel. There is currently (November 23 2004) no Cooker 2.6.9 or 2.6.10 kernel, and you will have to build one yourself from a vanilla kernel.
In summary, here are the main features and packages that you can get from this site in order to make most of the hardware of your Sony Z1 working. It is mostly based on a Mandrake distribution but all the sources codes can be accessed either on this site or elsewhere (URL are given) and can be used by other distributions. Some of the new packages from this site http://sauvy.ined.fr/~brouard/sony/rpm/ (most of time I only made the packaging, without writing original source codes) are already accessible from Mandrake contribs.
We hope that these pages will be useful to happy owners of Sony Z1 or
of similar laptops. But our most important hope is that this page
will help developpers of most common Linux distributions, like
Mandrake, to incorporate in a next release all these features so that
this page will be completely obsolete (fortunately it is getting obsolete).
We apologize for any mistake or error and ask for comments in
order to improve and update these pages.
We decided on July 1st with a few other happy Z1 owners (Craig de Forest, Cyril Wattebled, Ionut Georgescu and Leonardo) to setup a special mailing list named linux-sony-z1 chez listes point ined point fr . As usual you can subscribe by sending a mail to linux-sony-z1-subscribe at listes dot ined dot fr (and -unsubscribe for unsubscribing). Archives are publicly accessible at http://listes.ined.fr/wws/arc/linux-sony-z1 .
Nicolas Brouard brouard at ined dot fr
Here are some addenda which will be probably removed.
But in order to get a new "nosrc" rpm, you need to:
rpm -ivh kernel-sds-2.6.7-1.sds.23mdk-1-1mdk.nosrc.rpmand you will get ~/rpm/SPECS/kernel-sds.spec for the SPEC file, ~/rpm/SOURCES for all sources and patches. You still have to download the "linux src", file linux-2.6.7.tar.bz2 from http://www.kernel.org (click on the F for a full download) and store it in ~/rpm/SOURCES .