Slackware

Playing Need for Speed III with Wine

Posted August 29th, 2008 by Maarten

I recently found out that it isn't too difficult getting my favourite racing game, Need for Speed III, to run with Wine.

My current installation is Slackware Linux 12.1 with Wine 1.0 from SlackBuilds.org. My system supports 3D acceleration, so I compiled Wine with OpenGL support (as is the default in the SlackBuild script).

  1. Execute winecfg and set the Windows version to 98. Add your CD-ROM mountpoint to the list of drives in Wine. I used drive letter D.
  2. Mount the Need for Speed CD-ROM or image.
  3. Execute /SETUP/ENGLISH/SETUP.EXE, or choose Spanish if you prefer. Click through the setup options as you would normally. I chose the "full installation" option. There should be no errors during the copying of the files to your hard disk, if there is, try to copy the files manually. There may be an error like Could not get 'HardWareKey' value at the end of the installation, which can be ignored. At this point the game can be run by executing WINEDEBUG=+relay wine nfs3.exe -d3d0 from the directory to which the game was installed. This way the game will also use 3D acceleration, limited to a display size of 800x600. Note: executing wine nfs3.exe will result in the game complaining about corrupted files.
  4. To get the game to use a display size of up to 1152x864, the file d3da.dll needs to be patched and renamed to voodoo2a.dll as is explained by Robert Schuster in the Wine AppDB. This will only work if you have the exact same version of the file. I've attached the full file at the bottom of this page to save you some trouble.
  5. Now the game can be started using WINEDEBUG=+relay wine nfs3.exe -voodoo2. At this point I was able to play the game without major trouble, though it does tend to get stuck after finishing a race sometimes.

Installing Slackware Linux on a Sony Vaio TZ21MN

Posted August 21st, 2008 by Maarten

Since I needed to have my Vaio prepped for use fast, I first installed Kubuntu on it, with which it functioned reasonably well. Now that I have had some more time to figure things out I equipped it with my favourite Linux distribution, Slackware (version 12.1). Because of the choices I make for the installation, the software selections and versions are quite specific. Therefore I will write this guide step by step. In case you want to use other versions of the software (kernel version for instance), you can still use this guide as a reference.


My Sony Vaio.


Basic installation

I kept one 100 megabyte NTFS partition at the start of the hard disk for use of the Instant On software. Read more about this in the Kubuntu guide. The second partition is a Linux swap partition, not specifically because I need swap memory, but for use during the machine's hibernation. I used cfdisk to create a partition of approximately 1050 megabytes for it to be very slightly larger than the total of present memory. Double it if you have 2048 megabytes of RAM. Next I created a system partition of about eight gigabytes of space, and the rest, more than 90 gigabytes, I used to create the /home partition. I installed almost all software including KDE and its translations, since this is my favourite graphical desktop.
Back to contents


Audio

To be able to configure audio and mount storage devices as a regular user, add your user account to the groups audio, plugdev and cdrom. The latter two have nothing to do with audio, but will enable you to use removable media properly. You need to log out and in again to apply the changes. A very convenient way to do this is by using kuser. Start kmix or alsamixer to lower your notebook's volume settings, because the KDE startup sound can be quite loud. Execute alsactl store as root to store the mixer settings.

Edit /etc/modprobe.d/sound as root and append options snd-hda-intel model=hippo. An easy way of editing configuration files in Slackware in a terminal is by using jed, but beware of the backup files it creates. By adding this line to this file which loads your sound module, the correct or at least properly working sound card model will be selected. It will prevent you from having to plug in and out headphones to enable sound from the speakers, as is the case with the default configuration. After having made this change you could reset your mixer settings and you will have to execute alsactl store again to save them. Remove the /etc/asound.state file if you get any errors about non existing mixer settings during startup.
Back to contents


ACPI

Branded Slackware.To enable support for hibernation and CPU frequency scaling (lowering the processor clock rate to save power) you will have to compile a new kernel. I have included a kernel configuration file for the default Slackware 12.1 kernel in case you want to see which options need to be enabled. In it I have selected the correct processor and CPU frequency settings, but have not yet enabled support for hibernation, because you should enter your default resume partition. On all accounts be sure to enable the "ACPI Processor P-States driver" option to enable frequency scaling.

Hibernate
Once your modified kernel is running you will be able to activate hibernation by executing echo disk > /sys/power/state as root. Chmod this file 646 (possibly automatically at boot time) to do the same as a regular user. I added an entry to the KDE menu and bound it to a key combination to enable hibernation by pressing certain keys. The shell script below which is then executed works well for me. The sleep intervals are needed to prevent the notebook from entering sleep mode right after having woken up. The dcop command starts the KDE screensaver right before the notebook starts saving its memory to disk, so after starting up again it will be password protected. After having stored the memory on the swap partition and having shut down in about 30 seconds, the machine can revert to a fully operational state again in about 45 seconds.


#!/bin/sh
if [ ! -e ~/.sleepenabled ]; then
touch ~/.sleepenabled
dcop kdesktop KScreensaverIface lock
sleep 2
echo disk > /sys/power/state
sleep 2
rm ~/.sleepenabled
fi

Back to contents


Wireless network

Because I have a negative experience using the iwlwifi drivers (non-working WPA support at school), I installed the ipw3945 drivers, which in turn require a kernel version earlier than the 2.6.24 kernel (I am currently using 2.6.23.17). Installing this driver requires following these steps:

  • Compile and install the ieee80211 subsystem. I used the default options (aka pressing the enter key a couple of times).
  • Compile and install the IPW driver. I had to use the IEEE80211_IGNORE_DUPLICATE=y option to make it compile, probably because I installed ieee80211 manually.
  • Copy the regulatory daemon to /sbin.
  • Make /etc/rc.d/rc.M execute /sbin/ipw3945d by adding a line near the network initialisation (the starting of rc.inet1). This way the daemon will be started at boot.
  • Copy the microcode to /lib/firmware.

Back to contents


Video and Compiz

Edit the /etc/X11/xorg.conf file and add the video mode 1366x768 to set the proper resolution. Change the Driver setting in the videocard aka Device section from vesa to intel for proper acceleration.

The core Compiz package is already installed by default. I recommend installing additions and Compiz Fusion from SlackBuilds.org. To start Compiz when starting KDE, create a shell script containing the following, make it executable and place it in ~/.kde/env (create that directory if necessary):


#!/bin/sh
KDEWM=$HOME/.kde/startcompiz.sh
export KDEWM

The startcompiz.sh file contains the following:

#!/bin/sh
LIBGL_ALWAYS_INDIRECT=true compiz --replace --indirect-rendering ccp

You may not need the parts about indirect rendering, but Compiz wouldn't run without that on my notebook. Be sure to start kde-window-decorator somehow to have window decorations. It's convenient to start the programs you need to have started and save your KDE session (see KDE session management in kcontrol, KDE components, session manager).
Back to contents


Touchpad

To get the touchpad to scroll by using the right side of the pad, installation of the synaptics touchpad driver is needed. There also needs to be some special configuration in xorg.conf to make the pad work properly. Below are mine, I set my touchpad sensitivity reasonably high so I won't have to move my fingers a lot.


Section "InputDevice"
Identifier "Touchpad"
Driver "synaptics"
Option "Protocol" "auto-dev"
Option "Device" "/dev/psaux"
Option "SHMConfig" "true"
Option "MaxSpeed" "1"
Option "MinSpeed" "0.6"
Option "AccelFactor" "0.05"
Option "LeftEdge" "100"
Option "RightEdge" "900"
Option "TopEdge" "76"
Option "BottomEdge" "680"
Option "MaxTapTime" "180"
EndSection

Back to contents


Webcam

The R5u870 webcam driver seems to work quite well at this point. Simply compiling and installing it as root will do the trick.
Back to contents

Installing Slackware Linux on a Shuttle XPC

Posted August 16th, 2008 by Maarten

Shuttle XPC containing Slackware Linux

It shouldn't be necessary to write an installation guide for a Shuttle XPC since they are made to support Linux kernels. I got a SN68PTG5 (Glamor Series) model, which comes with an AMD processor and an NVidia card (GeForce 7050 PV / NVIDIA nForce 630a which has HDMI/DVI output), a SATA disk drive and plenty of memory. I'm writing this down here anyway to inform anyone who might be interested in buying it, that it works fine with Linux. I installed Slackware Linux 12.1 and a recompiled version of the default 2.6.24.5 kernel on it. I used the proprietary NVidia drivers, version 173.14.12.

At first I gave KDE 4.1 (Slackware packages by Robby Workman) a go. It looked really pretty, had some interesting new functionality, but I decided to skip it for now because a number of my favourite packages of KDE programs weren't available for KDE 4 yet. There were also a number of strange bugs, such as empty message dialogues (blame may lie with one of the following: the Slackware packages, the NVidia drivers or this KDE 4 release). I had hoped to use the new 3D effect enriched KDE 4 desktop, which worked for the most part. But as is known, some of the NVidia cards don't work well with KDE 4 at the moment. Other XPC models which contain Intel graphics cards probably function properly, since their drivers are released licensed as open source. The only thing I noticed was some occasional flickering of certain bars (those of minimised windows in the taskbar or WM buttons on the top-right corner of windows), but this was another factor which made me go with an alternative for now.

My alternative was the default KDE 3.5.9 release which comes with Slackware 12.1, enhanced with Compiz Fusion, which at the moment still outdoes KDE 4's 3D effects greatly. View a short demo below (flickering is only present in the recording).

Please Download Flash player to view this video.

Installing Slackware Linux on a Toshiba Satellite Pro 490CDT

Posted August 13th, 2007 by Maarten

Installing Slackware Linux 10.2 on this laptop is quite easy. In theory you should get most of it working without fiddling to much with things after the installation.


Red flower in XFCE.


Partitioning

Partitioning can be done very easily using cfdisk from the bootable cd. I created a swap partition of 64M and a system partition with the ext3 filesystem, that one took up the rest of the hard disk. I did this because Slackware needs around 3 gigabyte, so creating a separate home partition of one gigabyte could cause a shortage on the root partition.
After the installation I installed all the 2.6.13 kernel packages and the makeinitrd package. Then I followed the instructions to add the jbd and ext3 modules to an initial ramdisk file after which I added the new kernel to the lilo.conf file. Don't forget to chmod a+x the rc.udev file in the /etc/rc.d directory. The same procedure goes for a ReiserFS filesystem. If you are going to compile your own kernel, don't bother with all this and just enable these modules.


Video

X.Org works without problems using the VESA driver. If you would like to check out the X.Org configuration file you can find it on the bottom of this page. My laptop doesn't have enough memory to run KDE or GNOME, but Slackware lets you choose a from a whole range of window managers that require a lot less machine than the two major desktop environments. I've tried XFCE, Fluxbox and Window Maker, which I all consider to be great solutions. If you want to change your window manager at any time, just use xwmconfig. XFCE can be seen here in all the screen shots and pictures, it runs a bit slow at times but it looks very good. If you'd rather go for performance, try Blackbox or Fluxbox.
Back to contents


Sound

My laptop has a sound card which uses the Yamaha OPL-SAx chipset. Slackware has included the alsaconf tool to have the configuration done automatically. Deselect all sound cards other than Yamaha OPL-SAx to make alsaconf find it faster. PCI cards won't be found because this is an ISA card. Finding the right sound card settings can be done by alsaconf without using the probe on all ports option. If you are trying to install Red Hat you might want to try sndconfig which I remember worked fine when I installed that distribution.
Back to contents


USB

My USB stick as well as a USB mouse work fine with the 2.6.13 kernel. If you're new to Linux, here's how to mount a USB stick:
mount -t vfat /dev/sda1 /mnt/usb
Assuming it has a FAT32 filesystem. Note that in /dev/sdXX the letter and number for your device may vary. Check the /dev directory to see the available devices. The directory where you mount your USB stick has to exist before you mount it.
Back to contents