Page 1 of 1

My (not-so-good) experience with 1.20.1 and some suggestions

Posted: Thu Jun 02, 2005 2:17 am
by sebbarre
Hi there,

I spent a fair amount of time yesterday trying to install ZM from the LiveCD 1.21.0, and hit a lot of icebergs on my way :) Kudos to the great work done on both ZM and LiveCD nonetheless, this is a very nice piece of software. On the other hand, my experience installing ZM was not so smooth, mainly for hardware reasons that could eventually be addressed by some of the suggestions I will make in conclusion of this article. Other than that, once everything is up and running, it's a blast.

I am using a Dell Laptop, Inspiron 8600, 1 Gig of RAM, GeForce FX Go5200, and a Logitech Quickcam 4000 Pro. I use Windows on a daily basis as my primary OS, but work on Linux too.

1) Installing LiveCD 1.21.0

I downloaded the ISO, burnt it, and re-booted my laptop. Once the live Mandrake 10.1 started, I followed the LiveCD instructions that popped up automatically, and installed the distribution on my hard-disk. At that point, the instructions mention that one should install the boot loader either on the MBR of the hard disk, or on the specific partition the distribution had been installed on, in case one would want to dual-boot both Windows and Linux. This was my case, but even though I had done it several times in the past, I totally forgot one thing: if you write to the partition, you definitely need to create a boot disk, or save the lilo boot section to a file, otherwise you are a little screwed.

As far as I remember, some Linux distribs come with a CD that allows some options to be specified during the boot sequence, like which partition to start from, which graphics resolution to use, etc, but I could not use such options with the ZM LiveCD, so I ended up re-installing the whole thing again. Once it was done, I could not find how to create boot disks anyway, so I just copied the boot sector to a USB drive, and set up the multi-boot by modifying Windows's c:/boot.ini, as usual. You can copy the sector this way (provided that you installed to /dev/hda1):
dd if=/dev/hda1 bs=512 count=1 of=/tmp/boot.lnx

Of course, the ZM LiveCD is no place to discuss multi-boot issues, but I think a warning would not hurt: if you plan to multi-boot, or at least install the boot loader on the partition instead of the hard-disk MBR, *do* save that boot loader somewhere before rebooting :)

2) Testing the camera

Once the ZM CD was installed on my hard-disk, I proceeded to create a simple camera monitor and test it. No success. I checked the documentation, and noticed that the tutorial section (as well as many other resources online) simply advise to test the camera using Xawtv. Now the problem is, Xawtv was nowhere to be found, which was kinda puzzling for this LiveCD. I ended up having to track down and download a fair amount of packages, if I recall:
libnss3-1.7.2-11mdk.i586.rpm
libquicktime-0.9.3-1mdk.i586.rpm
libzvbi0-0.2.8-3mdk.i586.rpm
mailcap-2.0.4-12mdk.noarch.rpm
mozilla-1.7.2-11mdk.i586.rpm
tv-fonts-1.1-1mdk.i586.rpm
xawtv-3.93-3mdk.i586.rpm
xawtv-common-3.93-3mdk.i586.rpm

=> I think it would be nice to include Xawtv on the CD :)

3) Fighting with PWC

With Xawtv installed, I tried my best to get my Logitech Quickcam 4000 Pro working. No success. At all. After poking around, I noticed that the output of 'dmesg' was seriously complaining about the lack of support for my camera, for the PWCX driver/module was nowhere to be found. After reading about it an hour or so, and cursing the kernel maintainers zealots once more, I came to the following conclusion: my camera, as well as a lot of others, used to be supported by the PWC module, which was distributed as both source code, and a binary module called PWCX. Now after some fights with the kernel people who did not want any binary module in Linux, the author of PWC decided to throw the towel and discontinue PWC/PWCX:
http://www.smcc.demon.nl/webcam/

So what ended up in the kernel of Mandrake 10.1 and this LiveCD 1.20.1 is actually the crippled version of PWC, which is pretty much of no use for my camera: besides basically detecting it, it would not capture any frames. More browsing, and I finally found a fork of PWC, aiming at supporting the PWC/PWCX features without the need of a binary module:
http://www.saillard.org/linux/pwc/

Fair enough, I downloaded PWC 10.0.7a, then tried to compile, install and modprobe the module... without success, it would die complaining about an unresolved module: 'usb_kill_urb'. After checking some more forums online, I tried fixing the code by replacing 'usb_kill_urb' with 'usb_unlink_urb', but that just would not do the trick. Of course I had to find and install enough RPMs to compile the module, so I ended up installing Emacs, gcc, the kernel source (!) and a few things:
emacs-21.3-15mdk.i586.rpm
emacs-X11-21.3-15mdk.i586.rpm
gcc-3.4.1-4mdk.i586.rpm
libgpm1-devel-1.20.1-11mdk.i586.rpm
libXaw3d7-1.5-13mdk.i586.rpm
libncurses5-devel-5.4-1.20040529.2mdk.i586.rpm

Then I checked the PWC mailing list, and here it was: my kernel was too old. Now that sounded retarded to me: I had Mandrake 10.1, that's fairly new. It was hard to believe that in order to support a whole bunch of very common webcams (including old ones), I had to update my kernel ! Anyhow, since I'm too old to download, configure and compile a kernel from source, I checked if I could find some Mandrake RPM's to update my kernel the easy way. I checked the Mandrake 10.2 repository and found a new 2.6.11 RPM kernel. Sure, it was a little risky, but I updated my 10.1 with those packages. It failed the first time, complaining about the lack of a 'megaraid' module. Alright, let's browse the web again. I managed to track that the 'contrib' dir of 10.2 had some other kernels with the 'megaraid' module bundled, including a 2.6.10. Here they are:
kernel-multimedia-2.6.10-3.mm.24mdk-1-1mdk.i586.rpm
kernel-multimedia-source-2.6.10-3.mm.24mdk.i586.rpm

Yes, you need the source too to compile PWC :)

4) What's with XVideo ?

Alright, so far so good, I manage to reboot with that brand new kernel. I also managed to compile PWC and install it as a module, even though a new PWC module was included in the new kernel RPM, so you could probably skip that part.

I launched Xawtv again, and it died on me once more, with a new error this time, complaining about the XVideo extension. After checking the doc, I managed to launch Xawtv with an option discarding the XVideo support, and I got, at last, my first live capture. Great.

Yet it was in black & white, and it would die after a while, especially when I tried to resize. And ZM just would not grab anything anyway. Then I remembered that XVideo was probably an extension of the X11 server, and I thought that I should probably download the NVidia driver to get a better job out of my GeForce FX Go5200:
NVIDIA-Linux-x86-1.0-7174-pkg1.run

Of course, in order to do create that driver, you need the kernel source, but I had just downloaded them, so I had the new driver in no time, and of course once I restarted X it was a much smoother and better experience.

I finally managed to display the output of my webcam !

5) Setting up ZM the right way.

Now that I could check my camera in XawTV (proving, indeed, that this tool is definitely useful), I tried to set up my ZM monitor. And it took me some time. I poked around the logs, and found the following:

- setting STRICT_VIDEO_CONFIG to OFF should probably be the default, it *does* help (I was getting the usual "Failed to set picture attributes: Invalid argument".

- setting the right capture palette is important, and you should try *again* and *again*. I'm pretty certain I tried all of them several times, then suddenly it started working. For me, only one mode would work: YUV420P.

- the 'Maximum FPS' default setting is probably to low (2 FPS), I set it to 10.

- I had some other issues with shared mem, but played with the resolution until it disappeared.

My advise: be persistent. Restart the whole ZM from time to time. Try different settings, and combinations. Check the logs.

6) Sending email from ZM

So I played with ZM for a while, everything was flying, but just I could *not* manage to have it send any email on events. And apparently so were a lot of people in the forum too. I checked the output of zmfilter, set it to VERBOSE, check /var/log/*, checked the output of the web server, re-check my PHP settings, try using a SMTP server, nothing.

Then I realized that the default setting, 'use sendmail', which is the one I wanted to use anyway, was missing one important thing: 'sendmail' was not on the system ! So basically you need the following packages:
libnet2-1.1.2.1-1mdk.i586.rpm
procmail-3.22-5mdk.i586.rpm
sendmail-8.13.1-1mdk.i586.rpm
cyrus-sasl-2.1.19-5mdk.i586.rpm

And that did the trick.

7) Conclusion

Well I spent pretty much a whole day setting up ZM, and it was frustrating on many occasions, even though most of them were hardware related.

Here are a couple of suggestions, if I may, for the next LiveCD:

- provide XawTV
- use a new kernel, >= 2.6.9. Right now, I have my doubts that Logitech users can have their camera working with that LiveCD.
- eventually provide emacs/gcc, enough to compile some additional modules,
- eventually include the kernel source to compile modules and/or graphics drivers that definitely help,
- provide sendmail.

Great job otherwise
Thanks

Posted: Mon Jun 06, 2005 2:54 am
by rdmelin
Sorry that you had so much trouble with the installation. It's supposed to be a lot easier than that. :(

I left xawtv out because I like tvtime better and wanted to reduce the redundancy factor. Certainly the docs should mention this. Anyway you will find it in the menu in Multimedia --> Video.

Thank you for pointing out the need for better support for the Philips webcam and friends. I dont have one so did not realize the driver was inadequate. I have built new mods pwc and pwcx for the tmb kernel. You can find them here if they are any use to you now:
http://www.elltel.net/melins/mdk_10.1/D ... c_mods.tgz

On the sendmail issue, the default MTA in Mandrake is Postfix. So /usr/sbin/sendmail is linked to /usr/sbin/sendmail.postfix. Its included on the CD but turned off by default. You can bypass sendmail/postfix and have zm use your ISP's mail gateway by selecting SMTP instead of sendmail. I had to patch ZM to get this to work so it will require upgrading to the latest ZM RPM found here:
http://www.elltel.net/melins/mdk_10.1/RPMS/

You can also find NVIDIA driver that the tmb kernel there.

Prevous versions of the livecd included a full development environment including kernel source. Upgrading ZM used to mean compiling from source. I plan to support the livecd with upgrade RPMs so felt most users wouldn't use the whole development thing.



Anyway, thanks for the feedback and enjoy your new ZM system.

Best regards

Ross