https://wiki.archlinux.org/api.php?action=feedcontributions&user=Naguz&feedformat=atomArchWiki - User contributions [en]2024-03-29T11:06:27ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=PulseAudio&diff=141799PulseAudio2011-05-17T12:47:54Z<p>Naguz: /* KDE4 */</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
[[Category:Audio/Video (English)]]<br />
{{i18n|PulseAudio}}<br />
<br />
'''PulseAudio''' is a general purpose sound server. For a list of features, see [[Wikipedia:PulseAudio#Features]].<br />
<br />
{{Tip|If you want to play sound from multiple applications, [[ALSA]] already provides a basic software mixer named "dmix" which is enabled by default.}}<br />
<br />
==Installation==<br />
To install PulseAudio:<br />
# pacman -S pulseaudio-alsa<br />
<br />
Optionally you can install some GTK front-ends for PulseAudio:<br />
# pacman -S paprefs pavucontrol<br />
<br />
==Running==<br />
If the D-Bus system daemon is not already running, start it:<br />
<br />
# /etc/rc.d/dbus start<br />
<br />
PulseAudio can be started with:<br />
$ pulseaudio --start<br />
<br />
Or if you use X11:<br />
$ start-pulseaudio-x11<br />
<br />
If you use KDE 4:<br />
$ start-pulseaudio-x11; start-pulseaudio-kde<br />
<br />
PulseAudio can be stopped with:<br />
$ pulseaudio --kill<br />
<br />
Note that in the case of most X11 environments, PulseAudio will be automatically started together with the X11 session. See the section on Desktop Environments for details.<br />
<br />
==Backend Configuration==<br />
<br />
===ALSA===<br />
For the applications that do not support PulseAudio and support ALSA it is '''recommended''' to install the PulseAudio plugin for ALSA. The simplest way of doing this is installing the pulseaudio-alsa package:<br />
<br />
# pacman -S pulseaudio-alsa<br />
<br />
This package also contains the necessary {{Filename|/etc/asound.conf}} for configuring ALSA to use PulseAudio.<br />
<br />
If you are on Arch x86_64 and want to have sound for 32 bit programs (like Wine), make sure to install lib32-libpulse and lib32-alsa-plugins as well.<br />
<br />
To prevent applications from using ALSA's OSS emulation and bypassing Pulseaudio (thereby preventing other applications from playing sound), remove the {{Codeline|snd_pcm_oss}} module by executing:<br />
# rmmod snd_pcm_oss<br />
<br />
Afterwards, blacklist the module by adding {{Codeline|!snd_pcm_oss}} to MODULES in {{Filename|/etc/rc.conf}}.<br />
<br />
===OSS===<br />
There are multiple ways of making OSS-only programs play to PulseAudio:<br />
<br />
====osspd====<br />
This is the simplest method.<br />
<br />
Install '''ossp''' and start oospd with:<br />
/etc/rc.d/osspd start<br />
<br />
Afterwards, add it to DAEMONS in rc.conf.<br />
<br />
====padsp wrapper====<br />
If you have a program that uses OSS you can make it work with PulseAudio by starting it with padsp:<br />
$ padsp OSSprogram<br />
A few examples:<br />
$ padsp aumix<br />
$ padsp sox foo.wav -t ossdsp /dev/dsp<br />
<br />
If you prefer you can rename the program OSSprogram-bin and replace it with a script like this: <br />
{{File|name=/usr/bin/OSSProgram|content=<br />
#!/bin/sh<br />
if test -x /usr/bin/padsp; then<br />
exec /usr/bin/padsp /usr/bin/OSSprogram-bin "$@"<br />
else<br />
exec /usr/bin/OSSprogram "$@"<br />
fi<br />
}}<br />
<br />
===GStreamer===<br />
To make [[GStreamer]] use PulseAudio, execute {{Filename|gstreamer-properties}} (part of ''gnome-media'' package) and select ''PulseAudio Sound Server'' in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables {{Codeline|/system/gstreamer/0.10/default/audiosink}} to ''pulsesink'' and {{Codeline|/system/gstreamer/0.10/default/audiosrc}} to ''pulsesrc'':<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc<br />
<br />
Some applications (like Rhythmbox) ignore the ''audiosink'' property, but rely instead on ''musicaudiosink'', which can't be configured using {{Filename|gstreamer-properties}} but needs to be manually set using {{Filename|gconf-editor}} or the {{Filename|gconftool-2}}:<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink<br />
<br />
===OpenAL===<br />
OpenAL Soft should use PulseAudio by default, but can be explicitly configured to do so: {{File|name=/etc/openal/alsoft.conf|content=drivers=pulse,alsa}}<br />
<br />
===libao===<br />
Edit the libao configuration file:<br />
{{File|name=/etc/libao.conf|content=default_driver=pulse}}<br />
<br />
===PortAudio===<br />
The current binary of PortAudio in the community repository does not support PulseAudio and non-mmap audio devices. This can be remedied by building PortAudio from ABS and applying [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/portaudio/current/SOURCES/portaudio-19-alsa_pulse.patch?revision=313993 a patch] to the sources.<br />
<br />
===ESD===<br />
PulseAudio is a drop-in replacement for the enlightened sound daemon (ESD). While PulseAudio is running, ESD clients should be able to output to it without configuration.<br />
<br />
==Desktop Environments==<br />
<br />
===General X11===<br />
Start Pulseaudio after the X session using:<br />
$ start-pulseaudio-x11<br />
<br />
This will start PulseAudio and load the X11 plugins.<br />
<br />
Note that PulseAudio may already launch automatically. This is handled by either {{Filename|/etc/X11/xinit/xinitrc.d/pulseaudio}} or the files in {{Filename|/etc/xdg/autostart/}}.<br />
<br />
====X11 bell====<br />
To make PulseAudio play a sample when an X11 bell event happens (e.g. to make your terminal go 'Ping!' instead of 'Beep!'), add the following to<br />
{{Filename|/etc/pulse/default.pa}}:<br />
# Prevent pulseaudio --start from failing when following commands fail (eg. when X is not active)<br />
.nofail<br />
load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/dialog-error.oga<br />
load-module module-x11-bell sample=x11-bell<br />
.fail<br />
<br />
You can also use another sample. {{Filename|dialog-error.oga}} is provided by ''sound-theme-freedesktop''.<br />
<br />
===GNOME===<br />
Proper integration of PulseAudio into GNOME requires some special packages:<br />
* gnome-media-pulse<br />
* gnome-settings-daemon-pulse<br />
* libcanberra-pulse<br />
<br />
They are part of the ''pulseaudio-gnome'' group.<br />
<br />
===KDE 3===<br />
PulseAudio is ''not'' a drop-in replacement for aRts. If you use KDE 3, it is not currently possible to use PulseAudio.<br />
<br />
===KDE 4 and Qt4===<br />
If you've installed PulseAudio, it will be used by KDE4/Qt4 applications. For more information see the [http://www.pulseaudio.org/wiki/KDE KDE pages in the PulseAudio wiki].<br />
<br />
Additionally, a minimal KDE alternative to pavucontrol, the [https://aur.archlinux.org/packages.php?ID=43848 veromix plasmoid] is available in the AUR.<br />
<br />
==Applications==<br />
===Audacious===<br />
Audacious natively supports PulseAudio. In order to use it, in Audacious you should set Audacious Preferences -> Audio -> Current output plugin to 'PulseAudio Output Plugin'.<br />
<br />
===mpd===<br />
You will need to [http://mpd.wikia.com/wiki/PulseAudio configure] mpd to use PulseAudio.<br />
<br />
On a headless box, run PulseAudio as the ''mpd'' user.<br />
On a desktop, running mpd as yourself and not using the ''mpd'' user is preferred.<br />
<br />
===MPlayer===<br />
MPlayer natively supports PulseAudio output with the "{{Codeline|-ao pulse}}" option. It can also be configured to default to PulseAudio output, in {{Filename|~/.mplayer/config}} for per-user, or {{Filename|/etc/mplayer/mplayer.conf}} for system-wide:<br />
{{File|name=/etc/mplayer/mplayer.conf|content=ao=pulse}}<br />
<br />
===Flashplugin (x86_64 only)===<br />
If you are using flashplugin from the multilib repository you need to install lib32-alsa-plugins and lib32-libcanberra-pulse if you want to use software mixing, otherwise you will not be able to use other audio application while using flashplugin.<br />
<pre><br />
# pacman -S lib32-alsa-plugins lib32-libcanberra-pulse<br />
</pre><br />
<br />
===Skype (x86_64 only)===<br />
Install lib32-libpulse from multilib, otherwise you will get the Error "Problem with Audio Playback" when trying to initiate a call.<br />
<br />
===volume control===<br />
Adapt the variable 'device' to your sink-device listed in <pre>pactl list</pre> and you can change the volume using this script.<br />
<pre><br />
#!/bin/bash<br />
device="alsa_output.pci-0000_00_14.2.analog-stereo"<br />
case "$1" in<br />
"up") # increase volume by 1000<br />
pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3+1000 > 65535) {system ("pactl "$1" '${device}' "65535)} else {system ("pactl "$1" '${device}' "$3+1000)}}}'<br />
;;<br />
"down") # decrease volume by 1000<br />
pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3-1000 < 0) {system ("pactl "$1" '${device}' "0)} else {system ("pactl "$1" '${device}' "$3-1000)}}}'<br />
;;<br />
"mute") # toggle mute<br />
pacmd dump|awk --non-decimal-data '$1~/set-sink-mute/{if ($2~/'${device}'/) {system ("pactl "$1" '${device}' "($3=="yes"?"no":"yes"))}}'<br />
;;<br />
esac<br />
</pre><br />
<br />
==Alternative configurations==<br />
===Surround sound systems===<br />
Many people have a surround card, but have speakers for just two channels, so PulseAudio cannot really default to a surround setup. To enable all the channels, edit {{Filename|/etc/pulse/daemon.conf}}: uncomment the default-sample-channels line (i.e. remove the semicolon from the beginning of the line) and set the value to '''6''' if you have a ''5.1'' setup, or '''8''' if you have ''7.1'' setup etc.<br />
# Default<br />
default-sample-channels=2<br />
# For 5.1<br />
default-sample-channels=6<br />
# For 7.1<br />
default-sample-channels=8<br />
<br />
After doing the edit, you will need to restart Pulseaudio.<br />
<br />
===Advanced ALSA Configuration===<br />
In order for ALSA to use PulseAudio it needs a special {{Filename|/etc/asound.conf}} (system wide settings) (recommended) or {{Filename|~/.asoundrc}} (settings on a per user basis):<br />
{{File|name=/etc/asound.conf|content=<br />
pcm.pulse {<br />
type pulse<br />
}<br />
ctl.pulse {<br />
type pulse<br />
}<br />
pcm.!default {<br />
type pulse<br />
}<br />
ctl.!default {<br />
type pulse<br />
}<br />
}}<br />
<br />
If you omit the last two groups, Pulseaudio will not be used by default. You will then need to change the ALSA device to "pulse" in the applications that you use to make it work.<br />
<br />
====ALSA Monitor source====<br />
To be able to record from a monitor source (a.k.a. "What-U-Hear", "Stereo Mix"), use {{Codeline|pactl list}} to find out the name of the source in Pulseaudio (e.g. {{Codeline|alsa_output.pci-0000_00_1b.0.analog-stereo.monitor}}). Then add lines like the following to {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.pulse_monitor {<br />
type pulse<br />
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor<br />
}<br />
<br />
ctl.pulse_monitor {<br />
type pulse<br />
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor<br />
}<br />
<br />
Now you can select {{Codeline|pulse_monitor}} as a recording source.<br />
<br />
{{Note|You can also simply install the package 'pulseaudio-alsa'}}<br />
<br />
===PulseAudio over network===<br />
One of PulseAudio's magnificent features is the possibility to stream audio from clients over TCP to the server running the PulseAudio daemon, allowing sound to be streamed through your LAN.<br />
<br />
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients. <br />
<br />
====TCP support (networked sound)====<br />
To enable the TCP module, add this to (or uncomment, if already there) {{Filename|/etc/pulse/default.pa}}:<br />
load-module module-native-protocol-tcp<br />
<br />
To allow remote connections to the TCP module, you also have to remember to unblock the service in {{Filename|/etc/hosts.allow}} with the following line:<br />
pulseaudio-native: ALL<br />
<br />
Note: If you are having trouble connecting, use (on server)<br />
pacmd>> list-modules<br />
(you can even load modules from here!)<br />
<br />
====Zeroconf (Avahi) publishing====<br />
For the remote Pulseaudio server to appear in the PulseAudio Device Chooser ({{Filename|padevchooser}}), you will also need to add the {{Filename|avahi-daemon}} to the DAEMONS in rc.conf on both server and clients.<br />
<br />
====Switching the PulseAudio server used by local X clients====<br />
To switch between servers on the client from within X, the {{Codeline|pax11publish}} command can be used. For example, to switch from the default server to the server at hostname foo:<br />
$ pax11publish -e -S foo<br />
<br />
Or to switch back to the default:<br />
$ pax11publish -e -r<br />
<br />
Note that for the switch to become apparent, the programs using Pulse must be restarted.<br />
<br />
===Pulseaudio through JACK===<br />
The JACK-Audio-Connection-Kit is popular for audio work, and is widely supported by Linux audio applications. It fills a similar niche as Pulseaudio, but with more of an emphasis on professional audio work. In particular, audio applications such as Ardour and Audacity (recently) work well with Jack.<br />
<br />
Pulseaudio provides module-jack-source and module-jack-sink which allow Pulseaudio to be run as a sound server above the JACK daemon. This allows the usage of per-volume adjustments and the like for the apps which need it, play-back apps for movies and audio, while allowing low-latency and inter-app connectivity for sound-processing apps which connect to JACK. However, this will prevent Pulseaudio from directly writing to the sound card buffers, which will increase overall CPU usage.<br />
<br />
To just try PA on top of jack you can have PA load the necessary modules on start:<br />
pulseaudio -L module-jack-sink -L module-jack-source<br />
<br />
To use pulseaudio with JACK, JACK must be started up before Pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit {{Filename|/etc/pulse/default.pa}}, and change the following region:<br />
### Load audio drivers statically (it is probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
.ifexists module-udev-detect.so<br />
load-module module-udev-detect<br />
.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack udev support)<br />
load-module module-detect<br />
.endif<br />
<br />
to the following:<br />
### Load audio drivers statically (it is probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
load-module module-jack-source<br />
load-module module-jack-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
#.ifexists module-udev-detect.so<br />
#load-module module-udev-detect<br />
#.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack udev support)<br />
#load-module module-detect<br />
#.endif<br />
<br />
Basically, this prevents module-udev-detect from loading. module-udev-detect will always try to grab your sound-card (JACK has already done that, so this will cause an error). Also, the jack source and sink must be explicitly loaded.<br />
<br />
====QjackCtl with Startup/Shutdown Scripts====<br />
Using the settings listed above you can use QjackCtl to execute a script upon startup and shutdown to load/unload PulseAudio. Part of the reason you may wish to do this is that the above changes disable PulseAudio's automatic hardware detection modules. This particular setup is for using PulseAudio in an exclusive fashion with JACK, though the scripts could be modified to unload and load an alternate non-JACK setup, but killing and starting PulseAudio while programs might be using it would become problematic.<br />
<br />
The following example could be used and modified as necessary as a startup script that daemonizes PulseAudio and loads the ''padevchooser'' program (optional, needs to be built from AUR) called {{Filename|jack_startup}}:<br />
#!/bin/bash<br />
#Load PulseAudio and PulseAudio Device Chooser<br />
<br />
pulseaudio -D<br />
padevchooser&<br />
<br />
as well as a shutdown script to kill PulseAudio and the Pulse Audio Device Chooser, as another example called {{Filename|jack_shutdown}} also in the home directory:<br />
#!/bin/bash<br />
#Kill PulseAudio and PulseAudio Device Chooser<br />
<br />
pulseaudio --kill<br />
killall padevchooser<br />
<br />
Both scripts need to be made executable:<br />
chmod +x jack_startup jack_shutdown<br />
<br />
then with QjackCtl loaded, click on the ''Setup'' button and then the ''Options'' tab and tick both "Execute Script after Startup:" And "Execute Script on Shutdown:" and put either use the ... button or type the path to the scripts (assuming the scripts are in the home directory) {{Filename|~/jack_startup}} and {{Filename|~/jack_shutdown}} making sure to save the changes you have made.<br />
<br />
===Pulseaudio through OSS===<br />
Add the following to {{Filename|/etc/pulse/default.pa}}:<br />
load-module module-oss<br />
<br />
Then start Pulseaudio as usual. You should have sinks and sources for your OSS devices.<br />
<br />
===Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)===<br />
Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself ({{Codeline|pacman -S pulseaudio}} within the chroot environment).<br />
<br />
Pulseaudio, if not set up to connect to any specific server (this can be done in {{Filename|/etc/pulse/client.conf}}, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in {{Filename|/var/lib/dbus}}. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-<br />
/var/run<br />
/var/lib/dbus<br />
/tmp<br />
~/.pulse<br />
<br />
{{Filename|/dev/shm}} should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the {{Filename|~/.pulse}} folder.<br />
<br />
For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the [http://wiki.archlinux.org/index.php?title=Arch64_Install_bundled_32bit_system#Additional_mount_option_to_allow_32-bit_apps_to_access_the_64-bit_Pulseaudio_server additional section] specific to Pulseaudio.<br />
<br />
===Simultaneous Digital and Analog Output===<br />
As an example situation: you want to listen to music at your desktop, using the regular 3.5mm analog outputs into your desktop PC speakers. You also want to feed the same music to your hi-fi system in another room via your sound card's digital output. You would think this would be a simple matter, but for many sound chipsets, it requires some editing to get it set up since the default Pulseaudio profiles allow you to use either analog or digital, but not both simultaneously.<br />
<br />
The solution is as follows (with thanks for some useful pointers from: http://superuser.com/questions/267442/how-to-get-simultaneous-sound-from-pulseadio-on-two-outputs-analog-and-digital). Amarok is used in this example.<br />
<br />
* Install "pavucontrol" (pacman -S pavucontrol). You ''won't'' be needing the other useful pulse configuration utility "paprefs" for this task.<br />
* In a terminal, launch "pacmd" - a command line utility for loading pulse modules<br />
* Enter the following commands in pacmd in this order (where your numbers for "hw:0,0" are determined by entering "aplay -l" in terminal. One number is the hardware ID for the analog device, the other for the digital):<br />
load-module module-alsa-sink device="hw:0,0" sink_name=analog_output<br />
load-module module-alsa-sink device="hw:0,1" sink_name=digital_output<br />
load-module module-combine sink_name=analog_digital slaves=digital_output,analog_output<br />
<br />
* Open "pavucontrol" from a terminal<br />
* Under pavucontrol's "Playback Tab", for the running app Amarok, select "Simultaneous output to Internal Audio, Internal Audio" (you will need to have Amarok playing something to test this)<br />
* Under the "Configuration Tab" Select "Digital Stereo Duplex (IEC958)" for "Internal Audio" (your exact names may vary here, according to how ALSA has named your hardware). You should now be able to hear Amarok playing on both your analog and digital outputs!<br />
<br />
The above solution only holds to long as you have pacmd running, and is specific for the running app (in the above example, Amarok).<br />
<br />
To set the the sinks up every reboot and for all audio apps, add the above load-module commands to your '''/etc/pulse/default.pa''' file. You may need to add them at the start of the file, just above line "### Automatically restore the volume of streams and devices", or it may not work as expected.<br />
<br />
Finally, use the Gnome 3 sound preferences to set your system's default "Output" to "Simultaneous output to Internal Audio, Internal Audio".<br />
<br />
==Troubleshooting==<br />
===No sound after install===<br />
<br />
====Flash Content====<br />
If after installing pulseaudio you get no sound from flash content, you can try installing [http://aur.archlinux.org/packages.php?ID=13384 libflashsupport-pulse] from the AUR.<br />
<br />
====No cards====<br />
If PulseAudio starts, run {{Codeline|pacmd list}}. If no cards are reported, make sure that your ALSA devices are not in use:<br />
$ fuser -v /dev/snd/*<br />
$ fuser -v /dev/dsp<br />
<br />
Make sure any applications using the pcm or dsp files are shut down before restarting PulseAudio.<br />
<br />
====KDE4====<br />
It may be that you have another output device set as preferred in phonon. Make sure that every setting has your preferred output device at the top, and check pavucontrol (install using pacman) to make sure that applications are using the device for output.<br />
<br />
Note: Pulseaudio doesn't work by default with Gstreamer phonon-backend. It does, however, with the phonon-vlc backend (availible in the extra repo).<br />
<br />
====Muted audio device====<br />
If you experience no audio output via any means while using ALSA as your default device, you may have to unmute your sound card. To do this, you will want to launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')<br />
$ alsamixer -c 0<br />
<br />
===Daemon startup failed===<br />
Try resetting PulseAudio. To do that:<br />
$ pulseaudio --kill<br />
$ killall pulseaudio<br />
$ killall -9 pulseaudio<br />
$ rm -rf ~/.pulse*<br />
$ rm -rf /tmp/pulse*<br />
<br />
Afterwards, start PulseAudio again.<br />
<br />
===padevchooser===<br />
If you cannot launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:<br />
$ /etc/rc.d/avahi-daemon restart<br />
<br />
===Glitches, skips or crackling===<br />
The PulseAudio sound server uses a timer-based audio scheduling instead of the traditional interrupt-driven approach. Timer-based scheduling may expose issues in some ALSA drivers. To turn timer-based scheduling off, replace the line:<br />
load-module module-udev-detect <br />
in {{Filename|/etc/pulse/default.pa}} by:<br />
load-module module-udev-detect tsched=0<br />
Then restart the PulseAudio server.<br />
<br />
===Choppy sound===<br />
Choppy sound in pulsaudio can result from wrong settings for the sample rate in /etc/pulse/daemon.conf. Try changing the line <br />
; default-sample-rate = 44100<br />
to <br />
default-sample-rate = 48000<br />
and restart the PulseAudio server.<br />
<br />
===Volume adjustment doesn't work properly===<br />
You might wan't to check <br />
/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common<br />
<br />
If the volume does not appear to increment/decrement properly using {{Codeline|alsamixer}} or {{Codeline|amixer}}, it may be due to pulseaudio having a larger number of increments (65537 to be exact). Try using larger values when changing volume (e.g. {{Codeline|amixer set Master 655+}}).<br />
<br />
===Volume gets louder every time a new application is started===<br />
If you encounter this issue, you can fix it by uncommenting <br />
flat-volumes = no<br />
in<br />
/etc/pulse/daemon.conf<br />
<br />
==External links==<br />
*[http://www.pulseaudio.org/wiki/PerfectSetup http://www.pulseaudio.org/wiki/PerfectSetup] - A good guide to make your configuration perfect<br />
*[http://www.alsa-project.org/main/index.php/Asoundrc http://www.alsa-project.org/main/index.php/Asoundrc] - Alsa wiki on .asoundrc<br />
*[http://www.pulseaudio.org/ http://www.pulseaudio.org/] - PulseAudio official site<br />
*[http://www.pulseaudio.org/wiki/FAQ http://www.pulseaudio.org/wiki/FAQ] - PulseAudio FAQ</div>Naguzhttps://wiki.archlinux.org/index.php?title=Touchpad_Synaptics&diff=99862Touchpad Synaptics2010-03-12T15:28:55Z<p>Naguz: /* Troubleshooting */</p>
<hr />
<div>[[Category:Input devices (English)]][[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Touchpad Synaptics}}<br />
{{i18n_entry|German|Touchpad Synaptics (Deutsch)}}<br />
{{i18n_entry|Русский|Тачпад Synaptics}}<br />
{{i18n_entry|简体中文|触摸板 (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
This article details the installation and configuration process of the '''''Synaptics input driver''''' for Synaptics (and ALPS) touchpads found on most notebooks.<br />
<br />
==Installation==<br />
<br />
The Synaptics driver is now bundled as ''xf86-input-synaptics'', and is available in the [[Official_Repositories|[extra] repository]]:<br />
<br />
# pacman -S xf86-input-synaptics<br />
<br />
==Configuration==<br />
<br />
Configuration for the touchpad should done by tweaking options in the XML format *.fdi policy file with latest Xserver installed using [[Xorg input hotplugging|hotplugging]]. Alternatively, configuration can be done using xorg.conf. Please note, however, that this method of configuring is deprecated and might stop working in the future. Configuration by HAL policy is therefore encouraged.<br />
<br />
===Configuration via HAL policy (hotplugging enabled, recommended) ===<br />
<br />
With [[Xorg input hotplugging|hotplugging]] (enabled by default) and HAL installed and running, your Synaptics should work "out-of-the-box".<br />
<br />
If it doesn't or you want to tweak the configuration, you will need to edit the appropriate HAL policy file (XML format).<br />
Note that in this case.<br />
<br />
Copy '''/usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi''' into '''/etc/hal/fdi/policy/'''<br />
cp /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi /etc/hal/fdi/policy/<br />
<br />
Now you can modify the new file appending new options.<br />
<br />
Here's a simple template to begin with, covering the more common features:<br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.product" contains="Synaptics TouchPad"><br />
<!-- <match key="info.product" contains="AlpsPS/2 ALPS GlidePoint"> #ALPS users may need to use this instead of the above --><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
<merge key="input.x11_options.AlwaysCore" type="string">true</merge><br />
<merge key="input.x11_options.VertEdgeScroll" type="string">true</merge><br />
<merge key="input.x11_options.HorizEdgeScroll" type="string">true</merge><br />
<merge key="input.x11_options.TapButton1" type="string">1</merge><br />
<merge key="input.x11_options.TapButton2" type="string">2</merge><br />
<merge key="input.x11_options.TapButton3" type="string">3</merge><br />
<merge key="input.x11_options.protocol" type="string">event</merge><br />
<merge key="input.x11_options.touchpadoff" type="string">0</merge><br />
<merge key="input.x11_options.shmconfig" type="string">on</merge><br />
</match><br />
</device><br />
</deviceinfo><br />
<br />
The syntax is similar to xorg.conf, for instance, <br />
Option "RightEdge" "5300"<br />
equates to this .fdi file line:<br />
<merge key="input.x11_options.RightEdge" type="string">5300</merge><br />
{{Box Note| In the .fdi file, every type must be "string" instead of "float" or "int" as per xorg.conf.}}<br />
{{Box Note| You might need to run '''/etc/rc.d/hal restart''' in order for the changes to take place.}}<br />
<br />
====Advanced policy configuration====<br />
<br />
The Synaptics driver allows for a vast amount of options to be tweaked. Luckily, all of them are consistently named and well documented in Synaptic's manpage.<br />
<br />
man synaptics<br />
<br />
Here is a complete {{Filename|11-x11-synaptics.fdi}} configuration example. Do not use this example blindly. It is best practice to work from the default values ({{Codeline|synaptics -l}}) and work from there. For more read the man page and look at [[#Fine-tuning_with_synclient]]:<br />
<br />
<pre><?xml version="1.0" encoding="ISO-8859-1"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<br />
<!-- Type --><br />
<match key="info.capabilities" contains="input.touchpad"><br />
<match key="info.product" contains="Synaptics TouchPad"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
</match><br />
<br />
<!-- Values --><br />
<br />
<!-- Enable --><br />
<merge key="input.x11_options.TouchpadOff" type="string">0</merge><br />
<br />
<!-- Run-time Configuration Allow --><br />
<merge key="input.x11_options.SHMConfig" type="string">on</merge><br />
<br />
<!-- Edge Limits --><br />
<merge key="input.x11_options.LeftEdge" type="string">1478</merge><br />
<merge key="input.x11_options.RightEdge" type="string">5640</merge><br />
<merge key="input.x11_options.TopEdge" type="string">1274</merge><br />
<merge key="input.x11_options.ButtonEdge" type="string">4752</merge><br />
<br />
<!-- Speed --><br />
<merge key="input.x11_options.MinSpeed" type="string">0.4</merge><br />
<merge key="input.x11_options.MaxSpeed" type="string">0.7</merge><br />
<merge key="input.x11_options.AccelFactor" type="string">0.00995223</merge><br />
<br />
<!-- Pressure --><br />
<merge key="input.x11_options.FingerLow" type="string">24</merge><br />
<merge key="input.x11_options.FingerHigh" type="string">29</merge><br />
<merge key="input.x11_options.FingerPress" type="string">255</merge><br />
<br />
<!-- Tapping --><br />
<!-- Disable --><br />
<merge key="input.x11_options.MaxTapTime" type="string">0</merge><br />
<!-- Detect --><br />
<merge key="input.x11_options.MaxTapMove" type="string">29</merge><br />
<merge key="input.x11_options.MaxDoubleTapTime" type="string">255</merge><br />
<merge key="input.x11_options.SingleTapTimeout" type="string">180</merge><br />
<merge key="input.x11_options.ClickTime" type="string">100</merge><br />
<merge key="input.x11_options.FastTaps" type="string">0</merge><br />
<!-- Buttons (number of fingers) --><br />
<merge key="input.x11_options.TapButton1" type="string">1</merge><br />
<merge key="input.x11_options.TapButton2" type="string">2</merge><br />
<merge key="input.x11_options.TapButton3" type="string">3</merge><br />
<!-- Tap Dragging --><br />
<merge key="input.x11_options.LockedDrags" type="string">0</merge><br />
<merge key="input.x11_options.LockedDragTimeout" type="string">5000</merge><br />
<!-- Tap Gesture Dragging --><br />
<merge key="input.x11_options.TapAndDragGesture" type="string">0</merge><br />
<!-- Corner Tap Buttons --><br />
<merge key="input.x11_options.RTCornerButton" type="string">0</merge><br />
<merge key="input.x11_options.RBCornerButton" type="string">0</merge><br />
<merge key="input.x11_options.LTCornerButton" type="string">0</merge><br />
<merge key="input.x11_options.LBCornerButton" type="string">0</merge><br />
<br />
<!-- Scrolling --><br />
<!-- Vertical (Right Edge)--><br />
<merge key="input.x11_options.VertEdgeScroll" type="string">true</merge><br />
<merge key="input.x11_options.VerteScrollDelta" type="string">100</merge><br />
<!-- Horizontal (Bottom Edge)--><br />
<merge key="input.x11_options.HorizEdgeScroll" type="string">false</merge><br />
<merge key="input.x11_options.HorizScrollDelta" type="string">100</merge><br />
<!-- Circular Scrolling --><br />
<merge key="input.x11_options.CircularScrolling" type="string">false</merge><br />
<merge key="input.x11_options.CircScrollDelta" type="string">0.1</merge><br />
<merge key="input.x11_options.CircScrollTrigger" type="string">0</merge><br />
<!-- Two Finger --><br />
<merge key="input.x11_options.VertTwoFingerScroll" type="string">false</merge><br />
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">false</merge><br />
<!-- Corner Coasting --><br />
<merge key="input.x11_options.CornerCoasting" type="string">false</merge><br />
<merge key="input.x11_options.CoastingSpeed" type="string">0</merge><br />
<br />
<!-- Other --><br />
<!-- Kernel Event Protocol --><br />
<merge key="input.x11_options.GrabEventDevice" type="string">1</merge><br />
<!-- Edge Ignore Boundaries --><br />
<merge key="input.x11_options.AreaLeftEdge" type="string">0</merge><br />
<merge key="input.x11_options.AreaRightEdge" type="string">0</merge><br />
<merge key="input.x11_options.AreaTopEdge" type="string">0</merge><br />
<merge key="input.x11_options.AreaBottomEdge" type="string">0</merge><br />
<!-- Trackstick --><br />
<merge key="input.x11_options.TrackstickSpeed" type="string">40</merge><br />
<!-- Circular Trackpad --><br />
<merge key="input.x11_options.CircularPad" type="string">0</merge><br />
<!-- Trackpad w/ Scroll Buttons --><br />
<merge key="input.x11_options.UpDownScrolling" type="string">1</merge><br />
<merge key="input.x11_options.LeftRightScrolling" type="string">1</merge><br />
<merge key="input.x11_options.UpDownScrollRepeat" type="string">1</merge><br />
<merge key="input.x11_options.LeftRightScrollRepeat" type="string">1</merge><br />
<merge key="input.x11_options.ScrollButtonRepeat" type="string">100</merge><br />
<!-- Multi-function Buttons --><br />
<merge key="input.x11_options.ClickFinger1" type="string">1</merge><br />
<merge key="input.x11_options.ClickFinger2" type="string">1</merge><br />
<merge key="input.x11_options.ClickFinger3" type="string">1</merge><br />
<!-- Edge Movements (Pressure and Speed) --><br />
<merge key="input.x11_options.EdgeMotionMinZ" type="string">29</merge><br />
<merge key="input.x11_options.EdgeMotionMaxZ" type="string">159</merge><br />
<merge key="input.x11_options.EdgeMotionMinSpeed" type="string">1</merge><br />
<merge key="input.x11_options.EdgeMotionMaxSpeed" type="string">401</merge><br />
<merge key="input.x11_options.EdgeMotionUseAlways" type="string">0</merge><br />
<!-- Pressure Motion --><br />
<merge key="input.x11_options.PressureMotionMinZ" type="string">29</merge><br />
<merge key="input.x11_options.PressureMotionMaxZ" type="string">159</merge><br />
<merge key="input.x11_options.PressureMotionMinFactor" type="string">1</merge><br />
<merge key="input.x11_options.PressureMotionMaxFactor" type="string">1</merge><br />
<!-- Emulations --><br />
<merge key="input.x11_options.EmulateMidButtonTime" type="string">75</merge><br />
<merge key="input.x11_options.EmulateTwoFingerMinZ" type="string">280</merge><br />
<merge key="input.x11_options.EmulateTwoFingerMinW" type="string">7</merge><br />
<!-- Palm Detection --><br />
<merge key="input.x11_options.PalmDetect" type="string">0</merge><br />
<merge key="input.x11_options.PalmMinWidth" type="string">10</merge><br />
<merge key="input.x11_options.PalmMinZ" type="string">199</merge><br />
<!-- Guest Mouse --><br />
<merge key="input.x11_options.GuestMouseOff" type="string">0</merge><br />
<br />
</match><br />
</device><br />
</deviceinfo></pre><br />
<br />
====Other products====<br />
<br />
* ALPS users may try the following if the above does not work:<br />
<br />
<match key="info.product" contains="AlpsPS/2 ALPS"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
</match><br />
<br />
* Apple users with MacBook (1,1 2,1 etc...)<br />
<br />
<match key="info.product" contains="appletouch"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
</match><br />
<br />
* Apple users with latest MacBook (5,1)<br />
<br />
<match key="info.product" contains="bcm5974"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
</match><br />
<br />
{{Box Note| You can find the exact information for your touchpad in /proc/bus/input/devices.}}<br />
<br />
Or, if you find HAL is not loading your settings, try this template (the "append" child is necessary for some setups):<br />
<br />
<pre><br />
<?xml version="1.0" encoding="ISO-8859-1"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.product" contains="SynPS/2 Synaptics TouchPad"><br />
<append key="info.capabilities" type="strlist">input.touchpad</append><br />
</match><br />
<match key="info.capabilities" contains="input.touchpad"><br />
<merge key="input.x11_driver" type="string">synaptics</merge><br />
[...]<br />
</match><br />
</device><br />
</deviceinfo><br />
</pre><br />
<br />
===Configuration via xorg.conf (hotplugging disabled, deprecated) ===<br />
<br />
Edit ''/etc/X11/xorg.conf'' as root and add '''InputDevice "Touchpad" "SendCoreEvents"''' to the ''ServerLayout'':<br />
<br />
Section "ServerLayout"<br />
...<br />
InputDevice "USB Mouse" "CorePointer"<br />
'''''InputDevice "SynapticsTouchpad" "SendCoreEvents"<br />
EndSection<br />
<br />
Add '''Load "synaptics"''' to the ''Module'' section:<br />
Section "Module"<br />
...<br />
Load "glx"<br />
Load "freetype"<br />
'''''Load "synaptics"'''''<br />
...<br />
EndSection<br />
<br />
Lastly, add a new ''InputDevice'' section for the touchpad itself:<br />
Section "InputDevice"<br />
Identifier "SynapticsTouchpad"<br />
Driver "synaptics"<br />
Option "AlwaysCore" "true" # send events to CorePointer<br />
#Option "Device" "/dev/input/mice"<br />
Option "Device" "/dev/psaux"<br />
Option "Protocol" "auto-dev"<br />
Option "SHMConfig" "false" # configurable at runtime? security risk<br />
Option "LeftEdge" "1700" # x coord left<br />
Option "RightEdge" "5300" # x coord right<br />
Option "TopEdge" "1700" # y coord top<br />
Option "BottomEdge" "4200" # y coord bottom<br />
Option "FingerLow" "25" # pressure below this level triggers release<br />
Option "FingerHigh" "30" # pressure above this level triggers touch<br />
Option "MaxTapTime" "180" # max time in ms for detecting tap<br />
'''Option "VertEdgeScroll" "true" # enable vertical scroll zone'''<br />
'''Option "HorizEdgeScroll" "true" # enable horizontal scroll zone'''<br />
Option "CornerCoasting" "true" # enable continuous scroll with finger in corner<br />
Option "CoastingSpeed" "0.30" # corner coasting speed<br />
Option "VertScrollDelta" "100" # edge-to-edge scroll distance of the vertical scroll<br />
Option "HorizScrollDelta" "100" # edge-to-edge scroll distance of the horizontal scroll<br />
Option "MinSpeed" "0.10" # speed factor for low pointer movement<br />
Option "MaxSpeed" "0.60" # maximum speed factor for fast pointer movement<br />
Option "AccelFactor" "0.0020" # acceleration factor for normal pointer movements<br />
Option "VertTwoFingerScroll" "true" # vertical scroll anywhere with two fingers<br />
Option "HorizTwoFingerScroll" "true" # horizontal scroll anywhere with two fingers<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "2"<br />
Option "TapButton3" "3"<br />
EndSection<br />
<br />
The '''bold''' lines are important because users must now explicitly enable the side and bottom scroll zones of the touchpad. If you already had an InputDevice section configured for the old touchpad driver, you'll still need to add these two lines if you wish to use the scroll zones.<br />
<br />
To list all options in {{Filename|xorg.conf}} format, and their current values use this line:<br />
<br />
synclient -l | awk '/=/{printf "Option \"%s\" \"%s\"\n",$1,$3}'<br />
<br />
Save, exit and restart X. The touchpad should now have working scroll zones. You can further tweak the ''InputDevice'' settings if desired. See [[#Advanced_Configuration | Advanced Configuration]] for more information.<br />
<br />
Note that Xorg will automatically load the '''evdev''' and '''psmouse''' kernel modules required by Synaptics, however you may also add them explicitly to the MODULES array in the /etc/rc.conf file if desired.<br />
<br />
====ALPS Touchpads====<br />
<br />
For ALPS Touchpads, if the above configuration does not provide the desired results, try the following configuration instead:<br />
<br />
Section "ServerLayout"<br />
...<br />
InputDevice "USB Mouse" "CorePointer"<br />
InputDevice "Touchpad" "SendCoreEvents"<br />
EndSection<br />
<br />
Section "InputDevice"<br />
Identifier "Touchpad"<br />
Driver "synaptics"<br />
Option "Device" "/dev/input/mouse0"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "130"<br />
Option "RightEdge" "840"<br />
Option "TopEdge" "130"<br />
Option "BottomEdge" "640"<br />
Option "FingerLow" "7"<br />
Option "FingerHigh" "8"<br />
Option "MaxTapTime" "180"<br />
Option "MaxTapMove" "110"<br />
Option "EmulateMidButtonTime" "75"<br />
Option "VertScrollDelta" "20"<br />
Option "HorizScrollDelta" "20"<br />
Option "MinSpeed" "0.25"<br />
Option "MaxSpeed" "0.50"<br />
Option "AccelFactor" "0.010"<br />
Option "EdgeMotionMinSpeed" "200"<br />
Option "EdgeMotionMaxSpeed" "200"<br />
Option "UpDownScrolling" "1"<br />
Option "CircularScrolling" "1"<br />
Option "CircScrollDelta" "0.1"<br />
Option "CircScrollTrigger" "2"<br />
Option "SHMConfig" "on"<br />
Option "Emulate3Buttons" "on"<br />
EndSection<br />
<br />
==Advanced Configuration==<br />
<br />
===Input device options===<br />
<br />
There are a number of arbitrary parameters that can be tweaked for Synaptics touchpads. The following is a brief list of some of these options--see '''man synaptics''' for full details:<br />
<br />
{| class="wikitable" <br />
|-align="left"<br />
!+Option+<br />
!width=400|+Description+<br />
!width=200|+Type+<br />
|-<br />
|'''Device'''<br />
|Input device location. See [[#Troubleshooting | Troubleshooting]] to find your device handler if it isn't /dev/input/mouse0<br />
|String<br />
|-<br />
|'''MinSpeed'''<br />
|Minimum cursor speed<br />
|Decimal(float)<br />
|-<br />
|'''MaxSpeed'''<br />
|Maximum cursor speed<br />
|Decimal(float)<br />
|-<br />
|'''AccelFactor'''<br />
|Cursor Acceleration Factor<br />
|Decimal(float)<br />
|-<br />
|'''HorizScrollDelta'''<br />
|Horizontal [edge] scrolling speed(lower means faster)<br />
|Integer<br />
|-<br />
|'''VertScrollDelta'''<br />
|Vertical [edge] scrolling speed(lower means faster)<br />
|Integer<br />
|-<br />
|'''SHMConfig'''<br />
|height=100|Activation of shared memory(must be enabled for real-time configuration or [Disable touchpad upon external mouse detection| udev-based disabling]<br />
|Boolean<br />
|}<br />
<br />
===Gsynaptics===<br />
<br />
Once the touchpad is configured, users can also install the '''gsynaptics''' package from [community] to provide a GUI-based configuration solution for the device (note that it depends on libgnomeui):<br />
# pacman -S gsynaptics<br />
<br />
'''''Note:''' The '''gsynaptics''' web page [http://gsynaptics.sourceforge.jp/] indicates that it is becoming obsolete and users should consider '''GPointingDeviceSettings''' [http://live.gnome.org/GPointingDeviceSettings], currently available in AUR and as source code.''<br />
<br />
With hotplugging enabled(default), append this the match section of your 99-x11-synaptics.fdi or 11-x11-synaptics.fdi:<br />
<merge key="input.x11_options.SHMConfig" type="string">on</merge><br />
<br />
===Fine-tuning with synclient===<br />
<br />
The synclient monitor can display pressure and placement on the touchpad in real-time, allowing further refinement of the default Synaptics settings. In order for synclient to work properly, the '''SHMConfig''' option must be set to '''on''' or '''true'''.<br />
<br />
You can start the Synaptics monitor with the following command:<br />
$ synclient -m 100<br />
Where -m activates the monitor and the following number specifies the update interval in milliseconds.<br />
<br />
This monitor provides information about the current state of your touchpad. For example, if you move the mouse with the touchpad, the x and y values in the monitor will change. Therewith you can easy figure out your touchpad's dimension which is defined in the LeftEdge-, RightEdge-, BottomEdge- and TopEdge-Options.<br />
<br />
The abbreviations for the parameters are as follow:<br />
<br />
{| class="wikitable"<br />
|- align="left"<br />
!width="200"|+Abbreviation+<br />
!width="400|+Description+<br />
|-<br />
|'''time'''<br />
|Time in seconds since the logging was started.<br />
|-<br />
|'''x, y'''<br />
|The x/y coordinates of the finger on the touchpad. The origin is in the upper left corner.<br />
|-<br />
|'''z'''<br />
|The pressure value. It represents the pressure you are using to navigate on your touchpad.<br />
|-<br />
|'''f'''<br />
|Number of fingers currently touching the touchpad.<br />
|-<br />
|'''w'''<br />
|Value that represents the finger width.<br />
|-<br />
|'''l,r,u,d,m,multi'''<br />
|Those values represent the state of the left, right, up, down, middle and multi buttons pressed where zero means not pressed and one means pressed.<br />
|-<br />
|'''gl,gm,gr'''<br />
|For touchpads which have a guest device, this are the associated button states for guest left, guest middle and guest right pressed (1) and not pressed (0).<br />
|-<br />
|'''gdx, gdy'''<br />
|x/y coordinates of the guest device.<br />
|}<br />
If a value constantly is zero, it implies that this option is not supported by your device.<br />
<br />
===Edge scrolling===<br />
<br />
To enable the scroll zones found along the edges of the touchpad, add one or both of the following options to the touchpad device section in /etc/X11/xorg.conf:<br />
<br />
Section "InputDevice"<br />
...<br />
Option "VertEdgeScroll" "true" #vertical scrolling when dragging along the right edge.<br />
Option "HorizEdgeScroll" "true" #horizontal scrolling when dragging along the bottom edge.<br />
...<br />
EndSection<br />
<br />
In ''/etc/hal/fdi/policy/11-x11-synaptics.fdi''(or if that doesn't work, ''/etc/hal/fdi/policy/99-x11-synaptics.fdi) for [[#Configuration_via_HAL_policies_.28hotplugging_enabled.29 | Hotplugging]]:<br />
<match key="info.product" contains="Synaptics TouchPad"><br />
...<br />
<merge key="input.x11_options.HorizEdgeScroll" type="string">1</merge><br />
<merge key="input.x11_options.VertEdgeScroll" type="string">1</merge><br />
...<br />
</match><br />
<br />
===Two-Finger scrolling===<br />
<br />
Recent Synaptics touchpads support two-finger scrolling. This allows you to use two fingers together anywhere on the touchpad, similar to the behaviour of Macbooks.<br />
<br />
If your hardware supports this feature, you can enable it by inserting the following lines into the touchpad device section of /etc/X11/xorg.conf:<br />
Section "InputDevice"<br />
...<br />
Option "VertTwoFingerScroll" "true" # vertical scroll anywhere with two fingers<br />
Option "HorizTwoFingerScroll" "true" # horizontal scroll anywhere with two fingers<br />
Option "EmulateTwoFingerMinZ" "120" # this may vary between different machines<br />
...<br />
EndSection<br />
<br />
''EmulateTwoFingerMinZ'' is only necessary for the ALPS Touchpad, which several Dell machines have. ([http://ubuntuforums.org/showthread.php?t=516798&page=2#19 from Ubuntu forums]) <br />
<br />
'''Firefox users:''' You might find the default behaviour of Firefox pretty annoying relating to the horizontal scrolling. Just see ''Firefox and special touchpad events'' below to find out how to disable it.<br />
<br />
In '''/etc/hal/fdi/policy/11-x11-synaptics.fdi'''(or '''/etc/hal/fdi/policy/99-x11-synaptics.fdi''') for [[#Configuration_via_HAL_policies_.28hotplugging_enabled.29 | hotplugging]]:<br />
<match key="info.product" contains="Synaptics TouchPad"><br />
...<br />
<merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge><br />
<merge key="input.x11_options.EmulateTwoFingerMinZ" type="string">120</merge><br />
...<br />
</match><br />
<br />
Some users might need to modify the ''EmulateTwoFingerMinW'' parameter, as their touch pads sense two fingers as one wide finger. You can check which parameters you need to modify by running '''synclient -m 150''' -- when you touch two fingers to the touch pad, observe which parameters (z, w, or f) change. Those will determine the minimum threshold values you must set (if f changes, don't bother with ''EmulateTwoFingerMin[W,Z]'' since you do not need to emulate two fingers, your touch pad can simply sense two different fingers).<br />
<br />
===Circular scrolling===<br />
<br />
Circular scrolling is a feature that Synaptics offers which closely resembles the behaviour of iPods. Instead of (or additional to) scrolling horizontally or vertically, you can scroll circularly. Some users find this faster and more precise.<br />
To enable circular scrolling, add the following options to the touchpad device section of '''/etc/X11/xorg.conf''':<br />
Section "InputDevice"<br />
...<br />
Option "CircularScrolling" "on"<br />
Option "CircScrollTrigger" "0"<br />
...<br />
EndSection<br />
<br />
In '''/etc/hal/fdi/policy/11-x11-synaptics.fdi';'(or '''/etc/hal/fdi/policy/99-x11-synaptics.fdi''') for [[#Configuration_via_HAL_policies_.28hotplugging_enabled.29 | Hotplugging]]:<br />
<match key="info.product" contains="Synaptics TouchPad"><br />
...<br />
<merge key="input.x11_options.CircularScrolling" type="string">on</merge><br />
<merge key="input.x11_options.CircScrollTrigger" type="string">0</merge><br />
...<br />
</match><br />
<br />
The option '''CircScrollTrigger''' may be one of the following values, determining which edge circular scrolling should start:<br />
0 All Edges<br />
1 Top Edge<br />
2 Top Right Corner<br />
3 Right Edge<br />
4 Bottom Right Corner<br />
5 Bottom Edge<br />
6 Bottom Left Corner<br />
7 Left Edge<br />
8 Top Left Corner<br />
<br />
Specifying something different from zero may be useful if you want to use circular scrolling in conjunction with horizontal and/or vertical scrolling. If you do so, the type of scrolling is determined by the edge you start from.<br />
<br />
To scroll fast, draw small circles in the center of your touchpad. To scroll slowly and more precise, draw large circles.<br />
<br />
===Software Toggle===<br />
<br />
You may find it useful to have a software toggle that will turn on or off your touchpad, esplicially if it's extremely sensitive and your doing a lot of typing. Please also see [[#Disable touchpad upon external mouse detection]] and [[#Stopping the mouse from clicking while typing]] as those may be better solutions, again a matter of choice. The advantage here is you have the control, while the other solutions have daemons determine when to turn off the trackpad.<br />
<br />
You will want to grab [[xbindkeys]] if you don't already have key binding software.<br />
<br />
Then save this script to something such as /sbin/trackpad-toggle.sh:<br />
<br />
#!/bin/bash<br />
<br />
if [ `synclient -l | grep TouchpadOff | gawk -F '= ' '{ print $2 }'` -eq 0 ]; then<br />
synclient TouchpadOff=1<br />
else<br />
synclient TouchpadOff=0<br />
fi<br />
<br />
Then finally add a key binding to use the script. It is best to call with xbindkeys like so (file ''~/.xbindkeysrc''):<br />
<br />
"/sbin/trackpad-toggle.sh"<br />
m:0x5 + c:65<br />
Control+Shift + space<br />
<br />
Now just (re)start xbindkeys and ctrl+Shift+Space will now toggle your trackpad !<br />
<br />
Of course you could easily use any other keybinding software, such as the ones provided by Xfce4 and Gnome.<br />
<br />
==Troubleshooting==<br />
<br />
===Touchpad not working properly in Gnome (No tap zones, scrolling etc.)===<br />
<br />
Settings in /etc/hal/fdi/policy/11-x11-synaptics.fdi are not respected by Gnome. Gnome uses its own inferior mouse control plugin in the gnome-settings-daemon. <br />
<br />
If you only need to enable tapping, edge scrolling or two finger scrolling, you can use the settings tool in ''System->Preferences->Mouse->Touchpad'' to enable this in Gnome, but this will not allow you to define touchpad size, tap zones, tap sensitivity, etc.<br />
<br />
If you need or want more control of the touchpad settings, you are out of luck using the built-in settings apps in ''System->Preferences->Mouse->Touchpad'', as it is only good for setting a fraction of the availibe options. There is no other way of controlling the gnome mouse plugin either (at least that I know of).If you need more control over the touchpad settings, the best solution is probably to disable the plugin alltogether. The system will then use the settings in /etc/hal/fdi/policy/11-x11-synaptics.fdi correctly.<br />
<br />
To disble the gnome settings daemons mouse plugin, you launch gconf-editor, navigate to apps/gnome_settings_daemon/plugins/mouse/ and un-tick the "activate" box. Changes takes affect after a restart of gdm.<br />
<br />
===Synaptics Special Ability===<br />
<br />
By default, Synaptics touchpads are able to detect the number of fingers on the touchpad; ALPS touchpads are not. If the touchpad is tapped with two fingers, it will emulate a middle click. If the touchpad is typed with three fingers, a right click will be emulated.<br />
<br />
===Disable touchpad upon external mouse detection===<br />
<br />
In assistance to [[udev]], it is possible to automatically disable the touchpad if an external mouse has been plugged in. To achieve this, add the following udev rule to '''/etc/udev/rules.d/01-touchpad.rules''':<br />
ACTION=="add", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient -s TouchpadOff=1"<br />
ACTION=="remove", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient -s TouchpadOff=0"<br />
<br />
SHMConfig must be enabled (see the '''Configuration''' section for details)<br />
<br />
===Cursor Jump===<br />
<br />
Some users have their cursor inexplicably ''jump'' around the screen. There currently no patch for this, but the developers are aware of the problem and are working on it.<br />
<br />
===Multitouch===<br />
<br />
Multitouch gesture like in Mac OS X will be in future version of the driver.<br />
<br />
===Touchpad device isn't located at /dev/input/mouse0===<br />
<br />
If that's the case, you can use this command to display information about your input devices:<br />
cat /proc/bus/input/devices<br />
Search for an input device which has the name "SynPS/2 Synaptics TouchPad". The "Handlers" section of the output specifies what device you need to specify.<br />
<br />
'''Example output:'''<br />
I: Bus=0011 Vendor=0002 Product=0007 Version=0000<br />
N: Name="SynPS/2 Synaptics TouchPad"<br />
P: Phys=isa0060/serio4/input0<br />
S: Sysfs=/class/input/input1<br />
H: Handlers=mouse0 event1<br />
B: EV=b<br />
B: KEY=6420 0 7000f 0<br />
<br />
In this case, the Handlers are mouse0 and event1, so /dev/input/mouse0 would be used.<br />
<br />
=== Disable Trackpad while Typing ===<br />
<br />
There are two approaches on how run this command depending on your setup. But first you will need to have SHMConfig enable in your HAL policy ({{Filename|/etc/hal/fdi/policy/11-x11-synaptics.fdi}}), or {{Filename|/etc/xorg.conf}}. Some users may need to specify touchpad preferences in {{Filename|/etc/hal/fdi/policy/99-x11-synaptics.fdi}} instead.<br />
<br />
==== Using {{Filename|.xinitrc}} ====<br />
<br />
To have the touchpad disabled automatically when you begin typing, add the following line to your .xinitrc before you run your window manager (if not using a login manager):<br />
<br />
syndaemon -i 2 &<br />
<br />
The '''-i 2''' switch sets the idle time to 2 seconds. The idle time specifies how many seconds to wait after the last key-press before enabling the touchpad again.<br />
<br />
If you wish, you can add the '''-t''' switch that tells the daemon not to disable mouse movement when typing and only disable tapping and scrolling:<br />
<br />
syndaemon -t -i 2 &<br />
<br />
More details are available in the man page:<br />
<br />
$ man syndaemon<br />
<br />
If you are using a login manager, you will need to specify the command where your DE allows you to do so.<br />
<br />
==== Using a Login Manager ====<br />
<br />
The "-d" option is necessary to start syndaemon as a background process for post Login instructions.<br />
<br />
'''For GNOME: (GDM)'''<br />
<br />
To start syndaemon you need to use Gnome's Startup Applications Preferences program. Login to Gnome and go to '''System > Preferences > Startup Applications'''. In the Startup Programs tab click the '''Add''' button. Name the Startup Program whatever you like and input any comments you like (or leave this field blank). In the command field add:<br />
<br />
syndaemon -i 2 -d<br />
<br />
When you're done click the Add button in the Add Startup Program dialogue. Make sure the check box next to the startup program you've created is checked, in the list of additional startup programs. Close the Startup Applications Preferences window and you're done.<br />
<br />
'''For KDE: (KDM)'''<br />
<br />
Goto '''System Settings > Advanced Tab > Autostart''', then click '''Add Program''', enter:<br />
<br />
syndaemon -i 2 -d<br />
<br />
Then check 'Run in terminal'.<br />
<br />
===Firefox and special touchpad events===<br />
<br />
By default, Firefox is set up to do special events upon tapping or scrolling certain parts of your touchpad.<br />
You can edit the settings of those actions by typing '''about:config''' in your Firefox address bar.<br />
To alter these options, double-click on the line in question, changing "true" to "false" and vise versa.<br />
<br />
To prevent Firefox from scrolling (backward/forward) through browser history and instead scroll through pages, edit these settings as shown:<br />
mousewheel.horizscroll.withnokey.action = 1<br />
mousewheel.horizscroll.withnokey.sysnumlines = true<br />
<br />
To prevent Firefox from redirecting you to URLs formed from your clipboard content upon tapping the upper-right corner of your touchpad (or middle mouse button), set the following option to "false":<br />
middlemouse.contentLoadURL = false<br />
<br />
===Opera: horizontal scrolling issues===<br />
<br />
Same as above.<br />
To fix it, go to Tools -> Preferences -> Advanced -> Shortcuts. There you edit the mouse preferences: Delete the entries with "Button 5" and "Button 6".<br />
<br />
===Scrolling and multiple actions with Synaptics on LG Laptops===<br />
<br />
These problems seem to be occurring on several models of LG laptops.<br />
Symptoms include: when pressing Mouse Button 1, Synaptics interprets it as ScrollUP and a regular button 1 click; same goes for button 2.<br />
<br />
The scrolling issue can be resolved by entering in xorg.conf:<br />
Option "UpDownScrolling" "0"<br />
<br />
NOTE that this will make Synaptics interpret one button push as three. There is a patch written by Oskar Sandberg[http://www.math.chalmers.se/~ossa/linux/lg_tx_express.html] that removes these clicks.<br />
<br />
Apparently, when trying to compile this against the latest version of Synaptics it fails. The solution to this is using the GIT repository for Synaptics[http://web.telia.com/~u89404340/touchpad/synaptics/.git] .<br />
<br />
There is also a package build file in the AUR to automate this: [http://aur.archlinux.org/packages.php?ID=15983].<br />
<br />
To build the package after downloading the tarball and unpacking it, execute:<br />
cd synaptics-git<br />
makepkg<br />
<br />
If you want it to be automatically installed after being built, just add '-i' after makepkg.<br />
<br />
===Other external mouse issues===<br />
<br />
First, make sure your section describing the external mouse contains this line (or that the line looks like this):<br />
<br />
Option "Device" "/dev/input/mice"<br />
<br />
If the "Device" line is different, change it to the above and try to restart X. If this doesn't solve your problem, make your '''touchpad''' the CorePointer in the "Server Layout" section:<br />
<br />
InputDevice "Touchpad" "CorePointer"<br />
<br />
and make your external device "SendCoreEvents":<br />
<br />
InputDevice "USB Mouse" "SendCoreEvents"<br />
<br />
finally add this to your external device's section:<br />
<br />
Option "SendCoreEvents" "true"<br />
<br />
If all of the above doesn't work for you, please check relevant bug trackers for possible bugs, or go through the forums to see if anyone has found a better solution.<br />
<br />
===Touchpad synchronization issues===<br />
<br />
Sometimes the cursor may freeze for several seconds or start acting on its own for no apparent reason. This behavior is accompanied by records in /var/log/messages.log<br />
<br />
psmouse.c: TouchPad at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away<br />
<br />
This problem has no general solution, but there are several possible workarounds.<br />
*If you use CPU frequency scaling, avoid using the "ondemand" governor and use the "performance" governor when possible, as the touchpad may lose sync when the CPU frequency changes.<br />
*Avoid using an ACPI battery monitor.<br />
*Attempt to load psmouse with "proto=imps" option. To do that, add this line to your /etc/modprobe.conf:<br />
<br />
options psmouse proto=imps<br />
<br />
*Try another desktop environment. Some users report that this problem only occurs when using XFCE or GNOME, for whatever reason<br />
<br />
===Tapping issues===<br />
<br />
If you are not using [[Xorg input hotplugging]], you should know that Xorg v7.4 does not enable tapping by default. To enable it, add the following line to the touchpad's InputDevice section in <tt>/etc/X11/xorg.conf</tt>:<br />
<br />
Section "InputDevice"<br />
...<br />
Option "TapButton1" "''integer''"<br />
Option "TapButton2" "''integer''"<br />
Option "TapButton3" "''integer''"<br />
...<br />
EndSection<br />
The ''integer'' of option "TapButton1" means which mouse button is reported on a non-corner one-finger tap. Usually it is 1.<br />
The ''integer'' of option "TapButton2" means which mouse button is reported on a non-corner two-finger tap. Usually it is 2.<br />
The ''integer'' of option "TapButton3" means which mouse button is reported on a non-corner three-finger tap. Usually it is 3.<br />
<br />
===Delay between a button tap and the actual click===<br />
<br />
If you experience a delay between the tap on the touchpad and the actual click that is registered you need to enable FastTaps:<br />
<br />
If you're using input hotplugging(default behavior), change your 11-x11-synaptics.fdi(or 99-x11-synaptics.fdi, in some cases) so that it contains:<br />
<br />
<merge key="input.x11_options.FastTaps" type="string">1</merge><br />
<br />
If you're using xorg-server with disabled input hotplugging change xorg.conf so that you have:<br />
<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
...<br />
Option "FastTaps" "1"<br />
...<br />
EndSection<br />
<br />
===SynPS/2 Synaptics TouchPad can't grab event device, errno=16===<br />
<br />
If you are using Xorg 7.4, you may get a warning like this from /var/log/Xorg.0.log, thais is because the driver will grab the event device for exclusive use when using the Linux 2.6 event protocol. When it fails, X will return this error message.<br />
<br />
Grabbing the event device means that no other user space or kernel space program sees the touchpad events. This is desirable if the X config file includes /dev/input/mice as an input device, but is undesirable if you want to monitor the device from user space.<br />
<br />
If you want to control it, add or modify the "GrabEventDevice" option in you touchpad section in xorg.conf:<br />
<br />
...<br />
Option "GrabEventDevice" "''boolean''"<br />
...<br />
<br />
This will come into effect when X is restarted, though you can also change it by using synclient. When changing this parameter with the synclient program, the change will not take effect until the Synaptics driver is disabled and re-enabled. This can be achieved by switching to a text console and then switching back to X.<br />
<br />
==External Resources==<br />
<br />
Synaptics TouchPad driver: [http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/]<br />
<!-- vim: set ft=Wikipedia: --></div>Naguzhttps://wiki.archlinux.org/index.php?title=SynCE&diff=62200SynCE2009-02-16T21:51:33Z<p>Naguz: </p>
<hr />
<div>=Introduction=<br />
This page is a howto for connecting your Windows Mobile device with Archlinux. Afterwards you can sync and install cabs just like you can do with activesync in windows.<br />
It uses the kde app synce-kde, but gnome and *box users can relax, the only qt-deps are qscintilla-2.3.2-2 and pyqt-4.4.4-2. And they are small.<br />
<br />
=Installation=<br />
<br />
1: install synce-odccm and synce-kde (both in repos)<br />
<br />
§ pacman -S synce-odccm and synce-kde<br />
<br />
2: Install sync-engine from AUR<br />
If you have [[yaourt]] installed, this is done easily by <br />
§ yaourt -S sync-engine<br />
<br />
<br />
=Connecting to your phone=<br />
<br />
<br />
1: Start odccm. It requires root privileges, so:<br />
§ sudo odccm<br />
or, as root, just<br />
§ odccm<br />
<br />
2: Start sync-engine. You can use "sync-engine -d" to have it running in the background as a daemon.<br />
<br />
3: Start synce-kpm<br />
<br />
4: Connect your WM phone.<br />
<br />
Now you can sync your phone, install cabs and so on. Have fun.Before syncing you will have to crete a partnership with your phone. Just as with active sync in Windows.<br />
<br />
<br />
=Troubleshooting=<br />
If your phone does not show in synce-kpm, make sure the activesync-setting in your phone is set to "activesync", and not "mass storage device"" or similar. (Settings->Connections->USB connection settings)<br />
<br />
=Other problems=<br />
There is only one problem I have experienced with this. Sometimes it will stop working, and you will get an error report on your phone saying device.exe had a problem and was teminated.<br />
To fix this, simply go to USB-connection setting, choose "mass storage device" and select Ok, and then select "active sync" and again ok.<br />
<br />
If the above did not work, you might have to quit/kill sync-engine and odccm, and restart them. Start odccm first. This seems to be necessary when sync-engine is stuck at " Authorization pending - waiting for password on device" You will get output if you start sync-engine without the -d option.<br />
<br />
I think this problem arises after the phone has suspended, but I'm not quite sure what really causes it.</div>Naguzhttps://wiki.archlinux.org/index.php?title=SynCE&diff=62199SynCE2009-02-16T21:46:43Z<p>Naguz: New page: =Introduction= This page is a howto for connecting your Windows Mobile device with Archlinux. Afterwards you can sync and install cabs just like you can do with activesync in windows. It u...</p>
<hr />
<div>=Introduction=<br />
This page is a howto for connecting your Windows Mobile device with Archlinux. Afterwards you can sync and install cabs just like you can do with activesync in windows.<br />
It uses the kde app synce-kde, but gnome and *box users can relax, the only qt-deps are qscintilla-2.3.2-2 and pyqt-4.4.4-2. And they are small.<br />
<br />
=Installation=<br />
<br />
1: install synce-odccm and synce-kde (both in repos)<br />
<br />
§ pacman -S synce-odccm and synce-kde<br />
<br />
2: Install sync-engine from AUR<br />
[[Media:Example.ogg]]<br />
If you have yaourt installed, this is done easily by <br />
§ yaourt -S sync-engine<br />
<br />
<br />
=Connecting to your phone=<br />
<br />
<br />
1: Start odccm. It requires root privileges, so:<br />
§ sudo odccm<br />
or, as root, just<br />
§ odccm<br />
<br />
2: Start sync-engine. You can use "sync-engine -d" to have it running in the background as a daemon.<br />
<br />
3: Start synce-kpm<br />
<br />
4: Connect your WM phone.<br />
<br />
Now you can sync your phone, install cabs and so on. Have fun.Before syncing you will have to crete a partnership with your phone. Just as with active sync in Windows.<br />
<br />
<br />
=Troubleshooting=<br />
If your phone does not show in synce-kpm, make sure the activesync-setting in your phone is set to "activesync", and not "mass storage device"" or similar. (Settings->Connections->USB connection settings)<br />
<br />
=Other problems=<br />
There is only one problem I have experienced with this. Sometimes it wil stop working, and you will get an eror report on your phone sayig device.exe had a problem and was teminated.<br />
To fix this, simply go to USB-connection setting, choose "mass storage device" and select Ok, and then select "active sync" and again ok.<br />
<br />
If the above did not work, you might have to quit/kill sync-engine and odccm, and restart them. Start odccm first. This seems to be neccesary when sync-engine seems to be stuck at " Authorization pending - waiting for password on device" You will get output if you start sync-engine without the -d option.<br />
<br />
I think this problem arises after the phone has suspended, but I'm not quite sure what really causes it.</div>Naguz