https://wiki.archlinux.org/api.php?action=feedcontributions&user=Tim.thelion&feedformat=atomArchWiki - User contributions [en]2024-03-28T23:43:59ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Touchscreen&diff=228857Touchscreen2012-10-15T13:22:50Z<p>Tim.thelion: /* Using a touchscreen in a multi-head setup */</p>
<hr />
<div>[[zh-CN:Touchscreen]]<br />
[[Category:Input devices]]<br />
{{Merge|Calibrating Touchscreen}}<br />
{{out of date}}<br />
<br />
If you ever tried to set up a touchscreen device in linux, you might have noticed that it's either working out of the box (besides some calibration) or is very tedious, especially when it isn't supported by the kernel.<br />
<br />
== Introduction ==<br />
This article assumes that your touchscreen device is supported by the kernel (e.g. by the usbtouchscreen module).<br />
That means there exists a /dev/input/event* node for your device. Check out<br />
less /proc/bus/input/devices<br />
to see if your device is listed or try<br />
cat /dev/input/event? # replace ? with the event numbers<br />
for every of your event nodes while touching the display.<br />
<br />
If you found the corresponding node, it's likely that you will be able to get the device working.<br />
<br />
== Available X11 drivers ==<br />
There are a lot of touchscreen input drivers for X11 out there. The most common ones are in the ''extra'' repository:<br />
* {{AUR|xf86-input-evtouch}} (in AUR)<br />
* {{Pkg|xf86-input-elographics}}<br />
* {{Pkg|xf86-input-penmount}}<br />
* {{Pkg|xf86-input-mutouch}}<br />
<br />
Less common drivers, not contained in the repository, are:<br />
* xf86-input-magictouch<br />
* xf86-input-plpevtch<br />
* xf86-input-palmax,<br />
* xf86-input-elo2300 (*)<br />
* xf86-input-microtouch (*)<br />
(Note: (*) are deprecated and thus were removed from the repos [http://www.archlinux.org/news/333/])<br />
<br />
Some for some devices proprietary drivers exists as well, as e.g. {{AUR|xf86-input-egalax}} but it's recommended to try the open source drivers first.<br />
<br />
Depending on your touchscreen device choose an appropriated driver.<br />
<br />
The evtouch input drivers support a wide variety of touchscreens from different vendors like Fujitsu, eGalax, IDEACO, ITM, Touchkit.<br />
{{Box YELLOW||Since I've only got one touchscreen device (USB 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen) which works with the evtouch driver I confine myself to this driver. Perhaps someone can add details about how to set up other drivers.}}<br />
<br />
== evtouch drivers ==<br />
<br />
First, install [https://aur.archlinux.org/packages.php?ID=22758 xf86-input-evtouch] from the [[AUR]].<br />
<br />
This package already includes a set of udev rules to create a permanent node for your input device in {{ic|/etc/udev/rules.d/69-touchscreen.rules}}.<br />
<br />
If everything worked fine so far, you should have a symlink {{ic|/dev/input/evtouch_event}} to your input device. If not, your touch device might not work with evtouch, but you can add a custom udev rule for your device and try it anyway.<br />
<br />
In case you configured X server to use HAL hot-plugging, the touchscreen should work now after restarting the X server.<br />
Else you have to add the corresponding "InputDevice" section to xorg.conf as described on [http://www.conan.de/touchscreen/evtouch.html evtouch's webside].<br />
<br />
=== Calibration ===<br />
It's assumed that you have the touchscreen working now in X11 and that you're using hot-plugging for configuration. If you manually set up your input devices and thus switched off hot-plugging, you have to add the X11 options of this section to the xorg.conf file instead (see [http://www.conan.de/touchscreen/evtouch.html evtouch's webside] for details again).<br />
<br />
==== Rough calibration ====<br />
For touchscreen calibration the {{AUR|xf86-input-evtouch}} package includes a calibration program.<br />
sudo /usr/lib/xf86-input-evtouch/calibrate.sh<br />
No matter whether you started it from TTY or X11, this will start a new X server and bring up a white screen. Move the pen around the display border, along all edges a view times to get the minimum and maximum coordinates. Press {{Keypress|Return}}. Then tab exactly on the red cross. The next cross will turn red, touch it again and repeat this procedure for all crosses.<br />
When your done you should return to command line. The calibration data was written to {{ic|/etc/evtouch/config}}.<br />
<br />
To restore the calibration data after booting add evtouch_config to the DAEMONS variable in {{ic|/etc/rc.conf}}<br />
DAEMONS=( ... evtouch_config ... )<br />
This will read the calibration data from {{ic|/etc/evtouch/config}} and set the corresponding X options using HAL.<br />
<br />
You can now (re)start your X server and enjoy your calibrated touchscreen.<br />
<br />
==== Fine calibration (optional) ====<br />
If your not satisfied with the calibration you can do further tweaking by changing the values in {{ic|/etc/evtouch/config}} manually.<br />
MINX, MINY, MAXX, MAXY are the minimal and maximal coordinates and the nine X?,Y? pairs are the coordinates of the calibration points in the order you touched them.<br />
<br />
==== Correct orientation of the coordinate system ====<br />
The 9 point calibration assures that the coordinate axis are orientated in a way that your cursor moves to the right when your pen does (due to the signs of the X,Y pairs). In case you nevertheless notice your cursor is moving in the wrong direction you can add<br />
hal_set swapx 1<br />
hal_set swapy 1<br />
to /etc/rc.d/evtouch_config (of course this will get overwritten when you upgrade the package)<br />
<br />
When X and Y axis are swaped and your touchscreen uses the usbtouchscreen kernel module you can add the following line to {{ic|/etc/modprobe.d/modprobe.conf}}<br />
options usbtouchscreen swap_xy=1<br />
<br />
Correct orientation can also be done using scripts which utilize xrandr and xinput.<br />
''This was used and tested on a thinkpad x220t.''<br />
A shell script to make the rotation (portrait view) and fix the coordinate system for the touch screen would be<br />
#!/bin/bash<br />
xrandr --screen 0 -o right<br />
xinput set-prop "Wacom ISDv4 E6 Pen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1<br />
''exchanging "Wacom ISDv4 E6 Pen" with your input device from''<br />
xinput list<br />
The shell script should be made executable by<br />
chmod +x nameofscript.sh<br />
A script to change orientation back would be <br />
#!/bin/bash<br />
xrandr --screen 0 -o normal <br />
xinput set-prop "Wacom ISDv4 E6 Pen" --type=float "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1<br />
<br />
==== Make the calibration persistent to unplugging or suspending ====<br />
You may notice that after unplugging the touch device and replugging it while the X server is running, your calibration is messed up. The same happens when you resume from hibernation or suspend.<br />
<br />
The reason is, that your calibration setting get set only once, at boot time by evtouch_config. When you unplug it the settings are removed when evtouch is unloaded.<br />
On plugging it in HAL sets the default settings as specified in {{ic|/usr/share/hal/fdi/policy/20thirdparty/50-....fdi}} and loads the evtouch driver, which reads the calibration settings into its memory. Therefore it doesn't work to simply call evtouch_config while the X window system is running.<br />
<br />
The only way I found to make the calibration settings survive a replug-in or a hibernation is to set them directly in the HAL policy file.<br />
The following command converts the calibration settings to HAL policy format and prints the result on stdout.<br />
awk -F= '{print " <merge key=\"input.x11_options."tolower($1)"\" type=\"string\">"$2"</merge>"}' /etc/evtouch/config<br />
Replace the corresponding merge commands in the policy file ({{ic|/usr/share/hal/fdi/policy/20thirdparty/50-....fdi}}) corresponding to your device.<br />
<br />
Of course you do not need the evtouch_config daemon any more when you use this method, so you can remove it from {{ic|/etc/rc.conf}}.<br />
<br />
'''Note:''' when you have problems with right clicking or drag and drop you can try tweaking the settings ([http://www.conan.de/touchscreen/evtouch.html] [http://www.conan.de/touchscreen/libtouch.html]) in the fdi file. You can also set the swapx, swapy options here in case you need them.<br />
<br />
'''WARNING:''' The fdi files will be overwritten when you upgrade {{AUR|xf86-input-evtouch}}, so '''all your changes will be lost'''.<br />
<br />
== Using a touchscreen in a multi-head setup ==<br />
To use multiple displays (some of which are touchscreens), you need to tell Xorg the mapping between the touch surface and the screen. <br />
<br />
This can be done very easily with xinput:<br />
<br />
Take for example the setup of having a wacom tablet and an external monitor. When we type xrandr we get a list of our two displays:<br />
{{bc|<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 8192 x 8192<br />
LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm<br />
1024x768 60.0*+<br />
800x600 60.3 56.2 <br />
640x480 59.9 <br />
VGA1 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1600x1200 60.0 <br />
1680x1050 60.0 <br />
1680x945 60.0 <br />
}}<br />
<br />
You see we have two displays here. LVDS1 and VGA1. LVDS1 is the display internal to the tablet, and VGA1 is the external monitor. We wish to map our stylus input to LVDS1. So we have to find the ID of the stylus input:<br />
{{bc|<br />
$ xinput --list<br />
⎡ Virtual core pointer id&#61;2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id&#61;4 [slave pointer (2)]<br />
⎜ ↳ QUANTA OpticalTouchScreen id&#61;9 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id&#61;11 [slave pointer (2)]<br />
⎜ ↳ Serial Wacom Tablet WACf004 stylus id&#61;13 [slave pointer (2)]<br />
⎜ ↳ Serial Wacom Tablet WACf004 eraser id&#61;14 [slave pointer (2)]<br />
⎣ Virtual core keyboard id&#61;3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id&#61;5 [slave keyboard (3)]<br />
↳ Power Button id&#61;6 [slave keyboard (3)]<br />
↳ Video Bus id&#61;7 [slave keyboard (3)]<br />
↳ Sleep Button id&#61;8 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id&#61;10 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id&#61;12 [slave keyboard (3)]<br />
}}<br />
<br />
We see that we have two stylus inputs who's ID's are 13 and 14. We now need to simply map our inputs to our output like so:<br />
<br />
{{bc|<br />
<br />
xinput --map-to-output 13 LVDS1<br />
xinput --map-to-output 14 LVDS1<br />
}}<br />
<br />
More info can be found at [[Calibrating_Touchscreen]]</div>Tim.thelionhttps://wiki.archlinux.org/index.php?title=Touchscreen&diff=228851Touchscreen2012-10-15T13:08:37Z<p>Tim.thelion: /* Using a touchscreen in a multi-head setup */</p>
<hr />
<div>[[zh-CN:Touchscreen]]<br />
[[Category:Input devices]]<br />
{{Merge|Calibrating Touchscreen}}<br />
{{out of date}}<br />
<br />
If you ever tried to set up a touchscreen device in linux, you might have noticed that it's either working out of the box (besides some calibration) or is very tedious, especially when it isn't supported by the kernel.<br />
<br />
== Introduction ==<br />
This article assumes that your touchscreen device is supported by the kernel (e.g. by the usbtouchscreen module).<br />
That means there exists a /dev/input/event* node for your device. Check out<br />
less /proc/bus/input/devices<br />
to see if your device is listed or try<br />
cat /dev/input/event? # replace ? with the event numbers<br />
for every of your event nodes while touching the display.<br />
<br />
If you found the corresponding node, it's likely that you will be able to get the device working.<br />
<br />
== Available X11 drivers ==<br />
There are a lot of touchscreen input drivers for X11 out there. The most common ones are in the ''extra'' repository:<br />
* {{AUR|xf86-input-evtouch}} (in AUR)<br />
* {{Pkg|xf86-input-elographics}}<br />
* {{Pkg|xf86-input-penmount}}<br />
* {{Pkg|xf86-input-mutouch}}<br />
<br />
Less common drivers, not contained in the repository, are:<br />
* xf86-input-magictouch<br />
* xf86-input-plpevtch<br />
* xf86-input-palmax,<br />
* xf86-input-elo2300 (*)<br />
* xf86-input-microtouch (*)<br />
(Note: (*) are deprecated and thus were removed from the repos [http://www.archlinux.org/news/333/])<br />
<br />
Some for some devices proprietary drivers exists as well, as e.g. {{AUR|xf86-input-egalax}} but it's recommended to try the open source drivers first.<br />
<br />
Depending on your touchscreen device choose an appropriated driver.<br />
<br />
The evtouch input drivers support a wide variety of touchscreens from different vendors like Fujitsu, eGalax, IDEACO, ITM, Touchkit.<br />
{{Box YELLOW||Since I've only got one touchscreen device (USB 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen) which works with the evtouch driver I confine myself to this driver. Perhaps someone can add details about how to set up other drivers.}}<br />
<br />
== evtouch drivers ==<br />
<br />
First, install [https://aur.archlinux.org/packages.php?ID=22758 xf86-input-evtouch] from the [[AUR]].<br />
<br />
This package already includes a set of udev rules to create a permanent node for your input device in {{ic|/etc/udev/rules.d/69-touchscreen.rules}}.<br />
<br />
If everything worked fine so far, you should have a symlink {{ic|/dev/input/evtouch_event}} to your input device. If not, your touch device might not work with evtouch, but you can add a custom udev rule for your device and try it anyway.<br />
<br />
In case you configured X server to use HAL hot-plugging, the touchscreen should work now after restarting the X server.<br />
Else you have to add the corresponding "InputDevice" section to xorg.conf as described on [http://www.conan.de/touchscreen/evtouch.html evtouch's webside].<br />
<br />
=== Calibration ===<br />
It's assumed that you have the touchscreen working now in X11 and that you're using hot-plugging for configuration. If you manually set up your input devices and thus switched off hot-plugging, you have to add the X11 options of this section to the xorg.conf file instead (see [http://www.conan.de/touchscreen/evtouch.html evtouch's webside] for details again).<br />
<br />
==== Rough calibration ====<br />
For touchscreen calibration the {{AUR|xf86-input-evtouch}} package includes a calibration program.<br />
sudo /usr/lib/xf86-input-evtouch/calibrate.sh<br />
No matter whether you started it from TTY or X11, this will start a new X server and bring up a white screen. Move the pen around the display border, along all edges a view times to get the minimum and maximum coordinates. Press {{Keypress|Return}}. Then tab exactly on the red cross. The next cross will turn red, touch it again and repeat this procedure for all crosses.<br />
When your done you should return to command line. The calibration data was written to {{ic|/etc/evtouch/config}}.<br />
<br />
To restore the calibration data after booting add evtouch_config to the DAEMONS variable in {{ic|/etc/rc.conf}}<br />
DAEMONS=( ... evtouch_config ... )<br />
This will read the calibration data from {{ic|/etc/evtouch/config}} and set the corresponding X options using HAL.<br />
<br />
You can now (re)start your X server and enjoy your calibrated touchscreen.<br />
<br />
==== Fine calibration (optional) ====<br />
If your not satisfied with the calibration you can do further tweaking by changing the values in {{ic|/etc/evtouch/config}} manually.<br />
MINX, MINY, MAXX, MAXY are the minimal and maximal coordinates and the nine X?,Y? pairs are the coordinates of the calibration points in the order you touched them.<br />
<br />
==== Correct orientation of the coordinate system ====<br />
The 9 point calibration assures that the coordinate axis are orientated in a way that your cursor moves to the right when your pen does (due to the signs of the X,Y pairs). In case you nevertheless notice your cursor is moving in the wrong direction you can add<br />
hal_set swapx 1<br />
hal_set swapy 1<br />
to /etc/rc.d/evtouch_config (of course this will get overwritten when you upgrade the package)<br />
<br />
When X and Y axis are swaped and your touchscreen uses the usbtouchscreen kernel module you can add the following line to {{ic|/etc/modprobe.d/modprobe.conf}}<br />
options usbtouchscreen swap_xy=1<br />
<br />
Correct orientation can also be done using scripts which utilize xrandr and xinput.<br />
''This was used and tested on a thinkpad x220t.''<br />
A shell script to make the rotation (portrait view) and fix the coordinate system for the touch screen would be<br />
#!/bin/bash<br />
xrandr --screen 0 -o right<br />
xinput set-prop "Wacom ISDv4 E6 Pen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1<br />
''exchanging "Wacom ISDv4 E6 Pen" with your input device from''<br />
xinput list<br />
The shell script should be made executable by<br />
chmod +x nameofscript.sh<br />
A script to change orientation back would be <br />
#!/bin/bash<br />
xrandr --screen 0 -o normal <br />
xinput set-prop "Wacom ISDv4 E6 Pen" --type=float "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1<br />
<br />
==== Make the calibration persistent to unplugging or suspending ====<br />
You may notice that after unplugging the touch device and replugging it while the X server is running, your calibration is messed up. The same happens when you resume from hibernation or suspend.<br />
<br />
The reason is, that your calibration setting get set only once, at boot time by evtouch_config. When you unplug it the settings are removed when evtouch is unloaded.<br />
On plugging it in HAL sets the default settings as specified in {{ic|/usr/share/hal/fdi/policy/20thirdparty/50-....fdi}} and loads the evtouch driver, which reads the calibration settings into its memory. Therefore it doesn't work to simply call evtouch_config while the X window system is running.<br />
<br />
The only way I found to make the calibration settings survive a replug-in or a hibernation is to set them directly in the HAL policy file.<br />
The following command converts the calibration settings to HAL policy format and prints the result on stdout.<br />
awk -F= '{print " <merge key=\"input.x11_options."tolower($1)"\" type=\"string\">"$2"</merge>"}' /etc/evtouch/config<br />
Replace the corresponding merge commands in the policy file ({{ic|/usr/share/hal/fdi/policy/20thirdparty/50-....fdi}}) corresponding to your device.<br />
<br />
Of course you do not need the evtouch_config daemon any more when you use this method, so you can remove it from {{ic|/etc/rc.conf}}.<br />
<br />
'''Note:''' when you have problems with right clicking or drag and drop you can try tweaking the settings ([http://www.conan.de/touchscreen/evtouch.html] [http://www.conan.de/touchscreen/libtouch.html]) in the fdi file. You can also set the swapx, swapy options here in case you need them.<br />
<br />
'''WARNING:''' The fdi files will be overwritten when you upgrade {{AUR|xf86-input-evtouch}}, so '''all your changes will be lost'''.<br />
<br />
== Using a touchscreen in a multi-head setup ==<br />
To use multiple displays (some of which are touchscreens), you need to tell Xorg the mapping between the touch surface and the screen. <br />
<br />
This can be done very easily with xinput:<br />
<br />
Take for example the setup of having a wacom tablet and an external monitor. When we type xrandr we get a list of our two displays:<br />
{{bc|<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 8192 x 8192<br />
LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm<br />
1024x768 60.0*+<br />
800x600 60.3 56.2 <br />
640x480 59.9 <br />
VGA1 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1600x1200 60.0 <br />
1680x1050 60.0 <br />
1680x945 60.0 <br />
}}<br />
<br />
You see we have two displays here. LVDS1 and VGA1. LVDS1 is the display internal to the tablet, and VGA1 is the external monitor. We wish to map our stylus input to LVDS1. So we have to find the ID of the stylus input:<br />
{{bc|<br />
$ xinput --list<br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ QUANTA OpticalTouchScreen id=9 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (2)]<br />
⎜ ↳ Serial Wacom Tablet WACf004 stylus id=13 [slave pointer (2)]<br />
⎜ ↳ Serial Wacom Tablet WACf004 eraser id=14 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]<br />
}}<br />
<br />
We see that we have two stylus inputs who's ID's are 13 and 14. We now need to simply map our inputs to our output like so:<br />
<br />
{{bc|<br />
xinput --map-to-output 13 LVDS1<br />
xinput --map-to-output 14 LVDS1<br />
}}<br />
<br />
More info can be found at [[Calibrating_Touchscreen]]</div>Tim.thelionhttps://wiki.archlinux.org/index.php?title=GNOME/Web&diff=189606GNOME/Web2012-03-16T00:04:39Z<p>Tim.thelion: Install the flash plugin as well as the wrapper :) /* Flash */</p>
<hr />
<div>[[Category:Web Browser (English)]]<br />
<br />
{{stub}}<br />
[http://projects.gnome.org/epiphany/ Epiphany] is a simple web browser primarily intended for the [[GNOME]] desktop which works acceptably with other desktop environments as well.<br />
<br />
==Installation==<br />
To install Epiphany from the repositories, run: <br />
# pacman -S epiphany<br />
<br />
To install Epiphany extensions: <br />
# pacman -S epiphany-extensions<br />
<br />
If you want to save login passwords, install gnome-keyring:<br />
# pacman -S gnome-keyring<br />
<br />
If you are using another [[Desktop Environment|desktop environment]] (DE) other than GNOME, you will probably have to create directory {{ic|~/.gnome2/epiphany}}. To do so, type:<br />
$ mkdir -p ~/.gnome2/epiphany<br />
<br />
==Flash==<br />
Adobe Flash Player is a little buggy and an external utility like nspluginwrapper has to be used.<br />
<br />
$ pacman -S nspluginwrapper flashplugin<br />
$ nspluginwrapper -v -n -a -i<br />
<br />
Epiphany should now be able to echo flash content.<br />
<br />
== Manage Web Apps ==<br />
<br />
Since version 3.0, Epiphany can add "web app" launchers to GNOME Shell. You can manage and remove them by typing "about:applications" into the Epiphany address bar.<br />
<br />
==See also==<br />
The appearance of Epiphany's menu entry may vary depending on the DE, so please see their articles for further information:<br />
*[[GNOME]]<br />
*[[KDE]]<br />
*[[Xfce]]</div>Tim.thelionhttps://wiki.archlinux.org/index.php?title=Arduino&diff=141105Arduino2011-05-11T16:59:19Z<p>Tim.thelion: think that will do the trick/* Install arduino package from AUR */</p>
<hr />
<div>[[Category:Development (English)]]<br />
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. <br />
<br />
If you have a 64 bit Arch [[Arduino_64bit|this page]] is an alternative tested method of installing Arduino which works on version 17.<br />
<br />
More information is availible on the [http://www.arduino.cc/ Arduino HomePage].<br />
<br />
== Install packages from official repositories ==<br />
<br />
Install the avr-libc, avrdude, binutils-avr and gcc-avr packages from community.<br />
<br />
* avr-libc - standard C library<br />
* avrdude - very well known programmer<br />
* binutils-avr - assembler<br />
* gcc-avr - gcc C compiler support<br />
<br />
# pacman -S avr-libc avrdude binutils-avr gcc-avr<br />
<br />
==Install arduino package from AUR==<br />
<br />
Download [http://aur.archlinux.org/packages.php?ID=8388 arduino] from the AUR and install it.<br />
<br />
mkdir arduino_build && cd arduino_build &&<br />
wget http://aur.archlinux.org/packages/arduino/arduino.tar.gz &&<br />
tar -xvvz arduino.tar.gz &&<br />
makepkg -i<br />
<br />
===Running arduino for the first time===<br />
<br />
If the file /usr/share/arduino/lib/targets/libraries/Wire/utility/twi.o does not exist arduino will try and create it. Normal users don't have permission to write there so this will fail. Run arduino as root so it can create the file, after the file has been created it can be run under a normal user.<br />
<br />
==Other info==<br />
<br />
===Accessing serial===<br />
<br />
The arduino board communicates with the PC via a serial connection or a serial over USB connection. So the user needs read/write access to the serial device file. [[Udev]] creates files in /dev/tts/ owned by group uucp so adding the user to the uucp group gives the required read/write access.<br />
<br />
gpasswd -a <user> uucp<br />
<br />
Modify ~/.arduino/preferences.txt<br />
<br />
Change serial port from COM1 to your serial port. You can find out what your serial port is with:<br />
<br />
ls /dev/ | grep "USB"<br />
<br />
This is the line to change in ~/.arduino/preferences.txt:<br />
<br />
serial.port=/dev/ttyUSB0<br />
<br />
===delay() doesn't work===<br />
There are some cases where the delay() function doesn't work, causing programs such as the example "Blink" program to malfunction. See http://arduino.cc/forum/index.php/topic,56841.msg410902.html#msg410902<br />
<br />
===Working with Uno/Mega2560===<br />
The Arduino Uno and Mega2560 have an onboard USB interface (an Atmel 8U2) that accepts serial data, so they are accessed through /dev/ttyACM0 created by the cdc-acm kernel module when it is plugged in.<br />
<br />
The 8U2 firmware may need an update to ease serial communications. See [http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286350399] for more details and reply #11 for a fix. The original arduino bbs, where you can find an image explaining how to get your Uno into DFU, is now in a read-only state. If you don't have an account to view the image, see [http://www.scribd.com/doc/45913857/Arduino-UNO].<br />
<br />
You can perform a general function test of the Uno by putting it in loopback mode and typing characters into the arduino serial monitor at 115200 baud. It should echo the characters back to you. To put it in loopback, short pins 0 -> 1 on the digital side and either hold the reset button or short the GND -> RESET pins while you type.<br />
<br />
=== Adruino Mega2560 and new gcc-avr ===<br />
<br />
If you are using gcc-avr >= 4.3.5 then there is a C++ bug in the gcc-avr toolchain which builds bad firmware for the Atmel2560 processors. gcc-avr must be rebuilt using a patch found at [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45263]. You can read more about the problems at [http://andybrown.me.uk/ws/2010/10/24/the-major-global-constructor-bug-in-avr-gcc/].<br />
<br />
Here is the patch for gcc:<br />
<pre><br />
--- gcc-4.5.1.orig/gcc/config/avr/libgcc.S 2009-05-23 17:16:07 +1000<br />
+++ gcc-4.5.1/gcc/config/avr/libgcc.S 2010-08-12 09:38:05 +1000<br />
@@ -802,7 +802,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_ctors_start:<br />
cpi r28, lo8(__ctors_start)<br />
cpc r29, r17<br />
@@ -843,7 +845,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_dtors_start:<br />
cpi r28, lo8(__dtors_end)<br />
cpc r29, r17<br />
</pre><br />
<br />
The easiest way to rebuild gcc-avr is using ABS and makepkg.<br />
<br />
<br />
===Using a Makefile instead of the IDE===<br />
Update 2011-03-12. Arduino Is not shipping a Makefile with version (22). The Makefile from the [http://code.google.com/p/dogm128/source/browse/libraries/Dogm/examples/SpaceTrash/Makefile.uno_dogs102 dogm128] project works for me though.<br />
<br />
Instead of using the arduino IDE it's possible to use another editor and a Makefile.<br />
<br />
Set up a directory to program your Arduino and copy the Makefile into this directory. A copy of the Makefile can be obtained from [http://www.arduino.cc/en/uploads/Hacking/Makefile arduino website] or from /usr/share/arduino/hardware/cores/arduino/Makefile<br />
<br />
You will have to modify this a little bit to reflect your settings. The makefile should be pretty self explainatory. Here are some lines you may have to edit.<br />
<br />
PORT = usually /dev/ttyUSBx, where x is the usb serial port your arduino is plugged into<br />
TARGET = your sketch's name<br />
ARDUINO = /usr/share/arduino/lib/targets/arduino<br />
<br />
Depending on which library functions you call in your sketch, you may need to compile parts of the library. To do that you need to edit your SRC and CXXSRC to include the required libraries.<br />
<br />
Now you should be able to make && make upload to your board to execute your sketch.<br />
<br />
===Using Scons instead of the IDE===<br />
<br />
Using [http://www.scons.org/ scons] together with [http://code.google.com/p/arscons/ arscons] it is very easy to use to compile and upload Arduino projects from the command line. Scons is based on python and you will need python-pyserial to use the serial interface. Install everything with<br />
<br />
# pacman -S python-pyserial scons<br />
<br />
That will get the dependencies you need too. You will also need Arduino itself so install it as described above. Create project directory (eg. test), then create a arduino project file in your new directory. Use the same name as the directory and add .pde (eg. test.pde). Get the [http://code.google.com/p/arscons/source/browse/trunk/SConstruct SConstruct] script from arscons and put it in your directory. Have a peek in it and, if necessary, edit it. It's a python script. Edit your project as you please, then run<br />
<br />
$ scons # This will build the project<br />
$ scons upload # This will upload the project to your Arduino<br />
<br />
===Using CMake instead of the IDE===<br />
<br />
Using [https://github.com/queezythegreat/arduino-cmake arduino-cmake] and [http://www.cmake.org/cmake/resources/software.html CMake] you can build Arduino firmware from the command line using multiple build systems.<br />
<br />
===References===<br />
* http://www.arduino.cc/en/Hacking/CommandLine<br />
* http://bbs.archlinux.org/viewtopic.php?pid=295312<br />
* http://regomodoslinux.blogspot.com/2007/10/how-to-install-arduino-ide-in-archlinux.html</div>Tim.thelionhttps://wiki.archlinux.org/index.php?title=Arduino&diff=141103Arduino2011-05-11T16:46:51Z<p>Tim.thelion: fix link/* Install arduino package from AUR */</p>
<hr />
<div>[[Category:Development (English)]]<br />
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. <br />
<br />
If you have a 64 bit Arch [[Arduino_64bit|this page]] is an alternative tested method of installing Arduino which works on version 17.<br />
<br />
More information is availible on the [http://www.arduino.cc/ Arduino HomePage].<br />
<br />
== Install packages from official repositories ==<br />
<br />
Install the avr-libc, avrdude, binutils-avr and gcc-avr packages from community.<br />
<br />
* avr-libc - standard C library<br />
* avrdude - very well known programmer<br />
* binutils-avr - assembler<br />
* gcc-avr - gcc C compiler support<br />
<br />
# pacman -S avr-libc avrdude binutils-avr gcc-avr<br />
<br />
==Install arduino package from AUR==<br />
<br />
Download [http://aur.archlinux.org/packages.php?ID=8388 arduino] from the AUR and install it.<br />
<br />
mkdir arduino_build && cd arduino_build &&<br />
wget http://aur.archlinux.org/packages/arduino/PKGBUILD &&<br />
makepkg -i<br />
<br />
===Running arduino for the first time===<br />
<br />
If the file /usr/share/arduino/lib/targets/libraries/Wire/utility/twi.o does not exist arduino will try and create it. Normal users don't have permission to write there so this will fail. Run arduino as root so it can create the file, after the file has been created it can be run under a normal user.<br />
<br />
==Other info==<br />
<br />
===Accessing serial===<br />
<br />
The arduino board communicates with the PC via a serial connection or a serial over USB connection. So the user needs read/write access to the serial device file. [[Udev]] creates files in /dev/tts/ owned by group uucp so adding the user to the uucp group gives the required read/write access.<br />
<br />
gpasswd -a <user> uucp<br />
<br />
Modify ~/.arduino/preferences.txt<br />
<br />
Change serial port from COM1 to your serial port. You can find out what your serial port is with:<br />
<br />
ls /dev/ | grep "USB"<br />
<br />
This is the line to change in ~/.arduino/preferences.txt:<br />
<br />
serial.port=/dev/ttyUSB0<br />
<br />
===delay() doesn't work===<br />
There are some cases where the delay() function doesn't work, causing programs such as the example "Blink" program to malfunction. See http://arduino.cc/forum/index.php/topic,56841.msg410902.html#msg410902<br />
<br />
===Working with Uno/Mega2560===<br />
The Arduino Uno and Mega2560 have an onboard USB interface (an Atmel 8U2) that accepts serial data, so they are accessed through /dev/ttyACM0 created by the cdc-acm kernel module when it is plugged in.<br />
<br />
The 8U2 firmware may need an update to ease serial communications. See [http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286350399] for more details and reply #11 for a fix. The original arduino bbs, where you can find an image explaining how to get your Uno into DFU, is now in a read-only state. If you don't have an account to view the image, see [http://www.scribd.com/doc/45913857/Arduino-UNO].<br />
<br />
You can perform a general function test of the Uno by putting it in loopback mode and typing characters into the arduino serial monitor at 115200 baud. It should echo the characters back to you. To put it in loopback, short pins 0 -> 1 on the digital side and either hold the reset button or short the GND -> RESET pins while you type.<br />
<br />
=== Adruino Mega2560 and new gcc-avr ===<br />
<br />
If you are using gcc-avr >= 4.3.5 then there is a C++ bug in the gcc-avr toolchain which builds bad firmware for the Atmel2560 processors. gcc-avr must be rebuilt using a patch found at [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45263]. You can read more about the problems at [http://andybrown.me.uk/ws/2010/10/24/the-major-global-constructor-bug-in-avr-gcc/].<br />
<br />
Here is the patch for gcc:<br />
<pre><br />
--- gcc-4.5.1.orig/gcc/config/avr/libgcc.S 2009-05-23 17:16:07 +1000<br />
+++ gcc-4.5.1/gcc/config/avr/libgcc.S 2010-08-12 09:38:05 +1000<br />
@@ -802,7 +802,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_ctors_start:<br />
cpi r28, lo8(__ctors_start)<br />
cpc r29, r17<br />
@@ -843,7 +845,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_dtors_start:<br />
cpi r28, lo8(__dtors_end)<br />
cpc r29, r17<br />
</pre><br />
<br />
The easiest way to rebuild gcc-avr is using ABS and makepkg.<br />
<br />
<br />
===Using a Makefile instead of the IDE===<br />
Update 2011-03-12. Arduino Is not shipping a Makefile with version (22). The Makefile from the [http://code.google.com/p/dogm128/source/browse/libraries/Dogm/examples/SpaceTrash/Makefile.uno_dogs102 dogm128] project works for me though.<br />
<br />
Instead of using the arduino IDE it's possible to use another editor and a Makefile.<br />
<br />
Set up a directory to program your Arduino and copy the Makefile into this directory. A copy of the Makefile can be obtained from [http://www.arduino.cc/en/uploads/Hacking/Makefile arduino website] or from /usr/share/arduino/hardware/cores/arduino/Makefile<br />
<br />
You will have to modify this a little bit to reflect your settings. The makefile should be pretty self explainatory. Here are some lines you may have to edit.<br />
<br />
PORT = usually /dev/ttyUSBx, where x is the usb serial port your arduino is plugged into<br />
TARGET = your sketch's name<br />
ARDUINO = /usr/share/arduino/lib/targets/arduino<br />
<br />
Depending on which library functions you call in your sketch, you may need to compile parts of the library. To do that you need to edit your SRC and CXXSRC to include the required libraries.<br />
<br />
Now you should be able to make && make upload to your board to execute your sketch.<br />
<br />
===Using Scons instead of the IDE===<br />
<br />
Using [http://www.scons.org/ scons] together with [http://code.google.com/p/arscons/ arscons] it is very easy to use to compile and upload Arduino projects from the command line. Scons is based on python and you will need python-pyserial to use the serial interface. Install everything with<br />
<br />
# pacman -S python-pyserial scons<br />
<br />
That will get the dependencies you need too. You will also need Arduino itself so install it as described above. Create project directory (eg. test), then create a arduino project file in your new directory. Use the same name as the directory and add .pde (eg. test.pde). Get the [http://code.google.com/p/arscons/source/browse/trunk/SConstruct SConstruct] script from arscons and put it in your directory. Have a peek in it and, if necessary, edit it. It's a python script. Edit your project as you please, then run<br />
<br />
$ scons # This will build the project<br />
$ scons upload # This will upload the project to your Arduino<br />
<br />
===Using CMake instead of the IDE===<br />
<br />
Using [https://github.com/queezythegreat/arduino-cmake arduino-cmake] and [http://www.cmake.org/cmake/resources/software.html CMake] you can build Arduino firmware from the command line using multiple build systems.<br />
<br />
===References===<br />
* http://www.arduino.cc/en/Hacking/CommandLine<br />
* http://bbs.archlinux.org/viewtopic.php?pid=295312<br />
* http://regomodoslinux.blogspot.com/2007/10/how-to-install-arduino-ide-in-archlinux.html</div>Tim.thelionhttps://wiki.archlinux.org/index.php?title=JACK_Audio_Connection_Kit&diff=103504JACK Audio Connection Kit2010-04-15T21:16:04Z<p>Tim.thelion: /* Playing nice with ALSA */</p>
<hr />
<div><math>Insert formula here</math>{{stub}}<br />
<br />
If you know anything about JACK, please expand this article. I've uninstalled it, so I can't really expand it any further.<br />
<br />
=Install=<br />
==Multiprocessor implementation (soon: JACK2)==<br />
[http://www.grame.fr/~letz/jackdmp.html Here's] a mp version of JACK which will also be used as base for JACK2. <br />
<br />
[[AUR]] package: [http://aur.archlinux.org/packages.php?ID=22488 jack-audio-connection-kit-mp]<br />
<br />
You can compile Jack2 with the new dbus-based control system or the 'classic' interface. Which one you have depends on whether you compiled Jack2 with the --dbus configure option or not.<br />
<br />
Jack2 without --dbus executes similarly to Jack1. With --dbus, control is done using the jack_control utility. Run `jack_control` to see what it does. The important commands are listed below:-<br />
jack_control start - starts the jack server<br />
jack_control stop - stops the jack server<br />
jack_control ds alsa - selects alsa as the driver (backend)<br />
jack_control eps realtime True - set engine parameters, such as realtime<br />
jack_control dps period 256 - set the driver parameter period to 256<br />
<br />
You may also need to play with the driver parameters nperiods and rate.<br />
<br />
==JACK==<br />
Alternatively, there is the normal version from the extra repository, install it with:<br />
pacman -S jack<br />
<br />
=== Jack for a multi-user system ===<br />
So, you have a descent multiuser system as it was designed more than 20 years ago, and now some developers decided that sound is only for a mono-user system... No I can not believe it !<br />
<br />
{{Warning|Before following the below instructions, please note that there is a security risk to any service running as root, and, more importantly, the developers for jack do not test it for running as root. In other words, it could eat your babies, data, or both}}<br />
<br />
Fortunately some time ago someone convinced the developers to allow jack to run as a system wide daemon. Here is the procedure to follow:<br />
<br />
'''Create a <tt>/etc/profile.d/jack.sh</tt> file''' containing:<br />
export JACK_PROMISCUOUS_SERVER=""<br />
<br />
'''Replace <tt>/etc/rc.d/jack-audio-connection-kit</tt>''' with the following content<br />
<pre><br />
#!/bin/bash <br />
<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
<br />
# source application-specific settings<br />
[ -f /etc/conf.d/jack-audio-connection-kit ] && . /etc/conf.d/jack-audio-connection-kit<br />
<br />
PID=`pidof -o %PPID /usr/bin/jackd`<br />
<br />
[ -n "$JACKUSER" ] && HOME="/home/$JACKUSER"<br />
[ -z "$JACK_PARAMS" ] && JACK_PARAMS=$(sed 's:/usr/bin/jackd ::' $HOME/.jackdrc)<br />
<br />
case "$1" in<br />
start)<br />
stat_busy "Starting JACK"<br />
if [ -z "$PID" ]; then<br />
if [ -n "$JACKUSER" ]; then<br />
su - $JACKUSER -c 'export JACK_PROMISCUOUS_SERVER="" && . /etc/conf.d/jack-audio-connection-kit && umask 0000 && /usr/bin/jackd $JACK_PARAMS &> /dev/null &'<br />
else<br />
export JACK_PROMISCUOUS_SERVER=""<br />
umask 0000<br />
/usr/bin/jackd $JACK_PARAMS &> /dev/null &<br />
fi<br />
fi<br />
<br />
if [ ! -z "$PID" -o $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
add_daemon jack<br />
stat_done<br />
fi<br />
;;<br />
stop)<br />
stat_busy "Stopping JACK"<br />
[ ! -z "$PID" ] && kill $PID &> /dev/null<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
rm_daemon jack<br />
stat_done<br />
fi<br />
;;<br />
restart)<br />
$0 stop<br />
sleep 1<br />
$0 start<br />
;;<br />
*)<br />
echo "usage: $0 {sta<br />
</pre><br />
<br />
Where my '''<tt>/etc/conf.d/jack-audio-connection-kit</tt>''' is<br />
<pre><br />
# Configuration for starting JACK at boot<br />
<br />
# Uncomment this to run as user (recommended)<br />
#JACKUSER="root"<br />
<br />
# Uncomment this to not source ~/.jackdrc<br />
JACK_PARAMS="-R -P89 -dalsa -dhw:1 -r48000 -p512 -n3"<br />
</pre><br />
<br />
==Playing nice with ALSA==<br />
To allow Alsa programs to play while jack is running you must install the jack plugin for alsa:<br />
<pre>pacman -S alsa-plugins</pre><br />
<br />
And enable it by editing (or creating) /etc/asound.conf (system wide settings) to have these lines:<br />
<pre><br />
# convert alsa API over jack API<br />
# use it with<br />
# % aplay foo.wav<br />
<br />
# use this as default<br />
pcm.!default {<br />
type plug<br />
slave { pcm "jack" }<br />
}<br />
<br />
ctl.mixer0 {<br />
type hw<br />
card 1<br />
}<br />
<br />
# pcm type jack<br />
pcm.jack {<br />
type jack<br />
playback_ports {<br />
0 system:playback_1<br />
1 system:playback_2<br />
}<br />
capture_ports {<br />
0 system:capture_1<br />
1 system:capture_2<br />
}<br />
}</pre><br />
<br />
You needn't restart your computer or anything. Just edit the alsa config files, start up jack, and there you go...<br />
<br />
=Related Articles=<br />
[[Pro Audio]]</div>Tim.thelionhttps://wiki.archlinux.org/index.php?title=JACK_Audio_Connection_Kit&diff=103132JACK Audio Connection Kit2010-04-13T17:38:37Z<p>Tim.thelion: </p>
<hr />
<div><math>Insert formula here</math>{{stub}}<br />
<br />
If you know anything about JACK, please expand this article. I've uninstalled it, so I can't really expand it any further.<br />
<br />
=Install=<br />
==Multiprocessor implementation (soon: JACK2)==<br />
[http://www.grame.fr/~letz/jackdmp.html Here's] a mp version of JACK which will also be used as base for JACK2. <br />
<br />
[[AUR]] package: [http://aur.archlinux.org/packages.php?ID=22488 jack-audio-connection-kit-mp]<br />
<br />
You can compile Jack2 with the new dbus-based control system or the 'classic' interface. Which one you have depends on whether you compiled Jack2 with the --dbus configure option or not.<br />
<br />
Jack2 without --dbus executes similarly to Jack1. With --dbus, control is done using the jack_control utility. Run `jack_control` to see what it does. The important commands are listed below:-<br />
jack_control start - starts the jack server<br />
jack_control stop - stops the jack server<br />
jack_control ds alsa - selects alsa as the driver (backend)<br />
jack_control eps realtime True - set engine parameters, such as realtime<br />
jack_control dps period 256 - set the driver parameter period to 256<br />
<br />
You may also need to play with the driver parameters nperiods and rate.<br />
<br />
==JACK==<br />
Alternatively, there is the normal version from the extra repository, install it with:<br />
pacman -S jack<br />
<br />
=== Jack for a multi-user system ===<br />
So, you have a descent multiuser system as it was designed more than 20 years ago, and now some developers decided that sound is only for a mono-user system... No I can not believe it !<br />
<br />
{{Warning|Before following the below instructions, please note that there is a security risk to any service running as root, and, more importantly, the developers for jack do not test it for running as root. In other words, it could eat your babies, data, or both}}<br />
<br />
Fortunately some time ago someone convinced the developers to allow jack to run as a system wide daemon. Here is the procedure to follow:<br />
<br />
'''Create a <tt>/etc/profile.d/jack.sh</tt> file''' containing:<br />
export JACK_PROMISCUOUS_SERVER=""<br />
<br />
'''Replace <tt>/etc/rc.d/jack-audio-connection-kit</tt>''' with the following content<br />
<pre><br />
#!/bin/bash <br />
<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
<br />
# source application-specific settings<br />
[ -f /etc/conf.d/jack-audio-connection-kit ] && . /etc/conf.d/jack-audio-connection-kit<br />
<br />
PID=`pidof -o %PPID /usr/bin/jackd`<br />
<br />
[ -n "$JACKUSER" ] && HOME="/home/$JACKUSER"<br />
[ -z "$JACK_PARAMS" ] && JACK_PARAMS=$(sed 's:/usr/bin/jackd ::' $HOME/.jackdrc)<br />
<br />
case "$1" in<br />
start)<br />
stat_busy "Starting JACK"<br />
if [ -z "$PID" ]; then<br />
if [ -n "$JACKUSER" ]; then<br />
su - $JACKUSER -c 'export JACK_PROMISCUOUS_SERVER="" && . /etc/conf.d/jack-audio-connection-kit && umask 0000 && /usr/bin/jackd $JACK_PARAMS &> /dev/null &'<br />
else<br />
export JACK_PROMISCUOUS_SERVER=""<br />
umask 0000<br />
/usr/bin/jackd $JACK_PARAMS &> /dev/null &<br />
fi<br />
fi<br />
<br />
if [ ! -z "$PID" -o $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
add_daemon jack<br />
stat_done<br />
fi<br />
;;<br />
stop)<br />
stat_busy "Stopping JACK"<br />
[ ! -z "$PID" ] && kill $PID &> /dev/null<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
rm_daemon jack<br />
stat_done<br />
fi<br />
;;<br />
restart)<br />
$0 stop<br />
sleep 1<br />
$0 start<br />
;;<br />
*)<br />
echo "usage: $0 {sta<br />
</pre><br />
<br />
Where my '''<tt>/etc/conf.d/jack-audio-connection-kit</tt>''' is<br />
<pre><br />
# Configuration for starting JACK at boot<br />
<br />
# Uncomment this to run as user (recommended)<br />
#JACKUSER="root"<br />
<br />
# Uncomment this to not source ~/.jackdrc<br />
JACK_PARAMS="-R -P89 -dalsa -dhw:1 -r48000 -p512 -n3"<br />
</pre><br />
<br />
==Playing nice with ALSA==<br />
To allow Alsa programs to play while jack is running you must install the jack plugin for alsa:<br />
<pre>pacman -S alsa-plugins</pre><br />
<br />
And enable it by editing (or creating) /etc/asound.conf (system wide settings) (recommended) or ~/.asoundrc (settings on a per user basis) to have these lines:<br />
<pre><br />
# convert alsa API over jack API<br />
# use it with<br />
# % aplay foo.wav<br />
<br />
# use this as default<br />
pcm.!default {<br />
type plug<br />
slave { pcm "jack" }<br />
}<br />
<br />
ctl.mixer0 {<br />
type hw<br />
card 1<br />
}<br />
<br />
# pcm type jack<br />
pcm.jack {<br />
type jack<br />
playback_ports {<br />
0 system:playback_1<br />
1 system:playback_2<br />
}<br />
capture_ports {<br />
0 system:capture_1<br />
1 system:capture_2<br />
}<br />
}</pre><br />
<br />
You needn't restart your computer or anything. Just edit the alsa config files, start up jack, and there you go...<br />
<br />
=Related Articles=<br />
[[Pro Audio]]</div>Tim.thelion