Google
 
Web www.warpedsystems.sk.ca

 Welcome to Warped Systems Wednesday, May 29 2024 @ 05:31 AM CST  
About Us |  Projects |  Services |  Shop | 
Main Menu
Home
Gallery
Submit Article
Calendar
Stats
 RSS Feed
Links
Mail
Search

User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User

Who's Online
Guest Users: 57

Misc
Commonwealth Playlist
A Fan's Guide To Boxing
A Fan's Guide To Boxing - new site

Recommended Sites
Linux Today
Linux Weekly News


Building 'Nefarious' - Part 3: Customization
Part 1 :: Part 2 :: Part 3

As I stated in the previous article, this section will cover the customization and benchmarking of Mandrake Linux 9.2 AMD 64. I'll be covering the NVidia AMD 64 driver installation, configuring DVI, testing the DVD burner, some system tweaks and some benchmarks (hdparm, oggenc and kernel recompile). I've had to recompile some apps from Mandrake and PLF, so I'll provide whatever insight I can as to how I got them to work. The biggest thing I have noticed with building Nefarious is that as a rule of thumb the only time something didn't work exactly the same as it did on x86, or something didn't work at all, it was closed source.

NVidia Driver/DVI

I know some of you have strong feelings towards closed drivers, but nobody is coming over to your house and forcing you to install them (yet), so learn to relax a little.

The first thing to do is to download and install the kernel-source RPM that matches the running kernel. In this case it is kernel-source-2.4.22-24mdk:

$ wget ftp://ftp.sunet.se/pub3/os/Linux/distributions/mandrake-devel/cooker/amd64/Mandrake/RPMS/kernel-source-2.4.22-24mdk.amd64.rpm
$ su
# rpm -ivh kernel-source-2.4.22-24mdk.amd64.rpm

Next we grab the latest NVidia drivers for AMD 64 from http://www.nvidia.com/content/drivers/drivers.asp. In this case it is the 1.0-4499 driver. They don't use the new install method that is available for the x86 platform, instead they use the old GLX and kernel tar.gz files. Not a big problem, but worthy of a note. So to get the driver ready, we do the following:

$ wget http://download.nvidia.com/XFree86/Linux-x86-64/1.0-4499/NVIDIA_GLX-1.0-4499.tar.gz
$ wget http://download.nvidia.com/XFree86/Linux-x86-64/1.0-4499/NVIDIA_kernel-1.0-4499.tar.gz
$ tar -xvjf NVIDIA_GLX-1.0-4499.tar.gz
$ tar -xvjf NVIDIA_kernel-1.0-4499.tar.gz
$ su
# cd NVIDIA_GLX-1.0-4499
# make
# cd ../NVIDIA_kernel-1.0-4499
# make

Both compiled okay, and the NVidia kernel driver was loaded upon completion of the compile. I logged out of KDE, switched to a console as root, and disabled the X server:

CTRL-ALT-F1
$ su
# init 3

Editing '/etc/X11/XF86Config-4', I find that the only thing I have to change is the name of the driver from "nv" to "nvidia". Everything else is already there (load "glx", etc), and the XFree86 logs show that these settings are just skipped over if no 3D capable driver is found. If you run 'XFdrake' after making your changes, it will honour the 'nvidia' selecting, but also add 'alias /dev/nvidia* nvidia' to '/etc/modules.conf', using that the driver is loaded during boot (or you can add it manually).

I switched back to runlevel 5 (init 5) to restart X, and all that I saw was a black screen with a blue 'smudge' at the bottom. The system was unresponsive, so I logged in remotely via openssh, and noticed that the X server was taking up 99% of the CPU. I rebooted the system into runlevel 3, disabled the nvidia driver and started to hunt down the problem. After googling my brains out, I finally discovered that it might be an issue with AGPGART, so I set XF86Config-4 to use NvAGP by default (details below), and the NVidia splash screen popped up on the next reboot.

glxgears output, although impressive when compared to my old system, was not earth-shattering. All the OpenGL screensavers worked also.


$ glxgears
7289 frames in 5.0 seconds = 1457.800 FPS
8537 frames in 5.0 seconds = 1707.400 FPS
8523 frames in 5.0 seconds = 1704.600 FPS
8405 frames in 5.0 seconds = 1681.000 FPS
8244 frames in 5.0 seconds = 1648.800 FPS

I'll see if I can tweek this to provide better output later on. It was working though, so getting DVI to work was a fairly simple process. Following the direction in the NVidia README, I added the 'ConnectedMonitors' option, then shut the system down and switched the connector over to DVI. Initially, I could only get digital output from the console, so I took a look at '/var/log/XFree86.0.log' to see if I could determine what the problem might be. The first thing I noticed was that it was referencing the CRT as the primary device, regardless of the order I put the options in for 'ConnectedMonitor'. Removing 'CRT' from the option let it continue, but lead me to my second issue - resolution size. The 'XFree86.0.log' output was very detailed and easy to understand - I had to switch to 1280x1024 if I wanted to get everything to display properly. Everything is slightly 'bigger' than I am used to, but it is very crisp, so we'll leave it as it is for now (I was able to increase the framerate by about 300fps in glxgears by setting 'RenderAccel'). Below is the relevant section from XFConfig-4:

/etc/X11/XF86Config-4
Section "Device"
Identifier "device1"
VendorName "NVidia"
BoardName "NVIDIA GeForce FX (generic)"
Driver "nvidia"
Option "DPMS"
Option "ConnectedMonitor" "DFP"
Option "RenderAccel" "1"
Option "NvAgp" "1"
EndSection

There must be something mystical about the 'NvAgp' option, as it appears to become invisible when typed into any support/discussion forum. No matter what forum I went to, it was one of the first things mentioned as a possible solution to peoples problems, but in 99 out 100 of them, people seemed to ignore this option, and opted to try rebooting a couple dozen times instead. Either that or copy the entire contents of XF86Config-4 to the forum and complain that SUSE/Mandrake/Gentoo/Slackware/whatever sucks. I don't claim to understand, I'm just telling you what I read.

System Tweaks

Before I moved on to the DVD Player, I figured I'd tweak the system a bit. I started by installing lineakd to take advantage of all the keys on my keyboard that after next week will probably never get touched again -- except for the little scroll wheel on the keyboard, that kicks ass -- and yes, since my keyboard wasn't listed, I created a template and submitted it to the author of lineakd.

Next I grabbed some icon sets from KDE Look and some desktop backgrounds from Digital Blasphemy. I settled on Korilla and Tropical Moon of Thetis. I also grabbed some fonts from the web, and used 'drakfont' to add them to the system.



The next thing I wanted to get going was video playing. MPlayer was already available for AMD64, but I'm a sucker for movie trailers, so unfortunately, I would need the ability to play WMV files. The win32-codecs where available from PLF, but not for AMD64. I grabbed the source package (win32-codecs-1.4-2plf.src.rpm), installed it and made the following edits to win32-codecs.spec:

16c16
<
---
> ExclusiveArch: %ix86

After that was done, I did a 'rpm -bb win32-codecs.spec' then installed the resulting '.amd64.rpm'. I was expecting problems running .wmv, but everything I downloaded worked, and I was also able to play .asx streams. I didn't have any luck compiling kmplayer (there is a few hours of my life I'll never get back...).



By this time the onboard soundcard was really starting to get on my nerves. After setting everything (mplayer, xine, etc) to use artsd for output, it worked a little better, but it was stile sluggish when changing songs -- about 1/2 second behind. So I pulled out an SB Live! Value I had lying around and plugged that in. I ran 'alsaconf' as root to configure the modules for the card -- which promptly overwrote my '/etc/modules.conf' (all hail backups). The card sounds much better, and is far more responsive.

/etc/modules.conf

alias eth0 sk98lin
probeall usb-interface usb-uhci ehci-hcd
alias ieee1394-controller ohci1394
probeall scsi_hostadapter sata_promise sata_via ide-scsi
alias /dev/nvidia* nvidia
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 0.9.0 ---
alias char-major-116 snd
alias snd-card-0 snd-emu10k1
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd major=116 cards_limit=1 device_mode=0666
options snd-emu10k1 index=0 dxs_support=2 snd_extin="0x0003" snd_extout="0x1f0f"
# --- END: Generated by ALSACONF, do not edit. ---

I continued to tweak the soundcard, using 'alsamixergui' to enable digital output, center speaker, etc.

The last thing I wanted to get going was kopete, which is a flexible and extendable multiple protocol instant messaging system designed as a plugin-based system -- Came up with that off the top of my head. OK, I didn't, it's what their web page describes it as. In short, kopete is ICQ, AIM, MSN, Jabber, etc all wrapped up into one interface, but at this point it wasn't available as a '.amd64.rpm'. I grabbed the source (kopete-0.7.3-0.92mdk.src.rpm) and tried to rebuild it with 'rpm --rebuild kopete*src.rpm'. It didn't work the first go, so I had to make some changes to the spec

kopete.spec
108a109,110
> --with-qt-libraries=/usr/lib/qt3/lib64 \
> --with-qt-includes=/usr/lib/qt3/include \

After this, it compiled and installed OK, so I copied over my config from my old box and fired it up.



Since I would be using Nefarious as my day-to-day work machine, I copied over necessary parts of my home directory (Mail, Documents, etc) and dropped them into my new home. Everything from bookmarks to Mail to shortcut settings are now exactly the same as my previous box. Slick.

DVD Burner/Player

I initially though I would experience a lot of problems with the DVD devices, but as luck would have it, it is probably the smoothest running device in Nefarious. To start out, I set both the DVD Burner and DVD Player to 'ide-scsi' -- I don't know why this just isn't the default in distributions -- in '/etc/lilo.conf', run '/sbin/lilo' and reboot:

image=/boot/vmlinuz
label="linux"
root=/dev/sda1
initrd=/boot/initrd.img
append="devfs=mount hda=ide-scsi hdb=ide-scsi hdalun=0 acpi=off splash=silent"
vga=788
read-only

Once the system was back up, I installed k3b and k3b-plugins. Although k3b was available as a '.amd64.rpm', k3b-plugins wasn't. I grabbed the source RPM (k3b-0.10.1-2mdk.src.rpm) from MandrakeClub, and it rebuilt without error. I was able to burn CDs and DVDs, burn ISOs and create audio CDs on the fly from ogg files. If I wasn't straight forward enough in the first article - if you haven't tried k3b, get it. Use it. Love it.



Next up was DVD playing. Thankfully, I'm Canadian, so I'm not going to go to jail (yet) for wanting to watch my favourite DVDs while I code. A quick trip to The Penguin Liberation Front had me rebuilding libdvdcss-1.2.8-1plf.src.rpm for Nefarious. Now the search was on for a decent DVD player. Although MPlayer is perfect for playing movie files, I figured I'd find something dedicated to DVD playing. I decided to go with Ogle, and was quite pleased. The source file would not rebuild (2 and 1/2 pots of coffee later, I decided that the Ogle source RPM was plotting against me, and decided to get rid of it before it became fully self aware), so I built it from 'plain' source. So in approximately 27secs and a 'ogle /dev/scd1' I was quite happily watching the first season of Angel. Everything worked, from loading the libdvdcss to menu navigation to subtitles.



Lies, damn lies, and Benchmarks

I'm not a serious gamer, overclocker or point-release slave, so benchmarks usually mean very little to me, but it gives me an excuse to use the chart function in OpenOffice, so what the hell. I used a dual AMD Athlon (an Altus 140 from Penguin Computing) my old AMD Athlon 1G as comparisons. All of the boxes are using Mandrake 9.2, with no major optimizations.


AMD Athlon 64 3200+
nefarious
Dual AMD Athlon 2800+
brain
AMD Athlon 1Gig
neo
Linux Version 2.4.22-24mdk
One 2GHz UNKNOWN Processor
1GB RAM
3997.69 Bogomips
120Gig 7200RPM Maxtor SATA
Two 2.13GHz AMD Athlon Processors
Linux Version 2.4.22-24mdkenterprise
1GB RAM
8519.68 Bogomips
36Gig 15000RPM Seagate SCSI
Linux Version 2.4.22-24mdk
One 1.01GHz AMD Athlon Processor
640M RAM
2011.95 Bogomips
40Gig 7200RPM Maxtor ATA-133

The first bench I did was encoding a wav file to ogg, using oggenc from vorbis-tools-1.0-7mdk. I selected The Mercury March, the official march of the Canadian Communications and Electronics Branch. The original file size was 37.89 Meg, with a playing time of 3m 34.0s. It was encoded with no flags, using 'oggenc Mercury_March.wav -o mercury_march.ogg'.



Athon 64 Dual Athlon Athlon 1Gig
Seconds 11.8 15.9 81.6
Rate 18.18 13.52 2.63


The next benchmark used hdparm to test the buffer-cache reads and the buffered disk reads. If you currently use a system with SCSI, you'll be happy with the overall performance of the SATA drives. The test was done with 'hdparm -tT /dev/xxx'.



Athon 64 Dual Athlon Athlon 1Gig
buffer-cache 690 520 156
buffered disk 56.48 71.33 30.62


The last bench I did was a kernel compile. This was not a vanilla kernel compile, but a Mandrake kernel SRPM rebuild. I edit the kernel.spec file of kernel-2.4.22.24mdk-1-1mdk.src.rpm to have it only produce kernel-2.4.24, kernel-source-2.4.24 and kernel-doc-2.4.24. The test was done with 'time rpm -bb kernel.spec'



Athon 64 Dual Athlon Athlon 1Gig
Minutes 30.5 24.25 86


I wanted to do some 3D benchmarks, but I couldn't get anything to run reliably on all three platforms. So to sum up, the AMD 64 performs well against a Dual Athlon, and kicks the living crap out of a 3 year old AMD Athlon 1Gig. But how much stake do you put in benchmarks? If you're me, not much. You can see the full specs and text output of the tests in bench.txt.

Conclusion

Overall, I'm quite satisfied with Nefarious in it current configuration with Mandrake 9.2AMD64. What you can take away from these article, besides knowing what my cat looks like, is that the AMD 64 build will run the majority of the Linux software that is out there without problems, and run it well.

There where a few things I couldn't get running at the moment - games being one of them. Everything out there would appear to be using the Loki installer, and it errors out with 'This installation doesn't support glibc-2.1 on Linux / x86_64'. If anyone knows of a way around this, drop me an email. The other thing I couldn't get to run was the Flash plugin. I didn't expect it to, but I tried, and failed.

Some say the true value of the AMD 64 will not be seen until software is optimized to take advantage of the features of the AMD 64 architecture, but I don't see it that way. The true value in the AMD 64 is, as these articles have show, the benefit of not having to throw everything you know away, and just run the software you where running before. If you are in the market for a new computer, getting a AMD 64 based system is the logical step.

In closing, I'd like to give credit where credit is due:

Screenshots: KSnapshot
Image Editing: Gimp
HTML Editing: Quanta+ and vim
Graphs: OpenOffice.org
Hardware: EGlobalOnline and NCIX (Dual Athlon from Penguin Computing)
Software: Mandrake Linux and the thousands of other Open Source developers out there.

I'd also like to thank my wife for putting up with me. Not just during the writing of this article, but always.
Part 1 :: Part 2 :: Part 3


Last Updated Monday, January 08 2007 @ 12:49 PM CST; 23,964 Hits View Printable Version


Created this page in 0.05 seconds


 Copyright © 2024 Warped Systems
 All trademarks and copyrights on this page are owned by their respective owners.
Subscribe in a reader
J.P. Pasnak
Powered By