Debian Installation Tips

Hints for installing Debian 3.1 (Sarge)

deutschdeutsche Version

pdfdowload printer-friendly PDF file

Hinweise für EtchHinweise für Etch (deutsch)

Hints for EtchHints for Etch (english)

Hinweise für WoodyHinweise für Woody (deutsch)

Hints for WoodyHints for Woody (english)

About this list

This list is a collection of steps I took to solve problems with the installation of Debian, or to change the system according to my wishes. For some problems the solution was far from obvious and I had to look for quite some time to find a way. Some parts are special for my installation, some others (e.g. Euro support) are very general. There are plenty of websites with documentation on Debian, you can find some of them on my links page.

If this list contains errors or if you think that some description is incomplete or incorrect, feel free to write me an email  (andreas.janssen@gmail.com) 

Top

1. Installation kernel

Debian Sarge can be installed using Kernel 2.6 as well as Kernel 2.4. Kernel 2.4 will be chosen by default. However, Kernel 2.6 offers, among other things, included support for ALSA, lm-sensors, extended CPU frequency control for laptops (e.g. powernod/speedstep, also without ACPI) and extended ACPI functions. Furthermore, the hotplug service, if used with Kernel 2.6, is able to load most driver modules for hardware components automatically, not only for hotplug components like USB or PCMCIA devices. The boot screen of the installation system offers you the possibility to get more information about available kernels and other options by pressing F1.

Top

2. Boot parameters

If you are using certain hardware components/combinations, it can happen that the kernel crashes while booting. There is a list of boot parameters that you can use to switch of kernel functions during the installation. Often, these problems are caused by ACPI or APIC support, so if you have problems, try the following parameters:

pci=noacpi
Uses common interrupt routing without ACPI instead of ACPI interrupt routing
acpi=off
Deactivates ACPI (Advanced Configuration and Power Interface) completely. That way, also ACPI power save options are no longer available.
nolapic
Don't use Local APIC (Advanced Programmable Interrupt Controller), even if it is activated according to the BIOS. The local APIC makes it possible to use more than the common 16 interrupts, however the (faulty) support on some systems can cause crashes.
noapic
Switch off APIC

Further information on ACPI and APIC boot parameters can be found in the SuSE Support Database (http://portal.suse.com/sdb/de/2002/09/81_acpi.html) 

Top

3. Installation sources

During the installation, you should include the source security.debian.org additionally to your main installation sources (a DVD in my case). The installation program is able to add these sources on its own so that you won't have to do it manually after the installation. You can change the list later by using apt-setup. After configuring your internet connection, you should also include an official Debian server in your list of sources. Many inofficial installation media, especially DVDs included with magazines, don't include all packages (Sarge will need about 14 CDs or 2 DVDs). By adding a server, you get access to the complete archive, including non-free components that are (partially) not distributed on CDs or DVDs. One of the official servers is ftp.de.debian.org, the lines in the configuration file /etc/apt/sources.list could look like this:

deb http://ftp.de.debian.org/debian sarge main contrib non-free
deb http://security.debian.org sarge/updates main contrib non-free

Top

4. Package selection after the installation

After installing the base system, further packages can be added using dselect, tasksel or aptitude. However, dselect is somewhat complicated, so if you don't yet have an overview over the packages, use aptitude or tasksel. In the beginning, the easiest way is to use tasks, that are groups of packages that together give you a certain functionality. An example is the desktop task which installs X windows, KDE and Gnome. Tasks can be installed using tasksel as well as aptitude.

Top

5. Editors

After the installation, the editors vi (package nvi) and nano are available.

Top

6. Package management

The basic programs for package management apart from dpkg are apt-get and apt-cache. apt-get installs or removes packages, apt-cache searches the package list.

apt-get install <Name>
installs a package
apt-get remove <Name>
removes a package
apt-get --purge remove <Name>
removes a package and its configuration

ATTENTION: If you remove a package using apt-get remove and later delete its configuration files manually, they won't be reinstalled if you reinstall the package. In most cases you probably want to use --purge.

apt-cache search <Term>
searches the package database and shows matching packages. Searches package names as well as package descriptions.
apt-cache show <packagename>
shows detailed information about a package
apt-cache policy <packagename>
shows available versions of a package

Debian packages can of course also be installed manually by using dpkg --install packagename.deb.

Top

7. Exim

Debian Sarge installs exim4 as the default mail transport agent. Unlike in Woody, exim is no longer started through inetd by default, but runs in standalone mode instead. Also, at least if you selected "local delivery only" in the configuration dialog, it wil only listen on the loopback interface and cannot be reached from the outside. You can go back to the configuration dialog anytime by running

dpkg-reconfigure exim4-config

ATTENTION: If you only use exim to deliver local system mails, for example output from cron jobs, exim does not need to run in the background permanently. You can deactivate it and configure it not to be started automatically at boot time, for example using sysv-rc-conf.

Top

8. Runlevels

Debian organizes runlevels differently from all other distributions. The principle is simple: 0, 1(S) and 6 are as usual, but 2,3,4 and 5 are all identical and boot the system normally. There is no special runlevel without network or without X. There are several ways to change the runlevels according to your wishes. The program update-rc.d from the base system is not to be recommended, because it is supposed to allow packages to create or remove links during installation/deinstallation. If you remove the links using update-rc.d, they will be automatically recreated once the package is updated. Instead, you should install and use programs like sysv-rc-conf oder sysvconfig.

Top

9. Basic packages

Some of the packages that I added directly after installing the base system were gzip, zip, unzip, bzip2, rar and unrar. I installed less as a replacement for the more pager and traceroute. If your computer does not run 24/7, you should install anacron. It makes sure that cron jobs are executed that were scheduled for when the system was switched off.

Top

10. Documentation

The most important documentation packages are doc-linux-text and doc-linux-html. They contain the HowTos of the Linux Documentation Projects (http://www.tldp.org/) . Apart from that, every package has its own documentation in /usr/share/doc/<PACKAGENAME>. If you encounter problems with a package, this is where you should look for help first, especially the README.Debian or README.Debian.gz file that some packages have.

There is a list of other interesting documentation packages, including:

debian-reference
The Debian Reference contains important information on how Debian works and how to manage system administration tasks the Debian was.
apt-dpkg-ref
The Apt-DPKG-Reference gives you a short overview over the basic programs of the package management system.
debian-installer-manual
The Debian installation manual
rutebook
A detailed manual for administration of Linux systems. This package is included in the non-free section of Debian.
harden-doc
Includes the Securing Debian Manual.

This is only a short overview of some selected packages, you can find more in aptitude under "Not Installed Packages/doc".

To get control over the manuals installed to many different locations, you should install the dhelp and doc-base packages. dhelp generates an overview of available documentation that can be searched conveniently using a web browser. Contrary to systems like dwww this works without installing a web server. You can find the generated overview under file:/usr/share/doc/HTML/index.html.

Top

11. User groups

Debian follows a strict principle of security which grants normal users only little privileges by defailt. To do certain things they must be in the respecting group. The following groups are the most important ones:

If you install Sarge instead of Woody, users created during the installation will be in the most important groups automaticalls, except for dip. Running

adduser username dip

solves the problem.

ATTENTION: User permissions of the cdrom group only affect devices that are accessed through IDE-SCSI emulation (and real SCSI CD-ROMs). All IDE device files belong to the disk group. Because IDE-SCSI emulation is supposed to be deprecated in Kernel 2.6 you should change the group of the ide device files for CD-ROMs and writers (_not_ the hard disks) from disk to cdrom. If for example /dev/hdc is the writer, that would look like this:

chgrp cdrom /dev/hdc

ATTENTION: If you installed Sarge using Kernel 2.6, you are probably running the udev daemon that will take care of this automatically. Use

ps aux | grep udev

to check if udev is active.

You can find more information on CD writing unter Tip 22.

It is _not_ a good idea to add users to the disk group to solve CD writing permission problems. This allows direct read/write access to all IDE and SCSI disks, their boot sectors and partitions. All file-system level security functions like user and group permissions will become useless. It is not necessary to be in any special groups in order to mount CDROMs, because the mount programs will always run with root permissions.

Top

12. PPP Configuration

You can use the pppconfig program to configure a modem connection. After finishing the configuration, you can use the pon and poff commands to connect and disconnect. If you want to be able to use ifup and ifdown as well, you need to make an entry for your connection in /etc/network/interfaces. For a normal dialup connection it looks like this:

# PPP interface
iface ppp0 inet ppp
provider <name of the connection used in pppconfig>


ATTENTION: Only for T-Online users: the T-Online user name contains the # character. If you enter the username in pppconfig, the part after that character will be regarded as a comment and ignored. To solve the problem, enter a backslash first (\#). That way connecting will work.

Top

13. X11

In order to install XFree86, you can simply select some meta packages via apt-get that depend on all important components. x-window-system and x-window-system-core are available. These packages do not contain any programs, but only dependencies. The package x-window-system depends on x-window-system-core and some other packages. x-window-system installs a complete X environment, including the terminal emulator xterm, the login manager xdm, X font server xfs and the window manager twm. Especially users of KDE or Gnome should perhaps only install x-window-system-core and then use the respecting alternatives of their desktop environment, e.g. the login manager kdm od gdm.

Top

14. X Configuration

Apart from configuring the X server using the tools xf86cfg and xf86config which are included with XFree, you can also configure the X server using debconf. During the installation Debconf asks several questions, for example the type of the graphic card and the freuencies of the monitor. You can rerun this dialog later using

dpkg-reconfigure xserver-xfree86

ATTENTION: If you changed the configuration file yourself, debconf won't touch it anymore. Later changes through debconf will have no effect because debconf saves the changes in its internal database, but doesn't recreate the configuration file. In this case you can manually call dexconf, which will generate a new confguration file from the debconf database.

ATTENTION: By default, you are offered to use the kernel framebuffer. Apparently I am not the only user for whom this setting doesn't work. If the X server doesn't run right away, maybe it is because of this setting.

ATTENTION: The file dpkg-reconfigure creates is called XF86Config-4. Other configuration programs create XF86Config. The X server (version 4) first tries to load XF86Config. Only if this file does not exist it will try to read XF86Config-4. Maybe you need to remove XF86Config manually if you used some other configuration program before running dpkg-reconfigure.

Top

15. TrueType fonts in X

If you use Sarge, it is relatively easy to use TrueType fonts, for example from the packages ttf-bitstream-vera, ttf-freefont or msttcorefonts in X. These fonts can now be administrated through defoma, the Debian Font Manager. All you need to do is to install the package x-ttcidfont-conf:

apt-get install x-ttcidfont-conf

Afterwards you add a line for the TrueType directory to the Files section of the X configuration file /etc/X11/XF86Config-4, preferrably directly above all other FontPath entries:

FontPath  "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

Top

16. Installing your own TrueType fonts

In Debian, fonts can be managed by defoma, the Debian Font Manager. It registers the Fonts to applications which tell defoma how to do this using a plugin. Examples are gs, fontconfig and also x-ttcidfont-conf which in turn makes the fonts available to X (see Tip 15). The advantage is that is sufficient to register the fonts to defoma, which will take care of the rest of the configuration. Here is a short walkthrough on how to do it:

First you copy all your TrueType fonts to a suitable directory, for example /usr/local/share/fonts/truetype. Next you create a so called hints file for defoma which contains informations about the fonts. You do this using the defoma-hints program. Make sure that the libft-perl package is installed. After that you can create the hints file:

defoma-hints -c --no-question truetype \
/usr/local/share/fonts/truetype/* \
> /etc/defoma/hints/ownfonts.hints


Now you register this file to defoma:

defoma-font register-all /etc/defoma/hints/ownfonts.hints

The last thing you have to do is to apply the new configuration. The quickest way is to call

defoma-reconfigure

It updates the fonts database for all registered applications. To use the new fonts in your current X session, run

xset fp rehash

Top

17. KDE

Sarge includes, apart from Gnome, Xfce4, WindowMaker and many other window managers, also the desktop environment KDE 3.3. The easiest way to install KDE is to select the kde meta package. It depends on the group packages like kdebase, kdenetwork and kdegames that you maybe know from other distributions. Contrary to other distributions, these group packages are not monolithic, but are also only meta packages that depend on the applications like Konqueror, Kmail and Knode. That way you can easily install KDE, but if you want you include certain applications in your installation and exclude others.

ATTENTION: If you installed xdm and now want to use kdm instead, you can run

dpkg-reconfigure kdm or
dpkg-reconfigure xdm to choose which login manager will be used. If you prefer kdm, you can remove xdm. You should use --purge to remove the start scripts as well:

apt-get --purge remove xdm

If you want german language support, install kde-i18n-de.

Top

18. Printing with Cups

I use the Cups printing system. After installation, it can be configured easily using the web interface. You should install the following packages:

Owners of HP printers should install the following packages instead of cupsys-driver-gimpprint:

After Cups has been started, you can reach the configuration program using a browser under the address http://localhost:631.

ATTENTION: When installing cupsys-bsd, debconf asks if you want to start the BSD compatibility server. In most cases this is not necessary. This server is only needed if the printer is supposed to appear like a LPD printer in your network. If the printer is not used over the network, or if you use Cups or Samba (Windows shares) in your network, you do not need to activate the server. Locally installed applications can use the printer like a LPD device without the server running.

Top

19. Security and Cups

Using the default settings, Cups is listening on all network interfaces. If you only use your printer locally on the computer it is directly connected to, or if the printer is exported over the network using some other system like Samba, you can reconfigure Cups not to listen on all interfaces. To do this, edit the file /etc/cups/cupsd.conf and search Listen. Below a comment, you will find the line Port 631. Replace it by

Listen 127.0.0.1:631

Next, restart Cups. netstat -l should now display localhost:ipp in the Cups line.

Top

20. Package lists

Apart from the normal installation sources, I added the following to my /etc/apt/sources.list:

# official servers
deb ftp://ftp.de.debian.org/debian sarge main contrib non-free
deb ftp://security.debian.org/debian-security sarge/updates main contrib non-free

# multimedia
deb http://www.debian-multimedia.org sarge main

From the apt repository at debian-multimedia.org you can get some multimedia packages which are not included in Debian because of legal questions or license issues. This includes the mp3 encoder lame, Acrobat Reader 7 (packages acroread and mozilla-acroread), flashplayer-mozilla and mplayer.

Apart from that there are many more sources for packages that are not at all included in Debian or only available in older versions. You can find these sources for Sarge in the Unofficial APT repositories  (http://www.apt-get.org) .

Top

21. Mount points

Contrary to Woody, but according to recent versions of the Linux Filesystem Hierarchy Standard (FHS)  (http://www.pathname.com/fhs/) , mount points for removable media are no longer created in the root directory, but in the /media directory. You can of course change the mount points manually. If you however change the moint point for your installation medium, apt will be confused. You can set the standard mount point for apt by creating the file /etc/apt/apt.conf and making the following entry:

Acquire::cdrom::mount "/media/cdrom";

Top

22. CD writing

Most users own an IDE cd writer. If you use kernel 2.6, you won't need the ide-scsi emulation anymore like for kernel 2.4. Instead you can use the normal ide-cd driver. By default, only members of the cdrom group are allowed to access the device files. If you use IDE devices, you need to change the permissions, because IDE device files belong to the disk group by default. I described how to to that in Tip 11.

There are several programs for CD writing available in Debian, for example cdrecord and cdrdao for the commandline and k3b and xcdroast for X. k3b is a KDE program which is easy to use and offers a lot of functions.

ATTENTION: The k3b setup assistant suggests that you change the permissions for your cd writing programs and device files and to create a group cdwriter. This is _not_ necessary.

Top

23. Web browser

Debian Sarge includes several web browsers, for example Mozilla, Mozilla Firefox and the KDE browser Konqueror. If you only want to use the Mozilla browser, but not the mail and news client, you can install mozilla-browser and mozilla-psm instead of the mozilla package.

Top

24. Language settings

To get system-wide german-language support, install the locales and localeconf packages. By running

dpkg-reconfigure locales

you can select the desired locales and have them generated. By installing localeconf you can conveniently configure exceptions for each setting. You can for example configure locales to use de_DE@euro as your system-wide standard, but set LC_COLLATE to C to prevent side-effects like a changed order in the sort program.

Top

25. The Euro

To get Euro support you need to install some packages:

You need to select a matching font for the console. You can do that by using fonty. In the configuration dialog (which you can later rerun by executing dpkg-reconfigure fonty) you select ISO15, next restart console-tools.

In X everything should be configured correctly, but perhaps you need to select fonts with the Euro symbol in your applications. The Bitstream Vera fonts fall into this category and also look quite nice.

Top

26. Driver modules

Driver modules that are supposed to be loaded on every system boot can be added to /etc/modules. However, if you use kernel 2.6 and the hotplug agent, modules for most of your hardware should be loaded automatically. The psmouse module which you need for mice with an PS/2 connector is an exception. You should add it to /etc/modules because otherwise applications like X won't be able to find your mouse.

Top

27. Options for drivers

With the introduction of kernel 2.6, the format for driver options changed. They used to be stored in /etc/modutils, and the update-modules program generated the file /etc/modules.conf from it. This still works for kernel 2.4, but for kernel 2.6 you need to make your changes directly in /etc/modprobe.d. The file /etc/modprobe.conf is not necessary and can even cause problems, because when it exists the contents of /etc/modprobe.conf will be ignored. You can learn more about the new format, options and commands that are run when modules are loaded by reading the modprobe.conf man page.

Top

28. Bash completion

For some time Bash has been supporting programmable completion. Instead of only completing file and directory names using the tabulator key, completion will also work for options and parameters of certain programs. For example you can autocomplete package names for apt-get or host names for ssh (if these are listed in ~/.ssh/known_hosts). Debian Sarge already includes bash completion, but you need to activate it. To do that open your ~/.bashrc and remove the comment characters from these lines:

#if [ -f /etc/bash_completion ]; then
#  . /etc/bash_completion
#fi


To have these functions available in login shells as well, open your ~/.bash_profile and remove the comment characters in front of these lines:

#if [ -f ~/.bashrc ]; then
#    source ~/.bashrc
#fi


The settings will become active the next time you log in.

Top

29. Compiling drivers

In order to compile drivers that are not part of the Debian kernel, you don't necessarily need to install the complete kernel sources. Usually it is sufficient to install the headers:

apt-get install kernel-headers-$(uname -r)

should install the headers package matching your current kernel. Apart from that you should also install kernel-package and build-essential. A complete description would be too long, but there is an explanation available in the newbiedoc package. You can also use the module-assistant package which helps you to install all dependencies necessary for compiling driver modules.

Top

30. Orphaned packages

Debian includes programs that can search for packages which no other package does depend on. deborphan is one of them, it will search the libs and oldlibs sections by default. It can however also search the complete package list. debfoster includes more functions, it can remember packages that are not needey anymore according to the package management, but that you want to keey anyway. aptitude can remember which packages were installed automatically due to dependencies, and remove them as well.

Top

31. Java

Packages with the Java runtime environment and the Java developement kit have recently been included in Debian Testing and Unstable. The packages are called sun-java5-jre and sun-java5-jdk. Packages for Debian Stable are available from www.backports.org.

Top

32. Grub and the framebuffer

Kernel 2.4 and 2.6 allow you to use text consoles at high resolutions. There are several framebuffer drivers for different graphic cards, and also the VESA framebuffer driver (vesafb), which should work will all modern cards. To use it you pass a parameter to the kernel that sets the desired resolution and color depth. It you use Grub, add the vga option to the kernel line in /boot/grub/menu.lst:

title Debian GNU/Linux, kernel 2.6.9-custom
root (hd0,5)
kernel /vmlinuz-2.6.9-custom root=/dev/hda7 ro quiet vga=0x317
savedefault
boot


The setting vga=0x317 will configure your console to use a resolution of 1024x768 and 16 bits color depth. You can find more information on available modes in the Framebuffer HOWTO which is included in the doc-linux-text and doc-linux-html packages.

ATTENTION: If your kernel entries were created automatically, all options that you added manually will be overwritten when you run the update-grub program. There is a way to have your settings added to automatically created entries by changing the kopt line in your /boot/grub/menu.lst:

# kopt=root=/dev/hda7 ro
is changed to
# kopt=root=/dev/hda7 ro quiet 0x317

After saving the file, run update-grub to apply your changes.

Top

33. Multimedia keyboards

Many keyboards, for desktop PCs as well as for laptops, have attitional keys, for example to control the sound volume or to start certain programs like web browsers. Debian includes several programs to configure these additional keys. I use hotkeys. It is quite small, includes standard configuration files for common keyboard models like Logitech's itouch series, allows you to connect the keys to any commands you like and offers an onscreen display. All you need to do is to start the program after you logged into X, like this:

hotkeys -Z -t itouch

How you can automatically start it depends on the window manager/desktop environment you use. If you use KDE it is sufficient to copy an executable script that contains the program call to ~/.kde/Autostart

The option are explained in the manual. To find out which key produces which keycode you can use the xev program. You can find more information on multimedia keyboards on the Homepage of Malte J. Wetzhttp://www.mathematik.uni-marburg.de/~wetzmj/index.php?viewPage= mmkey.html

Top

34. DMA mode for hard disks and CDROMs

If you use recent Debian kernels, the DMA mode should be activated automatically. You can however also activate it  - as well as other settings -  manually by using hdparm. Unlike Woody, hdparm in Sarge includes its own configuration file in which you can configure your settings. The file is calles /etc/hdparm.conf. Here is an example for my hard disk (hda) and my CD writer (hdc):

/dev/hda {
    quiet
    lookahead = on
    mult_sect_io = 16
    io32_support = 3
    dma = on
    interrupt_unmask = on
    keep_settings_over_reset = on
}

/dev/hdc {
    quiet
    io32_support = 3
    dma = on
    interrupt_unmask = on
    keep_settings_over_reset = on
}


ATTENTION: Bevor you change settings using haparm, read the manual. Some options, especially interrupt_unmask, can cause data loss if your hardware does not support them. The keep_setting_over_reset option should _only_ be used if all other settings have proven to work, because the system won't be able to switch back to safe settings if you used this option.

Top

35. Log console

It is possible to display the syslog contents on a virtual console. That way you can always quickly take a look at your log without having to open the log file yourself. There are several ways to configure a log console. You can configure your syslog daemon to directly display messages on a virtual console, or run a pager like less. The latter has the advantages of allowing you to scroll and search the log directly. Debian includes the console-log package which will automativally configure two log consoles, with the exim log in console 8 and the syslog on console 9. You can change these settings in the configuration file /etc/console-log.conf.

Top

36. Sound with ALSA

Debian includes kernel 2.6, which unlike kernel 2.4 does not only include the old OSS sound drivers, but also ALSA. To activate sound you need to take some steps. First, install the following packages:

On most systems the hotplug service should load the necessary drivers automativally. If it doesn't, you can run the alsaconf program which will look for sound cards and add the proper modules to /etc/modprobe.d/sound. After that you need to add your user account to the audio group to be allowed to access the sound devices:

adduser andreas audio

Next you can use alsamixer or some other mixer software to configure the sound volume. That should be all. However there are some common problems that I will adress here:

I. Modues are not being loaded, or settings from /etc/modprobe.d are not applied

The alsaconf program looks for sound cards and creates matching entries in /etc/modprobe.d/sound. With these entries, the modules can be automatically loaded when the sound card is accessed the first time after booting, even without hotplug or discover1. However, sometimes alsaconf creates an empty /etc/modprobe.conf. If this file exists, all information from /etc/modprobe.d will be ignored. You can safely remove /etc/modprobe.conf, all entries will be read directly from /etc/modprobe.d.

II. ALSA does not work because hotplug loads OSS first, then ALSA

Until some time ago, hotplug loaded the OSS drivers first, then ALSA. Because of that ALSA could not access the sound card because OSS was blocking it. Recent versions of the alsa-base package (1.0.4-2 or newer) solve the problem by telling hotplug not to load OSS at all.

III. ALSA does not work because discover1 loads the OSS drivers before hotplug can load ALSA

The Debian Sarge base system includes discover1, a system for hardware autodetection. In automatically load the OSS drivers. This is good for users of kernel 2.4 without ALSA, but for users of kernel 2.6 it prevents sound from working. The problem is solved in alsa-base 1.0.6a-4 or newer. It tells discover1 not to load the OSS drivers. This will however only work if discover1 1.7.2 or newer is installed.

IV. After logging into KDE, the volume settings are wrong

After booting, the sound card is muted. The ALSA init script restores the volume stored when the computer was shut down it it was configured that way (dpkg-reconfigure alsa-base). After configuring the sound card, you can change the volume using alsamixer and then run /etc/init.d/alsa stop to save the settings immediately. KDE also restores the volume when you login, but it will restore the volume stored in the KDE settings. You should configure the volume in KDE using alsamixer or kmix and then save the settings in KDE or configure KDE not to change the volume settings automatically anymore. You can find both settings in the KDE control center under Sound & Multimedia => Mixer.

V. Sound is played on the wrong device, or not at all

If you have several sound devices (several sound cards, but also one sound card and one TV card), it can happen that the wrong device is used as the default output device. If the TV card is selected as the default device, this usually means that no output is possible at all. The command cat /proc/asound/cards lists for which cards ALSA drivers are loaded:

andreas@sirius:~$ cat /proc/asound/cards
0 [Live ]: EMU10K1 - Sound Blaster Live!
Sound Blaster Live! (rev.8) at 0xe400, irq 18
1 [Bt878 ]: Bt87x - Brooktree Bt878
Brooktree Bt878 at 0xdddff000, irq 19


There are several ways to change the default device system-wide:

The sequence in which the drivers are loaded is changed

If there are no other settings, ALSA will select the first device as default for which a driver is loaded. By adding the module for the desired default device to the top of /etc/modules you can make sure that this device is selected as default.

The default device is configured in the ALSA configuration file

You can create a system-wide ALSA configuration file /etc/asound.conf and configure the default devices there:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}


You can find more information on asound.conf in the Documentation of the ALSA project (http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php ?module=Generic) .

The index of the sound devices is configured using driver options

You can tell all ALSA drivers which index the device should have. The device with index 0 will be the default device. If you use kernel 2.6 you can make these changes in /etc/modprobe.d/sound, if you use kernel 2.4 you can make them in /etc/modutils/sound. If you use kernel 2.4 you also need to run update-modules. Here is an example:

options snd-emu10k1 index=0
options snd-bt87x index=1

Top

37. Nvidia driver

Sarge includes the closed-source graphic card driver from Nvidia. It is necessary for hardware 3D acceleration. Sadly this is not possible using the open-source nv driver that comes with XFree86. To install the driver you need to follow these steps:

1. Add non-free to your /etc/apt/sources.list
Because the Nvidia driver is not free software, it cannot be distributed in the Debian main archive. It is distributed in an archive for non-free software. To access it you need to change your package lists. Here is an example:

deb ftp://ftp.de.debian.org/debian sarge main

For all listed Debian servers (including security.debian.org) you need to change main to main contrib non-free

2. Update package lists
After changing /etc/apt/sources.list you need to run apt-get update to download the new package lists. After that you will be able to install the necessary packages.

3. Installing packages needed to compile the nvidia driver
There aren't prebuild nvidia module packages available for all Debian kernels. You can however easily build your own package and install it. For this you need to install module-assistant, build-essential and nvidia-kernel-source:

apt-get install module-assistant build-essential nvidia-kernel-source

4. Run module-assistant
Now module-assistant can prepare your system and compile and install the driver:

module-assistant update
module-assistant prepare
module-assistant auto-install nvidia-kernel-source

5. Install nvidia-glx
Additionally you need to nvidia-glx package that includes the Nvidia GLX libraries:

apt-get install nvidia-glx

6. Reconfigure XFree
At last you need to reconfigure XFree to use the nvidia driver instead of the nv driver (see Tip 14). When asked for the driver for your card, select nvidia instead of nv, and also deactivate the dri and glcore modules in the module configuration. The glx module needs to be activated. After restarting XFree it should be using the nvidia driver. You can check 3D acceleration by running programs like tuxracer or glxgears.

ATTENTION: After updating the nvidia-kernel-source package or changing to a new kernel version, you need to recompile the nvidia kernel driver (see 4).

Top

last updated: 2009-11-17, 14:14:44
http://www.andreasjanssen.de - andreas.janssen@gmail.com
Valid XHTML
 1.1! Valid CSS!