顯示具有 gpasswd 標籤的文章。 顯示所有文章
顯示具有 gpasswd 標籤的文章。 顯示所有文章

2009年8月12日 星期三

Change the Default Sound Card on Arch Linux

i found the sound module of my tv card was the default sound device because i tried to run amixer and got no master or pcm controls.

1. discover your sound card model name with lspci and your ALSA driver module names with ls

$ ls -l /sys/module/snd/holders
total 0
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 saa7134_alsa -> ../../saa7134_alsa
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_hda_codec -> ../../snd_hda_codec
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_hda_codec_realtek -> ../../snd_hda_codec_realtek
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_hda_intel -> ../../snd_hda_intel
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_hwdep -> ../../snd_hwdep
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_mixer_oss -> ../../snd_mixer_oss
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_pcm -> ../../snd_pcm
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_pcm_oss -> ../../snd_pcm_oss
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_rawmidi -> ../../snd_rawmidi
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_seq -> ../../snd_seq
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_seq_device -> ../../snd_seq_device
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_seq_oss -> ../../snd_seq_oss
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_timer -> ../../snd_timer
lrwxrwxrwx 1 root root 0 2009-08-13 09:21 snd_usb_audio -> ../../snd_usb_audio

2. add order setting for the module of main soundcard to modprobe.conf

vi /etc/modprobe.d/modprobe.conf
--

options snd_hda_intel index=0

3. make your user be able to use the sound card

gpasswd -a username audio

3. reboot then make sure the sound modules have been loaded

lsmod | grep ^snd_

4. the current version of alsa installs with all channels muted by default. use alsamixer to unmute the channels and adjust volume manually

5. run alsactl once to create /etc/asound.state

alsactl store
# restore
# alsactl restore

6. add alsa to daemons in rc.conf to store the mixer settings on every shutdown and restore them when you boot.

2009年4月8日 星期三

Install VirtualBox on Arch Linux

1. virtuabox needs fakeroot installed and its gui needs sdl

sudo pacman -S fakeroot sdl

2. install virtualbox personal use binary edition from aur

http://aur.archlinux.org/packages.php?ID=9753

3. add user to the vboxusers group

gpasswd -a USERNAME vboxusers

4. add vboxdrv, vboxnetflt( for host interface networking ), vboxnetadp( for host-only networking ) to the Modules array in /etc/rc.conf

5. add the following line to /etc/fstab if you want the vboxusers to have permission to emulate USB devices

none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0

6. run "vbox_build_module" as root every time your kernel is upgraded

sudo /usr/bin/vbox_build_module