https://wiki.archlinux.org/api.php?action=feedcontributions&user=Hramat&feedformat=atomArchWiki - User contributions [en]2024-03-29T00:18:16ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Systemd/Services&diff=234472Systemd/Services2012-11-08T22:40:03Z<p>Hramat: </p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
{{Article summary start}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Systemd}}<br />
{{Article summary end}}<br />
<br />
This page is useful to publish [[systemd]] service files that are missing in the appropriate package in the repositories. These files can be copied from other distributions or created by yourself.<br />
<br />
== Adsuck ==<br />
{{hc|/etc/systemd/system/adsuck.service|<nowiki><br />
[Unit]<br />
Description=Adsuck daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/usr/sbin/adsuck -l 127.0.0.1 -c /var/adsuck -f /resolv.conf /hosts -r /filter<br />
ExecStartPost=/bin/sh -c "echo 'nameserver 127.0.0.1' > /etc/resolv.conf"<br />
ExecStop=/bin/kill $MAINPID<br />
ExecStopPost=/bin/sh -c "cp /var/adsuck/resolv.conf /etc/resolv.conf"<br />
ExecReload=/bin/kill -HUP $MAINPID ; /bin/kill -USR1 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|1=Script based on the comment on the [http://aur.archlinux.org/packages.php?ID=44461 AUR package] page.}}<br />
<br />
<br />
<br />
== BOINC Daemon ==<br />
{{hc|/etc/systemd/system/boinc.service|<nowiki><br />
[Unit]<br />
Description=BOINC Daemon<br />
<br />
[Service]<br />
User=boinc<br />
Nice=19<br />
ExecStart=/usr/bin/boinc_client --dir /var/lib/boinc --redirectio<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Courier-IMAP ==<br />
{{hc|/etc/systemd/system/authdaemond.service|<nowiki><br />
[Unit]<br />
Description=Courier Authentification Daemon<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/usr/sbin/authdaemond start<br />
ExecStop=/usr/sbin/authdaemon stop<br />
PIDFile=/run/authdaemon/pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/courier-imapd.service|<nowiki><br />
[Unit]<br />
Description=Courier IMAP Daemon<br />
Requires=authdaemond.service<br />
After=authdaemond.service<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/courier-imap/imapd<br />
ExecStart=/usr/lib/courier-imap/imapd.rc start<br />
ExecStop=/usr/lib/courier-imap/imapd.rc stop<br />
PIDFile=/var/run/courier/imapd.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/courier-imapd-ssl.service|<nowiki><br />
[Unit]<br />
Description=Courier IMAP Daemon<br />
Requires=authdaemond.service<br />
After=authdaemond.service<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/courier-imap/imapd<br />
ExecStart=/usr/lib/courier-imap/imapd-ssl.rc start<br />
ExecStop=/usr/lib/courier-imap/imapd-ssl.rc stop<br />
PIDFile=/var/run/courier/imapd-ssl.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/usr/lib/tmpfiles.d/authdaemond.conf|<nowiki><br />
D /run/authdaemon 0755 courier courier<br />
</nowiki>}}<br />
<br />
{{hc|/usr/lib/tmpfiles.d/courier-imapd.conf|<nowiki><br />
D /run/courier 0755 courier courier<br />
</nowiki>}}<br />
<br />
{{Note|Taken from Gentoo and modified for Arch. You could replace the files in tmpfiles.d with appropriate ExecStartPre calls as well. Service files for pop3d and pop3d-ssl are still missing, but are probably very similar to the imapd files!}}<br />
<br />
{{Warning|1=Beware that you may need to add Requires=network.target to certain units like mythtv or chrony if you use this unit }}<br />
<br />
== dropbear ==<br />
{{hc|/etc/systemd/system/dropbear.service|<br />
<nowiki><br />
[Unit]<br />
Description=Dropbear SSH server<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/dropbear -p 22 -d /etc/dropbear/dropbear_dss_host_key -w -P /var/run/dropbear.pid<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
== Folding@home SMP ==<br />
See the comment on the [https://aur.archlinux.org/packages.php?ID=11964 AUR package].<br />
The unit file is copied below for convenience.<br />
{{hc|/etc/systemd/system/foldingathome-smp.service|<br />
<nowiki><br />
[Unit]<br />
Description=Folding@home distributed computing client<br />
After=network.target<br />
<br />
[Service]<br />
Type=simple<br />
WorkingDirectory=/opt/fah-smp<br />
ExecStart=/opt/fah-smp/fah6 -smp -verbosity 9 -forceasm<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== IPv6 (Hurricane Electric) ==<br />
{{hc|/etc/systemd/system/he-ipv6.service|<nowiki><br />
<br />
[Unit]<br />
Description=he.net IPv6 tunnel<br />
After=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/sbin/ip tunnel add he-ipv6 mode sit remote 209.51.161.14 local <local IPv4> ttl 255<br />
ExecStart=/sbin/ip link set he-ipv6 up mtu 1480<br />
ExecStart=/sbin/ip addr add <local IPv6>/64 dev he-ipv6<br />
ExecStart=/sbin/ip -6 route add ::/0 dev he-ipv6<br />
ExecStart=/sbin/ip addr add <public IPv6>/64 dev he-ipv6<br />
ExecStop=/sbin/ip -6 route del ::/0 dev he-ipv6<br />
ExecStop=/sbin/ip link set he-ipv6 down<br />
ExecStop=/sbin/ip tunnel del he-ipv6<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
== Logmein Hamachi ==<br />
{{hc|/etc/systemd/system/hamachi.service|<nowiki><br />
[Unit]<br />
Description=Hamachi Daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/opt/logmein-hamachi/bin/hamachid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== pcscd ==<br />
{{hc|/etc/systemd/system/pcscd.service|<nowiki><br />
[Unit]<br />
Description=PC/SC Smart Card Daemon<br />
Requires=pcscd.socket<br />
<br />
[Service]<br />
ExecStart=/usr/sbin/pcscd --foreground --auto-exit<br />
ExecReload=/usr/sbin/pcscd --hotplug<br />
StandardOutput=syslog<br />
<br />
[Install]<br />
Also=pcscd.socket<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/pcscd.socket|<nowiki><br />
[Unit]<br />
Description=PC/SC Smart Card Daemon Activation Socket<br />
<br />
[Socket]<br />
ListenStream=/var/run/pcscd/pcscd.comm<br />
<br />
[Install]<br />
WantedBy=sockets.target<br />
</nowiki>}}<br />
Reference:<br />
* http://ludovicrousseau.blogspot.de/2011/11/pcscd-auto-start-using-systemd.html<br />
<br />
== Filesystem mounts ==<br />
''See: [[Systemd#Filesystem_mounts]]''<br />
<br />
== screen ==<br />
Autostarts screen for the specified user. (e.g. `systemctl enable screen@florian.service`)<br />
{{hc|/etc/systemd/system/screen@.service|<nowiki><br />
[Unit]<br />
Description=screen<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
User=%i<br />
ExecStart=/usr/bin/screen -dmS autoscreen<br />
ExecStop=/usr/bin/screen -S autoscreen -X quit<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
== Static Ethernet network ==<br />
<br />
This is a custom service file for static Ethernet configurations. For other configurations, see [[Systemd#Network]]<br />
{{Warning |1=Beware, you may have to add 'Requires=network.target' for certain services like chrony or mythtv when using this.}}<br />
{{hc|/etc/conf.d/network|<nowiki><br />
interface=eth0<br />
address=192.168.0.1<br />
netmask=24<br />
broadcast=192.168.0.255<br />
gateway=192.168.0.254</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/network.service|<nowiki><br />
[Unit]<br />
Description=Network Connectivity<br />
Wants=network.target<br />
Before=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/etc/conf.d/network<br />
ExecStart=/sbin/ip link set dev ${interface} up<br />
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}<br />
ExecStart=/sbin/ip route add default via ${gateway}<br />
ExecStop=/sbin/ip addr flush dev ${interface}<br />
ExecStop=/sbin/ip link set dev ${interface} down<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
== Set network interface in promiscuous mode ==<br />
{{hc|/etc/systemd/system/promiscuous@.service|<nowiki><br />
[Unit]<br />
Description=Set %i interface in promiscuous mode<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/ip link set dev %i promisc on<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
If you want to enable promiscuous mode on interface {{ic|1=eth0}} run:<br />
<br />
# systemctl enable promiscuous@eth0.service<br />
<br />
== tpfand ==<br />
{{hc|/etc/systemd/system/tpfand.service|<nowiki><br />
[Unit]<br />
Description=ThinkPad Fan Control<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/var/run/tpfand.pid<br />
ExecStart=/usr/sbin/tpfand<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== truecrypt volume setup==<br />
This service employ truecrypt as a mapper only and requires you to create an entry in fstab to mount the mapped & unencrypted device to your desired mountpoint like for instance so:<br />
{{hc|/etc/fstab|<nowiki><br />
/dev/mapper/truecrypt1 /home/ ext4 defaults 0 2</nowiki>}}<br />
<br />
The {{ic|2}} means your fs will be fscked regularly.<br />
<br />
{{hc|/usr/lib/systemd/system/truecrypt@.service|<nowiki><br />
[Unit]<br />
Description=Truecrypt Setup for %I<br />
DefaultDependencies=no<br />
Conflicts=umount.target<br />
Before=umount.target<br />
After=systemd-readahead-collect.service systemd-readahead-replay.service<br />
<br />
[Service]<br />
RemainAfterExit=yes<br />
StandardInput=tty-force<br />
ExecStart=/usr/bin/truecrypt --filesystem=none %I<br />
ExecStop=/usr/bin/truecrypt --filesystem=none -d %I<br />
<br />
[Install]<br />
WantedBy=cryptsetup.target</nowiki>}}<br />
<br />
If your encrypted volume is {{ic|1=/dev/sda2}}, you would enable the service with this command: <br />
# systemctl enable truecrypt@dev-sda2.service<br />
<br />
{{Note|1=Although it works, this service should stil be considered experimental, there might be better solutions to use truecrypt with systemd. If you use mpd or any other programme that needs to access the encrypted filesystem, put it into the line starting with {{ic|1=Before=}}. Cheers to dgbaley27 for basically writing this! Improvements welcome!}}<br />
<br />
== truecrypt (mount encrypted fs) ==<br />
{{hc|/etc/systemd/system/multi-user.target/truecrypt-mount.service|<nowiki><br />
[Unit]<br />
Description=Mount Truecrypt-encrypted filesystems<br />
ConditionFileIsExecutable=/usr/bin/truecrypt<br />
#Requires=truecrypt-unmount.service<br />
#Before=mpd.service<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/truecrypt -t /dev/sdXY /MOUNTPOINT<br />
StandardInput=tty-force<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
#Also=truecrypt-unmount.service<br />
</nowiki>}}<br />
<br />
{{Note|1=Gleaned from [https://bbs.archlinux.org/viewtopic.php?pid=1163760#p1163760 bpont on the forums]. If you use mpd and have your music dir in ~, uncomment {{ic|1=Before=mpd.service}}, which takes care that mpd is started after this script. If you also use {{ic|1=truecrypt-unmount.service}} (see next service) uncomment the {{ic|1=Requires=truecrypt-unmount.service}} and {{ic|1=Also=truecrypt-unmount.service}} so it gets installed and activated by systemd automatically when using this script.}}<br />
<br />
== truecrypt (unmount encrypted fs) ==<br />
{{hc|/etc/systemd/system/multi-user/truecrypt-unmount.service|<nowiki><br />
[Unit]<br />
Description=Truecrypt unmount on shutdown, poweroff, reboot, system halt<br />
Before=local-fs-pre.target<br />
#Before=mpd.service<br />
ConditionPathExistsGlob=/media/truecrypt*<br />
DefaultDependencies=no<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/truecrypt -d<br />
TimeoutSec=5<br />
StandardInput=tty<br />
<br />
[Install]<br />
WantedBy=shutdown.target reboot.target halt.target poweroff.target<br />
</nowiki>}}<br />
<br />
{{Note|1=I don't know if this works yet. It may be necessary to replace {{ic|1=TimeoutSec=5}} with {{ic|1=ExecStart=sleep 5}}. If you use {{ic|mpd}}, make sure to uncomment {{ic|1=Before=mpd.service}} to make sure this service is executed after mpd is closed down (different order during the shutdown of processes than during start up!). Script gleaned from [https://bbs.archlinux.org/viewtopic.php?pid=1163334#p1163334 tladuke on the forums].}}<br />
<br />
== verynice ==<br />
{{hc|/etc/systemd/system/verynice.service|<nowiki><br />
[Unit]<br />
Description=A tool for dynamically adjusting the nice-level of processes<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/var/run/verynice.pid<br />
ExecStart=/usr/sbin/verynice -d /var/run/verynice.pid<br />
ExecStop=/bin/kill -15 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== VideoLAN 2.0 ==<br />
Change the '''User''' parameter.<br />
<br />
{{hc|/etc/systemd/system/vlc.service|<nowiki><br />
[Unit]<br />
Description=VideoOnLAN Service<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
User=nobody<br />
ExecStart=/usr/bin/cvlc --intf=lua --lua-intf=http --daemon --http-port 8090<br />
Restart=on-abort<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Xvfb ==<br />
Change the '''User'''/'''Group''' parameters.<br />
{{hc|/etc/systemd/system/xinit.service|<nowiki><br />
[Unit]<br />
Description=xinit with xvfb<br />
After=network.target<br />
<br />
[Service]<br />
User=bitlbee<br />
Group=bitlbee<br />
ExecStart=/usr/bin/xvfb-run bash %h/.xinitrc<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== ZNC ==<br />
Assuming znc was set up to be run by znc user from /var/lib/znc as explained in the [[Znc]] wiki page.<br />
<br />
{{hc|/etc/systemd/system/znc.service|<nowiki><br />
[Unit]<br />
Description=ZNC Daemon<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/usr/bin/znc -f<br />
User=znc<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
== Nexus ==<br />
This is for Sonatype's Nexus OSS Artifact Repository.<br />
[[https://aur.archlinux.org/packages.php?ID=57055 nexus2 on AUR]]<br />
<br />
{{hc|/etc/systemd/system/nexus.service|<nowiki><br />
[Unit]<br />
Description=Nexus OSS Artifact Repository<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=-/etc/conf.d/nexus<br />
ExecStart=/opt/nexus/bin/nexus start<br />
ExecStop=/opt/nexus/bin/nexus stop<br />
ExecReload=/opt/nexus/bin/nexus restart<br />
PIDFile=/opt/nexus/run/nexus.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Gitlab ==<br />
<br />
{{hc|/etc/systemd/system/gitlab.service|<nowiki><br />
[Unit]<br />
Description=Self Hosted Git Management<br />
Requires=postgresql.service redis.service<br />
After=postgresql.service redis.service<br />
Wants=postfix.service gitlab-worker.service<br />
<br />
[Service]<br />
Type=forking<br />
User=gitlab<br />
WorkingDirectory=/home/gitlab/gitlab<br />
ExecStart=/home/gitlab/gitlab/script/rails server -d -e production<br />
PIDFile=/home/gitlab/gitlab/tmp/pids/server.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/gitlab-worker.service|<nowiki><br />
[Unit]<br />
Description=Gitlab Resque Worker<br />
Requires=redis.service<br />
After=redis.service<br />
Wants=postfix.service postgresql.service<br />
<br />
[Service]<br />
Type=forking<br />
User=gitlab<br />
WorkingDirectory=/home/gitlab/gitlab<br />
ExecStart=/bin/bash -c '. ~/.bashrc; . ./resque.sh'<br />
ExecStopPost=/usr/bin/rm /home/gitlab/gitlab/tmp/pids/resque_worker.pid<br />
PIDFile=/home/gitlab/gitlab/tmp/pids/resque_worker.pid<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [[systemd]]<br />
* [http://en.gentoo-wiki.com/wiki/Systemd systemd at gentoo wiki]</div>Hramathttps://wiki.archlinux.org/index.php?title=Systemd/Services&diff=234471Systemd/Services2012-11-08T22:37:27Z<p>Hramat: /* Filesystem mounts */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
{{Article summary start}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Systemd}}<br />
{{Article summary end}}<br />
<br />
This page is useful to publish [[systemd]] service files that are missing in the appropriate package in the repositories. These files can be copied from other distributions or created by yourself.<br />
<br />
== Adsuck ==<br />
{{hc|/etc/systemd/system/adsuck.service|<nowiki><br />
[Unit]<br />
Description=Adsuck daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/usr/sbin/adsuck -l 127.0.0.1 -c /var/adsuck -f /resolv.conf /hosts -r /filter<br />
ExecStartPost=/bin/sh -c "echo 'nameserver 127.0.0.1' > /etc/resolv.conf"<br />
ExecStop=/bin/kill $MAINPID<br />
ExecStopPost=/bin/sh -c "cp /var/adsuck/resolv.conf /etc/resolv.conf"<br />
ExecReload=/bin/kill -HUP $MAINPID ; /bin/kill -USR1 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|1=Script based on the comment on the [http://aur.archlinux.org/packages.php?ID=44461 AUR package] page.}}<br />
<br />
<br />
<br />
== BOINC Daemon ==<br />
{{hc|/etc/systemd/system/boinc.service|<nowiki><br />
[Unit]<br />
Description=BOINC Daemon<br />
<br />
[Service]<br />
User=boinc<br />
Nice=19<br />
ExecStart=/usr/bin/boinc_client --dir /var/lib/boinc --redirectio<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Courier-IMAP ==<br />
{{hc|/etc/systemd/system/authdaemond.service|<nowiki><br />
[Unit]<br />
Description=Courier Authentification Daemon<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/usr/sbin/authdaemond start<br />
ExecStop=/usr/sbin/authdaemon stop<br />
PIDFile=/run/authdaemon/pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/courier-imapd.service|<nowiki><br />
[Unit]<br />
Description=Courier IMAP Daemon<br />
Requires=authdaemond.service<br />
After=authdaemond.service<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/courier-imap/imapd<br />
ExecStart=/usr/lib/courier-imap/imapd.rc start<br />
ExecStop=/usr/lib/courier-imap/imapd.rc stop<br />
PIDFile=/var/run/courier/imapd.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/courier-imapd-ssl.service|<nowiki><br />
[Unit]<br />
Description=Courier IMAP Daemon<br />
Requires=authdaemond.service<br />
After=authdaemond.service<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/courier-imap/imapd<br />
ExecStart=/usr/lib/courier-imap/imapd-ssl.rc start<br />
ExecStop=/usr/lib/courier-imap/imapd-ssl.rc stop<br />
PIDFile=/var/run/courier/imapd-ssl.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/usr/lib/tmpfiles.d/authdaemond.conf|<nowiki><br />
D /run/authdaemon 0755 courier courier<br />
</nowiki>}}<br />
<br />
{{hc|/usr/lib/tmpfiles.d/courier-imapd.conf|<nowiki><br />
D /run/courier 0755 courier courier<br />
</nowiki>}}<br />
<br />
{{Note|Taken from Gentoo and modified for Arch. You could replace the files in tmpfiles.d with appropriate ExecStartPre calls as well. Service files for pop3d and pop3d-ssl are still missing, but are probably very similar to the imapd files!}}<br />
<br />
{{Warning|1=Beware that you may need to add Requires=network.target to certain units like mythtv or chrony if you use this unit }}<br />
<br />
== dropbear ==<br />
{{hc|/etc/systemd/system/dropbear.service|<br />
<nowiki><br />
[Unit]<br />
Description=Dropbear SSH server<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/dropbear -p 22 -d /etc/dropbear/dropbear_dss_host_key -w -P /var/run/dropbear.pid<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
== Folding@home SMP ==<br />
See the comment on the [https://aur.archlinux.org/packages.php?ID=11964 AUR package].<br />
The unit file is copied below for convenience.<br />
{{hc|/etc/systemd/system/foldingathome-smp.service|<br />
<nowiki><br />
[Unit]<br />
Description=Folding@home distributed computing client<br />
After=network.target<br />
<br />
[Service]<br />
Type=simple<br />
WorkingDirectory=/opt/fah-smp<br />
ExecStart=/opt/fah-smp/fah6 -smp -verbosity 9 -forceasm<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== IPv6 (Hurricane Electric) ==<br />
{{hc|/etc/systemd/system/he-ipv6.service|<nowiki><br />
<br />
[Unit]<br />
Description=he.net IPv6 tunnel<br />
After=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/sbin/ip tunnel add he-ipv6 mode sit remote 209.51.161.14 local <local IPv4> ttl 255<br />
ExecStart=/sbin/ip link set he-ipv6 up mtu 1480<br />
ExecStart=/sbin/ip addr add <local IPv6>/64 dev he-ipv6<br />
ExecStart=/sbin/ip -6 route add ::/0 dev he-ipv6<br />
ExecStart=/sbin/ip addr add <public IPv6>/64 dev he-ipv6<br />
ExecStop=/sbin/ip -6 route del ::/0 dev he-ipv6<br />
ExecStop=/sbin/ip link set he-ipv6 down<br />
ExecStop=/sbin/ip tunnel del he-ipv6<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
== Logmein Hamachi ==<br />
{{hc|/etc/systemd/system/hamachi.service|<nowiki><br />
[Unit]<br />
Description=Hamachi Daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/opt/logmein-hamachi/bin/hamachid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== pcscd ==<br />
{{hc|/etc/systemd/system/pcscd.service|<nowiki><br />
[Unit]<br />
Description=PC/SC Smart Card Daemon<br />
Requires=pcscd.socket<br />
<br />
[Service]<br />
ExecStart=/usr/sbin/pcscd --foreground --auto-exit<br />
ExecReload=/usr/sbin/pcscd --hotplug<br />
StandardOutput=syslog<br />
<br />
[Install]<br />
Also=pcscd.socket<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/pcscd.socket|<nowiki><br />
[Unit]<br />
Description=PC/SC Smart Card Daemon Activation Socket<br />
<br />
[Socket]<br />
ListenStream=/var/run/pcscd/pcscd.comm<br />
<br />
[Install]<br />
WantedBy=sockets.target<br />
</nowiki>}}<br />
Reference:<br />
* http://ludovicrousseau.blogspot.de/2011/11/pcscd-auto-start-using-systemd.html<br />
<br />
== Remote filesystem mounts ==<br />
''See: [[Systemd#Filesystem_mounts]]''<br />
<br />
== screen ==<br />
Autostarts screen for the specified user. (e.g. `systemctl enable screen@florian.service`)<br />
{{hc|/etc/systemd/system/screen@.service|<nowiki><br />
[Unit]<br />
Description=screen<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
User=%i<br />
ExecStart=/usr/bin/screen -dmS autoscreen<br />
ExecStop=/usr/bin/screen -S autoscreen -X quit<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
== Static Ethernet network ==<br />
<br />
This is a custom service file for static Ethernet configurations. For other configurations, see [[Systemd#Network]]<br />
{{Warning |1=Beware, you may have to add 'Requires=network.target' for certain services like chrony or mythtv when using this.}}<br />
{{hc|/etc/conf.d/network|<nowiki><br />
interface=eth0<br />
address=192.168.0.1<br />
netmask=24<br />
broadcast=192.168.0.255<br />
gateway=192.168.0.254</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/network.service|<nowiki><br />
[Unit]<br />
Description=Network Connectivity<br />
Wants=network.target<br />
Before=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/etc/conf.d/network<br />
ExecStart=/sbin/ip link set dev ${interface} up<br />
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}<br />
ExecStart=/sbin/ip route add default via ${gateway}<br />
ExecStop=/sbin/ip addr flush dev ${interface}<br />
ExecStop=/sbin/ip link set dev ${interface} down<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
== Set network interface in promiscuous mode ==<br />
{{hc|/etc/systemd/system/promiscuous@.service|<nowiki><br />
[Unit]<br />
Description=Set %i interface in promiscuous mode<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/ip link set dev %i promisc on<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
If you want to enable promiscuous mode on interface {{ic|1=eth0}} run:<br />
<br />
# systemctl enable promiscuous@eth0.service<br />
<br />
== tpfand ==<br />
{{hc|/etc/systemd/system/tpfand.service|<nowiki><br />
[Unit]<br />
Description=ThinkPad Fan Control<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/var/run/tpfand.pid<br />
ExecStart=/usr/sbin/tpfand<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== truecrypt volume setup==<br />
This service employ truecrypt as a mapper only and requires you to create an entry in fstab to mount the mapped & unencrypted device to your desired mountpoint like for instance so:<br />
{{hc|/etc/fstab|<nowiki><br />
/dev/mapper/truecrypt1 /home/ ext4 defaults 0 2</nowiki>}}<br />
<br />
The {{ic|2}} means your fs will be fscked regularly.<br />
<br />
{{hc|/usr/lib/systemd/system/truecrypt@.service|<nowiki><br />
[Unit]<br />
Description=Truecrypt Setup for %I<br />
DefaultDependencies=no<br />
Conflicts=umount.target<br />
Before=umount.target<br />
After=systemd-readahead-collect.service systemd-readahead-replay.service<br />
<br />
[Service]<br />
RemainAfterExit=yes<br />
StandardInput=tty-force<br />
ExecStart=/usr/bin/truecrypt --filesystem=none %I<br />
ExecStop=/usr/bin/truecrypt --filesystem=none -d %I<br />
<br />
[Install]<br />
WantedBy=cryptsetup.target</nowiki>}}<br />
<br />
If your encrypted volume is {{ic|1=/dev/sda2}}, you would enable the service with this command: <br />
# systemctl enable truecrypt@dev-sda2.service<br />
<br />
{{Note|1=Although it works, this service should stil be considered experimental, there might be better solutions to use truecrypt with systemd. If you use mpd or any other programme that needs to access the encrypted filesystem, put it into the line starting with {{ic|1=Before=}}. Cheers to dgbaley27 for basically writing this! Improvements welcome!}}<br />
<br />
== truecrypt (mount encrypted fs) ==<br />
{{hc|/etc/systemd/system/multi-user.target/truecrypt-mount.service|<nowiki><br />
[Unit]<br />
Description=Mount Truecrypt-encrypted filesystems<br />
ConditionFileIsExecutable=/usr/bin/truecrypt<br />
#Requires=truecrypt-unmount.service<br />
#Before=mpd.service<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/truecrypt -t /dev/sdXY /MOUNTPOINT<br />
StandardInput=tty-force<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
#Also=truecrypt-unmount.service<br />
</nowiki>}}<br />
<br />
{{Note|1=Gleaned from [https://bbs.archlinux.org/viewtopic.php?pid=1163760#p1163760 bpont on the forums]. If you use mpd and have your music dir in ~, uncomment {{ic|1=Before=mpd.service}}, which takes care that mpd is started after this script. If you also use {{ic|1=truecrypt-unmount.service}} (see next service) uncomment the {{ic|1=Requires=truecrypt-unmount.service}} and {{ic|1=Also=truecrypt-unmount.service}} so it gets installed and activated by systemd automatically when using this script.}}<br />
<br />
== truecrypt (unmount encrypted fs) ==<br />
{{hc|/etc/systemd/system/multi-user/truecrypt-unmount.service|<nowiki><br />
[Unit]<br />
Description=Truecrypt unmount on shutdown, poweroff, reboot, system halt<br />
Before=local-fs-pre.target<br />
#Before=mpd.service<br />
ConditionPathExistsGlob=/media/truecrypt*<br />
DefaultDependencies=no<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/truecrypt -d<br />
TimeoutSec=5<br />
StandardInput=tty<br />
<br />
[Install]<br />
WantedBy=shutdown.target reboot.target halt.target poweroff.target<br />
</nowiki>}}<br />
<br />
{{Note|1=I don't know if this works yet. It may be necessary to replace {{ic|1=TimeoutSec=5}} with {{ic|1=ExecStart=sleep 5}}. If you use {{ic|mpd}}, make sure to uncomment {{ic|1=Before=mpd.service}} to make sure this service is executed after mpd is closed down (different order during the shutdown of processes than during start up!). Script gleaned from [https://bbs.archlinux.org/viewtopic.php?pid=1163334#p1163334 tladuke on the forums].}}<br />
<br />
== verynice ==<br />
{{hc|/etc/systemd/system/verynice.service|<nowiki><br />
[Unit]<br />
Description=A tool for dynamically adjusting the nice-level of processes<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/var/run/verynice.pid<br />
ExecStart=/usr/sbin/verynice -d /var/run/verynice.pid<br />
ExecStop=/bin/kill -15 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== VideoLAN 2.0 ==<br />
Change the '''User''' parameter.<br />
<br />
{{hc|/etc/systemd/system/vlc.service|<nowiki><br />
[Unit]<br />
Description=VideoOnLAN Service<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
User=nobody<br />
ExecStart=/usr/bin/cvlc --intf=lua --lua-intf=http --daemon --http-port 8090<br />
Restart=on-abort<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Xvfb ==<br />
Change the '''User'''/'''Group''' parameters.<br />
{{hc|/etc/systemd/system/xinit.service|<nowiki><br />
[Unit]<br />
Description=xinit with xvfb<br />
After=network.target<br />
<br />
[Service]<br />
User=bitlbee<br />
Group=bitlbee<br />
ExecStart=/usr/bin/xvfb-run bash %h/.xinitrc<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== ZNC ==<br />
Assuming znc was set up to be run by znc user from /var/lib/znc as explained in the [[Znc]] wiki page.<br />
<br />
{{hc|/etc/systemd/system/znc.service|<nowiki><br />
[Unit]<br />
Description=ZNC Daemon<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/usr/bin/znc -f<br />
User=znc<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
== Nexus ==<br />
This is for Sonatype's Nexus OSS Artifact Repository.<br />
[[https://aur.archlinux.org/packages.php?ID=57055 nexus2 on AUR]]<br />
<br />
{{hc|/etc/systemd/system/nexus.service|<nowiki><br />
[Unit]<br />
Description=Nexus OSS Artifact Repository<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=-/etc/conf.d/nexus<br />
ExecStart=/opt/nexus/bin/nexus start<br />
ExecStop=/opt/nexus/bin/nexus stop<br />
ExecReload=/opt/nexus/bin/nexus restart<br />
PIDFile=/opt/nexus/run/nexus.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Gitlab ==<br />
<br />
{{hc|/etc/systemd/system/gitlab.service|<nowiki><br />
[Unit]<br />
Description=Self Hosted Git Management<br />
Requires=postgresql.service redis.service<br />
After=postgresql.service redis.service<br />
Wants=postfix.service gitlab-worker.service<br />
<br />
[Service]<br />
Type=forking<br />
User=gitlab<br />
WorkingDirectory=/home/gitlab/gitlab<br />
ExecStart=/home/gitlab/gitlab/script/rails server -d -e production<br />
PIDFile=/home/gitlab/gitlab/tmp/pids/server.pid<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/gitlab-worker.service|<nowiki><br />
[Unit]<br />
Description=Gitlab Resque Worker<br />
Requires=redis.service<br />
After=redis.service<br />
Wants=postfix.service postgresql.service<br />
<br />
[Service]<br />
Type=forking<br />
User=gitlab<br />
WorkingDirectory=/home/gitlab/gitlab<br />
ExecStart=/bin/bash -c '. ~/.bashrc; . ./resque.sh'<br />
ExecStopPost=/usr/bin/rm /home/gitlab/gitlab/tmp/pids/resque_worker.pid<br />
PIDFile=/home/gitlab/gitlab/tmp/pids/resque_worker.pid<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [[systemd]]<br />
* [http://en.gentoo-wiki.com/wiki/Systemd systemd at gentoo wiki]</div>Hramathttps://wiki.archlinux.org/index.php?title=List_of_applications/Science&diff=166676List of applications/Science2011-10-20T20:03:56Z<p>Hramat: </p>
<hr />
<div>[[Category:Mathematics and science (English)]]<br />
[[Category:Software (English)]]<br />
{{i18n|Scientific Applications}}<br />
==Mathematics==<br />
===Calculator===<br />
* [http://speedcrunch.org Speedcrunch] - A feature-rich scientific calculator.<br />
* [http://extcalc-linux.sourceforge.net/ ExtCalc] - A feature-rich scientific calculator.<br />
* [http://kalgebra.berlios.de/ KAlgebra] - calculator and 3D plot.<br />
* [http://qalculate.sourceforge.net/ Qalculate] - calculator and equation solver with fault-tolerant parsing. Recognises constants and units.<br />
<br />
===Computer Algebra System===<br />
*[http://maxima.sourceforge.net/ Maxima] - "Maple/Mathematica"-like program or its frontend [http://wxmaxima.sourceforge.net/wiki/index.php/Main_Page wXMaxima].<br />
*[http://www.sagemath.org/ Sage] - "Maple/Mathematica"-like program in python.<br />
<br />
===Scientific or Technical Computing===<br />
*[[Matlab]] - Widely used for scientific computing and data processing (proprietary!).<br />
*[http://www.gnu.org/software/octave/ Octave] - "Matlab"-like program or its frontend {{Package Official|QtOctave}}.<br />
*[http://freemat.sourceforge.net/ Freemat] - "Matlab"-like program.<br />
*[http://www.scilab.org/ Scilab] - "Matlab"-like program.<br />
*[http://aur.archlinux.org/packages.php?ID=694 Euler] - Mathematical programming environment like MatLab or Octave<br />
*[http://aur.archlinux.org/packages.php?ID=19160 Englab] - Cross-compile mathematical platform with a C like syntax.<br />
*[http://www.scipy.org/PyLab PyLab] - Python modules for scientific calculations<br />
<br />
===Statistics===<br />
* [http://www.gnu.org/software/pspp/ PSPP] - Free SPSS implementation (Graphical:PSPPire).<br />
* [[R]] - Software environment for statistical computing and graphics (note package name is {{Codeline|r}}, in {{Codeline|extras}})<br />
* [http://rkward.sourceforge.net/ RKWard] - Frontend for the statistical language R.<br />
<br />
===Data Evaluation===<br />
* [http://www.unipress.waw.pl/fityk/ Fityk] - Non-linear fitting of curves.<br />
* [http://soft.proindependent.com/qtiplot.html QtiPlot] - Similar & semi-compatible with "OriginLab".<br />
* [http://scidavis.sourceforge.net/ SciDavis] - Similar to QtiPlot.<br />
* [http://labplot.sourceforge.net/ LabPlot] - Comparable to "OriginLab".<br />
* [http://root.cern.ch/drupal/ ROOT] - Data analysis program and library (originally for particle physics).<br />
* [http://www.gnuplot.info/ GnuPlot] - Command-line based plotting program.<br />
* [http://plasma-gate.weizmann.ac.il/Grace/ XmGrace] - Plotting program with GUI.<br />
* [http://aur.archlinux.org/packages.php?ID=9583 Extrema] - Visualization and data analysis tool.<br />
* [[Common Applications#Spreadsheets]]<br />
<br />
==Natural Science==<br />
<br />
===Chemistry and Biology===<br />
<br />
====Molecule Viewer====<br />
*[http://avogadro.openmolecules.net/wiki/Main_Page Avogadro] - Edit and view 3D molecule structures (also .pdb) and simulate.<br />
*[http://www.ballview.org/ Ballview] - Standalone molecular modeling and visualization application.<br />
*[http://www.uku.fi/~thassine/projects/ghemical/ Ghemical] - Edit and view 3D molecule structures (also .pdb) and simulate.<br />
*[http://www.rasmol.org/ Rasmol] - View 3D molecule structures.<br />
*[http://pymol.sourceforge.net/ Pymol] - View 3D molecule structures.<br />
<br />
====Molecule Drawing====<br />
*[http://bkchem.zirael.org/ BkChem] - Practical and goodlooking skeletal formula molecule drawing program.<br />
*[http://xdrawchem.sourceforge.net/ XDrawChem] - Extensive skeletal formula molecule drawing program (incl. spectroscopy prediction).<br />
*[http://easychem.sourceforge.net/ EasyChem] - Simple skeletal formula molecule drawing program.<br />
*[http://ruby.chemie.uni-freiburg.de/~martin/chemtool/ Chemtool] - Skeletal formula molecule drawing program.<br />
*[http://gabedit.sourceforge.net/ Gabedit] - Gabedit is a graphical user interface to computational chemistry packages like Gamess-US, Gaussian, Molcas, Molpro, MPQC, OpenMopac, Orca, PCGamess and Q-Chem <br />
<br />
====Periodic Table====<br />
* [http://edu.kde.org/kalzium/ Kalzium] - Periodic table of the elements with molecule editor and equation solver (from KDE project).<br />
* [http://www.kdau.com/projects/gelemental/ GElemental]{{Linkrot|2011|09|05}} - Periodic table of the elements and additional information. <br />
<br />
====Biochemistry====<br />
* [http://www.bioclipse.net/ Bioclipse] - Aims to be a complete biochemistry office suite.<br />
<br />
====Molecular Modeling====<br />
* [http://www.gromacs.org GROMACS] - GROMACS is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.<br />
* [http://www.quantum-espresso.org/ Quantum-Espresso] - Quantum ESPRESSO is an integrated suite of computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials (both norm-conserving and ultrasoft).<br />
<br />
===Astronomy===<br />
*[http://www.stellarium.org/ Stellarium] - Beautiful 3D planetarium.<br />
*[http://edu.kde.org/kstars/ KStars] - KDE desktop planetarium.<br />
*[http://starplot.org/ StarPlot] - 3D starchart viewer.<br />
*[http://www.shatters.net/celestia/ Celestia] - Space simulation software.<br />
<br />
===Physics===<br />
<br />
====Electronics====<br />
*[http://www.gpleda.org/ gEDA] - Electronic design automation tools.<br />
*[http://qucs.sourceforge.net/ Qucs] - Electronic circuit simulation.<br />
*[http://oregano.gforge.lug.fi.uba.ar/ Oregano]{{Linkrot|2011|09|05}} - Electronic circuit simulation.<br />
*[http://qelectrotech.org/ QElectroTech] - Draw advanced electrical circuits.<br />
*[http://kicad.sourceforge.net/wiki/index.php/Main_Page KiCad] - Design schematics for printed circuit boards.<br />
*[http://ksimus.berlios.de/ KSimus] - Logical circuits simulation.<br />
*[http://www.a-rostin.de/ KLogic] - Logical circuits simulation.<br />
<br />
====Physics Simulation====<br />
*[http://www.code-aster.org Code Aster] - Simulation for civil and structural engineering.<br />
*[http://edu.kde.org/step/ Step] - Physics Simulation Educative physics simulation (KDE).<br />
<br />
====Unit Conversion====<br />
*[http://convertall.bellz.org/ Convertall] - Convert between different physical units.<br />
*[http://www.unihedron.com/projects/gonvert/ Gonvert] - Convert between different physical units.<br />
*[http://www.gnu.org/s/units/ Units] - CLI Unit converter and calculator.</div>Hramathttps://wiki.archlinux.org/index.php?title=AMD_Catalyst&diff=160723AMD Catalyst2011-09-19T19:34:46Z<p>Hramat: /* Configuration */</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
{{i18n|ATI Catalyst}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of ATI's proprietary linux "Catalyst" video card driver.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|cchtml.com - Unofficial Wiki for the ATI Linux Driver|http://wiki.cchtml.com/index.php/Main_Page}}<br />
{{Article summary link|Unofficial ATI Linux Driver Bugzilla|http://ati.cchtml.com/query.cgi}}<br />
{{Article summary end}}<br />
ATI/AMD's proprietary binary Linux driver package, ''fglrx''. Now known as ''Catalyst'' to fall in line with the naming scheme of the Windows driver. Only the package name has changed, while the kernel module retains it's original ''fglrx.ko'' filename. Therefore, any mention of fglrx below is specifically in reference to the ''kernel module'', '''not the package'''.<br />
<br />
Supported devices are [http://en.wikipedia.org/wiki/Radeon ATI Radeon] video cards (now made by AMD) with chipset R600 and newer (as of Catalyst 9.4). [http://en.wikipedia.org/wiki/Comparison_of_AMD_graphics_processing_units This table] to translate '''model''' names (X1900, HD4850) to/from '''chip''' names (R580, RV770 respectively).<br />
<br />
There are four routes to supporting your ATI graphics card in Arch:<br />
<br />
- using the open-source [https://wiki.archlinux.org/index.php/ATI xf86-video-ati];<br />
<br />
- installing Catalyst from AUR;<br />
<br />
- installing Catalyst from unofficial [catalyst] repository;<br />
<br />
- trying to install the Catalyst binary yourself (not recommended).<br />
<br />
Older cards will need the open-source driver as work on 2D/3D for those is [http://www.x.org/wiki/RadeonFeature nearly complete]. This article concerns the latter three methods.<br />
<br />
== Installation ==<br />
Catalyst was once a precompiled package offered by Arch in the <code>[extra]</code> repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver. [http://aur.archlinux.org/packages.php?ID=29111 Catalyst driver for stock kernel] and [http://aur.archlinux.org/packages.php?ID=40833 Catalyst libraries/utils] (required) are available on [[AUR]].<br />
<br />
{{Note| With '''every''' Catalyst update you should remove '''amdpcsdb''' file in this way: stop your X/DE, remove <code>/etc/ati/amdpcsdb</code>, start your X/DE, and then run <code>amdcccle</code>.}}<br />
{{Note| '''<nowiki>Catalyst >= 10.10</nowiki>''' build supports only '''xorg-server 1.9''' so feel free to install it from [extra] repository}}<br />
{{Warning|<br />
*Make sure that you own a '''R6xx''' ('''HD2xxx''') or newer card or the driver '''won't''' be enabled. You will encounter an error if you try to enable your display using Catalyst and a card older than the R6xx series.<br />
<br />
*It appears that Catalyst 9.10-10.11 does not support nForce4 motherboard chipsets.}}<br />
<br />
{{Warning|Whether or not you install from AUR, you will have to reinstall/update fglrx every time the kernel is updated. Otherwise, X '''will''' fail to start.}}<br />
=== Installing from AUR ===<br />
{{Note| Since version 10.9, Catalyst is split into ''catalyst'' and ''catalyst-utils''}}<br />
====Stock kernel====<br />
To install AMD's fglrx driver for the <code>linux</code> package, you need to install either [http://aur.archlinux.org/packages.php?ID=29111 catalyst] or [http://aur.archlinux.org/packages.php?ID=34773 catalyst-test] [[AUR]] packages.<br />
{{Note| If pacman asks you about removing '''libgl''' - you may safely say "Y"}}<br />
<br />
After installing you need to ensure xorg.conf is [[#Configuration| created and/or configured]] before rebooting.<br />
<br />
If you are using x86_64 architecture and want 32-bit OpenGL: Install [http://aur.archlinux.org/packages.php?ID=24824 AUR's lib32-catalyst-utils]<br />
<br />
''If you need more information on catalyst, visit [http://bbs.archlinux.org/viewtopic.php?id=57084 this thread].''<br />
<br />
==== Custom Kernels ====<br />
To install catalyst for a custom kernel, you'll need to build your own <code>catalyst-$kernel</code> package.<br />
<br />
If you are at all uncomfortable or inexperienced making packages, read up the [[ABS]] wiki page first so things go smoothly.<br />
<br />
'''Obtaining PKGBUILD'''<br />
<br />
Obtain the <code>PKGBUILD</code> and <code>catalyst.install</code> files from [http://aur.archlinux.org/packages.php?ID=22899 AUR].<br />
<br />
'''Editing the PKGBUILD and Building'''<br />
<br />
Three changes need to be made here:<br />
1. Change:<code>pkgname=catalyst</code> to <code>pkgname=catalyst-KERNEL_NAME</code><br />
where KERNEL_NAME is whatever you want (e.g. custom, mm, themostawesomekernelever)<br />
<br />
2. Remove <code>linux</code> from the dependencies list.<br />
<br />
3. Build and install the package. (<code>makepkg -i</code> or <code>makepkg</code> followed by <code>pacman -U pkgname.pkg.tar.gz</code>)<br />
<br />
{{Note| If you run multiple kernels, then install catalyst module packages for all kernels. They won't conflict with one another.}}<br />
<br />
==== Tools ====<br />
<br />
===== catalyst-generator =====<br />
[http://aur.archlinux.org/packages.php?ID=34773 catalyst-generator] is a package able to build and install ''fglrx modules'' packed into nice catalyst-{kernver} pacman's packages. <br />
<br />
It creates ''catalyst-{kernver}'' packages using [[makepkg]] and installs them with [[pacman]]. ''{kernver}'' is the kernel version for which each package was built (e.g. catalyst-2.6.35-ARCH package was built for 2.6.35-ARCH kernel).<br />
<br />
To build and install catalyst-{kernver} package for booted kernel as an '''unprivileged user''' (safer way) type this:<br />
<code>catalyst_build_module</code><br />
You will be asked for root's password to proceed to package installation.<br />
It is important to run this command '''after''' installing catalyst-generator.<br />
<br />
This package '''doesn't support auto re-compilation functionality''' so after kernel updates you will have to ''manually'' update catalyst-{kernver} package. Do it in this way (without rebooting):<br />
<br />
1.) As root:<br />
# catalyst_build_module remove<br />
<br />
This will remove all unused <code>catalyst-{kernver}</code> packages<br />
<br />
2.) As unprivileged user:<br />
# catalyst_build_module ''new_kernel_version''<br />
Where ''new_kernel_version'' is a version of kernel which you just updated/installed. e.g.:<br />
catalyst_build_module 2.6.36-ARCH<br />
or:<br />
catalyst_build_module all<br />
which will built catalyst-{kernver} packages for all kernels.<br />
<br />
<br />
If you want to remove <code>catalyst-generator</code> - it's best to run this as root before removing catalyst-generator:<br />
catalyst_build_module remove_all<br />
(This will remove all catalyst-{kernver} packages from the system.)<br />
<br />
catalyst-generator isn't able to remove all those catalyst-{kernver} packages automatically while being removed because there can not be more than one instance of pacman running. If you forget to type `catalyst_build_module remove_all` before typing `pacman -R catalyst-generator` - catalyst-generator will tell you which catalyst-{kernver} packages you will have to remove after removing catalyst-generator.<br />
<br />
<br />
{{Note| If you see those warnings:<br />
<br />
'''WARNING:''' Package contains reference to $srcdir<br />
<br />
'''WARNING:''' '.pkg' is not a valid archive extension.<br />
<br />
while building catalyst-{kernver} package - don't be concerned, it's normal.<br />
}}<br />
<br />
===== Automatic re-compilation of fglrx module with every kernel update =====<br />
<br />
{{Note| Here catalyst_build_module script is working on fglrx modules files, not on pacman's packages.<br />
Most of catalyst_build_module script options mentioned in catalyst-generator section is supported, type '''catalyst_build_module help''' to check which ones exactly.<br />
}}<br />
Since catalyst 10.9 that funcionality has been removed from catalyst package mainly because of [https://bbs.archlinux.org/viewtopic.php?pid=825546#p825546 this] and [https://bbs.archlinux.org/viewtopic.php?pid=825785#p825785 that].<br />
<br />
Still it can be very usefull if you are using more than one stock kernel, or you don't like to rebuild catalyst package with every kernel update.<br />
Known mkinitcpio's hook functionality has been moved to [http://aur.archlinux.org/packages.php?ID=40834 AUR's catalyst-hook].<br />
<br />
Also there is a new package able to provide similar functionality called [http://aur.archlinux.org/packages.php?ID=40832 catalyst-daemon].<br />
<br />
Please note that those packages provides only re-building scripts and source files needed to build fglrx module, and they depend on catalyst-utils package.<br />
<br />
Auto re-compilation is enabled by default after installing selected package, if you want to turn it off just run this command as root:<br />
# catalyst_build_module autooff<br />
You can also turn it on with:<br />
# catalyst_build_module auto<br />
<br />
catalyst_build_module is storing all informations about compilling/installig fglrx module in '''log''' file placed in /var/log/catalys-install.log. But you don't need to remember it, you will be informed about that fact whenever installation fails.<br />
<br />
====== catalyst-hook ======<br />
In '''catalyst-hook''' 'automatic re-compilation' functionality is done by a '''fglrx hook''' on [[mkinitcpio]] with combination of forcing to update package '''linux-headers''' in first place.<br />
<br />
The hook will call '''catalyst_build_module''' command to update fglrx module for the version of your new kernel, and additionally it will call '''catalyst_build_module remove''' command to remove unneeded flgrx module(s).<br />
<br />
{{Note| If you are using this functionality it's '''important''' to look at the installation process of linux (or any other kernel) package. fglrx hook will tell you is everything all right.}}<br />
{{Note| If your '''custom kernel''' is using some '''non-standard mkinitcpio configuration file''' (ie. linux-zen is using /etc/mkinitcpio-zen.conf) you'll have to manually add '''fglrx''' to HOOKS array so it can be auto-recompiled with kernel's update.}}<br />
{{Note| If you '''aren't using stock linux''' at all and still wanna use auto recompilation you should remove linux-headers from SyncFirst list of /etc/pacman.conf after running 'catalyst_build_module auto'.}}<br />
<br />
====== catalyst-daemon ======<br />
In '''catalyst-daemon''' 'automatic re-compilation' functionality is done by init script called '''autofglrx''' which runs with every system boot and checks if kernel was updated. If kernel was updated - it's rebuilding fglrx module. If kernel wasn't updated - it's loading previously built fglrx module (this whole operation is taking only 20ms on 2.4 GHz CPU).<br />
<br />
Autofglrx's check function is comparing built time of just booted kernel (provided by `uname -v`) with built time of a kernel for which fglrx module was built.<br />
It's able to do such a comparison because it adds `uname -v` information to the fglrx module's description while module's compilation.<br />
<br />
While rebuilding autofglrx will call 'catalyst_build_module' to build a module and 'catalyst_build_module remove' to remove unneeded, older fglrx module.<br />
<br />
It doesn't remain in memory.<br />
<br />
{{Note|While installation autofglrx is added into beginning of DAEMONS array of /etc/rc.conf file. You may replace it, but be sure to add it before your DM/X, and do NOT add monkey (@) to it because it must NOT be started in background.<br />
}}<br />
{{Note|If you are using '''own compilation flags''' and got problems with a daemon - please add those flags into /usr/bin/catalyst_build_module file.<br />
}}<br />
<br />
=== Unofficial repositories ===<br />
<br />
There are some unofficial repositories containing the newest (or older) catalyst packages along with the appropriate libs and software in order to use the driver.<br />
If you want to know what packages are inside any given repository you need to first add repository to pacman.conf, perform ''pacman -Sy'' command and then list repository with pacman -Sl command:<br />
# pacman -Sl catalyst<br />
<br />
==== [catalyst] repository ====<br />
There is a repository called ''[catalyst]'' which contains ''newest stable catalyst driver'' and some additional packages like a ''patched xorg-server''.<br />
This repository should always work with the ''stock kernel'' from [core] and it is updated most frequently.<br />
To use it you need:<br />
<br />
1.) Edit /etc/pacman.conf and add those lines above all other repositories (above [core] and [extra]:<br />
<pre><br />
[catalyst]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch<br />
</pre><br />
<br />
2.) Update with:<br />
# pacman -Syu<br />
<br />
3.) Install catalyst:<br />
# pacman -S catalyst catalyst-utils<br />
<br />
'''Note:''' If you are updating from catalyst =< 10.8 steps 2 and 3 look like this:<br />
# pacman -Sy<br />
# pacman -Rdd catalyst<br />
# pacman -S catalyst catalyst-utils<br />
<br />
4.) Don't forget to prepare your /etc/X11/xorg.conf for catalyst! Use aticonfig --initial if it doesn't exist.<br />
<br />
5.) Reboot.<br />
<br />
For x86_64 users '''[catalyst]''' provides lib32-catalyst-utils package needed to run 32-bit opengl applications and wine games.<br />
<br />
Repository also contains '''xvba-video''' package so you may easily use video acceleration described [http://wiki.archlinux.org/index.php/ATI_Catalyst#Video_acceleration below],<br />
plus '''catalyst-daemon''', '''catalyst-hook''' and '''catalyst-generator''' packages.<br />
<br />
'''[catalyst]''' repository contains [http://aur.archlinux.org/packages.php?ID=26687 xorg-server-catalyst-maximize-fix] package. This package is fixing problems with '''maximizing/resizing''', use it mainly if you have [https://wiki.archlinux.org/index.php/ATI_Catalyst#Catalyst_10.6.2F10.7.2F10.8.2F10.9_:_black.2Fgrey.2Fwhite_boxes.2Fartifacts_in_firefox.2Fthunderbird disabled ATi 2D Acceleration Architecture]. To remove xorg-server and install xorg-server-catalyst-maximize-fix just type:<br />
# pacman -Rdd xorg-server xorg-server-common<br />
# pacman -S xorg-server-catalyst-maximize-fix<br />
<br />
==== Archived repositories ====<br />
<br />
There are some archived repositories placed in [http://catalyst.apocalypsus.net/repo http://catalyst.apocalypsus.net/repo], please browse this site and look for files with *.db extension, if you have found interesting catalyst repository tell pacman to use it.<br />
For catalyst-10.9.db pacman.conf entry looks like:<br />
<br />
<pre><br />
[catalyst-10.9]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch<br />
</pre><br />
<br />
You can also view archive catalyst PKGBUILDs and use them to build catalyst package which fit your needs, you can find it inside tar.gz archives [http://catalyst.apocalypsus.net/tarball here].<br />
<br />
==== Xorg-server repositories ====<br />
<br />
'''[xorg110]'''<br />
<br />
This repository contains xorg-server packages of 1.10 line - the last line supported by catalyst at the moment.<br />
<br />
To use this repo you need to edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
<pre><br />
[xorg110]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg110/$arch<br />
</pre><br />
<br />
'''[xorg19]'''<br />
<br />
Catalyst <= 11.3 isn't supporting '''xorg-server >= 1.10''' (checked also with IgnoreAbi flag) - that's the reason why [xorg19] repo with xserver 1.9 and some additional packages arrived.<br />
<br />
To use it you need edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
<pre><br />
[xorg19]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg19/$arch<br />
</pre><br />
<br />
'''[xorg18]'''<br />
<br />
Catalyst < 10.10 isn't working with xorg-server >= 1.9 (checked also with IgnoreAbi flag).<br />
To use it you need edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
<pre><br />
[xorg18]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg18/$arch<br />
</pre><br />
<br />
'''[xorg17]'''<br />
<br />
Supported since catalyst 10.4<br />
<br />
[xorg17] repository contains xserver 1.7 packages, use it only if you are experiencing problems with newer xservers.<br />
<br />
Repository contains [http://catalyst.apocalypsus.net/tarball/xorg-server-1.7-backclear.tar.gz xorg-server-backclear] (patched with backclear patch) and [http://aur.archlinux.org/packages.php?ID=35686 xorg-server-1.7-catalyst-maximize-fix] (patched with fedora patch) packages. Both this patches fix problems with '''maximizing/resizing''' but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-backclear just type:<br />
# pacman -Rdd xorg-server<br />
# pacman -S xorg-server-backclear<br />
Similar with xorg-server-1.7-catalyst-maximize-fix<br />
<br />
To use [xorg17] repo please put those lines at the top of all other repositories in '''/etc/pacman.conf''':<br />
<br />
<pre><br />
[xorg17]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg17/$arch<br />
</pre><br />
<br />
'''[xorg16]'''<br />
<br />
[xorg16] repository contains xserver 1.6 packages, use it only if you are experiencing problems with newer xservers.<br />
<pre><br />
[xorg16]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg16/$arch<br />
</pre><br />
<br />
=== Official ATI/AMD Installer ===<br />
{{Warning| Using the installer from ati.com/amd.com is '''NOT''' recommended for inexperienced users! It may cause file conflicts and X failures. You ''must'' be familiar with booting to the command-line if you wish to attempt this.}}<br />
{{Note|If you have attempted a manual install from the official installer, and cannot recover your desktop:<br />
# /usr/share/ati/fglrx-uninstall.sh}}<br />
<br />
1.) Download the installer from AMD or elsewhere (whereas *-* will be the version): <code>ati-driver-installer-*-*-x86.x86_64.run</code><br />
<br />
2.) Make sure it's executable: <code># chmod +x ati-driver*</code><br />
<br />
3.) Ensure you're using a basic video driver like vesa, and remove conflicting drivers (i.e. xf86-video-ati, radeon) with pacman and from /etc/rc.conf<br />
<br />
4.) Symlink <code>/usr/src/linux</code> to <code>/usr/src/{kernelsource}</code>. 64-bit users also symlink<code>/usr/lib64</code> to <code>/usr/lib</code>.<br />
<br />
5.) As root: <code># ./ati-driver-installer-*-*-x86.86_64.run</code> (Files will extract to a temporary folder and scripts will run...)<br />
<br />
Assuming nothing went horribly wrong...<br />
<br />
6.) Check <code>/usr/share/ati/fglrx-install.log</code> for issues. There should also be a <code>/lib/modules/fglrx/make.{ker_version}.log</code><br />
{{Note|If you modify the make scripts, save to a different filename. Otherwise uninstall will not complete successfully.}}<br />
<br />
7.) Finally, try <code># aticonfig</code> As of Catalyst 11.7, it still assumes <code>/etc/X11/xorg.conf</code> should exist.<br />
<br />
{{Note| If you want to adhere to the new xorg.conf.d: Append your <code>aticonfig</code> string with ''--output'' so that you can adapt the Device section to ''/etc/X11/xorg.conf.d/20-radeon.conf'' The drawback of this is that many <code>aticonfig</code> options rely on an xorg.conf, and thus will be unavailable.}}<br />
<br />
== Configuration ==<br />
Three things to check in Arch before rebooting, otherwise X can break:<br />
*/etc/X11/xorg.conf<br />
*/etc/rc.conf<br />
*/boot/grub/menu.lst<br />
<br />
First, <code>xorg.conf</code>:<br />
AMD provides the <code>aticonfig</code> tool to create/modify <code>xorg.conf</code> file. It also can configure virtually every aspect of the card for it also accesses the <code>amdpcsdb</code> file. For a complete list of <code>aticonfig</code> options, run:<br />
<pre> # aticonfig --help | less </pre><br />
{{Warning| Use the --output option before committing to /etc/X11 as an xorg.conf file will override anything in /etc/X11/xorg.conf.d}}<br />
Simple examples from <code>aticonfig</code>:<br />
<pre><br />
1. Setting up fglrx for the first time.<br />
Single head : aticonfig --initial --input=/etc/X11/xorg.conf<br />
Dual head : aticonfig --initial=dual-head --screen-layout=above<br />
This command will generate a dual head configuration<br />
file with the second screen located above the first<br />
screen.<br />
</pre><br />
If you don't already have an <code>xorg.conf</code> file, you can compare the generated file to one of the [[Xorg#Sample_xorg.conf_Files|Sample Xorg.conf]] examples listed on the Xorg page.<br />
<br />
Although most options are now automatically detected in current Xorg, you may want to specify some in case the defaults change between versions.<br />
<br />
Here is an example(with notes) '''for reference'''. Entries with '#' should be required, add entries with '##' as needed:<br />
<pre><br />
Section "ServerLayout"<br />
Identifier "Arch"<br />
Screen 0 "Screen0" 0 0 # 0's are necessary.<br />
EndSection<br />
Section "Module"<br />
Load ...<br />
...<br />
EndSection<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
...<br />
EndSection<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "fglrx" # Essential.<br />
BusID "PCI:1:0:0" # Recommended if autodetect fails.<br />
Option "OpenGLOverlay" "0" ##<br />
Option "XAANoOffscreenPixmaps" "false" ##<br />
Option "UseInternalAGPGart" "no" ## Deprecated since Catalyst 8.24.18/<br />
Option "KernelModuleParm" "agplock=0" ## as AGP GART support was removed<br />
EndSection<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24 # Should not change from '24'<br />
Modes "1280x1024" "2048x1536" ## 1st value=default resolution, 2nd=maximum.<br />
Virtual 1664 1200 ## (x+64, y) to workaround potential OGL rect. artifacts/<br />
EndSubSection ## fixed in Catalyst 9.8<br />
EndSection<br />
Section "DRI"<br />
Mode 0666 # May help enable direct rendering.<br />
EndSection<br />
</pre><br />
On to <code>rc.conf</code>:<br />
:*Remove '''radeon''' from MODULES and blacklist it in <code>/etc/modprobe.d/modprobe.conf</code> if <code>blacklist-fglrx.conf</code> does not exist.<br />
:*Adding '''fglrx''' to MODULES appears to be optional if added instead to <code>/etc/mkinitcpio.conf</code> (boot image would be rebuilt before reboot).<br />
{{Note|If you are using an AGP card instead of PCI Express add the agp module as well}}<br />
<br />
Finally, <code>menu.lst</code>:<br />
:*Clear modesetting options as the driver doesn't appear to take advantage of [[KMS]] yet. Add <code>nomodeset</code>.<br />
:*For example: <code>kernel /boot/vmlinuz26 root=/dev/sda1 ro '''nomodeset'''</code><br />
<br />
Reboot!<br />
<br />
===Checking operation===<br />
Assuming reboot to your login was successful, otherwise [[#Troubleshooting]].<br />
Commands to check that fglrx is up and running:<br />
<pre><br />
lsmod | grep fglrx<br />
fglrxinfo <br />
</pre><br />
<br />
Finally, run Xorg with <code>startx</code> or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:<br />
$ glxinfo | grep direct<br />
<br />
If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found, you may need to install the mesa-demos package as well.<br />
<br />
{{Warning| In recent versions of Xorg, the paths of libs are changed. So, sometimes <code>libGL.so</code> cannot be correctly loaded even if it's installed. Check this if your GL is not working. Please read "Troubleshooting" section for details.}}<br />
<br />
== Features ==<br />
=== Video acceleration ===<br />
'''[http://en.wikipedia.org/wiki/Video_Acceleration_API Video Acceleration API] (VA API)''' is an open source software library ("libVA") and API specification which enables and provides access to '''graphics hardware (GPU) acceleration''' for video processing on Linux and UNIX based operating systems.<br />
The main motivation for VA API is to enable hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).<br />
<br />
In November 2009, VA-API gained a new proprietary '''xvba-video''' backend which allows VA-API powered applications to take advantage of AMD Radeon's UVD2 chipsets via the [http://en.wikipedia.org/wiki/XvBA XvBA (X-Video Bitstream Acceleration API designed by AMD)] library.<br />
<br />
XvBA support and xvba-video is still under development, however in nowadays it is '''working very well in most cases''' and with '''mplayer''' (and mplayer front-ends), so feel free to check it. You have to build [http://aur.archlinux.org/packages.php?ID=31723 xvba-video] package and install mplayer-vaapi (available in community repository) & libva (available in extra repository) packages.<br />
Then just set your video player to use vaapi:gl as video output.<br />
<br />
Ie. for '''mplayer''':<br />
$ mplayer -vo vaapi:gl -va vaapi movie.avi<br />
<br />
Ie. for '''smplayer''':<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: User Defined : vaapi:gl<br />
Options -> Preferences -> General -> Video (tab) -> Double buffering '''on'''<br />
Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi<br />
Options -> Preferences -> General -> General -> Screenshots -> Turn screenshots '''off'''<br />
{{Note| If Tear Free Desktop is enabled it's better to use<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: vaapi<br />
instead of:<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: User Defined : vaapi:gl<br />
}}<br />
<br />
Ie. for '''vlc''':<br />
Tools -> Preferences -> Input & Codecs -> Use GPU acceleration<br />
<br />
Don't forget to enable v-sync in '''amdcccle''':<br />
3D -> More Settings -> Wait for vertical refresh = Always On<br />
<br />
Note: If you are using '''compiz/kwin''' please note that the only way to '''avoid video flickering''' is to watch videos in '''full-screen''', and only when '''Unredirect Fullscreen is off'''.<br />
<br />
In '''compiz''' you need to set '''Redirected Direct Rendering''' in General Options of ccsm.<br />
If its still flickering try to disable this option in ccsm.<br />
<br />
Its off by default in '''kwin''', but if you see flickering try to turn option "Suspend desktop effects for fullscreen windows" on or off in System Settings -> Desktop Effects -> Advanced.<br />
<br />
<br />
<br />
=== Tear Free Rendering ===<br />
Presented in '''Catalyst 11.1''' 'Tear Free Desktop' feature reduces tearing in 2D, 3D and video applications. This likely adds triple-buffering and v-sync.<br />
Please note that it requires additional GPU processing.<br />
<br />
To enable 'Tear Free Desktop' run <code>amdcccle</code> and go to: [Display Options] -> [Tear Free]<br />
<br />
or as root run:<br />
aticonfig --set-pcs-u32=DDX,EnableTearFreeDesktop,1<br />
To disable use amdcccle or as root run:<br />
aticonfig --del-pcs-key=DDX,EnableTearFreeDesktop<br />
<br />
=== GPU/Mem frequency, Temperature, Fan speed, Overclocking utilities ===<br />
You can get GPU/Mem clocks with:<br />
aticonfig --od-getclocks<br />
Fan speed:<br />
aticonfig --pplib-cmd "get fanspeed 0"<br />
Temperature:<br />
aticonfig --od-gettemperature<br />
<br />
To overclock/underclock it's easier to use some GUI software, like '''ATi Overclocking Utility''', which is very simple and requires qt to work.<br />
<br />
i686 version is available [http://kde-apps.org/content/show.php/ATI+Overclocking+Utility+X32?content=107458 here] while x86_64 - [http://kde-apps.org/content/show.php/ATI+Overclocking+Utility+X64?content=107457 here]. Just download it and run.<br />
<br />
Other, more complex utility to perform such operations is '''AMDOverdriveCtrl'''. It's homepage is [http://sourceforge.net/projects/amdovdrvctrl here], you can get arch package from [http://aur.archlinux.org/packages.php?ID=45298 AUR] or from [catalyst] repository.<br />
<br />
==Troubleshooting==<br />
If you can still boot to command-line, then the problem probably lies in <code>xorg.conf</code><br />
<br />
You can parse the whole <code>/var/log/Xorg.0.log</code><br />
<br />
or<br />
<pre><br />
cat /var/log/Xorg.0.log | grep '(EE)'<br />
cat /var/log/Xorg.0.log | grep '(WW)'<br />
</pre><br />
For clues.<br />
=== Problems with video colours ===<br />
You may still use vaapi:gl to avoid video flickering, but without video acceleration<br />
<br />
Run '''mplayer''' without '''-va vaapi''' switch.<br />
<br />
For '''smplayer''' remove '''-va vaapi''' from Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi<br />
<br />
Plus for '''smplayer''' you may now safely turn screenshots on.<br />
===KWin and composite===<br />
You may use XRender if the rendering with OpenGL is slow. However, XRender might also be slower than OpenGL depending on your card.<br />
XRender also solves artifact issues in some cases.<br />
<br />
===Black screen with complete lockups / hangs after reboot or startx===<br />
<br />
==== Faulty ACPI hardware calls ====<br />
It is possible that fglrx doesn't cooperate well with the system's ACPI hardware calls, so it autodisables itself and there is no screen output. <br />
<br />
So try to run this:<br />
aticonfig --acpi-services=off<br />
<br />
===KDM disappears after logout===<br />
If you are running Catalyst proprietary driver and you get a console (tty1) instead of the expected KDM greeting when you log out, you must instruct KDM to restart the X server after each logout:<br />
$ sudo nano /usr/share/config/kdm/kdmrc<br />
<br />
Uncomment the following line under the section titled [X-:*-Core]:<br />
TerminateServer=True<br />
<br />
KDM should now appear when you log out of KDE.<br />
<br />
===Direct Rendering Doesn't Work===<br />
This problem may occur when using the proprietary '''catalyst''' driver. <br />
<br />
{{Warning|This error would also appear if you haven't '''rebooted''' your system after the installation or upgrade of catalyst. The system needs to load the fglrx.ko module in order to make the driver work.}}<br />
<br />
If you have problem with direct rendering, run:<br />
$ LIBGL_DEBUG=verbose glxinfo > /dev/null<br />
at the command prompt. At the very start of the output, it'll usually give you a nice error message saying why you don't have direct rendering.<br />
<br />
Common errors, and their solutions, are:<br />
'''libGL error: XF86DRIQueryDirectRenderingCapable returned false'''<br />
<br />
* Ensure that you are loading the correct agp modules for your AGP chipset before you load the fglrx kernel module. To determine which agp modules you'll need, run <code>hwdetect --show-agp</code>, then ensure that all modules listed from that command are in the <code>MODULES=</code> array in rc.conf, '''before''' fglrx.<br />
'''libGL error: failed to open DRM: Operation not permitted'''<br />
'''libGL error: reverting to (slow) indirect rendering'''<br />
<br />
'''libGL: OpenDriver: trying /usr/lib/xorg/modules/dri//fglrx_dri.so'''<br />
'''libGL error: dlopen /usr/lib/xorg/modules/dri//fglrx_dri.so failed'''<br />
'''(/usr/lib/xorg/modules/dri//fglrx_dri.so: cannot open shared object file: No such file or directory)'''<br />
'''libGL error: unable to find driver: fglrx_dri.so'''<br />
<br />
* Something hasn't been installed correctly. If the paths in the error message are <code>/usr/X11R6/lib/modules/dri/fglrx_dri.so</code>, then ensure you've logged completely out of your system, then back in. If you're using a graphical login manager (gdm, kdm, xdm), ensure that /etc/profile is sourced every time you log in. This is usually accomplished by adding <code>source /etc/profile</code> into <code>~/.xsession</code> or <code>~/.xinitrc</code>, but may vary between login managers.<br />
<br />
* If the paths above in your error message _are_ <code>/usr/lib/xorg/modules/dri/fglrx_dri.so</code>, then something hasn't been correctly installed. Try reinstalling the <code>catalyst</code> package.<br />
<br />
Errors such as:<br />
'''fglrx: libGL version undetermined - OpenGL module is using glapi fallback'''<br />
could be caused by having multiple versions of <code>libGL.so</code> on your system. Run:<br />
$ sudo updatedb<br />
$ locate libGL.so<br />
<br />
This should return the following output:<br />
$ locate libGL.so<br />
/usr/lib/libGL.so<br />
/usr/lib/libGL.so.1<br />
/usr/lib/libGL.so.1.2<br />
$<br />
<br />
These are the only three libGL.so files you should have on your system. If you have any more (e.g. <code>/usr/X11R6/lib/libGL.so.1.2</code>), then remove them. This should fix your problem. <br />
<br />
You might not get any error to indicate that this is a problem. If you are using X11R7, make sure you do '''not''' have these files on your system:<br />
/usr/X11R6/lib/libGL.so.1.2<br />
/usr/X11R6/lib/libGL.so.1<br />
<br />
===Hibernate/Sleep Issues===<br />
<br />
====Video fails to resume from suspend2ram====<br />
ATI's proprietary {{Codeline|catalyst}} driver cannot resume from suspend if the framebuffer is enabled. To disable the framebuffer, add '''vga=0''' to your kernel options in <code>/boot/grub/menu.lst</code>, for example:<br />
kernel /vmlinuz-linux root=/dev/sda3 resume=/dev/sda2 ro quiet '''vga=0'''<br />
<br />
===System Freezes/Hard locks===<br />
* The <code>radeonfb</code> framebuffer drivers have been known in the past to cause problems of this nature. If your kernel has radeonfb support compiled in, you may want to try a different kernel and see if this helps. <br />
<br />
===Hardware Conflicts===<br />
Radeon cards used in conjunction with some versions of the nForce3 chipset (e.g. nForce 3 250Gb) won't have 3D acceleration. Currently the cause of this issue is unknown, but some sources indicate that it may be possible to get acceleration with this combination of hardware by booting Windows with the drivers from nVIDIA and then rebooting the system. This can be verified by issuing in a root console the following command:<br />
dmesg | grep agp<br />
<br />
If you get something similar to this (using an nForce3-based system)<br />
agpgart: Detected AGP bridge 0<br />
agpgart: Setting up Nforce3 AGP.<br />
agpgart: aperture base > 4G<br />
<br />
and also if issuing this command...<br />
tail -n 100 /var/log/Xorg.0.log | grep agp<br />
<br />
...gets something similar to:<br />
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"<br />
<br />
Then you have this bug.<br />
<br />
Some sources indicate that in some situations, downgrading the motherboard BIOS may help, but this cannot be verified in all cases. Also, a bad BIOS downgrade can render your hardware useless, so beware.<br />
<br />
See bug http://bugzilla.kernel.org/show_bug.cgi?id=6350 for more information and a potential fix.<br />
<br />
===Temporary hangs when playing video===<br />
This problem may occur when using the proprietary Catalyst.<br />
<br />
If you experience temporary hangs lasting from a few seconds to several minutes occuring randomly during playback with mplayer, check /var/log/messages.log for output like:<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<f8bc628c>] ? ip_firegl_ioctl+0x1c/0x30 [fglrx]<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c0197038>] ? vfs_ioctl+0x78/0x90<br />
Nov 28 18:31:56 pandemonium [<c01970b7>] ? do_vfs_ioctl+0x67/0x2f0<br />
Nov 28 18:31:56 pandemonium [<c01973a6>] ? sys_ioctl+0x66/0x70<br />
Nov 28 18:31:56 pandemonium [<c0103ef3>] ? sysenter_do_call+0x12/0x33<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium =======================<br />
<br />
Adding the nopat kerneloption to /boot/grub/menu.lst and rebooting fixed the problem at least for me.<br />
<br />
===Catalyst 10.6/10.7/10.8/10.9 : black/grey/white boxes/artifacts in firefox/thunderbird===<br />
With catalyst 10.6 AMD/ATi announce new method of 2D acceleration for radeons, unfortunately this step causes bugs for some users. To turn on old (slower xaa) method of 2d rendering please kill your desktop environment and Xserver and type this command as root:<br />
aticonfig --set-pcs-str=DDX,ForceXAA,TRUE<br />
Now you'll probably need patched xorg-server to fix problems with resizing/maximizing windows, read about it ie. [http://wiki.archlinux.org/index.php/ATI_Catalyst#Black.2Fgrey.2Fwhite_boxes.2Fartifacts_mainly_in_firefox.2Fthunderbird here].<br />
<br />
===Radeon HD 6870 and fglrx 10.10===<br />
When running<br />
#sudo aticonfig --initial<br />
you will get<br />
aticonfig: No supported adaptaters detected<br />
That's because HD6870 is not supported by fglrx 10.10<br />
<br />
However you can create xorg.conf yourself :<br />
Section "Device"<br />
Identifier "ATI radeon 6870"<br />
Driver "fglrx"<br />
EndSection<br />
<br />
Xorg will start and it is possible to use amdcccle instead of aticonfig. There will be a "AMD Unsupported hardware" watermark.<br />
<br />
You can remove this watermark using the following script :<br />
#!/bin/sh<br />
DRIVER=/usr/lib/xorg/modules/drivers/fglrx_drv.so<br />
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do<br />
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER<br />
done<br />
<br />
===WebGL support in Chromium===<br />
Google has blacklisted linux's catalyst driver from supporting webGL in their Chromium/Chrome browsers.<br />
<br />
You can turn webGL on by editing /usr/share/applications/chromium.desktop file and adding '''--ignore-gpu-blacklist''' flag into '''Exec''' line so it could look like this:<br />
Exec=chromium %U --ignore-gpu-blacklist<br />
You can also run chromium from console with that --ignore-gpu-blacklist flag:<br />
$ chromium --ignore-gpu-blacklist<br />
<br />
{{Warning| Catalyst does not support the GL_ARB_robustness extension, so it is possible that a malicious site could use WebGL to perform a DoS attack on your graphic card, more info: http://www.h-online.com/security/news/item/WebGL-as-a-security-problem-1240567.html}}</div>Hramathttps://wiki.archlinux.org/index.php?title=AMD_Catalyst&diff=160710AMD Catalyst2011-09-19T17:26:47Z<p>Hramat: /* GPU/Mem frequency, Temperature, Fan speed, Overclocking utilities */</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
{{i18n|ATI Catalyst}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of ATI's proprietary linux "Catalyst" video card driver.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|cchtml.com - Unofficial Wiki for the ATI Linux Driver|http://wiki.cchtml.com/index.php/Main_Page}}<br />
{{Article summary link|Unofficial ATI Linux Driver Bugzilla|http://ati.cchtml.com/query.cgi}}<br />
{{Article summary end}}<br />
ATI/AMD's proprietary binary Linux driver package, ''fglrx''. Now known as ''Catalyst'' to fall in line with the naming scheme of the Windows driver. Only the package name has changed, while the kernel module retains it's original ''fglrx.ko'' filename. Therefore, any mention of fglrx below is specifically in reference to the ''kernel module'', '''not the package'''.<br />
<br />
Supported devices are [http://en.wikipedia.org/wiki/Radeon ATI Radeon] video cards (now made by AMD) with chipset R600 and newer (as of Catalyst 9.4). [http://en.wikipedia.org/wiki/Comparison_of_AMD_graphics_processing_units This table] to translate '''model''' names (X1900, HD4850) to/from '''chip''' names (R580, RV770 respectively).<br />
<br />
There are four routes to supporting your ATI graphics card in Arch:<br />
<br />
- using the open-source [https://wiki.archlinux.org/index.php/ATI xf86-video-ati];<br />
<br />
- installing Catalyst from AUR;<br />
<br />
- installing Catalyst from unofficial [catalyst] repository;<br />
<br />
- trying to install the Catalyst binary yourself (not recommended).<br />
<br />
Older cards will need the open-source driver as work on 2D/3D for those is [http://www.x.org/wiki/RadeonFeature nearly complete]. This article concerns the latter three methods.<br />
<br />
== Installation ==<br />
Catalyst was once a precompiled package offered by Arch in the <code>[extra]</code> repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver. [http://aur.archlinux.org/packages.php?ID=29111 Catalyst driver for stock kernel] and [http://aur.archlinux.org/packages.php?ID=40833 Catalyst libraries/utils] (required) are available on [[AUR]].<br />
<br />
{{Note| With '''every''' Catalyst update you should remove '''amdpcsdb''' file in this way: stop your X/DE, remove <code>/etc/ati/amdpcsdb</code>, start your X/DE, and then run <code>amdcccle</code>.}}<br />
{{Note| '''<nowiki>Catalyst >= 10.10</nowiki>''' build supports only '''xorg-server 1.9''' so feel free to install it from [extra] repository}}<br />
{{Warning|<br />
*Make sure that you own a '''R6xx''' ('''HD2xxx''') or newer card or the driver '''won't''' be enabled. You will encounter an error if you try to enable your display using Catalyst and a card older than the R6xx series.<br />
<br />
*It appears that Catalyst 9.10-10.11 does not support nForce4 motherboard chipsets.}}<br />
<br />
{{Warning|Whether or not you install from AUR, you will have to reinstall/update fglrx every time the kernel is updated. Otherwise, X '''will''' fail to start.}}<br />
=== Installing from AUR ===<br />
{{Note| Since version 10.9, Catalyst is split into ''catalyst'' and ''catalyst-utils''}}<br />
====Stock kernel====<br />
To install AMD's fglrx driver for the <code>linux</code> package, you need to install either [http://aur.archlinux.org/packages.php?ID=29111 catalyst] or [http://aur.archlinux.org/packages.php?ID=34773 catalyst-test] [[AUR]] packages.<br />
{{Note| If pacman asks you about removing '''libgl''' - you may safely say "Y"}}<br />
<br />
After installing you need to ensure xorg.conf is [[#Configuration| created and/or configured]] before rebooting.<br />
<br />
If you are using x86_64 architecture and want 32-bit OpenGL: Install [http://aur.archlinux.org/packages.php?ID=24824 AUR's lib32-catalyst-utils]<br />
<br />
''If you need more information on catalyst, visit [http://bbs.archlinux.org/viewtopic.php?id=57084 this thread].''<br />
<br />
==== Custom Kernels ====<br />
To install catalyst for a custom kernel, you'll need to build your own <code>catalyst-$kernel</code> package.<br />
<br />
If you are at all uncomfortable or inexperienced making packages, read up the [[ABS]] wiki page first so things go smoothly.<br />
<br />
'''Obtaining PKGBUILD'''<br />
<br />
Obtain the <code>PKGBUILD</code> and <code>catalyst.install</code> files from [http://aur.archlinux.org/packages.php?ID=22899 AUR].<br />
<br />
'''Editing the PKGBUILD and Building'''<br />
<br />
Three changes need to be made here:<br />
1. Change:<code>pkgname=catalyst</code> to <code>pkgname=catalyst-KERNEL_NAME</code><br />
where KERNEL_NAME is whatever you want (e.g. custom, mm, themostawesomekernelever)<br />
<br />
2. Remove <code>linux</code> from the dependencies list.<br />
<br />
3. Build and install the package. (<code>makepkg -i</code> or <code>makepkg</code> followed by <code>pacman -U pkgname.pkg.tar.gz</code>)<br />
<br />
{{Note| If you run multiple kernels, then install catalyst module packages for all kernels. They won't conflict with one another.}}<br />
<br />
==== Tools ====<br />
<br />
===== catalyst-generator =====<br />
[http://aur.archlinux.org/packages.php?ID=34773 catalyst-generator] is a package able to build and install ''fglrx modules'' packed into nice catalyst-{kernver} pacman's packages. <br />
<br />
It creates ''catalyst-{kernver}'' packages using [[makepkg]] and installs them with [[pacman]]. ''{kernver}'' is the kernel version for which each package was built (e.g. catalyst-2.6.35-ARCH package was built for 2.6.35-ARCH kernel).<br />
<br />
To build and install catalyst-{kernver} package for booted kernel as an '''unprivileged user''' (safer way) type this:<br />
<code>catalyst_build_module</code><br />
You will be asked for root's password to proceed to package installation.<br />
It is important to run this command '''after''' installing catalyst-generator.<br />
<br />
This package '''doesn't support auto re-compilation functionality''' so after kernel updates you will have to ''manually'' update catalyst-{kernver} package. Do it in this way (without rebooting):<br />
<br />
1.) As root:<br />
# catalyst_build_module remove<br />
<br />
This will remove all unused <code>catalyst-{kernver}</code> packages<br />
<br />
2.) As unprivileged user:<br />
# catalyst_build_module ''new_kernel_version''<br />
Where ''new_kernel_version'' is a version of kernel which you just updated/installed. e.g.:<br />
catalyst_build_module 2.6.36-ARCH<br />
or:<br />
catalyst_build_module all<br />
which will built catalyst-{kernver} packages for all kernels.<br />
<br />
<br />
If you want to remove <code>catalyst-generator</code> - it's best to run this as root before removing catalyst-generator:<br />
catalyst_build_module remove_all<br />
(This will remove all catalyst-{kernver} packages from the system.)<br />
<br />
catalyst-generator isn't able to remove all those catalyst-{kernver} packages automatically while being removed because there can not be more than one instance of pacman running. If you forget to type `catalyst_build_module remove_all` before typing `pacman -R catalyst-generator` - catalyst-generator will tell you which catalyst-{kernver} packages you will have to remove after removing catalyst-generator.<br />
<br />
<br />
{{Note| If you see those warnings:<br />
<br />
'''WARNING:''' Package contains reference to $srcdir<br />
<br />
'''WARNING:''' '.pkg' is not a valid archive extension.<br />
<br />
while building catalyst-{kernver} package - don't be concerned, it's normal.<br />
}}<br />
<br />
===== Automatic re-compilation of fglrx module with every kernel update =====<br />
<br />
{{Note| Here catalyst_build_module script is working on fglrx modules files, not on pacman's packages.<br />
Most of catalyst_build_module script options mentioned in catalyst-generator section is supported, type '''catalyst_build_module help''' to check which ones exactly.<br />
}}<br />
Since catalyst 10.9 that funcionality has been removed from catalyst package mainly because of [https://bbs.archlinux.org/viewtopic.php?pid=825546#p825546 this] and [https://bbs.archlinux.org/viewtopic.php?pid=825785#p825785 that].<br />
<br />
Still it can be very usefull if you are using more than one stock kernel, or you don't like to rebuild catalyst package with every kernel update.<br />
Known mkinitcpio's hook functionality has been moved to [http://aur.archlinux.org/packages.php?ID=40834 AUR's catalyst-hook].<br />
<br />
Also there is a new package able to provide similar functionality called [http://aur.archlinux.org/packages.php?ID=40832 catalyst-daemon].<br />
<br />
Please note that those packages provides only re-building scripts and source files needed to build fglrx module, and they depend on catalyst-utils package.<br />
<br />
Auto re-compilation is enabled by default after installing selected package, if you want to turn it off just run this command as root:<br />
# catalyst_build_module autooff<br />
You can also turn it on with:<br />
# catalyst_build_module auto<br />
<br />
catalyst_build_module is storing all informations about compilling/installig fglrx module in '''log''' file placed in /var/log/catalys-install.log. But you don't need to remember it, you will be informed about that fact whenever installation fails.<br />
<br />
====== catalyst-hook ======<br />
In '''catalyst-hook''' 'automatic re-compilation' functionality is done by a '''fglrx hook''' on [[mkinitcpio]] with combination of forcing to update package '''linux-headers''' in first place.<br />
<br />
The hook will call '''catalyst_build_module''' command to update fglrx module for the version of your new kernel, and additionally it will call '''catalyst_build_module remove''' command to remove unneeded flgrx module(s).<br />
<br />
{{Note| If you are using this functionality it's '''important''' to look at the installation process of linux (or any other kernel) package. fglrx hook will tell you is everything all right.}}<br />
{{Note| If your '''custom kernel''' is using some '''non-standard mkinitcpio configuration file''' (ie. linux-zen is using /etc/mkinitcpio-zen.conf) you'll have to manually add '''fglrx''' to HOOKS array so it can be auto-recompiled with kernel's update.}}<br />
{{Note| If you '''aren't using stock linux''' at all and still wanna use auto recompilation you should remove linux-headers from SyncFirst list of /etc/pacman.conf after running 'catalyst_build_module auto'.}}<br />
<br />
====== catalyst-daemon ======<br />
In '''catalyst-daemon''' 'automatic re-compilation' functionality is done by init script called '''autofglrx''' which runs with every system boot and checks if kernel was updated. If kernel was updated - it's rebuilding fglrx module. If kernel wasn't updated - it's loading previously built fglrx module (this whole operation is taking only 20ms on 2.4 GHz CPU).<br />
<br />
Autofglrx's check function is comparing built time of just booted kernel (provided by `uname -v`) with built time of a kernel for which fglrx module was built.<br />
It's able to do such a comparison because it adds `uname -v` information to the fglrx module's description while module's compilation.<br />
<br />
While rebuilding autofglrx will call 'catalyst_build_module' to build a module and 'catalyst_build_module remove' to remove unneeded, older fglrx module.<br />
<br />
It doesn't remain in memory.<br />
<br />
{{Note|While installation autofglrx is added into beginning of DAEMONS array of /etc/rc.conf file. You may replace it, but be sure to add it before your DM/X, and do NOT add monkey (@) to it because it must NOT be started in background.<br />
}}<br />
{{Note|If you are using '''own compilation flags''' and got problems with a daemon - please add those flags into /usr/bin/catalyst_build_module file.<br />
}}<br />
<br />
=== Unofficial repositories ===<br />
<br />
There are some unofficial repositories containing the newest (or older) catalyst packages along with the appropriate libs and software in order to use the driver.<br />
If you want to know what packages are inside any given repository you need to first add repository to pacman.conf, perform ''pacman -Sy'' command and then list repository with pacman -Sl command:<br />
# pacman -Sl catalyst<br />
<br />
==== [catalyst] repository ====<br />
There is a repository called ''[catalyst]'' which contains ''newest stable catalyst driver'' and some additional packages like a ''patched xorg-server''.<br />
This repository should always work with the ''stock kernel'' from [core] and it is updated most frequently.<br />
To use it you need:<br />
<br />
1.) Edit /etc/pacman.conf and add those lines above all other repositories (above [core] and [extra]:<br />
<pre><br />
[catalyst]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch<br />
</pre><br />
<br />
2.) Update with:<br />
# pacman -Syu<br />
<br />
3.) Install catalyst:<br />
# pacman -S catalyst catalyst-utils<br />
<br />
'''Note:''' If you are updating from catalyst =< 10.8 steps 2 and 3 look like this:<br />
# pacman -Sy<br />
# pacman -Rdd catalyst<br />
# pacman -S catalyst catalyst-utils<br />
<br />
4.) Don't forget to prepare your /etc/X11/xorg.conf for catalyst! Use aticonfig --initial if it doesn't exist.<br />
<br />
5.) Reboot.<br />
<br />
For x86_64 users '''[catalyst]''' provides lib32-catalyst-utils package needed to run 32-bit opengl applications and wine games.<br />
<br />
Repository also contains '''xvba-video''' package so you may easily use video acceleration described [http://wiki.archlinux.org/index.php/ATI_Catalyst#Video_acceleration below],<br />
plus '''catalyst-daemon''', '''catalyst-hook''' and '''catalyst-generator''' packages.<br />
<br />
'''[catalyst]''' repository contains [http://aur.archlinux.org/packages.php?ID=26687 xorg-server-catalyst-maximize-fix] package. This package is fixing problems with '''maximizing/resizing''', use it mainly if you have [https://wiki.archlinux.org/index.php/ATI_Catalyst#Catalyst_10.6.2F10.7.2F10.8.2F10.9_:_black.2Fgrey.2Fwhite_boxes.2Fartifacts_in_firefox.2Fthunderbird disabled ATi 2D Acceleration Architecture]. To remove xorg-server and install xorg-server-catalyst-maximize-fix just type:<br />
# pacman -Rdd xorg-server xorg-server-common<br />
# pacman -S xorg-server-catalyst-maximize-fix<br />
<br />
==== Archived repositories ====<br />
<br />
There are some archived repositories placed in [http://catalyst.apocalypsus.net/repo http://catalyst.apocalypsus.net/repo], please browse this site and look for files with *.db extension, if you have found interesting catalyst repository tell pacman to use it.<br />
For catalyst-10.9.db pacman.conf entry looks like:<br />
<br />
<pre><br />
[catalyst-10.9]<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch<br />
</pre><br />
<br />
You can also view archive catalyst PKGBUILDs and use them to build catalyst package which fit your needs, you can find it inside tar.gz archives [http://catalyst.apocalypsus.net/tarball here].<br />
<br />
==== Xorg-server repositories ====<br />
<br />
'''[xorg110]'''<br />
<br />
This repository contains xorg-server packages of 1.10 line - the last line supported by catalyst at the moment.<br />
<br />
To use this repo you need to edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
<pre><br />
[xorg110]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg110/$arch<br />
</pre><br />
<br />
'''[xorg19]'''<br />
<br />
Catalyst <= 11.3 isn't supporting '''xorg-server >= 1.10''' (checked also with IgnoreAbi flag) - that's the reason why [xorg19] repo with xserver 1.9 and some additional packages arrived.<br />
<br />
To use it you need edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
<pre><br />
[xorg19]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg19/$arch<br />
</pre><br />
<br />
'''[xorg18]'''<br />
<br />
Catalyst < 10.10 isn't working with xorg-server >= 1.9 (checked also with IgnoreAbi flag).<br />
To use it you need edit /etc/pacman.conf and add those lines above all other repositories:<br />
<br />
<pre><br />
[xorg18]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg18/$arch<br />
</pre><br />
<br />
'''[xorg17]'''<br />
<br />
Supported since catalyst 10.4<br />
<br />
[xorg17] repository contains xserver 1.7 packages, use it only if you are experiencing problems with newer xservers.<br />
<br />
Repository contains [http://catalyst.apocalypsus.net/tarball/xorg-server-1.7-backclear.tar.gz xorg-server-backclear] (patched with backclear patch) and [http://aur.archlinux.org/packages.php?ID=35686 xorg-server-1.7-catalyst-maximize-fix] (patched with fedora patch) packages. Both this patches fix problems with '''maximizing/resizing''' but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-backclear just type:<br />
# pacman -Rdd xorg-server<br />
# pacman -S xorg-server-backclear<br />
Similar with xorg-server-1.7-catalyst-maximize-fix<br />
<br />
To use [xorg17] repo please put those lines at the top of all other repositories in '''/etc/pacman.conf''':<br />
<br />
<pre><br />
[xorg17]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg17/$arch<br />
</pre><br />
<br />
'''[xorg16]'''<br />
<br />
[xorg16] repository contains xserver 1.6 packages, use it only if you are experiencing problems with newer xservers.<br />
<pre><br />
[xorg16]<br />
Server = http://catalyst.apocalypsus.net/repo/xorg16/$arch<br />
</pre><br />
<br />
=== Official ATI/AMD Installer ===<br />
{{Warning| Using the installer from ati.com/amd.com is '''NOT''' recommended for inexperienced users! It may cause file conflicts and X failures. You ''must'' be familiar with booting to the command-line if you wish to attempt this.}}<br />
{{Note|If you have attempted a manual install from the official installer, and cannot recover your desktop:<br />
# /usr/share/ati/fglrx-uninstall.sh}}<br />
<br />
1.) Download the installer from AMD or elsewhere (whereas *-* will be the version): <code>ati-driver-installer-*-*-x86.x86_64.run</code><br />
<br />
2.) Make sure it's executable: <code># chmod +x ati-driver*</code><br />
<br />
3.) Ensure you're using a basic video driver like vesa, and remove conflicting drivers (i.e. xf86-video-ati, radeon) with pacman and from /etc/rc.conf<br />
<br />
4.) Symlink <code>/usr/src/linux</code> to <code>/usr/src/{kernelsource}</code>. 64-bit users also symlink<code>/usr/lib64</code> to <code>/usr/lib</code>.<br />
<br />
5.) As root: <code># ./ati-driver-installer-*-*-x86.86_64.run</code> (Files will extract to a temporary folder and scripts will run...)<br />
<br />
Assuming nothing went horribly wrong...<br />
<br />
6.) Check <code>/usr/share/ati/fglrx-install.log</code> for issues. There should also be a <code>/lib/modules/fglrx/make.{ker_version}.log</code><br />
{{Note|If you modify the make scripts, save to a different filename. Otherwise uninstall will not complete successfully.}}<br />
<br />
7.) Finally, try <code># aticonfig</code> As of Catalyst 11.7, it still assumes <code>/etc/X11/xorg.conf</code> should exist.<br />
<br />
{{Note| If you want to adhere to the new xorg.conf.d: Append your <code>aticonfig</code> string with ''--output'' so that you can adapt the Device section to ''/etc/X11/xorg.conf.d/20-radeon.conf'' The drawback of this is that many <code>aticonfig</code> options rely on an xorg.conf, and thus will be unavailable.}}<br />
<br />
== Configuration ==<br />
Three things to check in Arch before rebooting, otherwise X can break:<br />
*/etc/X11/xorg.conf<br />
*/etc/rc.conf<br />
*/boot/grub/menu.lst<br />
<br />
First, <code>xorg.conf</code>:<br />
AMD provides the <code>aticonfig</code> tool to create/modify <code>xorg.conf</code> file. It also can configure virtually every aspect of the card for it also accesses the <code>amdpcsdb</code> file. For a complete list of <code>aticonfig</code> options, run:<br />
<pre> # aticonfig --help | less </pre><br />
{{Warning| Use the --output option before committing to /etc/X11 as an xorg.conf file will override anything in /etc/X11/xorg.conf.d}}<br />
Simple examples from <code>aticonfig</code>:<br />
<pre><br />
1. Setting up fglrx for the first time.<br />
Single head : aticonfig --initial --input=/etc/X11/xorg.conf<br />
Dual head : aticonfig --initial=dual-head --screen-layout=above<br />
This command will generate a dual head configuration<br />
file with the second screen located above the first<br />
screen.<br />
</pre><br />
If you don't already have an <code>xorg.conf</code> file, you can compare the generated file to one of the [[Xorg#Sample_xorg.conf_Files|Sample Xorg.conf]] examples listed on the Xorg page.<br />
<br />
Although most options are now automatically detected in current Xorg, you may want to specify some in case the defaults change between versions.<br />
<br />
Here is an example(with notes) '''for reference'''. Entries with '#' should be required, add entries with '##' as needed:<br />
<pre><br />
Section "ServerLayout"<br />
Identifier "Arch"<br />
Screen 0 "Screen0" 0 0 # 0's are necessary.<br />
EndSection<br />
Section "Module"<br />
Load ...<br />
...<br />
EndSection<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
...<br />
EndSection<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "fglrx" # Essential.<br />
BusID "PCI:1:0:0" # Recommended if autodetect fails.<br />
Option "OpenGLOverlay" "0" ##<br />
Option "XAANoOffscreenPixmaps" "false" ##<br />
Option "UseInternalAGPGart" "no" ## Deprecated since Catalyst 8.24.18/<br />
Option "KernelModuleParm" "agplock=0" ## as AGP GART support was removed<br />
EndSection<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24 # Should not change from '24'<br />
Modes "1280x1024" "2048x1536" ## 1st value=default resolution, 2nd=maximum.<br />
Virtual 1664 1200 ## (x+64, y) to workaround potential OGL rect. artifacts/<br />
EndSubSection ## fixed in Catalyst 9.8<br />
EndSection<br />
Section "DRI"<br />
Mode 0666 # May help enable direct rendering.<br />
EndSection<br />
</pre><br />
On to <code>rc.conf</code>:<br />
:*Remove '''radeon''' from MODULES and blacklist in <code>/etc/modprobe.d</code> if <code>blacklist-fglrx.conf</code> does not exist.<br />
:*Adding '''fglrx''' to MODULES appears to be optional if added instead to <code>/etc/mkinitcpio.conf</code> (boot image would be rebuilt before reboot).<br />
{{Note|If you are using an AGP card instead of PCI Express add the agp module as well}}<br />
<br />
Finally, <code>menu.lst</code>:<br />
:*Clear modesetting options as the driver doesn't appear to take advantage of [[KMS]] yet. Add <code>nomodeset</code>.<br />
:*For example: <code>kernel /boot/vmlinuz26 root=/dev/sda1 ro '''nomodeset'''</code><br />
<br />
Reboot!<br />
<br />
===Checking operation===<br />
Assuming reboot to your login was successful, otherwise [[#Troubleshooting]].<br />
Commands to check that fglrx is up and running:<br />
<pre><br />
lsmod | grep fglrx<br />
fglrxinfo <br />
</pre><br />
<br />
Finally, run Xorg with <code>startx</code> or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:<br />
$ glxinfo | grep direct<br />
<br />
If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found, you may need to install the mesa-demos package as well.<br />
<br />
{{Warning| In recent versions of Xorg, the paths of libs are changed. So, sometimes <code>libGL.so</code> cannot be correctly loaded even if it's installed. Check this if your GL is not working. Please read "Troubleshooting" section for details.}}<br />
<br />
== Features ==<br />
=== Video acceleration ===<br />
'''[http://en.wikipedia.org/wiki/Video_Acceleration_API Video Acceleration API] (VA API)''' is an open source software library ("libVA") and API specification which enables and provides access to '''graphics hardware (GPU) acceleration''' for video processing on Linux and UNIX based operating systems.<br />
The main motivation for VA API is to enable hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).<br />
<br />
In November 2009, VA-API gained a new proprietary '''xvba-video''' backend which allows VA-API powered applications to take advantage of AMD Radeon's UVD2 chipsets via the [http://en.wikipedia.org/wiki/XvBA XvBA (X-Video Bitstream Acceleration API designed by AMD)] library.<br />
<br />
XvBA support and xvba-video is still under development, however in nowadays it is '''working very well in most cases''' and with '''mplayer''' (and mplayer front-ends), so feel free to check it. You have to build [http://aur.archlinux.org/packages.php?ID=31723 xvba-video] package and install mplayer-vaapi (available in community repository) & libva (available in extra repository) packages.<br />
Then just set your video player to use vaapi:gl as video output.<br />
<br />
Ie. for '''mplayer''':<br />
$ mplayer -vo vaapi:gl -va vaapi movie.avi<br />
<br />
Ie. for '''smplayer''':<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: User Defined : vaapi:gl<br />
Options -> Preferences -> General -> Video (tab) -> Double buffering '''on'''<br />
Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi<br />
Options -> Preferences -> General -> General -> Screenshots -> Turn screenshots '''off'''<br />
{{Note| If Tear Free Desktop is enabled it's better to use<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: vaapi<br />
instead of:<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: User Defined : vaapi:gl<br />
}}<br />
<br />
Ie. for '''vlc''':<br />
Tools -> Preferences -> Input & Codecs -> Use GPU acceleration<br />
<br />
Don't forget to enable v-sync in '''amdcccle''':<br />
3D -> More Settings -> Wait for vertical refresh = Always On<br />
<br />
Note: If you are using '''compiz/kwin''' please note that the only way to '''avoid video flickering''' is to watch videos in '''full-screen''', and only when '''Unredirect Fullscreen is off'''.<br />
<br />
In '''compiz''' you need to set '''Redirected Direct Rendering''' in General Options of ccsm.<br />
If its still flickering try to disable this option in ccsm.<br />
<br />
Its off by default in '''kwin''', but if you see flickering try to turn option "Suspend desktop effects for fullscreen windows" on or off in System Settings -> Desktop Effects -> Advanced.<br />
<br />
<br />
<br />
=== Tear Free Rendering ===<br />
Presented in '''Catalyst 11.1''' 'Tear Free Desktop' feature reduces tearing in 2D, 3D and video applications. This likely adds triple-buffering and v-sync.<br />
Please note that it requires additional GPU processing.<br />
<br />
To enable 'Tear Free Desktop' run <code>amdcccle</code> and go to: [Display Options] -> [Tear Free]<br />
<br />
or as root run:<br />
aticonfig --set-pcs-u32=DDX,EnableTearFreeDesktop,1<br />
To disable use amdcccle or as root run:<br />
aticonfig --del-pcs-key=DDX,EnableTearFreeDesktop<br />
<br />
=== GPU/Mem frequency, Temperature, Fan speed, Overclocking utilities ===<br />
You can get GPU/Mem clocks with:<br />
aticonfig --od-getclocks<br />
Fan speed:<br />
aticonfig --pplib-cmd "get fanspeed 0"<br />
Temperature:<br />
aticonfig --od-gettemperature<br />
<br />
To overclock/underclock it's easier to use some GUI software, like '''ATi Overclocking Utility''', which is very simple and requires qt to work.<br />
<br />
i686 version is available [http://kde-apps.org/content/show.php/ATI+Overclocking+Utility+X32?content=107458 here] while x86_64 - [http://kde-apps.org/content/show.php/ATI+Overclocking+Utility+X64?content=107457 here]. Just download it and run.<br />
<br />
Other, more complex utility to perform such operations is '''AMDOverdriveCtrl'''. It's homepage is [http://sourceforge.net/projects/amdovdrvctrl here], you can get arch package from [http://aur.archlinux.org/packages.php?ID=45298 AUR] or from [catalyst] repository.<br />
<br />
==Troubleshooting==<br />
If you can still boot to command-line, then the problem probably lies in <code>xorg.conf</code><br />
<br />
You can parse the whole <code>/var/log/Xorg.0.log</code><br />
<br />
or<br />
<pre><br />
cat /var/log/Xorg.0.log | grep '(EE)'<br />
cat /var/log/Xorg.0.log | grep '(WW)'<br />
</pre><br />
For clues.<br />
=== Problems with video colours ===<br />
You may still use vaapi:gl to avoid video flickering, but without video acceleration<br />
<br />
Run '''mplayer''' without '''-va vaapi''' switch.<br />
<br />
For '''smplayer''' remove '''-va vaapi''' from Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi<br />
<br />
Plus for '''smplayer''' you may now safely turn screenshots on.<br />
===KWin and composite===<br />
You may use XRender if the rendering with OpenGL is slow. However, XRender might also be slower than OpenGL depending on your card.<br />
XRender also solves artifact issues in some cases.<br />
<br />
===Black screen with complete lockups / hangs after reboot or startx===<br />
<br />
==== Faulty ACPI hardware calls ====<br />
It is possible that fglrx doesn't cooperate well with the system's ACPI hardware calls, so it autodisables itself and there is no screen output. <br />
<br />
So try to run this:<br />
aticonfig --acpi-services=off<br />
<br />
===KDM disappears after logout===<br />
If you are running Catalyst proprietary driver and you get a console (tty1) instead of the expected KDM greeting when you log out, you must instruct KDM to restart the X server after each logout:<br />
$ sudo nano /usr/share/config/kdm/kdmrc<br />
<br />
Uncomment the following line under the section titled [X-:*-Core]:<br />
TerminateServer=True<br />
<br />
KDM should now appear when you log out of KDE.<br />
<br />
===Direct Rendering Doesn't Work===<br />
This problem may occur when using the proprietary '''catalyst''' driver. <br />
<br />
{{Warning|This error would also appear if you haven't '''rebooted''' your system after the installation or upgrade of catalyst. The system needs to load the fglrx.ko module in order to make the driver work.}}<br />
<br />
If you have problem with direct rendering, run:<br />
$ LIBGL_DEBUG=verbose glxinfo > /dev/null<br />
at the command prompt. At the very start of the output, it'll usually give you a nice error message saying why you don't have direct rendering.<br />
<br />
Common errors, and their solutions, are:<br />
'''libGL error: XF86DRIQueryDirectRenderingCapable returned false'''<br />
<br />
* Ensure that you are loading the correct agp modules for your AGP chipset before you load the fglrx kernel module. To determine which agp modules you'll need, run <code>hwdetect --show-agp</code>, then ensure that all modules listed from that command are in the <code>MODULES=</code> array in rc.conf, '''before''' fglrx.<br />
'''libGL error: failed to open DRM: Operation not permitted'''<br />
'''libGL error: reverting to (slow) indirect rendering'''<br />
<br />
'''libGL: OpenDriver: trying /usr/lib/xorg/modules/dri//fglrx_dri.so'''<br />
'''libGL error: dlopen /usr/lib/xorg/modules/dri//fglrx_dri.so failed'''<br />
'''(/usr/lib/xorg/modules/dri//fglrx_dri.so: cannot open shared object file: No such file or directory)'''<br />
'''libGL error: unable to find driver: fglrx_dri.so'''<br />
<br />
* Something hasn't been installed correctly. If the paths in the error message are <code>/usr/X11R6/lib/modules/dri/fglrx_dri.so</code>, then ensure you've logged completely out of your system, then back in. If you're using a graphical login manager (gdm, kdm, xdm), ensure that /etc/profile is sourced every time you log in. This is usually accomplished by adding <code>source /etc/profile</code> into <code>~/.xsession</code> or <code>~/.xinitrc</code>, but may vary between login managers.<br />
<br />
* If the paths above in your error message _are_ <code>/usr/lib/xorg/modules/dri/fglrx_dri.so</code>, then something hasn't been correctly installed. Try reinstalling the <code>catalyst</code> package.<br />
<br />
Errors such as:<br />
'''fglrx: libGL version undetermined - OpenGL module is using glapi fallback'''<br />
could be caused by having multiple versions of <code>libGL.so</code> on your system. Run:<br />
$ sudo updatedb<br />
$ locate libGL.so<br />
<br />
This should return the following output:<br />
$ locate libGL.so<br />
/usr/lib/libGL.so<br />
/usr/lib/libGL.so.1<br />
/usr/lib/libGL.so.1.2<br />
$<br />
<br />
These are the only three libGL.so files you should have on your system. If you have any more (e.g. <code>/usr/X11R6/lib/libGL.so.1.2</code>), then remove them. This should fix your problem. <br />
<br />
You might not get any error to indicate that this is a problem. If you are using X11R7, make sure you do '''not''' have these files on your system:<br />
/usr/X11R6/lib/libGL.so.1.2<br />
/usr/X11R6/lib/libGL.so.1<br />
<br />
===Hibernate/Sleep Issues===<br />
<br />
====Video fails to resume from suspend2ram====<br />
ATI's proprietary {{Codeline|catalyst}} driver cannot resume from suspend if the framebuffer is enabled. To disable the framebuffer, add '''vga=0''' to your kernel options in <code>/boot/grub/menu.lst</code>, for example:<br />
kernel /vmlinuz-linux root=/dev/sda3 resume=/dev/sda2 ro quiet '''vga=0'''<br />
<br />
===System Freezes/Hard locks===<br />
* The <code>radeonfb</code> framebuffer drivers have been known in the past to cause problems of this nature. If your kernel has radeonfb support compiled in, you may want to try a different kernel and see if this helps. <br />
<br />
===Hardware Conflicts===<br />
Radeon cards used in conjunction with some versions of the nForce3 chipset (e.g. nForce 3 250Gb) won't have 3D acceleration. Currently the cause of this issue is unknown, but some sources indicate that it may be possible to get acceleration with this combination of hardware by booting Windows with the drivers from nVIDIA and then rebooting the system. This can be verified by issuing in a root console the following command:<br />
dmesg | grep agp<br />
<br />
If you get something similar to this (using an nForce3-based system)<br />
agpgart: Detected AGP bridge 0<br />
agpgart: Setting up Nforce3 AGP.<br />
agpgart: aperture base > 4G<br />
<br />
and also if issuing this command...<br />
tail -n 100 /var/log/Xorg.0.log | grep agp<br />
<br />
...gets something similar to:<br />
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"<br />
<br />
Then you have this bug.<br />
<br />
Some sources indicate that in some situations, downgrading the motherboard BIOS may help, but this cannot be verified in all cases. Also, a bad BIOS downgrade can render your hardware useless, so beware.<br />
<br />
See bug http://bugzilla.kernel.org/show_bug.cgi?id=6350 for more information and a potential fix.<br />
<br />
===Temporary hangs when playing video===<br />
This problem may occur when using the proprietary Catalyst.<br />
<br />
If you experience temporary hangs lasting from a few seconds to several minutes occuring randomly during playback with mplayer, check /var/log/messages.log for output like:<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<f8bc628c>] ? ip_firegl_ioctl+0x1c/0x30 [fglrx]<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c0197038>] ? vfs_ioctl+0x78/0x90<br />
Nov 28 18:31:56 pandemonium [<c01970b7>] ? do_vfs_ioctl+0x67/0x2f0<br />
Nov 28 18:31:56 pandemonium [<c01973a6>] ? sys_ioctl+0x66/0x70<br />
Nov 28 18:31:56 pandemonium [<c0103ef3>] ? sysenter_do_call+0x12/0x33<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium =======================<br />
<br />
Adding the nopat kerneloption to /boot/grub/menu.lst and rebooting fixed the problem at least for me.<br />
<br />
===Catalyst 10.6/10.7/10.8/10.9 : black/grey/white boxes/artifacts in firefox/thunderbird===<br />
With catalyst 10.6 AMD/ATi announce new method of 2D acceleration for radeons, unfortunately this step causes bugs for some users. To turn on old (slower xaa) method of 2d rendering please kill your desktop environment and Xserver and type this command as root:<br />
aticonfig --set-pcs-str=DDX,ForceXAA,TRUE<br />
Now you'll probably need patched xorg-server to fix problems with resizing/maximizing windows, read about it ie. [http://wiki.archlinux.org/index.php/ATI_Catalyst#Black.2Fgrey.2Fwhite_boxes.2Fartifacts_mainly_in_firefox.2Fthunderbird here].<br />
<br />
===Radeon HD 6870 and fglrx 10.10===<br />
When running<br />
#sudo aticonfig --initial<br />
you will get<br />
aticonfig: No supported adaptaters detected<br />
That's because HD6870 is not supported by fglrx 10.10<br />
<br />
However you can create xorg.conf yourself :<br />
Section "Device"<br />
Identifier "ATI radeon 6870"<br />
Driver "fglrx"<br />
EndSection<br />
<br />
Xorg will start and it is possible to use amdcccle instead of aticonfig. There will be a "AMD Unsupported hardware" watermark.<br />
<br />
You can remove this watermark using the following script :<br />
#!/bin/sh<br />
DRIVER=/usr/lib/xorg/modules/drivers/fglrx_drv.so<br />
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do<br />
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER<br />
done<br />
<br />
===WebGL support in Chromium===<br />
Google has blacklisted linux's catalyst driver from supporting webGL in their Chromium/Chrome browsers.<br />
<br />
You can turn webGL on by editing /usr/share/applications/chromium.desktop file and adding '''--ignore-gpu-blacklist''' flag into '''Exec''' line so it could look like this:<br />
Exec=chromium %U --ignore-gpu-blacklist<br />
You can also run chromium from console with that --ignore-gpu-blacklist flag:<br />
$ chromium --ignore-gpu-blacklist<br />
<br />
{{Warning| Catalyst does not support the GL_ARB_robustness extension, so it is possible that a malicious site could use WebGL to perform a DoS attack on your graphic card, more info: http://www.h-online.com/security/news/item/WebGL-as-a-security-problem-1240567.html}}</div>Hramathttps://wiki.archlinux.org/index.php?title=PulseAudio&diff=75919PulseAudio2009-09-16T17:12:39Z<p>Hramat: sholud -> should</p>
<hr />
<div>[[Category:Sound (English)]]<br />
[[Category:Audio/Video (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|PulseAudio}}<br />
{{i18n_entry|Italiano|PulseAudio (Italiano)}}<br />
{{i18n_entry|Türkçe|PulseAudio (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
PulseAudio is a sound server for POSIX and Win32 systems. It allows to have multiple programs playing sound at one machine and even more advanced features. PulseAudio is a drop-in replacement for the enlightened sound daemon (esd).<br />
<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 />
This article focuses on the more basic PulseAudio features.<br />
<br />
= Install =<br />
All packages are from the community repository so you need to have it enabled. Then, to install pulseaudio:<br />
# pacman -S pulseaudio <br />
<br />
Optionally you can install some GTK front-ends for PulseAudio (recommended):<br />
# pacman -S padevchooser paman paprefs pavucontrol pavumeter<br />
<br />
For the applications that don't support PulseAudio and support ALSA it's '''recommended''' to install the PulseAudio plugin for alsalibs. This plugin is available in the alsa-plugins package.<br />
# pacman -S alsa-plugins<br />
<br />
== Drop-in replacement for ESD (EsounD) ==<br />
Current GNOME versions have support for starting ESD on session startup. Because PulseAudio can be used as drop-in replacement for ESD you can fool GNOME to load the PulseAudio daemon just like the traditional ESD daemon. To achieve this use the esdcompat script shipped with PulseAudio. Create a symlink from {{Filename|/usr/bin/esd}} to this script: <br />
# ln -sf /usr/bin/esdcompat /usr/bin/esd<br />
That's it. Now GNOME should load and make use of PulseAudio automatically on each login.<br />
<br />
Pulseaudio uses by default a different socket ({{Filename|/tmp/.esd-xxxx}}) as the stock to prevent different users to access the same socket. If you want gnome to start esd (esdcompat actually) automatically as a user you should edit the file {{Filename|/etc/pulse/system.pa}} to make it use the default socket as expected by most gnome apps. Find the line {{Codeline|"load-module module-esound-protocol-unix"}} and edit it as follows:<br />
<br />
load-module module-esound-protocol-unix socket=/tmp/.esd/socket <br />
<br />
This works only if you are the only user of the computer however, as soon as a second user starts gnome on the same computer problems are likely to appear. To have a more general solution for the problem start esdcompat on a server basis. Though I did not have to edit the above line (because my Ubuntu was working fine even without editing the above line, so tried the same with Arch and it worked) but YMMV.<br />
<br />
= Configuring your system for Pulse =<br />
== System-wide daemon (optional) ==<br />
By default, PulseAudio is run per-user and will be started automatically when it is needed. This is simpler, more efficient and more secure. If for some reason you need a system-wide daemon e.g. multiple users log in at the same time, do the following:<br />
<br />
First you need to add the "pulseaudio" daemon to {{Filename|/etc/[[rc.conf]]}}. Example:<br />
DAEMONS=(syslog-ng ipw3945d network netfs crond fam hal '''avahi-daemon''' '''pulseaudio''')<br />
To use the PulseAudio Device Chooser (padevchooser), you might also need to add the 'avahi-daemon' to this list.<br />
<br />
Then you need to add the user(s) to the pulse-access group, even for root (if you want to have sound as root).<br />
# gpasswd -a <user> pulse-access<br />
<br />
== Permissions for per-user daemon ==<br />
It's a good idea to add your user to the pulse-rt group, this can help performance but doesn't seem to be done automatically in installation.<br />
<br />
# gpasswd -a <user> pulse-rt<br />
<br />
== Configuration of the ALSA PulseAudio plugin ==<br />
It's recommended to configure ALSA for PulseAudio, since most applications use ALSA. This is done through the PulseAudio plugin for alsalibs (the ALSA PulseAudio plugin is available through the alsa-plugins package). In order for ALSA to use PulseAudio we need to edit (and most likely create) {{Filename|/etc/asound.conf}} (recommended) or {{Filename|~/.asoundrc}} to have these lines:<br />
pcm.pulse {<br />
type pulse<br />
}<br />
ctl.pulse {<br />
type pulse<br />
}<br />
{{Codeline|pulse}} in {{Codeline|pcm.pulse}} and {{Codeline|ctl.pulse}} is just the name, you can change it but it would change the next steps.<br />
<br />
If you want ALSA to use PulseAudio by default you should also add this to {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.!default {<br />
type pulse<br />
}<br />
ctl.!default {<br />
type pulse<br />
}<br />
If you selected pulse to be your default device you need to '''either''' specify the hardware device to PulseAudio in {{Filename|/etc/pulse/system.pa}} example:<br />
load-module module-alsa-sink device=hw:0<br />
load-module module-alsa-source device=hw:0<br />
'''or''' you can use automatic detection using hal with:<br />
load-module module-hal-detect<br />
The above line should be there by default in {{Filename|/etc/pulse/system.pa}}, make sure it is uncommented.<br />
<br />
If you haven't configured PulseAudio as the ALSA default, you need to change the ALSA device to "pulse" in the applications that you use to make it work.<br />
<br />
=== Multiple PulseAudio ALSA devices ===<br />
<br />
If you want to use multiple sound cards or multiple virtual PCMs of your sound card (for example, to separate front and rear outputs), you'll need to tell PulseAudio to use multiple ALSA sinks:<br />
load-module module-alsa-sink device=front<br />
load-module module-alsa-sink device=rear<br />
If you want the client to have separate Pulse/ALSA outputs for each device, edit {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.pulsefront {<br />
type pulse<br />
device front<br />
}<br />
pcm.pulserear {<br />
type pulse<br />
device rear<br />
}<br />
And specify the appropriate ctl elements:<br />
ctl.pulsefront {<br />
type pulse<br />
device front<br />
}<br />
ctl.pulserear {<br />
type pulse<br />
device rear<br />
}<br />
To list the available ALSA devices:<br />
$ aplay -L<br />
<br />
== Configuration of GStreamer for PulseAudio ==<br />
To make GStreamer use PulseAudio, you'll need to install the gstreamer0.10-pulse package:<br />
<br />
# pacman -S gstreamer0.10-pulse<br />
<br />
Then, execute {{Codeline|gstreamer-properties}} (part of {{Codeline|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 />
<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 />
== Configuration of SDL for PulseAudio ==<br />
<br />
Since SDL version 1.2.12, SDL has native pulseaudio support. Add this to your {{Filename|.profile}} or similar: <br />
export SDL_AUDIODRIVER="pulse"<br />
to use it. Other environment variables to configure: set PASERVER to the host of the PulseAudio server and set PADEVICE to the device used on the server. (the "pulse" driver has no support, yet, for reading your pulseaudio configuration, it seems.).<br />
<br />
Or, if this driver does not work for you or if you are using an older version of SDL, <br />
export SDL_AUDIODRIVER="esd"<br />
might do the trick.<br />
<br />
{{Note | You may need to use the ABS to compile SDL with pulseaudio support. Until the quality of the driver is fixed upstream, please use the patch located here: [http://0pointer.de/blog/projects/pa-plugin-for-sdl.html SDL PulseAudio Patch]. It should fix most if not all the sound issues you may be having. You might have luck with sdl-pulse in AUR.}}<br />
<br />
== Configuration of OpenAL for PulseAudio ==<br />
<br />
=== OpenAL Soft ===<br />
<br />
Latest [http://kcat.strangesoft.net/openal.html OpenAL Soft], an implementation of OpenAL, supports PulseAudio starting from [http://opensource.creative.com/pipermail/openal-devel/2009-June/005463.html release 1.8.466]. By default OpenAL Soft will try first to open ALSA and OSS, and there is currently an [http://www.pulseaudio.org/wiki/PerfectSetup issue] with alsa output. Instead OpenAL Soft should be configured to use PulseAudio via {{Filename|/etc/openal/alsoft.conf}}:<br />
<br />
# drivers = pulse<br />
<br />
This setting was tested with warzone2100 & Glest and rocks ;)<br />
<br />
== Configuration of libao for PulseAudio ==<br />
<br />
# pacman -Sy libao-pulse<br />
<br />
Edit {{Filename|/etc/libao.conf}}, add:<br />
<br />
default_driver=pulse<br />
<br />
== Using OSS apps with PulseAudio wrapper ==<br />
<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 />
<br />
If you prefer you can rename the program OSSprogram-real and replace it with a script like this: <br />
#!/bin/sh<br />
if test -x /usr/bin/padsp ; then<br />
exec /usr/bin/padsp /usr/bin/OSSprogram-real "$@"<br />
else<br />
exec /usr/bin/OSSprogram "$@"<br />
fi<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 />
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients. <br />
To enable the TCP module, add (or uncomment, if already there) this to {{Filename|/etc/pulse/system.pa}}:<br />
<br />
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16<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 for example the following line:<br />
pulseaudio-native: ALL<br />
<br />
If you're running a system-wide PulseAudio instance, which makes sense for networked audio, the cookie is located in {{Filename|/var/run/pulse/.pulse-cookie}}. This cookie needs to be sent to the client and placed somewhere the pulse-access group can read (and with permissions so only they can read it). Alternatively, you may add auth-anonymous=1 to the end of the load-module module-native-protocol-tcp line to disable authentication. <br />
<br />
# scp /var/run/pulse/.pulse-cookie client:/etc/pulse-cookie<br />
<br />
# chown pulse:pulse-access /etc/pulse-cookie<br />
# chmod 640 /etc/pulse-cookie<br />
<br />
The pulse client needs to know where to look for the cookie.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
<br />
### Cookie file<br />
cookie-file = /etc/pulse-cookie<br />
<br />
Then the client needs to be configured to connect to the specified server.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
<br />
## The default server to connect to<br />
default-server = 192.168.0.5<br />
<br />
That's it!<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. 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.<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 your {{Filename|/etc/pulse/default.pa}} (as root, of course), and change the following region:<br />
<br />
### Load audio drivers statically (it's 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-hal-detect.so<br />
load-module module-hal-detect<br />
.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack HAL support)<br />
load-module module-detect<br />
.endif<br />
<br />
to the following:<br />
<br />
### Load audio drivers statically (it's 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-hal-detect.so<br />
#load-module module-hal-detect<br />
#.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack HAL support)<br />
#load-module module-detect<br />
#.endif<br />
<br />
Basically, this prevents module-hal-detect from loading. module-hal-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 />
==Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)==<br />
<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/lib/dbus<br />
/tmp<br />
~/.pulse<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 />
= Troubleshooting =<br />
<br />
=== authkey.c: Failed to open cookie file '/home/<user>/.esd_auth': Permission denied ===<br />
If this error message appears in {{Filename|/var/log/errors.log}}, then add:<br />
<br />
if [ -e /var/run/pulse/.esd_auth ]; then<br />
chown pulse:pulse-access /var/run/pulse/.esd_auth<br />
chmod 640 /var/run/pulse/.esd_auth<br />
fi<br />
<br />
before {{Codeline|"add_daemon pulseaudio"}} in {{Filename|/etc/rc.d/pulseaudio}}.<br />
<br />
=== module-x11-publish ===<br />
If PulseAudio fails to start and the messages<br />
x11wrap.c: XOpenDisplay() failed<br />
module.c: Failed to load module "module-x11-publish" (argument: ""): initialization failed.<br />
main.c: Module load failed.<br />
main.c: failed to initialize daemon.<br />
appear in your logs, you need to disable module-x11-publish in {{Filename|/etc/pulse/system.pa}}:<br />
#load-module module-x11-publish<br />
<br />
=== "daemon startup failed" ===<br />
If PulseAudio fails to start as a daemon and the message <br />
E: main.c: daemon startup failed.<br />
appears, you may need to disable the line in {{Filename|/etc/pulse/system.pa}} that reads<br />
.fail<br />
Simply add a "#" as a comment in front of that line.<br />
<br />
=== Glitches and high CPU usage since 0.9.14 ===<br />
The PulseAudio sound server has been rewritten to use 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-hal-detect <br />
in {{Filename|/etc/pulse/default.pa}} by:<br />
load-module module-hal-detect tsched=0<br />
<br />
=== Audacity ===<br />
'''As of Audacity 1.3.8, PulseAudio and other non-mmap ALSA devices are supported without killing PulseAudio. Upgrading to this version is recommended.'''<br />
<br />
According to the PulseAudio.org Wiki, Audacity doesn't currently support PulseAudio. Therefore they suggest killing pulseaudio before using it.<br />
[http://www.pulseaudio.org/wiki/PerfectSetup#Audacity look here]<br />
<br />
=== PulseAudio Device Chooser (padevchooser) ===<br />
If you can't launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:<br />
$ sudo /etc/rc.d/avahi-daemon restart<br />
<br />
=== VLC ===<br />
If you are having audio problems with the audio playback of DVDs in VLC, uninstall VLC and install the vlc-nightly package from the AUR, and set the audio output method to {{Codeline|"Pulseaudio"}}.<br />
<br />
Alternative: [http://aur.archlinux.org/packages.php?ID=25257 vlc-pulse] from AUR<br />
<br />
=== mpd ===<br />
There is a pulseaudio enabled version of mpd [http://aur.archlinux.org/packages.php?ID=18722 in the AUR]. You will need to add the mpd user to the "pulse-access" group in order for mpd to connect to the daemon.<br />
<br />
=== module-hal-detect ===<br />
If you receive an error message about HAL, module-hal, or something along those lines, you will need to remove module-hal-detect from your {{Filename|/etc/pulse/system.pa}} and explicitely specify the ALSA devices yourself, for example:<br />
load-module module-alsa-sink device=hw:0<br />
load-module module-alsa-source device=hw:0<br />
<br />
=== No sound after install ===<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 />
Sometimes the snd_pcsp driver conflicts with the snd_hda_intel driver (for those of you<br />
using Intel cards) and no sound output is experienced. To fix this, you can blacklist the<br />
snd_pcsp driver in the MODULES array of {{Filename|/etc/rc.conf}} (by appending {{Codeline|!snd_pcsp}}).<br />
<br />
=== I have a surround sound card, but PulseAudio uses just the front speakers! ===<br />
<br />
Many people have a surround card, but have speakers for just two channels, so PulseAudio can't 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. After doing the edit, restart pulseaudio daemon. <br />
<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 />
=== PortAudio Applications ===<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 />
=== Amarok ===<br />
Install [http://aur.archlinux.org/packages.php?ID=25978 xine-lib-pulseaudio] from AUR - tested with Amarok 1.x<br />
<br />
= See also =<br />
*[[Allow multiple programs to play sound at once]]<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://mpd.wikia.com/wiki/PulseAudio#Version_0.12.0_and_later http://mpd.wikia.com/wiki/PulseAudio#Version_0.12.0_and_later] - Configuring MPD for PulseAudio<br />
*[http://www.pulseaudio.org/wiki/FAQ http://www.pulseaudio.org/wiki/FAQ] - PulseAudio FAQ</div>Hramathttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=55759NVIDIA2008-12-17T23:20:11Z<p>Hramat: /* Installing drivers */</p>
<hr />
<div>[[Category:Graphics (English)]]<br />
[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|NVIDIA}}<br />
{{i18n_entry|Italiano|NVIDIA (Italiano)}}<br />
{{i18n_entry|Nederlands|NVIDIA (Nederlands)}}<br />
{{i18n_entry|Русский|NVIDIA (Russian)}}<br />
{{i18n_entry|Česky|NVIDIA (česky)}}<br />
{{i18n_links_end}}<br />
<br />
===How to install Nvidia Driver with pacman===<br />
<br />
====Info from Package Maintainer ''tpowa''====<br />
<br />
The package is for those people who run a stock arch kernel!<br />
I only test with kernel 2.6 and xorg.<br />
<br />
Multiple kernel users:<br />
You need to install nvidia package for each extra!<br />
<br />
====Installing drivers====<br />
<br />
You have to use extra repository, enable it for pacman.<br />
Leave X-Server, else pacman cannot finish installation and it will not work! <br />
As root, run:<br />
pacman -Sy nvidia (for newer cards)<br />
pacman -Sy nvidia-96xx or pacman -Sy nvidia-173xx (for older cards)<br />
<br />
For newer-newer cards you may need to install nvidia-beta from AUR, because stable drivers are not available. (See /usr/share/doc/nvidia/supported-cards.txt in nvidia package if your card is supported.)<br />
<br />
If you use the '''-mm''' kernel, adjust the above command appropriately.<br />
<br />
See the [http://us.download.nvidia.com/XFree86/Linux-x86/173.14.12/README/appendix-a.html <code>README</code>] from nvidia for details on which card is supported by which driver.<br />
<br />
====Configuring X-Server====<br />
<br />
Edit <code>/etc/X11/XF86Config</code> or your <code>/etc/X11/xorg.conf</code> config file:<br />
Disable in modules section:<br />
<code>GLcore</code> and <code>DRI</code><br />
<br />
Add to modules section:<br />
Load "glx"<br />
<br />
Make sure you DON'T have a line<br />
<br />
Load "type1"<br />
<br />
in the Module section since recent versions of xorg-server does not include the type1 font module (completely replaced by freetype).<br />
<br />
Disable <code>Section DRI</code> completely:<br />
#Section "DRI"<br />
# Mode 0666<br />
#EndSection<br />
<br />
Change<br />
Driver "nv"<br />
or<br />
Driver "vesa"<br />
to<br />
Driver "nvidia"<br />
If it exists, disable the Chipset option (only needed for nv driver):<br />
#Chipset "generic"<br />
<br />
This was for basic setup; if you need more tweaking options,<br />
have a look at <code>/usr/share/doc/nvidia/README</code>.<br />
<br />
You can also run:<br />
nvidia-xconfig<br />
<br />
See [http://wiki.archlinux.org/index.php/Xorg7 installing and configuring xorg].<br />
<br />
====Enabling Composite in Xorg====<br />
Refer to the [[Composite]] wiki for detailed instructions.<br />
<br />
====Modifying Arch <code>rc.conf</code> file====<br />
<br />
Add <code>nvidia</code> to <code>/etc/rc.conf</code> MODULES section (not needed anymore if you run xorg and udev).<br />
Needed for nvidia-71xx and kernel >=2.6.13!<br />
<br />
====Problems that might occur====<br />
<br />
=====Nvidia specific=====<br />
Xorg7:<br />
Please remove your old /usr/X11R6 dir it can cause trouble during installation. Also make sure you've installed <code>pkgconfig</code>. The NVIDIA installer uses pkgconfig to determine where modular Xorg components are installed.<br />
<br />
If you experience slow 3D Performance have a look at<br />
<code>/usr/lib/libGL.so.1</code>, <code>/usr/lib/libGL.so</code>, <code>/usr/lib/libGLcore.so.1</code><br />
Perhaps they are wrong linked to mesa or something else.<br />
Try reinstalling with <code>pacman -S nvidia</code>.<br />
<br />
When you get this message when you try to start an openGL application (for example enemy-territory, or glxgears):<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the <code>FREQUENTLY ASKED QUESTIONS</code> <br />
section of <code>/usr/share/doc/NVIDIA_GLX-1.0/README</code> <br />
for steps to correct.<br />
<br />
Add yourself to the <code>video</code> group using <code>gpasswd -a ''yourusername'' video</code> (don't forget to log out and back in, or type: source /etc/profile).<br />
<br />
=====Arch specific=====<br />
<br />
'''x86_64 and lib32-* (stale files problem):'''<br />
If you have previously used the nvidia binary installer, and switch to the packages pacman provides, you will probably run into a problem where 32-bit proprietary GL apps won't start anymore (they throw segfaults now, and you have no idea what went wrong); examples of this are google earth and wine with GL apps. The difficulty here is that the installer stores its files in other places, and you might have stale files in either<br />
/usr/lib64<br />
/usr/lib/tls <br />
/opt/lib32/usr/lib/tls<br />
or similar. The solution is to do a<br />
updatedb; locate libnvidia-tls<br />
then identify the mismatching tls libs, and remove them (if they live in a /tls directory, remove that directory). Contrary to popular belief, the installer does not always find and remove them, and the problem can go unnoticed a long time. If you cannot identify the mismatching versions, just remove nvidia-utils and lib32-nvidia-utils packages on the command line (with pacman -Rd), do the command above again, and you will know which ones have not been in the package. Delete them and reinstall nvidia-utils and lib32-nvidia-utils.<br />
<br />
'''GCC update:'''<br />
You must compile the module with the compiler that was used for the kernel<br />
else it may fail.<br />
A simple <code>pacman -S nvidia</code> should do it, if not wait for a new kernel release and stay with old kernel and gcc.<br />
<br />
'''Kernel update:'''<br />
Kernel updates will require reinstalling the driver.<br />
<br />
====Driver Config Tool====<br />
<br />
The new config tool for the nvidia-drivers is included called 'nvidia-settings'<br />
You don't have to use it it's only a add-on! <br><br />
For more information about the use, have a look at the following file:<br><br />
/usr/share/doc/NVIDIA_GLX-1.0/nvidia-settings-user-guide.txt<br><br />
Please install gtk2 with "pacman -S gtk2" in order to use this tool.<br />
<br />
'''NOTE:'''<br />
If you experience problems like crashing the X-Server while running the tool<br />
you have to delete your <code>.nvidia-settings-rc</code> file in your home directory.<br />
<br />
'''Nvidia-Settings Autostart:'''<br />
You might like to apply the settings chosen using nvidia-settings at startup, firstly run nvidia-settings at least once in order for settings to be restored. The settings file is stored in ~/.nvidia-settings-rc. Then add the following to the auto-startup method of your DE:<br />
nvidia-settings --load-config-only<br />
<br />
====Known Issues====<br />
<br />
If you experience crashes, try to disable <code>RenderAccel "True"</code> option.<br />
<br />
If you have nvidia installer complaining about different versions of gcc between the current one and the one used for compiling the kernel then see on how to install the traditional way but remember to <code>export IGNORE_CC_MISMATCH=1</code><br />
<br />
If you have comments on the package please post it here: http://bbs.archlinux.org/viewtopic.php?t=10692<br />
If you have a problem with the drivers have a look at the nvidia forum: http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14<br />
For a Changelog please look here: http://www.nvidia.com/object/linux_display_ia32_1.0-8762.html<br />
<br />
Note: please don't change the above part without notifying me.<br />
<br />
===Bad performance after installing new nvidia-driver===<br />
<br />
If you experience very slow fps rate in compare with older driver first check if You have Direct Rendering turned on. You can do it by: <br />
<br />
glxinfo | grep direct<br />
<br />
If You get: direct rendering: No then that's your problem. <br />
Next check if You have the same versions of glx for the client and server by this:<br />
<br />
glxinfo | egrep "glx (vendor|version)"<br />
<br />
And if you see different vendors or versions for the client and server run this:<br />
<br />
ln -fs /usr/lib/libGL.so.$VER /usr/X11R6/lib/libGL.so<br />
ln -fs /usr/lib/libGL.so.$VER /usr/X11R6/lib/libGL.so.1<br />
ln -fs /usr/lib/libGL.so.$VER /usr/lib/libGL.so.1.2<br />
<br />
Where $VER is the version of nvidia package, that you're using. You can check it by <code>nvidia-settings</code><br />
<br />
That's all. Now restart your Xserver and you should have normal acceleration.<br />
<br />
<br />
<br />
==Tweaking NVIDIA drivers==<br />
Open <code>/etc/X11/xorg.conf</code> or <code>/etc/X11/XFree86Config</code> with your editor of choice and try the following options to improve performance.<br />
''Not all options may work for your system, try them carefully and always backup your configuration file.''<br />
<br />
===Disable NVIDIA Graphics Logo on startup===<br />
Under <code>Device</code> section add the <code>"NoLogo"</code> Option<br />
Option "NoLogo" "True"<br />
<br />
===Enable hardware acceleration===<br />
Under <code>Device</code> section add the <code>"RenderAccel"</code> Option.<br />
Option "RenderAccel" "True"<br />
<br />
'''NOTE:''' The RenderAccel is enabled by default since drivers version 9746.<br />
<br />
===Override monitor detection===<br />
The <code>"ConnectedMonitor"</code> Option under <code>Device</code> section allows to override the monitor detection when X server starts. This may save a bunch of seconds at start up. The available options are: <code>"CRT"</code> (cathode ray tube), <code>"DFP"</code> (digital flat panel), or <code>"TV"</code> (television).<br />
<br />
The following statement force NVIDIA drivers to use DFP monitors.<br />
Option "ConnectedMonitor" "DFP"<br />
<br />
'''NOTE:''' use "CRT" for all analog 15 pin VGA connections (even if you have a flat panel). "DFP" is intended for DVI digital connections only!<br />
<br />
===Enable TripleBuffer===<br />
Enable the use of triple buffering by adding under <code>Device</code> section the <code>"TripleBuffer"</code> Option.<br />
Option "TripleBuffer" "True"<br />
<br />
Use this option if your GPU has plenty of ram (128mb and more) and combined with "Sync to VBlank". You may enable sync to vblank in nvidia-settings.<br />
<br />
===Enable BackingStore===<br />
This option is used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed. BackingStore is not bound to NVIDIA drivers but to X server itself. ATI users would benefit from this option as well.<br />
<br />
Under Device section add:<br />
Option "BackingStore" "True"<br />
<br />
{{Box Note| This option is known to lead to severe unstability and crashes with the new xorg 1.5.3. It is recommended to set it to "False".}}<br />
<br />
===Use OS-level events===<br />
Taken from NVIDIA drivers README file: ''"Use OS-level events to efficiently notify X when a client has performed direct rendering to a window that needs to be composited."'' Whatever it means, it may help improve performance. This option is currently incompatible with SLI and Multi-GPU modes.<br />
<br />
Under <code>Device</code> section add:<br />
Option "DamageEvents" "True"<br />
This option is enabled by default in newer driver.<br />
<br />
===Enable power saving===<br />
... For a greener planet (not strictly related to NVIDIA drivers). Under <code>Monitor</code> section add:<br />
Option "DPMS" "True"<br />
<br />
===Force Powermizer performance level (for laptops)===<br />
In your xorg.conf, add the following to Section "Device"<br />
#force Powermizer to a certain level at all times<br />
# level 0x1 = highest<br />
# level 0x2 = med<br />
# level 0x3 = lowest<br />
Option "RegistryDwords" "PowerMizerLevelAC=0x3"<br />
Option "RegistryDwords" "PowerMizerLevel=0x3"<br />
<br />
===Let the GPU set its own performance level (based on temperature)===<br />
In your xorg.conf, add the following to the Section "Device"<br />
Option "RegistryDwords" "PerfLevelSrc=0x3333"<br />
<br />
===Disable vblank interrupts (for laptops) ===<br />
When running the interrupt detection utility powertop, it is seen that the nvidia driver will generate an interrupt for every vblank. to disable, place in the Device section:<br />
Option "OnDemandVBlankInterrupts" "True"<br />
<br />
This will reduce interrupts to about one or two per second.<br />
<br />
===Enable overclocking via nvidia-settings===<br />
To enable overclocking, place the following line in the "device" section:<br />
Option "Coolbits" "1"<br />
This will enable on the fly overclocking by running nvidia-settings inside X.<br />
<br />
Please note that overclocking may damage your hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.<br />
<br />
===Further readings===<br />
* [http://us.download.nvidia.com/XFree86/Linux-x86/177.82/README/appendix-b.html NVIDIA drivers README file] (latest drivers)<br />
* [http://wiki.compiz-fusion.org/Hardware/NVIDIA Compiz Fusion wiki]<br />
<br />
==Using TV-out on your NVIDIA card==<br />
<br />
Good article on the subject can be found from:<br />
http://en.wikibooks.org/wiki/NVidia/TV-OUT<br />
<br />
==Why is the refresh rate not reported correctly by utilities that use the XRandR X extension (e.g., the GNOME "Screen Resolution Preferences" panel, `xrandr -q`, etc)?==<br />
<br />
The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the MetaMode bounding box, which may contain one or more actual modes. This means that if multiple MetaModes have the same bounding box, XRandR will not be able to distinguish between them.<br />
<br />
In order to support DynamicTwinView, the NVIDIA X driver must make each MetaMode appear to be unique to XRandR. Presently, the NVIDIA X driver accomplishes this by using the refresh rate as a unique identifier.<br />
<br />
You can use `nvidia-settings -q RefreshRate` to query the actual refresh rate on each display device.<br />
<br />
The XRandR extension is currently being redesigned by the X.Org community, so the refresh rate workaround may be removed at some point in the future.<br />
<br />
This workaround can also be disabled by setting the "DynamicTwinView" X configuration option to FALSE, which will disable NV-CONTROL support for manipulating MetaModes, but will cause the XRandR and XF86VidMode visible refresh rate to be accurate.<br />
<br />
==How to install NVIDIA Driver with custom kernel==<br />
<br />
It's an advantage to know how the ABS system works by reading some of the other wiki pages about it, first:<br />
* http://wiki.archlinux.org/index.php/ABS<br />
* http://wiki.archlinux.org/index.php/Makepkg<br />
* http://wiki.archlinux.org/index.php/The_Arch_package_making_HOW-TO_-_with_guidelines.<br />
<br />
<br />
We will create our own pacman package quickly by using ABS, which will build the module for the currently running kernel:<br />
<br />
Make a temporary directory for creating our new package:<br />
mkdir -p /var/abs/local/<br />
<br />
Make a copy of the nvidia package directory:<br />
cp -r /var/abs/extra/nvidia/ /var/abs/local/<br />
<br />
Go into our temporary nvidia directory:<br />
cd /var/abs/local/nvidia<br />
<br />
We need to edit the two files nvidia.install and the PKGBUILD file, so they contain the right kernel version variables, so we don't have to move it from the stock kernel /lib/modules/2.6.xx-ARCH directory.<br />
<br />
You can get your kernel version and local version name if you type:<br />
uname -r<br />
<br />
* In nvidia.install replace the KERNEL_VERSION="2.6.xx-ARCH" variable with your kernel version, such as KERNEL_VERSION="2.6.22.6" or KERNEL_VERSION"2.6.22.6-custom" depending on what your kernels version is and local version text/number. Do this for all instances of the version number within this file.<br />
<br />
* In PKGBUILD change the _kernver='2.6.xx-ARCH' variable to match your kernel version again, like above.<br />
* If you have more than one kernel coexisting in parallel with another, (such as a custom kernel alongside the default -ARCH kernel) change the "pkgname=nvidia" variable in the PKGBUILD to a unique identifier, such as nvidia-2622 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original.<br />
Then do:<br />
makepkg -i -c<br />
<br />
.. Now it will automatically build the NVIDIA module for your custom kernel and clean up the leftover files from creating the package. Enjoy!</div>Hramat