Table of Contents ================= 1. Frequently asked questions 2. Fundamentals 1. Conventions 2. Using the shell - The command line interface 3. Becoming root (the system administrator) 4. Man pages 3. Hardware setup 1. The X Window graphical system fails to start 2. I can't connect to the network 4. Boot process 1. At boot no splash image appears and the boot loader looks crappy 5. System architecture 1. Kernel 2. Getting to Know JACK 1. QJackCtl 2. Setup - the qjackctl settings tab 3. ALSA and 'permissions' 4. MIDI 5. Xruns - Overruns 1. Interrupts 2. Hard drive speed is too slow 3. Too many processes running 4. Further Reading 6. 6. Minimum System Requirements 7. There's Just One Other Thing ... 8. Upgrading existing installations 9. Package Updates 10. And beyond ... 1. After Installation and Configuration -- Using Audio and MIDI Applications 2. Additional Notes Fundamentals Conventions Commands prefaced by a $ are to be entered as a normal user, commands with a # in front of them need to be entered as root. This is your prompt, that means you don't need to type it. Using the shell - The command line interface If you've not used a text interface before (i.e. are new to GNU/Linux) spend a while getting used to it, you're going to need it. A GUI (Graphical User Interface) is great, but nothing beats a command line terminal for speed and flexibility. An introduction to the shell, Linux's command-line interface: * Learn the linux shell - linuxcommand.org * The Linux Terminal - a Beginners' Bash * The Linux Shell, at TuxFiles Becoming root (the system administrator) To get access to root type: $ su This will ask you for root's password and then allow you to execute commands as root. The command: # exit will return you to a normal user. Don't stay logged in as root and pay careful attention to what you are doing (write it down, even), mistakes here are often difficult to resolve, you have been warned! Man pages If you want to know more about any of the commands type: $ man some_command at the prompt. Hardware setup The X Window graphical system fails to start This is probably due to your video card not being properly detected. You may need to google a little bit to find out if your video card is supported and which is the right module (driver) for it. Note also the NVidia cards need proprietary drivers which can be found in the non-free section of Debian software archives. Detailed instructions can be found here. You may also try with the following commands: # dpkg-reconfigure xserver-xfree86 and # xf86config The new 1.2.1 release will be using Xorg, in which case: # dpkg-reconfigure xserver-xorg or # xorgconfig # xorgcfg might be more appropriate. I can't connect to the network The installer should configure the network for you. If for some reason that hasn't happened then you will need to configure the network by hand. If you use dial-up or PPPOE (PPP over Ethernet) or something, use pppconfig or pppoeconf If you use ethernet and DHCP, please become root and run # dpkg-reconfigure etherconf Then follow the instructions, and when asked for a domain name, leave the field empty. If you're on a laptop you may need to configure pcmcia-cs before this will work. As this is a GNU system, there are several different methods you could use for configuration. If you have a preferred method of setting up your network it should also be available and you can always edit /etc/network/interfaces by hand. The information you need to do this is at: # man 5 interfaces You can then bring the network up with: # ifup eth0 or whatever interface you are using instead of eth0. Boot process At boot no splash image appears and the boot loader looks crappy You've probably place /boot in a separate partition of the hard drive, so that the splash image can't be found. Please either move /boot to the root partition (denoted by a single slash: / ), or change the paths in /boot/grub/menu.lst accordingly. System architecture Kernel The latest A/DeMuDi releases use the 2.6 series, with a couple of patches: * Realtime preemption * Realtime Linux Security Modules to get the sources just set the proper entry in your /etc/apt/sources.list and type apt-get source kernel-image-2.6.12-2-multimedia-386. In particular read the debian/rules makefile to check how the kernel is built. Getting to Know JACK OK, so that's the basic set-up, now you should be hearing some recognisable sound. To check that it's all working properly, it's probably best to go through the exercises in the First steps in Agnula tutorial. QJackCtl Now that you've done that, it's time to have a look at qjackctl, that funny little control panel sitting in the middle of your desktop. Hopefully it's already running. If not, hit the Start button. All being well you'll see the word Started come up in the window with 0 (0) below it. Click on the Connect button and it should show alsa_pcm in both the input and output windows. If so, you're ready to make some music. If you need to alter the way Qjackctl and gkrellm start up look in: # cat /etc/X11/Xsession.d/51demudi. If it's not all gone so smoothly, click on Messages, if you see anything much more complicated than: 20:19:41.579 Client activated. 20:19:41.583 Audio connection change. 20:19:41.617 Audio connection graph change. then you're going to need to do some work to get the best out of this. If you only want to use one application at a time, you may not need to worry about JACK too much right now. However, if you want the full power of a Linux Audio system then it's worth taking the time to figure this out. The Status button also provides some slightly less verbose information. Setup - the qjackctl settings tab The 'Server Path' should be set to jackstart and the 'Driver' to alsa. 'Parameters' - you probably want to check Realtime for most work and Softmode to start with. 'Softmode' means that JACK doesn't quit if you get odd xruns, obviously, you won't want this if you're recording. If you know your machine only works at 16bit resolution check Force 16bit. You'll probably want to leave most settings where they are. If you're operating in realtime, your 'Priority' should usually be 0, but some soundcards differ. 'Frames/Period' worth setting at the maximum to start and then working your way down. This setting affects your latency most directly, setting it too low will result in xruns. 'Sample Rate' probably wants to be 44100 (CD quality) but some soundcards prefer 48000 (DAT quality). 'Periods/Buffer' almost certainly wants to be 2, but again, your soundcard may vary. ;-) 'Interface' - probably should be hw:0 or whatever you specified in your ~/.asoundrc. 'Audio' try 'Playback' only if you're having trouble, mostly you'll want full Duplex. 'Dither' - 'Shaped' is best but CPU hungry, 'Triangular' gives a good compromise, you don't _need_ dithering, so None will do for now. 'Timeout' and 'Start Delay' you might want to consider increasing these in certain situations. OK your new settings Stop if JACK is still running and Start again. You may need to play with the settings a bit to get satisfactory results. ALSA and 'permissions' Check that you have the necessary permissions to use the audio devices. vi (a command-line text editor) is used for some of these examples, but again, your favourite text editor will do fine. Make sure your username is in this file next to the audio entry. It should be, by default, so you shouldn't need to change anything here. $ cat /etc/group If you need to add yourself to the list you can use this command: # useradd -G audio username Next you need to check the permissions of the devices themselves: $ ls -l /dev/dsp* /dev/mixer* /dev/cdrom* This should give you some output that looks like this: lrwxrwxrwx 1 root cdrom 9 2004-08-04 17:47 /dev/cdrom -> /dev/scd0 lrwxrwxrwx 1 root cdrom 8 2004-08-02 22:16 /dev/cdrom1 -> /dev/hdc lrwxrwxrwx 1 root audio 9 2004-08-02 22:34 /dev/dsp -> /dev/dsp0 crw-rw---- 1 root audio 14, 3 2004-08-02 22:34 /dev/dsp0 crw-rw---- 1 root audio 14, 19 2004-08-02 22:34 /dev/dsp1 crw-rw---- 1 root audio 14, 35 2004-08-02 22:34 /dev/dsp2 crw-rw---- 1 root audio 14, 51 2004-08-02 22:34 /dev/dsp3 lrwxrwxrwx 1 root audio 11 2004-08-02 22:34 /dev/mixer -> /dev/mixer0 crw-rw---- 1 root audio 14, 0 2004-08-02 22:34 /dev/mixer0 crw-rw---- 1 root audio 14, 16 2004-08-02 22:34 /dev/mixer1 crw-rw---- 1 root audio 14, 32 2004-08-02 22:34 /dev/mixer2 crw-rw---- 1 root audio 14, 48 2004-08-02 22:34 /dev/mixer3 If it doesn't then you may need to perform these moves: # chgrp audio /dev/dsp* /dev/mixer* # chgrp cdrom /dev/cdrom* In this example /dev/cdrom points to the CD Burner, which is a SCSI device. If these links don't point to where you want, then you can change them like this: # rm /dev/cdrom ln -s /dev/hdc /dev/cdrom check the settings in: # cat /etc/fstab to check that all your devices are mounted where they should be. If you make changes to this file then you'll need to: # mount -a afterwards. In order to get alsa to function properly you may need to edit /etc/alsa/modutils/1.0 and/or /etc/modutils/sound, then: # update-modules You will probably need to restart ALSA before the changes take effect: # /etc/init.d/alsa restart It is also worth making a configuration file in your home directory. $ vi ~/.asoundrc notice that last command is in your home directory (denoted by the shell shorthand tilde) so you don't need to be root--so you shouldn't be ;-). # exit will take you back to the normal prompt. See the ALSA website for further details on what to put in these files. There is a really useful script available at http://alsa.opensrc.org/?aadebug that you can use to check that everything is set up right and to provide some useful info to accompany any further questions. You will need a little knowledge of how BASH scripts work to use this. The script is now included with the distribution. If you look in your menu; Apps > System > Admin has some useful tools such as alsaconf, if your soundcard failed to autoconfigure. You may need to create the file /etc/alsa/modutils/1.0 by hand before this will work. /etc/modutils/alsa-base should be a duplicate of this file. If not copy it across and don't forget to update-modules. You may need to log out and back in before these changes take effect. MIDI In order to enable MIDI, you have to do: # modprobe snd_mpu401 You should then see both midi input and output connections, labeled "MPU_401" in the 'Connect' panel of qjackctl, you can then set your connections to other software. You will have to add the name of this module to the end of the file /etc/modules so it loads every time you restart your system (just add snd_mpu401 at the end). You should also check that the module snd_seq is loaded (check that with $ lsmod in a console). If not you will have to add it to the /etc/modules list too. You may also need to provide an options line in /etc/modutils/sound if the system fails to find the MIDI port on its own. Xruns - Overruns During recording sessions, the Messages panel in Qjackctl may report xruns. Xruns are basically an indications that while Jack is running something gets in the way of it running correctly and it becomes unable to cope with the flow of data causing dropouts in the sound. Let's look at the possibilities: Interrupts If some other card has a higher priority then when it generates an interrupt, if it's slow responding, then possibly Jack and the sound card cannot get their job done. # cat /proc/interrupts and # lspci -v will give you some valuable information here. Generally speaking, you want your soundcard to be in the highest priority slot (9 or 10) and not sharing with anything. Solutions mostly involve physically moving the soundcard up to a higher slot and/or disabling unused hardware in the BIOS. Hard drive speed is too slow # hdparm -tT /dev/hda (or whatever drive you use for audio) A/DeMuDi installs with optimal settings for most drives. You shouldn't need to edit /etc/hdparm.conf unless you know you do. You can cause irreversible data corruption messing with these settings. Read: # man hdparm before you attempt anything. Too many processes running Processes that interrupt system operation on a regular basis can also cause xruns, although technically this shouldn't be a problem for a powerful enough machine running a low-latency kernel. $ ps fax will show you all the processes currently running on your box. One way of cutting down on running processes is to specify a runlevel that is reserved for making music, for example /etc/rc5.d, the default runlevel is /etc/rc2.d. These directories contain links to the scripts that start and stop essential services, usually when you boot up and shut down. Each of these links starts with S## (an S followed by two numerical digits), change the non-essential services to K## using your favorite runlevel editor (again, plenty of choice). Likely candidates for removal are anacron, klogd and cron, most are nonessential apart from the obviously music related ones. You can then change runlevels by issuing: # telinit 5 or whatever level number you chose. It's also worth disabling your screensaver and generally closing down any unused applications or XShells. You can automate this process in the Options tab of Qjackctl's Setup dialog to execute the appropriate commands on startup and shutdown. Further Reading Check the sources below for more information and to gain a greater understanding of details and issues pertaining to sound quality and configuration. * http://www.linuxdj.com/audio/quality/ * http://jackit.sourceforge.net/docs/faq.php * http://jackit.sourceforge.net/docs/faq.php * http://alsa.opensrc.org/ * http://linux-sound.org/ Minimum System Requirements You will need at least a Pentium II or equivalent. *Basic use >= 400MHz system with 64MB of memory. *Audio use + minimal audio plugins >= 800MHz system with 256MB of memory. *Soft synths >= 1.0GHz system with 512 MB of memory. If you have less resources than this, try using an external MIDI device or a SoundBlaster? type card that supports soundfonts. A good video card is also reckoned to be an advantage. Athlons are prefered to Intel CPUs by some authors. For maximum performance, a dual CPU system is a great choice. Avoid VIA motherboards and chipsets wherever possible. See: http://ardour.org/requirements.php for more useful info. There's Just One Other Thing ... Q: What the-- I've got unresolved symbols!? depmod:*** unresolved symbols in /lib/modules/2.4.27-1-multimedia-686/ kernel/drivers/media/radio/micropcm20.o depmod:*** unresolved symbols in /lib/modules/2.4.27-1-multimedia-686/ alsa/sndpdaudiocf.o depmod:*** unresolved symbols in /lib/modules/2.4.27-1-multimedia-686/ alsa/snd-vx-cs.o depmod:*** unresolved symbols in /lib/modules/2.4.27-1-multimedia-686/ alsa/snd-440.o depmod:*** unresolved symbols in /lib/modules/2.4.27-1-multimedia-686/ alsa/snd-vxpocket.o A: Yeah, we know. You can safely ignore all these messages. The last four are because you haven't installed pcmcia-modules. Q: I think I forgot to configure something else. A: If you're worried you've missed something, # dpkg-reconfigure -a will take you through the configurations of all packages. This will take some time and concentration. Upgrading existing installations Q: Can I upgrade my existing 1.2.0-beta0 installation? A: Yes, please read the Package Updates section below. Q: Can I install A/DeMuDi over an existing Debian installation? A: Yes, at least as long as you are running Sarge. Take the following steps-- * become root * read InstallApt and edit your /etc/apt/sources.list accordingly, choosing either the stable branch or the development one * from the command line issue: # apt-get update # apt-get install demudi * install the tasks you are interested in. To select them run: # tasksel * install the appropriate kernel for your processor: # apt-get kernel-image-2.6.12-3-multimedia- where might be 386, 586tsc, 686, k6, k7. Q: Can I upgrade my existing 1.0/1.1.0 installation? A: Yes, using apt. See http://lurker.agnula.org/message/20040616.113908.06d6aea7.html for more info on upgrading. Q: Can I upgrade my existing 1.1.1 LiveCD installation? A: No, cannot upgrade a 1.1.1 LiveCD install. It was not meant for hard disk installation, but only for demo purposes. Q: Is this a LiveCD? A: No. It requires installation to your hard drive. Q: what URL do I need to add to "/etc/apt/sources.list" in order to get ... [package]? A: http://www.apt-get.org is as a place for people to share useful APT (Advanced Package Tool) sources for the Debian operating system. If you want to install packages not included in the standard DeMuDi or Debian repositories, look here first. Package Updates At some point you may want to update your packages in order to take advantage of upgrades, new software or bug fixes by using Debian's wonderful tool apt (this requires a network connection). Many people like to use a package manager such as dselect or aptitude, if you prefer a point and click GUI, synaptic is very useable. See InstallApt on how to edit your /etc/apt/sources.list. Now that apt is configured, let's get all the updated packages: # apt-get dist-upgrade And beyond ... After Installation and Configuration -- Using Audio and MIDI Applications You'll doubtless be wanting to try out some of the wonderful Linux Audio applications. Here are some good links: * Dave Phillips's excellent Tutorials. * Djcj Quick Toots * Ish's HOWTO about using alsa, jack, ardour and jamin together to record and master digital audio. Additional Notes If by some strange chance you find a bug ;-) please submit a bug report at the development GForge portal. If you want to discuss this FAQ or write a HOW-TO yourself, log in and make a contribution. Subscribe to the mailing lists and let us know what you think. Other previously answered questions are available at the mailing list archives. Yes, this is a hint. ;) Make some great music!