https://wiki.archlinux.org/api.php?action=feedcontributions&user=Seletskiy&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:58:34ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Go_package_guidelines&diff=407463Go package guidelines2015-10-30T04:59:08Z<p>Seletskiy: Added note about go-makepkg tool</p>
<hr />
<div>[[Category:Package development]]<br />
{{Package guidelines}}<br />
<br />
[[Wikipedia:Go (programming language)|Go]] is well supported on Arch Linux.<br />
<br />
The {{Pkg|go}} package contains the '''go''' tool (for running {{Ic|go fix}}, {{Ic|go build}} etc). There is also {{Pkg|gcc-go}} which provides {{Ic|gccgo}}.<br />
<br />
[https://github.com/seletskiy/go-makepkg go-makepkg] tool provides easy way of packaging Go programs without need of crafting PKGBUILD files manually.<br />
<br />
= General guidelines =<br />
<br />
== Naming ==<br />
* For applications written in Go, use the name of the application as the package name, in lowercase.<br />
** Be creative if the name is already taken.<br />
* For libraries written in Go, use {{Ic|go-''modulename''}}, in lowercase.<br />
** If the name already starts with {{Ic|go-}}, do not call the package {{Ic|go-''go-modulename''}}, but just {{Ic|go-''modulename''}}.<br />
* For PKGBUILDS that uses the "go" tool to download the package, only add "-git" to the package name if it is not built from a tarball or a from a tagged release (but from trunk/HEAD).<br />
** Similarly for mercurial packages, only add "-hg" to the package name if it is not a release-revision.<br />
** Extend this pattern for other version control systems.<br />
** The go tool has its own logic for which branch or tag it should use. See {{Ic|go get --help}}.<br />
* Consider adding the name of the author to the package name if there are several applications that are named the same, like {{AUR|dcpu16-kballard}}.<br />
** In general, the most popular packages should be allowed to use the shortest or "best" name.<br />
* Postfixes to the package names (like {{Ic|-hg}}, {{Ic|-git}} or {{Ic|-svn}}) are optional if there are no official releases from the project in question. On one hand, it is common to use them when the package downloads from a VCS. On the other hand, most Go projects do not have any release-tarballs, only the repo which is used for branching/tagging the official release, if it is not ''trunk''. Also, {{Ic|go get}}, which is the "official" way to install Go modules, uses the repositories directly. Use your better judgement.<br />
<br />
== Packaging ==<br />
* Go projects are either just library files, just executables or both. Choose the appropriate way of packaging them. There are several examples below.<br />
* Some Go applications or libraries have not been updated to the latest version of Go yet.<br />
** Running {{Ic|go build -fix}} may often work, but it may have to be fixed by the developer. Report an issue upstream if this is the case.<br />
* Several Go projects do not have a version number or a license file.<br />
** Use license=('unknown') and report an issue to the developer if a license file is missing.<br />
** Use version "0.1", "1" or the git-revision (or equivalent for other version control systems) if the version number is missing.<br />
** Alternatively, use the current date as the version number, in this form {{Ic|YYYYMMDD}}.<br />
* Since Go applications are usually statically compiled, it is hard to envision reasons for packaging Go libraries instead of just Go applications.<br />
<br />
= Sample PKGBUILDs =<br />
<br />
== Sample PKGBUILD for an application written in Go ==<br />
<br />
{{bc|<nowiki># Maintainer: NAME <EMAIL><br />
<br />
pkgname=PACKAGE NAME<br />
pkgver=1.2.3<br />
pkgrel=1<br />
pkgdesc="PACKAGE DESCRIPTION"<br />
arch=('x86_64' 'i686')<br />
url="http://SERVER/$pkgname/"<br />
license=('MIT')<br />
makedepends=('go')<br />
options=('!strip' '!emptydirs')<br />
source=("http://SERVER/$pkgname/$pkgname-$pkgver.tar.gz")<br />
sha256sums=('00112233445566778899aabbccddeeff')<br />
<br />
build() {<br />
cd "$pkgname-$pkgver"<br />
<br />
go build<br />
}<br />
<br />
package() {<br />
cd "$pkgname-$pkgver"<br />
<br />
install -Dm755 "$pkgname-$pkgver" "$pkgdir/usr/bin/$pkgname"<br />
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"<br />
}<br />
<br />
# vim:set ts=2 sw=2 et:</nowiki>}}<br />
<br />
=== Sample packages ===<br />
* {{Pkg|gendesk}}<br />
* {{AUR|dcpu16}}<br />
<br />
== Sample PKGBUILD for when only a single source file is available ==<br />
<br />
{{bc|<nowiki># Maintainer: NAME <EMAIL><br />
<br />
pkgname=PACKAGE NAME<br />
pkgver=1.2.3<br />
pkgrel=1<br />
pkgdesc="PACKAGE DESCRIPTION"<br />
arch=('x86_64' 'i686')<br />
url="http://SERVER/$pkgname/"<br />
license=('GPL3')<br />
makedepends=('go')<br />
options=('!strip' '!emptydirs')<br />
source=("http://SERVER/$pkgname/$pkgname.go")<br />
sha256sums=('00112233445566778899aabbccddeeff')<br />
<br />
build() {<br />
go build -o "$pkgname"<br />
}<br />
<br />
package() {<br />
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"<br />
}<br />
<br />
# vim:set ts=2 sw=2 et:</nowiki>}}<br />
<br />
=== Sample packages ===<br />
* {{AUR|gorun}}<br />
<br />
== Sample PKGBUILDs for Go libraries that also includes executables ==<br />
<br />
=== Using ''go get'' ===<br />
<br />
This is the recommended way, instead of the method below.<br />
<br />
Here is a way that relies on go get.<br />
<br />
You probably will not need to modify the build() or package() functions at all, only the variables at the top (pkgname etc).<br />
<br />
If this does not work, test with go get first.<br />
<br />
{{Note| Remove {{Ic|/...}} if the PKGBUILD fails!}}<br />
<br />
{{bc|<nowiki># Maintainer: NAME <EMAIL><br />
<br />
pkgname=codesearch<br />
pkgver=20120515<br />
pkgrel=1<br />
pkgdesc="Code indexing and search written in Go"<br />
arch=('x86_64' 'i686')<br />
url="https://github.com/google/codesearch"<br />
license=('BSD')<br />
depends=('go')<br />
makedepends=('mercurial')<br />
options=('!strip' '!emptydirs')<br />
_gourl=github.com/google/codesearch<br />
<br />
build() {<br />
GOPATH="$srcdir" go get -fix -v -x ${_gourl}/...<br />
}<br />
<br />
check() {<br />
GOPATH="$GOPATH:$srcdir" go test -v -x ${_gourl}/...<br />
}<br />
<br />
package() {<br />
mkdir -p "$pkgdir/usr/bin"<br />
install -p -m755 "$srcdir/bin/"* "$pkgdir/usr/bin"<br />
<br />
mkdir -p "$pkgdir/$GOPATH"<br />
cp -Rv --preserve=timestamps "$srcdir/"{src,pkg} "$pkgdir/$GOPATH"<br />
<br />
# Package license (if available)<br />
for f in LICENSE COPYING LICENSE.* COPYING.*; do<br />
if [ -e "$srcdir/src/$_gourl/$f" ]; then<br />
install -Dm644 "$srcdir/src/$_gourl/$f" \<br />
"$pkgdir/usr/share/licenses/$pkgname/$f"<br />
fi<br />
done<br />
}<br />
<br />
# vim:set ts=2 sw=2 et:</nowiki>}}<br />
<br />
Thanks to Rémy Oudompheng for this one.<br />
<br />
=== Using ''go get'' ===<br />
<br />
Here is another way that relies on {{Ic|go get}}.<br />
<br />
You probably will not need to modify the build() or package() functions at all, only the variables at the top (pkgname etc).<br />
<br />
If this does not work, test with {{Ic|go get}} first.<br />
<br />
{{bc|<nowiki># Maintainer: NAME <EMAIL><br />
<br />
pkgname=PACKAGE NAME<br />
pkgver=1.2.3<br />
pkgrel=1<br />
pkgdesc="PACKAGE DESCRIPTION"<br />
arch=('x86_64' 'i686')<br />
url="http://SERVER/$pkgname/"<br />
license=('MIT')<br />
makedepends=('go' 'git')<br />
options=('!strip' '!emptydirs')<br />
_gourl=SERVER.NET/PATH/MODULENAME<br />
<br />
build() {<br />
export GOROOT=/usr/lib/go<br />
<br />
rm -rf build<br />
mkdir -p build/go<br />
cd build/go<br />
<br />
for f in "$GOROOT/"*; do<br />
ln -s "$f"<br />
done<br />
<br />
rm pkg<br />
mkdir pkg<br />
cd pkg<br />
<br />
for f in "$GOROOT/pkg/"*; do<br />
ln -s "$f"<br />
done<br />
<br />
platform=`for f in "$GOROOT/pkg/"*; do echo \`basename $f\`; done|grep linux`<br />
<br />
rm "$platform"<br />
mkdir "$platform"<br />
cd "$platform"<br />
<br />
for f in "$GOROOT/pkg/$platform/"*.h; do<br />
ln -s "$f"<br />
done<br />
<br />
export GOROOT="$srcdir/build/go"<br />
export GOPATH="$srcdir/build"<br />
<br />
go get -fix "$_gourl"<br />
<br />
# Prepare executable<br />
if [ -d "$srcdir/build/src" ]; then<br />
cd "$srcdir/build/src/$_gourl"<br />
go build -o "$srcdir/build/$pkgname"<br />
else<br />
echo 'Old sources for a previous version of this package are already present!'<br />
echo 'Build in a chroot or uninstall the previous version.'<br />
return 1<br />
fi<br />
}<br />
<br />
package() {<br />
export GOROOT="$GOPATH"<br />
<br />
# Package go package files<br />
for f in "$srcdir/build/go/pkg/"* "$srcdir/build/pkg/"*; do<br />
# If it's a directory<br />
if [ -d "$f" ]; then<br />
cd "$f"<br />
mkdir -p "$pkgdir/$GOROOT/pkg/`basename $f`"<br />
for z in *; do<br />
# Check if the directory name matches<br />
if [ "$z" == `echo $_gourl | cut -d/ -f1` ]; then<br />
cp -r $z "$pkgdir/$GOROOT/pkg/`basename $f`"<br />
fi<br />
done<br />
cd ..<br />
fi<br />
done<br />
<br />
# Package source files<br />
if [ -d "$srcdir/build/src" ]; then<br />
mkdir -p "$pkgdir/$GOROOT/src/pkg"<br />
cp -r "$srcdir/build/src/"* "$pkgdir/$GOROOT/src/pkg/"<br />
find "$pkgdir" -depth -type d -name .git -exec rm -r {} \;<br />
fi<br />
<br />
# Package license (if available)<br />
for f in LICENSE COPYING; do<br />
if [ -e "$srcdir/build/src/$_gourl/$f" ]; then<br />
install -Dm644 "$srcdir/build/src/$_gourl/$f" \<br />
"$pkgdir/usr/share/licenses/$pkgname/$f"<br />
fi<br />
done<br />
<br />
# Package executables<br />
if [ -e "$srcdir/build/$pkgname" ]; then<br />
install -Dm755 "$srcdir/build/$pkgname" \<br />
"$pkgdir/usr/bin/$pkgname"<br />
fi<br />
}<br />
<br />
# vim:set ts=2 sw=2 et:</nowiki>}}</div>Seletskiyhttps://wiki.archlinux.org/index.php?title=AMD_Catalyst&diff=326287AMD Catalyst2014-07-23T05:22:04Z<p>Seletskiy: Undo revision 326285 by Little (talk). Chinese version on English page.</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X Server]]<br />
[[es:ATI Catalyst]]<br />
[[fr:ATI#Catalyst]]<br />
[[it:AMD Catalyst]]<br />
[[ja:AMD Catalyst]]<br />
[[zh-CN:AMD Catalyst]]<br />
{{Related articles start}}<br />
{{Related|ATI}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
Owners of ATI/AMD video cards have a choice between AMD's proprietary driver ({{AUR|catalyst}}) and the [[ATI|open source driver]] ({{Pkg|xf86-video-ati}}). This article covers the proprietary driver.<br />
<br />
AMD's Linux driver package ''catalyst'' was previously named ''fglrx'' ('''F'''ire'''GL''' and '''R'''adeon '''X'''). Only the package name has changed, while the kernel module retains its original ''fglrx.ko'' filename. Therefore, any mention of fglrx below is specifically in reference to the ''kernel module'', '''not the package'''.<br />
<br />
'''Catalyst packages are no longer offered in the official repositories.''' In the past, Catalyst [https://www.archlinux.org/news/ati-catalyst-support-dropped/ has been dropped] from official Arch support because of dissatisfaction with the quality and speed of development. After a brief return they were dropped again in April 2013 and they have not returned since.<br />
<br />
Compared to the open source driver, Catalyst performs worse in 2D graphics, but has a better support for 3D rendering and power management. Supported devices are [[wikipedia:Radeon|ATI/AMD Radeon]] video cards with chipset R600 and newer (Radeon HD 2xxx and newer). See the Xorg [http://www.x.org/wiki/RadeonFeature/#index5h2 decoder ring] or [[wikipedia:Comparison of AMD graphics processing units|this table]], to translate ''model'' names (X1900, HD4850) to/from ''chip'' names (R580, RV770 respectively).<br />
<br />
== Installation ==<br />
<br />
There are three ways of installing Catalyst on your system. One way is to use [https://aur.archlinux.org/account/Vi0l0/ Vi0L0's] (Arch's unofficial Catalyst maintainer) repository. This repository contains all the necessary packages. The second method you can use is the AUR; PKGBUILDs offered here are also made by Vi0L0 and are the same he uses to built packages for his repository. Lastly, you can install the driver directly from AMD.<br />
<br />
Before choosing the method you prefer, you will have to see which driver you need. Since Catalyst 12.4, AMD has separated its development for Radeon HD 2xxx, 3xxx and 4xxx cards into the '''legacy''' Catalyst driver. For Radeon HD 5xxx and newer, there is the regular Catalyst driver. Regardless of the driver you need, you will also need the Catalyst utilities.<br />
<br />
{{Note|After the instructions for every method of installing, you will find general instructions '''everyone''' has to perform, regardless of the method you used.}}<br />
<br />
=== Installing the driver ===<br />
<br />
==== Installing from the unofficial repository ====<br />
<br />
If you don't fancy building the packages from the [[Arch User Repository|AUR]], this is the way to go. The repository is maintained by our unofficial Catalyst maintainer, [[User:Vi0L0|Vi0l0]]. All packages are signed and are considered safe to use. As you will see later on in this article, Vi0L0 is also responsible for many other packages that will help you get your system working with your ATI graphic cards. <br />
<br />
Vi0L0 has three different Catalyst repositories, each having different drivers:<br />
* [[Unofficial user repositories#catalyst|catalyst]] for the regular Catalyst driver needed by Radeon HD 5xxx and up, it contains the latest (stable or beta) Catalyst release.<br />
* ''catalyst-stable'' for the regular Catalyst driver needed by Radeon HD 5xxx and up, with the latest stable driver.<br />
* [[Unofficial user repositories#catalyst-hd234k|catalyst-hd234k]] for the legacy Catalyst driver needed by Radeon HD 2xxx, 3xxx and 4xxx cards.<br />
<br />
To enable one of these, follow the instructions in [[Unofficial user repositories]]. Remember to add the chosen repository '''above all other repositories''' in {{ic|pacman.conf}}.<br />
<br />
{{Note|The ''catalyst'' and ''catalyst-stable'' repositories share the same URL. To enable ''catalyst-stable'', follow the instructions for enabling ''catalyst'' and replace {{ic|[catalyst]}} with {{ic|[catalyst-stable]}} in {{ic|pacman.conf}}. If you need to stick with an old version, there are also some versioned repositories using the same URL (for example ''catalyst-stable-13.4'').}}<br />
<br />
{{Warning|<br />
* The legacy Catalyst driver does not support Xorg Server 1.13. Should you want to use this driver, see [[#Xorg repositories]] for instructions on how to roll back to Xorg Server 1.12.<br />
* Catalyst does not support Xorg Server 1.15, check out [[#Xorg repositories]] and pick up xorg repository that you would like to use.<br />
}}<br />
<br />
{{Tip|Because catalyst.wirephire.com will go down if a certain bandwidth limit is exceeded (this happened in the past) or may be too slow at your location, repository mirrors are provided by yanom at [http://eee.bot.nu/catalyst-mirror] (USA) and rtsinformatique at [http://mirror.rts-informatique.fr/archlinux-catalyst/] (France). These mirrors however come with no warranty and are not guaranteed to always be operational. Uncomment the line for the mirror closest to your location. It is also a good idea to keep alternatives in case of mirror downtime.<br />
<br />
Repository mirroring can be easily achieved using {{ic|rsync://mirror.rts-informatique.fr::archlinux-catalyst}}.<br />
}}<br />
<br />
Once you have added some Catalyst repository, update pacman's database and [[pacman|install]] these packages (see [[#Tools]] for more information):<br />
<br />
* ''catalyst-hook''<br />
* ''catalyst-utils''<br />
* ''catalyst-libgl''<br />
* ''opencl-catalyst'' - optional, needed for OpenCL support<br />
* ''lib32-catalyst-utils'' - optional, needed for 32-bit OpenGL support on 64-bit systems<br />
* ''lib32-catalyst-libgl'' - optional, needed for 32-bit OpenGL support on 64-bit systems<br />
* ''lib32-opencl-catalyst'' - optional, needed for 32-bit OpenCL support on 64-bit systems<br />
<br />
If you are using a notebook with hybrid Intel/AMD graphics card, the set of packages will be slightly different:<br />
<br />
* ''catalyst-hook''<br />
* ''catalyst-utils-pxp''<br />
* ''lib32-catalyst-utils-pxp'' - optional, needed for 32-bit OpenGL support on 64-bit systems<br />
<br />
{{Note|If pacman asks you about removing '''libgl''' you can safely do so.}}<br />
<br />
{{Warning|catalyst package was removed from Vi0L0's repository, its place was taken by catalyst-hook.}}<br />
<br />
==== Installing from the AUR ====<br />
The second way to install Catalyst is from the [[Arch User Repository|AUR]]. If you want to built the packages specifically for your computer, this is your way to go. Note that this is also the most tedious way to install Catalyst; it requires the most work and also requires manual updates upon every kernel update.<br />
<br />
{{Warning|If you install the Catalyst package from the AUR, you will have to rebuild Catalyst every time the kernel is updated. Otherwise X '''will''' fail to start.}}<br />
<br />
All packages mentioned above in Vi0L0's unofficial repository are also available on the [[Arch User Repository|AUR]]:<br />
* {{AUR|catalyst}}<br />
* {{AUR|catalyst-generator}}<br />
* {{AUR|catalyst-hook}}<br />
* {{AUR|catalyst-utils}}<br />
* {{AUR|lib32-catalyst-utils}}<br />
<br />
The AUR also holds some packages that are '''not''' found in any of the repositories. These packages contain the so-called ''Catalyst-total'' packages and the beta versions:<br />
* {{AUR|catalyst-total}}<br />
* {{AUR|catalyst-total-pxp}}<br />
* {{AUR|catalyst-total-hd234k}}<br />
* {{AUR|catalyst-test}}<br />
<br />
The {{AUR|catalyst-total}} packages are made to make the lives of AUR users easier. It builds the driver, the kernel utilities and the 32 bit kernel utilities. It also builds the {{AUR|catalyst-hook}} package, which described in [[#Tools]].<br />
<br />
{{AUR|catalyst-total-pxp}} builds Catalyst with experimental powerXpress support.<br />
<br />
=== Configuring the driver ===<br />
After you have installed the driver via your chosen method, you will have to configure X to work with Catalyst. Also, you will have to make sure the module gets loaded at boot. Also, one should disable [[KMS|kernel mode setting]].<br />
<br />
==== Configuring X ====<br />
To configure X, you will have to create an {{ic|xorg.conf}} file. Catalyst provides its own {{ic|aticonfig}} tool to create and/or modify this file.<br />
It also can configure virtually every aspect of the card for it also accesses the {{ic|/etc/ati/amdpcsdb}} file. For a complete list of {{ic|aticonfig}} options, run:<br />
<br />
# aticonfig --help | less<br />
<br />
{{Warning|Use the {{ic|--output}} option before committing to {{ic|/etc/X11/}} as an {{ic|xorg.conf}} file will override anything in {{ic|/etc/X11/xorg.conf.d/}}}}<br />
<br />
{{Note|To adhere to the new config location use {{ic|# aticonfig [...] --output}} to adapt the {{ic|Device}} section to {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}. The drawback is that many {{ic|aticonfig}} options rely on an {{ic|xorg.conf}}, and will be unavailable.}}<br />
<br />
Now, to configure Catalyst. If you have only one monitor, run this:<br />
<br />
# aticonfig --initial<br />
<br />
{{Note | If you have a PowerXpress problem you should probably install {{AUR|catalyst-total-pxp}}.}}<br />
<br />
However, if you have two monitors and want to use both of them, you can run the command stated below. Note that this will generate a dual head configuration with the second screen located above the first screen.<br />
<br />
# aticonfig --initial=dual-head --screen-layout=above<br />
<br />
{{Note|See [[#Double Screen (Dual Head / Dual Screen / Xinerama)]] for more information on setting up dual monitors.}}<br />
<br />
You can compare the generated file to one of the [[Xorg#Sample configurations|Sample Xorg.conf]] examples listed on the Xorg page.<br />
<br />
Although the current Xorg versions auto-detect most options when started, 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 {{ic|#}} should be required, add entries with {{ic|##}} as needed:<br />
<br />
{{hc|/etc/X11/xorg.conf|2=<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 />
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 />
}}<br />
<br />
{{Note|With '''every''' Catalyst update you should remove {{ic|amdpcsdb}} file in this way: kill X, remove {{ic|/etc/ati/amdpcsdb}}, start X and then run {{ic|amdcccle}} - otherwise the version of Catalyst may display wrongly in {{ic|amdcccle}}.}}<br />
<br />
''If you need more information on Catalyst, visit [https://bbs.archlinux.org/viewtopic.php?id=57084 this thread].''<br />
<br />
==== Loading the module at boot ====<br />
We have to blacklist the {{ic|radeon}} module to prevent it from auto-loading. To do so, blacklist ''radeon'' in {{ic|/etc/modprobe.d/modprobe.conf}}. Also, make sure that it is not loaded by any file under {{ic|/etc/modules-load.d/}}. For more information, see [[kernel modules#Blacklisting]]. <br />
<br />
Then we will have to make sure that the {{ic|fglrx}} module gets auto-loaded. Either add {{ic|fglrx}} on a new line of an existing module file located under {{ic|/etc/modules-load.d/}}, or create a new file and add {{ic|fglrx}}.<br />
<br />
==== Disable kernel mode setting ====<br />
<br />
{{Note|Don't do this if you are using {{ic|catalyst-utils-pxp}} or {{ic|catalyst-total-pxp}} because intel driver needs it.}}<br />
<br />
Disabling kernel mode setting is important, as the driver doesn't take advantage of [[KMS]] yet. If you do not deactivate KMS, your system might freeze when trying to switch to a TTY or even when shutting down via your DE.<br />
<br />
To disable kernel mode setting, add {{ic|nomodeset}} to your [[kernel parameters]].<br />
<br />
==== Checking operation ====<br />
<br />
Assuming that a reboot to your login was successful, you can check if {{ic|fglrx}} is running properly with the following commands:<br />
<br />
$ lsmod | grep fglrx<br />
$ fglrxinfo<br />
<br />
If you get output, it works. Finally, run X with {{ic|$ startx}} or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:<br />
<br />
$ glxinfo | grep "direct rendering"<br />
<br />
If it says {{ic|"direct rendering: yes"}} then you're good to go! If the {{ic|$ glxinfo}} command is not found install the {{Pkg|mesa-demos}} package.<br />
<br />
{{Note|You can also use:<br />
$ fgl_glxgears<br />
as the fglrx alternative test to {{ic|glxgears}}.<br />
}}<br />
<br />
{{Warning|In recent versions of Xorg, the paths of libs are changed. So, sometimes {{ic|libGL.so}} 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 />
=== Custom kernels ===<br />
<br />
{{Note|If you are at all uncomfortable or inexperienced with making packages, read up the [[ABS]] wiki page first so things go smoothly.}}<br />
<br />
To install catalyst for a custom kernel, you'll need to build your own {{ic|catalyst-$kernel}} package:<br />
<br />
# Obtain the {{ic|PKGBUILD}} and {{ic|catalyst.install}} files from [[AUR|Catalyst]].<br />
# Editing the PKGBUILD. Two changes need to be made here:<br />
## Change {{ic|1=pkgname=catalyst}} to {{ic|1=pkgname=catalyst-$kernel_name}}, where {{ic|$kernel_name}} is whatever you want (e.g. custom, mm, themostawesomekernelever).<br />
## Change the dependency of {{ic|linux}} to {{ic|$kernel_name}}.<br />
# Build your package and install; run {{ic|makepkg -i}} or {{ic|makepkg}} followed by {{ic|# pacman -U pkgname.pkg.tar.gz}}<br />
<br />
{{Note|<br />
*If you run multiple kernels, you have to install the {{AUR|catalyst-utils}} packages for all kernels. They won't conflict with one another.<br />
*{{AUR|catalyst-generator}} is able to build {{ic|<nowiki>catalyst-{kernver}</nowiki>}} packages for you so you do not actually need to perform all those steps manually. For more information, see [[#Tools| Tools section]].}}<br />
<br />
=== PowerXpress support ===<br />
<br />
PowerXpress technology allows switching notebooks with dual-graphic capability from integrated graphics (IGP) to discrete graphics either to increase battery life or to achieve better 3D rendering capabilities.<br />
<br />
To use such functionality on Arch you will have to:<br />
* Get and build {{AUR|catalyst-total-pxp}} package from the [[Arch User Repository|AUR]], or<br />
* Install '''catalyst-utils-pxp''' package from the [catalyst] repository (plus additional lib32-catalyst-utils-pxp, if needed).<br />
<br />
To perform a switch into Intel's IGP you will also have to install the {{pkg|mesa-libgl}} package and Intel's drivers: {{pkg|xf86-video-intel}} and {{pkg|intel-dri}}.<br />
<br />
{{Note|'''With the latest version of Catalyst, version 13.1 (not Catalyst legacy) ChrisXY was able to work on the newest {{pkg|xorg-server}} (version 1.13.1), {{Pkg|mesa}} 9.0.1 and {{pkg|xf86-video-intel}} 2.20.18'''.<br />
<br />
On any version of Catalyst below 13.1 (and all versions of Catalyst legacy) there are some problems with the new Intel drivers and the '''last noted working version of {{pkg|xf86-video-intel}} is 2.20.2-2''', so you will probably have to downgrade from the latest version that you have gotten from Arch's repositories (although we recommend to test the newest one before downgrading - there's always some possibility that it will work).<br />
<br />
{{pkg|xf86-video-intel}} 2.20.2-2 works only with xorg-server 1.12 and so it is a part of the '''xorg112 repository'''. If you want to use it you will have to downgrade xorg-server as well. For information on this, see [[#Xorg repositories]].}}<br />
<br />
Now you can switch between the integrated and the discrete GPU, using these commands:<br />
<br />
{{bc|1=<br />
# aticonfig --px-igpu #for integrated GPU<br />
# aticonfig --px-dgpu #for discrete GPU<br />
}}<br />
<br />
Just remember that fglrx needs {{ic|/etc/X11/xorg.conf}} configured for AMD's card with {{ic|fglrx}} inside.<br />
<br />
You can also use the {{ic|pxp_switch_catalyst}} switching script that will perform some additional usefull operations:<br />
* Switching {{ic|xorg.conf}} - it will rename {{ic|xorg.conf}} into {{ic|xorg.conf.cat}} (if there's fglrx inside) or {{ic|xorg.conf.oth}} (if there's intel inside) and then it will create a symlink to {{ic|xorg.conf}}, depending on what you chose.<br />
* Running {{ic|aticonfig --px-Xgpu}}.<br />
* Running {{ic|switchlibGL}}.<br />
* Adding/removing {{ic|fglrx}} into/from {{ic|/etc/modules-load.d/catalyst.conf}}.<br />
<br />
Usage:<br />
{{bc|1=<br />
# pxp_switch_catalyst amd<br />
# pxp_switch_catalyst intel<br />
}}<br />
<br />
If you have got problems when you try to run X on Intel's driver you may try to force "UXA" acceleration. Just make sure you got {{ic|Option "AccelMethod" "uxa"}} in {{ic|xorg.conf}}:<br />
{{hc|/etc/X11/xorg.conf|2=<br />
Section "Device"<br />
Identifier "Intel Graphics"<br />
Driver "intel"<br />
#Option "AccelMethod" "sna"<br />
'''Option "AccelMethod" "uxa"'''<br />
#Option "AccelMethod" "xaa"<br />
EndSection<br />
}}<br />
<br />
==== Running two X servers (one using the Intel driver, another one using fglrx) simultaneously ====<br />
Because fglrx is crash-prone (regarding PowerXpress), it could be a good idea to use the Intel driver in the main X server and have a secondary X server using fglrx when 3D acceleration is needed. However, simply switching to the discrete GPU from the integrated GPU using {{ic|aticonfig}} or {{ic|amdcccle}} will cause all sorts of weird bugs when starting the second X.<br />
<br />
To run two X servers at the same time (each using different drivers), you should firstly set up a fully working X with Catalyst and then move its {{ic|xorg.conf}} to a temporary place (for example, {{ic|/etc/X11/xorg.conf.fglrx}}. The next time X is started, it will use the Intel driver by default instead of fglrx.<br />
<br />
To start a second X server using fglrx, simply move {{ic|xorg.conf}} back to the proper place ({{ic|/etc/X11/xorg.conf}}) before starting X. This method even allows you to switch between running X sessions. When you are done using fglrx, move {{ic|xorg.conf}} somewhere else again.<br />
<br />
The only disadvantage of this method is not having 3D acceleration using the Intel driver. 2D acceleration, however, is fully functional. Other than that, this will provide us with a completely stable desktop.<br />
<br />
==== Issues with PowerXpress laptops running in AMD mode (pxp_switch_catalyst amd) with external / secondary monitor ====<br />
When using a PowerXpress laptop in AMD-only mode (ie, setting the discrete card to render everything) you sometimes run into issues with artifacting/duplicating between displays. This is a known issue, and seems to effect 7xxxM series cards.<br />
<br />
The artifacting disappears when you transform one of the monitors by either rotating or scaling. So you can use xrandr to fix this:<br />
<br />
{{bc|1=<br />
xrandr --output HDMI1 --left-of LVDS1 --primary --scale 1x1 --output LVDS1 --scale 1.0001x1.0001<br />
}}<br />
<br />
== Xorg repositories ==<br />
Catalyst is notorious for its slow update process. As such, it is common that a new Xorg version is pushed down from upstream that will break compatibility for Catalyst. This means that Catalyst users either have to build Xorg packages on their own, or use a backported repository that only contains the Xorg packages that should be hold back. Vi0L0 has stepped in to fulfil this task and provides several backported repositories. <br />
<br />
To enable one of these, follow the instructions in [[Unofficial user repositories]] (use the same PGP key as for the [[Unofficial user repositories#catalyst|catalyst]] repository). Remember to add the chosen repository '''above all other repositories''' in {{ic|pacman.conf}}, even above your ''catalyst'' repository, should you use one.<br />
<br />
=== xorg115 ===<br />
Catalyst doesn't support xorg-server 1.16 (note: need confirmation...).<br />
<br />
{{bc|<nowiki><br />
[xorg115]<br />
Server = http://catalyst.wirephire.com/repo/xorg115/$arch<br />
## Mirrors, if the primary server does not work or is too slow:<br />
#Server = http://mirror.rts-informatique.fr/archlinux-catalyst/repo/xorg115/$arch<br />
#Server = http://mirror.hactar.bz/Vi0L0/xorg115/$arch<br />
</nowiki>}}<br />
<br />
=== xorg114 ===<br />
Catalyst < 14.1 doesn't support xorg-server 1.15.<br />
<br />
{{bc|<nowiki><br />
[xorg114]<br />
Server = http://catalyst.wirephire.com/repo/xorg114/$arch<br />
## Mirrors, if the primary server does not work or is too slow:<br />
#Server = http://mirror.rts-informatique.fr/archlinux-catalyst/repo/xorg114/$arch<br />
#Server = http://mirror.hactar.bz/Vi0L0/xorg114/$arch<br />
</nowiki>}}<br />
<br />
=== xorg113 ===<br />
Catalyst < 13.6 doesn't support xorg-server 1.14.<br />
<br />
{{bc|<nowiki><br />
[xorg113]<br />
Server = http://catalyst.wirephire.com/repo/xorg113/$arch<br />
## Mirrors, if the primary server does not work or is too slow:<br />
#Server = http://mirror.rts-informatique.fr/archlinux-catalyst/repo/xorg113/$arch<br />
#Server = http://mirror.hactar.bz/Vi0L0/xorg113/$arch<br />
</nowiki>}}<br />
<br />
=== xorg112 ===<br />
Catalyst < 12.10 and Catalyst Legacy do not support xorg-server 1.13.<br />
<br />
{{bc|<nowiki><br />
[xorg112]<br />
Server = http://catalyst.wirephire.com/repo/xorg112/$arch<br />
## Mirrors, if the primary server does not work or is too slow:<br />
#Server = http://mirror.rts-informatique.fr/archlinux-catalyst/repo/xorg112/$arch<br />
#Server = http://mirror.hactar.bz/Vi0L0/xorg112/$arch<br />
</nowiki>}}<br />
<br />
== Tools ==<br />
<br />
=== Catalyst-hook ===<br />
{{AUR|Catalyst-hook}} is a [[systemd]] service that will automatically rebuild the {{ic|fglrx}} modules while the system shuts down or reboots, but only if it's necessary (e.g. after an update).<br />
<br />
Before using this package make sure that both the {{Grp|base-devel}} group and the {{Pkg|linux-headers}} package (the one specific to the kernel you use) are installed.<br />
<br />
To enable the automatic update, enable the {{ic|catalyst-hook.service}}:<br />
<br />
# systemctl enable catalyst-hook<br />
# systemctl start catalyst-hook<br />
<br />
You can also use this package to build the {{ic|fglrx}} module manually. Simply run the {{ic|catalyst_build_module}} script after the kernel has been updated:<br />
<br />
# catalyst_build_module all<br />
<br />
'''A few more technical details:'''<br />
<br />
The {{ic|catalyst-hook.service}} is stopping the systemd "river" and is forcing systemd to wait until catalyst-hook finishes its job.<br />
<br />
The {{ic|catalyst-hook.service}} is calling the {{ic|catalyst_build_module check}} function which checks if fglrx rebuilds are really necessary.<br />
<br />
The {{ic|check}} function is checking if the {{ic|fglrx}} module exists, if it:<br />
<br />
*doesn't exist, it will build it;<br />
<br />
*does exist, it will compare the two values to be sure that a rebuild is necessary.<br />
<br />
These values are md5sums of the {{ic|/usr/lib/modules/<kernel_version>/build/Module.symvers}} file (because I, Vi0L0, noticed that this file is unique and different for every kernel's release). The first value is the md5sum of the existing {{ic|Module.symvers}} file. The second value is the md5sum of the {{ic|Module.symvers}} file which existed in a moment of the {{ic|fglrx}} module creation. This value was compiled into the {{ic|fglrx}} module by a {{ic|catalyst_build_module}} script.<br />
<br />
If the values are different, it will compile the new {{ic|fglrx}} module.<br />
<br />
The check is checking the whole {{ic|/usr/lib/modules/}} directory and building modules for all of the installed kernels if it's necessary. If the build or rebuild isn't necessary, the whole process takes only some milliseconds to complete before it gets killed by systemd.<br />
<br />
=== Catalyst-generator ===<br />
<br />
{{AUR|catalyst-generator}} is a package that is able to build and install the {{ic|fglrx}} module packed into pacman compliant {{ic|<nowiki>catalyst-${kernver}</nowiki>}} packages. The basic difference from [[#Catalyst-hook]] is that you will have to trigger this command manually, whereas Catalyst-hook will do this automatically at boot when a new kernel got installed.<br />
<br />
It creates {{ic|<nowiki>catalyst-${kernver}</nowiki>}} packages using [[makepkg]] and installs them with [[pacman]]. {{ic|${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 {{ic|<nowiki>catalyst-${kernver}</nowiki>}} package for a currently booted kernel as an unprivileged user (non-root; safer way), use {{ic|catalyst_build_module}}. You will be asked for your root password to proceed to package installation.<br />
<br />
A short summary on how to use this package:<br />
<br />
# As root: {{ic|catalyst_build_module remove}}. This will remove all unused {{ic|<nowiki>catalyst-{kernver}</nowiki>}} packages.<br />
# As unprivileged user: {{ic|<nowiki>catalyst_build_module ${kernver}</nowiki>}}, where {{ic|<nowiki>${kernver}</nowiki>}} is the version of the kernel to which you just updated. For example: {{ic|catalyst_build_module 2.6.36-ARCH}}. You can also build {{ic|<nowiki>catalyst-{kernver}</nowiki>}} for all installed kernels by using {{ic|catalyst_build_module all}}.<br />
# If you want to remove {{ic|catalyst-generator}}, it's best to run this as root before removing catalyst-generator: {{ic|catalyst_build_module remove_all}}. '''This will remove all {{ic|<nowiki>catalyst-{kernver}</nowiki>}} packages from the system.'''<br />
<br />
{{ic|Catalyst-generator}} isn't able to remove all those {{ic|<nowiki>catalyst-{kernver}</nowiki>}} packages automatically while being removed because there can not be more than one instance of pacman running. If you forget to run {{ic|# catalyst_build_module remove_all}} before using {{ic|# pacman -R catalyst-generator}} catalyst-generator will tell you which {{ic|<nowiki>catalyst-{kernver}</nowiki>}} packages you will have to remove manually after removing catalyst-generator itself.<br />
<br />
Catalyst-generator is most safe and KISS-friendly solution because:<br />
<br />
# you can use unprivileged user to build the package;<br />
# it is building modules in a fakeroot environment;<br />
# it is not throwing files here and there, [[pacman]] always knows where they are;<br />
# all you have to do is to remember to use it<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 {{ic|<nowiki>catalyst-{kernver}</nowiki>}} package, do not be concerned, it's normal.}}<br />
<br />
=== OpenCL and OpenGL development ===<br />
<br />
Since years AMD is working on tools for OpenCL and OpenGL developement.<br />
<br />
Now under the banner of '''"Heterogeneous Computing"''' AMD is providing even more of them, fortunately most of their computing tools are available also for Linux.<br />
<br />
In the AUR and the [catalyst] repositories you will find packages that represent the most important work from AMD, namely; [https://aur.archlinux.org/packages/amdapp-aparapi amdapp-aparapi], [https://aur.archlinux.org/packages/amdapp-sdk amdapp-sdk] and [https://aur.archlinux.org/packages/amdapp-codexl amdapp-codexl].<br />
<br />
APP shortcut stands for Accelerated Parallel Processing.<br />
<br />
==== amdapp-aparapi ====<br />
AMD's Aparapi is an API for expressing data parallel workloads in Java and a runtime component capable of converting the Java bytecode of compatible workloads into OpenCL so that it can be executed on a variety of GPU devices. If Aparapi can’t execute on the GPU, it will execute in a Java thread pool.<br />
<br />
You can find more information about Aparapi [http://developer.amd.com/tools/heterogeneous-computing/aparapi/ here].<br />
<br />
==== amdapp-sdk (formerly known as amdstream) ====<br />
The AMD APP Software Development Kit (SDK) is a complete development platform created by AMD to allow you to quickly and easily develop applications accelerated by AMD APP technology. The SDK provides samples, documentation and other materials to quickly get you started leveraging accelerated compute using OpenCL, Bolt, or C++ AMP in your C/C++ application.<br />
<br />
Since version 2.8 amdapp-sdk is providing aparapiUtil as well as aparapi's samples. A package is available on the [catalyst] repository; it depends on the {{AUR|amdapp-aparapi}} package. The AUR's package will let you decide whether you want aparapi's additions or not.<br />
<br />
Version 2.8 does not provide Profiler functionality, it has been moved to CodeXL.<br />
<br />
You can find more information about AMD APP SDK [http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/ here].<br />
<br />
==== amdapp-codexl ====<br />
CodeXL is an OpenCL and OpenGL Debugger and Profiler, with a static OpenCL kernel analyzer. It's a GUI application written atop of the well known [https://aur.archlinux.org/packages/gdebugger gDEBugger] and is available only for x86_64 systems.<br />
<br />
You can find more informations about CodeXL [http://developer.amd.com/tools/heterogeneous-computing/codexl/ here].<br />
<br />
== Features ==<br />
<br />
=== Tear Free Rendering ===<br />
<br />
Presented in '''Catalyst 11.1''', the ''Tear Free Desktop'' feature reduces tearing in 2D, 3D and video applications. This likely adds triple-buffering and v-sync. Do note that it requires additional GPU processing.<br />
<br />
To enable 'Tear Free Desktop' run {{ic|amdcccle}} and go to: {{ic|Display Options}} → {{ic|Tear Free}}.<br />
<br />
Or as root run:<br />
<br />
# aticonfig --set-pcs-u32=DDX,EnableTearFreeDesktop,1<br />
<br />
To disable, again use {{ic|amdcccle}} or run as root:<br />
<br />
# aticonfig --del-pcs-key=DDX,EnableTearFreeDesktop<br />
<br />
=== Video acceleration ===<br />
<br />
'''[[wikipedia:Video_Acceleration_API|Video Acceleration API]] (VA API)''' is an open source software library (libVA) and API specification which provides GPU acceleration for video processing on Linux/UNIX based operating systems. The process works by enabling hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for common encoding standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).<br />
<br />
VA-API gained a proprietary backend (in November 2009) called {{AUR|xvba-video}}, that allows VA-API programmed applications to take advantage of AMD Radeons UVD2 chipsets via the [[wikipedia:XvBA|XvBA (X-Video Bitstream Acceleration API designed by AMD)]] library.<br />
<br />
XvBA support and xvba-video is still under development, however it is '''working very well in most cases'''. Build (or install from Vi0L0's repo) the proprietary {{AUR|xvba-video}} package, or if you have problems with that version, install {{AUR|libva-xvba-driver}}; and also install {{Pkg|mplayer-vaapi}} and {{Pkg|libva}}. Then just set your video player to use vaapi:gl as video output:<br />
<br />
$ mplayer -vo vaapi:gl movie.avi<br />
<br />
These options can be added to your mplayer configuration file, see [[MPlayer]].<br />
<br />
For '''smplayer''':<br />
<br />
Options → Preferences → General → Video (tab) → Output driver: User Defined : vaapi:gl<br />
Options → Preferences → General → Video (tab) → Double buffering '''on'''<br />
Options → Preferences → General → General → Screenshots → Turn screenshots '''off'''<br />
Options → Preferences → Performance → Threads for decoding: '''1''' (to turn off -lavdopts parameter)<br />
<br />
{{Note|If Tear Free Desktop is enabled it's better to use:<br />
Options → Preferences → General → Video (tab) → Output driver: vaapi<br />
If Video Output '''vaapi:gl''' isn't working - please check:<br />
'''vaapi''', '''vaapi:gl2''' or simply '''xv(0 - AMD Radeon [[wikipedia:Avivo|AVIVO Video]])'''.<br />
}}<br />
<br />
For '''VLC''':<br />
<br />
Tools → Preferences → Input & Codecs → Use GPU accelerated decoding<br />
<br />
It might help to enable v-sync in '''amdcccle''':<br />
<br />
3D → More Settings → Wait for vertical refresh = Always On<br />
<br />
{{Note|If you are using '''Compiz/KWin''', 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. If it is still flickering, try to disable this option in CCSM. It's off by default in '''KWin''', but if you see flickering try to turn "Suspend desktop effects for fullscreen windows" on or off in {{ic|System Settings}} → {{ic|Desktop Effects}} → {{ic|Advanced}}.}}<br />
<br />
=== GPU/Mem frequency, Temperature, Fan speed, Overclocking utilities ===<br />
<br />
You can get the GPU/Mem clocks with: {{ic|$ aticonfig --od-getclocks}}.<br />
<br />
You can get the fan speed with: {{ic|$ aticonfig --pplib-cmd "get fanspeed 0"}}<br />
<br />
You can get the temperature with: {{ic|$ aticonfig --odgt}}<br />
<br />
To set the fanspeed with: {{ic|$ aticonfig --pplib-cmd "set fanspeed 0 50"}} Query Index: 50, Speed in percent<br />
<br />
To overclock and/or underclock it's easier to use a GUI, like '''ATi Overclocking Utility''', which is very simple and requires qt to work. It might be out of date/old, but you can get it [http://kde-apps.org/content/show.php/ATI+Overclock?content=47796 here].<br />
<br />
Another, more complex utility to perform such operations is '''AMDOverdriveCtrl'''. Its homepage is [http://sourceforge.net/projects/amdovdrvctrl here] and you can build {{AUR|amdoverdrivectrl}} from the AUR or from Vi0L0's unofficial repositories.<br />
<br />
=== Double Screen (Dual Head / Dual Screen / Xinerama) ===<br />
<br />
==== Introduction ====<br />
<br />
{{Warning| you should know that there isn't one specific solution because each setup differs and needs its own configuration. That's why you will have to adapt the steps below to your own needs. It is possible that you have to try more than once. '''Therefore, you should save your working {{ic|/etc/X11/xorg.conf}} before you start modifying and you must be able to recover from a command-line environment.'''}}<br />
<br />
* In this chapter, we will describe the installation of two different-sized screens on only one graphics card with two different output ports (DVI + HDMI) using a "BIG Desktop" configuration.<br />
<br />
* The Xinerama solution has some inconveniences, especially because it is not compatible with XrandR. For that very reason, you should not use this solution, because XrandR is a must for our later configuration.<br />
<br />
* The Dual Head solution would allow you to have 2 different sessions (one for each screen). It could be what you want, but you will not be able to move windows from one screen to another. If you have only one screen, you will have to define the mouse inside your Xorg session for each of the two sessions inside the Server Layout section.<br />
<br />
[http://support.amd.com/us/kbarticles/Pages/1105-HowCanIConfigureMultip.aspx ATI Documentation]<br />
<br />
==== ATI Catalyst Control Center ====<br />
<br />
The GUI tool shipped by ATI is very useful and we will try to use it as much as we can. To launch it, open a terminal and use the following command:<br />
<br />
$ {kdesu/gksu} amdcccle<br />
<br />
{{Warning|Do '''not''' use sudo directly with a GUI. Sudo gives you admin rights with user account information. Instead, use ''gksu'' (GNOME) or ''kdesu'' (KDE).}}<br />
<br />
==== Installation ====<br />
<br />
Before we start, make sure that your hardware is plugged in correctly, that power is on and that you know your hardware characteristics (screen dimensions, sizes, refreshment rates, etc.) Normally, both screens are recognized during boot time but not necessarily identified properly, especially if you are not using any Xorg base configuration file ({{ic|/etc/X11/xorg.conf}}) but relying on the hot-plugging feature.<br />
<br />
The first step is to make sure that you screens will be recognized by your DE and by X. For this, you need to generate a basic Xorg configuration file for your two screens:<br />
<br />
# aticonfig --initial --desktop-setup=horizontal --overlay-on=1<br />
<br />
or<br />
<br />
# aticonfig --initial=dual-head --screen-layout=left<br />
<br />
{{Note|{{ic|overlay}} is important because it allows you to have 1 pixel (or more) shared between the 2 screens.}}<br />
{{Tip|For the other possible and available options, do not hesitate to type {{ic|aticonfig --help}} inside a terminal to display all available command lines.}}<br />
<br />
Now you should have a basic Xorg configuration file that you can edit to add your screen resolutions. It is important to use the precise resolution, especially if you have screens of different sizes. These resolutions have to be added in the "Screen" section:<br />
<br />
SubSection "Display"<br />
Depth 24<br />
Modes "X-resolution screen 1xY-resolution screen 1" "Xresolution screen 2xY-resolution screen 2"<br />
EndSubSection<br />
<br />
From now on, instead of editing the {{ic|xorg.conf}} file manually, let us use the ATI GUI tool. Restart X to be sure that your two screens are properly supported and that the resolutions are properly recognized (Screens must be independent, not mirrored).<br />
<br />
==== Configuration ====<br />
<br />
Now you will only have to launch the ATI control center with root privileges, go to the display menu and choose how you would like to set your configuration (small arrow of the drop down menu). A last restart of X and you should be done!<br />
<br />
Before you restart X, do not hesitate to verify your new {{ic|xorg.conf}} file. At this stage, inside the "Display" sub-section of the "Screen" section, you should see a "Virtual" command line, of which the resolution should be the sum of both screens. The "Server Layout" section says all the rest.<br />
<br />
== Uninstallation ==<br />
<br />
If for any reason this driver is not working for you or if you simply want to try out the open source driver, remove the {{ic|catalyst}} and {{ic|catalyst-utils}} packages. Also you should remove {{AUR|catalyst-generator}}, {{AUR|catalyst-hook}} and {{AUR|lib32-catalyst-utils}} packages if they have been installed on your system.<br />
<br />
{{Warning|<br />
*You may need to use {{ic|# pacman -Rdd}} to remove {{AUR|catalyst-utils}} (and/or {{AUR|lib32-catalyst-utils}}) because that package contains ''gl'' related files and many of your installed packages depend on them. These dependencies will be satisfied again when you install {{Pkg|xf86-video-ati}}.<br />
*You may need to remove {{ic|/etc/profile.d/ati-flgrx.sh}} and {{ic|/etc/profile.d/lib32-catalyst}} (if it exists on your system), otherwise {{ic|r600_dri.so}} will fail to load and you would not have 3D support.}}<br />
<br />
{{Note|You should remove unofficial repositories from your {{ic|/etc/pacman.conf}} and run {{ic|# pacman -Syu}}, because those repositories include out-dated Xorg packages to allow use of {{ic|catalyst}} and the {{Pkg|xf86-video-ati}} package needs up-to-date Xorg packages from the [[Official repositories]].}}<br />
<br />
Also follow these steps:<br />
<br />
* If you have the {{ic|/etc/modprobe.d/blacklist-radeon.conf}} file remove it or comment the line {{ic|blacklist radeon}} in that file.<br />
* If you have a file in {{ic|/etc/modules-load.d}} to load the {{ic|fglrx}} module on boot, remove it or comment the line containing {{ic|fglrx}}.<br />
* Make sure to remove or backup {{ic|/etc/X11/xorg.conf}}.<br />
* If you have installed the {{AUR|catalyst-hook}} package, make sure to disable the systemd service.<br />
* If you used the {{ic|nomodeset}} option in your [[kernel parameters]] and plan to use [[#Kernel mode-setting (KMS)|KMS]], remove it.<br />
* '''Reboot''' before installing another driver.<br />
<br />
== Troubleshooting ==<br />
<br />
If you can still boot to command-line, then the problem probably lies in {{ic|/etc/X11/xorg.conf}}<br />
<br />
You can parse the whole {{ic|/var/log/Xorg.0.log}} or, for clues:<br />
<br />
$ grep '(EE)' /var/log/Xorg.0.log<br />
$ grep '(WW)' /var/log/Xorg.0.log<br />
<br />
If you are still confused about what is going on, search the forums first. Then post a message in the [https://bbs.archlinux.org/viewtopic.php?pid=1166052#p1166052/ thread specific to ATI/AMD]. Provide the information from {{ic|xorg.conf}} and both commands mentioned above.<br />
<br />
=== 3D Wine applications freeze ===<br />
If you use a 3D Wine application and it hangs, you have to disable TLS. To do this, either use {{ic|aticonfig}} or edit {{ic|/etc/X11/xorg.conf}}. To use {{ic|aticonfig}}:<br />
<br />
# aticonfig --tls=off<br />
<br />
Or, to edit {{ic|/etc/X11/xorg.conf}}; first open the file in an editor as root and then add {{ic|Option "UseFastTLS" "off"}} to the ''Device'' section of this file. <br />
<br />
After applying either of the solutions, restart X for it to take effect.<br />
<br />
=== Problems with video colours ===<br />
<br />
You may still use {{ic|vaapi:gl}} to avoid video flickering, but without video acceleration:<br />
<br />
* Run '''mplayer''' without {{ic|-vo vaapi}} switch.<br />
<br />
* Run '''smplayer''' remove {{ic|-vo vaapi}} from Options → Preferences → Advanced → Options for MPlayer → Options: -vo vaapi<br />
<br />
Plus for '''smplayer''' you may now safely turn screenshots on.<br />
<br />
=== KWin and composite ===<br />
<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 artefact issues in some cases, for instance when resizing Konsole.<br />
<br />
=== Black screen with complete lockups and/or hangs after reboot or startx ===<br />
<br />
Ensure you have added the {{ic|nomodeset}} option to the kernel options line in your bootloader (see [[#Disable kernel mode setting]]).<br />
<br />
If you are using the legacy driver ({{ic|catalyst-hd234k}}) and get a black screen, try downgrading xorg-server to 1.11 by using the [[#&#91;xorg111&#93;]] repository.<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 auto-disables itself and there is no screen output.<br />
<br />
If so, try to run this:<br />
<br />
$ aticonfig --acpi-services=off<br />
<br />
=== KDM disappears after logout ===<br />
<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. Uncomment the following line under the section titled {{ic|[X-:*-Core]}}<br />
<br />
{{hc|/usr/share/config/kdm/kdmrc|2=<br />
TerminateServer=True<br />
}}<br />
<br />
KDM should now appear when you log out of KDE.<br />
<br />
=== Direct Rendering does not work ===<br />
<br />
This problem may occur when using the proprietary '''Catalyst''' driver.<br />
<br />
{{Warning|This error would also appear if you have not '''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 />
<br />
$ LIBGL_DEBUG=verbose glxinfo > /dev/null<br />
<br />
at the command prompt. At the very start of the output, it'll usually give you a nice error message saying why you do not have direct rendering.<br />
<br />
Common errors and their solutions, are:<br />
<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 {{ic|fglrx}} kernel module. To determine which agp modules you'll need, run {{ic|# hwdetect --show-agp}}. Then open your {{ic|/etc/modules-load.d/fglrx.conf}} and add the agp module on a line '''before''' the {{ic|fglrx}} line.<br />
<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 has not been installed correctly. If the paths in the error message are {{ic|/usr/X11R6/lib/modules/dri/fglrx_dri.so}}, 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 {{ic|/etc/profile}} is sourced every time you log in. This is usually accomplished by adding {{ic|source /etc/profile}} into {{ic|~/.xsession}} or {{ic|~/.xinitrc}}, but this may vary between login managers.<br />
<br />
* If the paths above in your error message ''are'' {{ic|/usr/lib/xorg/modules/dri/fglrx_dri.so}}, then something has not been correctly installed. Try reinstalling the {{AUR|catalyst}} package.<br />
<br />
Errors such as:<br />
<br />
fglrx: libGL version undetermined - OpenGL module is using glapi fallback<br />
<br />
could be caused by having multiple versions of {{ic|libGL.so}} on your system. The command below should return the following output:<br />
<br />
{{hc|$ locate libGL.s|<br />
/usr/lib/libGL.so<br />
/usr/lib/libGL.so.1<br />
/usr/lib/libGL.so.1.2}}<br />
<br />
These are the only three libGL.so files you should have on your system. If you have any more (e.g. {{ic|/usr/X11R6/lib/libGL.so.1.2}}), 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 />
<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 />
<br />
ATI's proprietary Catalyst driver cannot resume from suspend if the framebuffer is enabled. To disable the framebuffer, add {{ic|1=vga=0}} to your kernel [[kernel parameters]].<br />
<br />
To see where you need to add this with other bootloaders, see [[#Disable kernel mode setting]].<br />
<br />
=== System freezes/Hard locks ===<br />
<br />
* The {{ic|radeonfb}} 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 />
* If you experience system freezes when exiting your DE (shut down, suspend, switching to tty etc.) you probably forgot to deactivate KMS. (See [[#Disable kernel mode setting]])<br />
<br />
=== Hardware conflicts ===<br />
<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 getting output something similar to this (using an nForce3-based system):<br />
<br />
{{hc|<nowiki>$ dmesg | grep agp</nowiki>|<br />
agpgart: Detected AGP bridge 0<br />
agpgart: Setting up Nforce3 AGP.<br />
agpgart: aperture base > 4G<br />
}}<br />
<br />
and also if issuing the following command gets you the following output:<br />
<br />
{{hc|<nowiki>$ tail -n 100 /var/log/Xorg.0.log | grep agp</nowiki>|<br />
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"}}<br />
<br />
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 [http://bugzilla.kernel.org/show_bug.cgi?id=6350/ this bugreport] for more information and a potential fix.<br />
<br />
=== Temporary hangs when playing video ===<br />
<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 the system logs for output like:<br />
<br />
{{hc|/var/log/messages.log|2=<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 />
<br />
Adding the {{ic|nopat}} and/or {{ic|nomodeset}} [[kernel parameters]] should work.<br />
<br />
=== "aticonfig: No supported adapters detected" ===<br />
<br />
If you get the following:<br />
<br />
{{hc|# aticonfig --initial|<br />
aticonfig: No supported adapters detected<br />
}}<br />
<br />
It may still be possible to get Catalyst working by manually setting the device in your your {{ic|etc/X11/xorg.conf}} file or by copying an older working {{ic|/etc/ati/control}} file (preferred - this also fixes the watermark issue).<br />
<br />
To get an older control file, download a previous version of fglrx from AMD and run it with {{ic|--extract driver}} parameter. You'll find the control file in {{ic|driver/common/etc/ati/control}}. Copy the extracted file over the system file and restart Xorg. You can try different versions of the file.<br />
<br />
To set your model in {{ic|xorg.conf}}, edit the device section of {{ic|/etc/X11/xorg.conf}} to:<br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
Section "Device"<br />
Identifier "ATI radeon '''****'''"<br />
Driver "fglrx"<br />
EndSection<br />
}}<br />
<br />
Where {{ic|****}} should be replaced with your device's marketing number (e.g. 6870 for the HD 6870 and 6310 for the E-350 APU).<br />
<br />
Xorg will start and it is possible to use {{ic|amdcccle}} instead of {{ic|aticonfig}}. There will be an "AMD Unsupported hardware" watermark.<br />
<br />
You can remove this watermark using the following script:<br />
<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 />
and then reboot your machine.<br />
<br />
=== WebGL support in Chromium ===<br />
<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 and adding {{ic|--ignore-gpu-blacklist}} flag into the {{ic|Exec}} line so it looks like this:<br />
<br />
{{hc|/usr/share/applications/chromium.desktop|2=<br />
Exec=chromium %U '''--ignore-gpu-blacklist'''<br />
}}<br />
<br />
You can also run chromium from console with the same {{ic|--ignore-gpu-blacklist}} flag:<br />
<br />
$ chromium '''--ignore-gpu-blacklist'''<br />
<br />
{{Warning|Catalyst does not support the {{ic|GL_ARB_robustness}} extension, so it is possible that a malicious site could use WebGL to perform a DoS attack on your graphic card.}}<br />
<br />
=== Lag/freezes when watching flash videos via Adobe's flashplugin ===<br />
<br />
Edit:<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
#EnableLinuxHWVideoDecode=1<br />
OverrideGPUValidation=true<br />
}}<br />
<br />
If you are using KDE make sure that "Suspend desktop effects for fullscreen windows" is unchecked under {{ic|System Settings}} → {{ic|Desktop Effects}} → {{ic|Advanced}}.<br />
<br />
=== Lag/slow windows movement in GNOME3 ===<br />
<br />
You can try this solution, it is working for many people.<br />
<br />
Add this line into {{ic|~/.profile}} or into {{ic|/etc/profile}}:<br />
<br />
export CLUTTER_VBLANK=none<br />
<br />
Restart X server or reboot your system.<br />
<br />
=== Not using full screen resolution at 1920x1080 (underscanning, black borders around the screen) ===<br />
<br />
This usually happens when you use a HDMI connection to connect your monitor/TV to your computer.<br />
<br />
Seemed to be a feature by AMD/ATI to work with all HDTVs that could be adjusted via the amdccle.<br />
<br />
Using the amdcccle GUI you can select the affected display, go to adjustments, and set underscan to 0% (aticonfig defaults to 15% underscan). It is possible as well that the underscan slider won't show under the display's adjustments, as sometimes in (at least) version 14.10.<br />
<br />
The problem is that the settings will not persist after restarting X server or rebooting or wake up or might even revert after changing TTYs.<br />
<br />
For the changes to become permanent, you will need to adjust the underscan settings manually using "aticonfig" via console (as root) or manually edit the file '''/etc/ati/amdpcsdb''' (as root)<br />
<br />
'''using aticonfig method:'''<br />
<br />
# aticonfig --set-pcs-u32=MCIL,DigitalHDTVDefaultUnderscan,0<br />
<br />
After changing the settings, reboot.<br />
<br />
For newer version (for example, 12.11), if Catalyst control center repeatedly fails to save the overscan setting you can also try:<br />
<br />
# aticonfig --set-pcs-u32=MCIL,TVEnableOverscan,0<br />
<br />
<br />
'''Manually editing /etc/ati/amdpcsdb method:'''<br />
<br />
Add the following line anywhere under the following header '''[AMDPCSROOT/SYSTEM/MCIL]'''<br />
<br />
# DigitalHDTVDefaultUnderscan=V0<br />
<br />
For newer version (for example, 12.11), if Catalyst control center repeatedly fails to save the overscan setting you can also try:<br />
locate under '''[AMDPCSROOT/SYSTEM/MCIL]''' the following line <br />
<br />
# TVEnableOverscan=V1<br />
<br />
and change it to<br />
<br />
# TVEnableOverscan=V0<br />
<br />
After changing the settings, reboot.<br />
<br />
<br />
----<br />
<br />
<br />
'''IMPORTANT:'''<br />
You might find that the file /etc/ati/amdpcsdb will be overwritten and revert no matter what you do as user or as root even with log in/log out/reboot, ergo the modification will not stick.<br />
For the amd database file not to be overwritten you have to modify it without the fgrlx driver running.<br />
This can be made by rebooting in any "safe mode" that will not use the driver or directly booting into console mode<br />
<br />
<br />
----<br />
<br />
<br />
'''WORKAROUND:'''<br />
For whatever reason you can find yourself not wanting to touch ATI's config files you can circumvent the problem by forcing the panel's position and resolution:<br />
as user:<br />
<br />
# aticonfig --set-dispattrib=DISPLAYTYPE,positionX:0<br />
# aticonfig --set-dispattrib=DISPLAYTYPE,positionY:0<br />
# aticonfig --set-dispattrib=DISPLAYTYPE,sizeX:1920<br />
# aticonfig --set-dispattrib=DISPLAYTYPE,sizeY:1080<br />
<br />
'''DISPLAYTYPE''' will be the name of the monitor you want to change it's attributes, for example "dfp9".<br />
To know the name of your '''DISPLAYTYPE''' issue the following command:<br />
<br />
# xrand --current<br />
<br />
if RandR is not enabled you should instead use;<br />
<br />
# aticonfig --query-monitor<br />
<br />
That will show you which displays are connected and disconnected and it's properties<br />
<br />
This workaround will not persist but it is a quick fix that will show that the panel works just fine and that the above solutions are to be put into place.<br />
<br />
'''NOTE:'''<br />
<br />
''aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0'' should not be used on newer versions of the driver as it is deprecated and will be soon removed as stated by ATI.<br />
<br />
Try ''aticonfig --help |grep set-pcs-val'' to read ATI's notice<br />
<br />
=== Dual Screen Setup: general problems with acceleration, OpenGL, compositing, performance ===<br />
Try to disable xinerama and xrandr12. Check out ie. this way:<br />
<br />
Type those commands:<br />
# aticonfig --initial<br />
# aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE"<br />
Then reboot your system. In {{ic|/etc/X11/xorg.conf}} check that xinerama is disabled, if it's not disable it and reboot your system.<br />
<br />
Next run {{ic|amdcccle}} and pick up amdcccle → display manager → multi-display → multidisplay desktop with display(s) 2.<br />
<br />
Reboot again and set up your display layout whatever you desire.<br />
<br />
=== Disabling VariBright feature ===<br />
Type the following command to disable VariBright:<br />
# aticonfig --set-pcs-u32=MCIL,PP_UserVariBrightEnable,0<br />
<br />
=== Hybrid/PowerXpress: turning off discrete GPU ===<br />
When you are using {{AUR|catalyst-total-pxp}} or catalyst-utils-pxp and you are switching to integrated GPU you may notice that discrete GPU is still working, consuming power and making your system's temperature higher. <br />
<br />
Sometimes ie. when your integrated GPU is intel's one you can use {{ic|vgaswitcheroo}} to turn the discrete GPU off.<br />
Sometimes unfortunatelly, it's not working.<br />
<br />
Then you may check out [https://aur.archlinux.org/packages/?O=0&K=acpi_call acpi_call]. MrDeepPurple has prepared the script which he's using to perform 'turn off' task, he's calling script via systemd service while booting and resuming his system.<br />
Here's his script:<br />
#!/bin/sh<br />
libglx=$(/usr/lib/fglrx/switchlibglx query)<br />
modprobe acpi_call<br />
if [ "$libglx" = "intel" ]; then<br />
echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call<br />
fi<br />
<br />
=== Switching from X session to TTYs gives a blank screen/low resolution TTY ===<br />
Workaround for this "feature", which appeared in catalyst 13.2 betas, is to use {{ic|1=vga=}} kernel option, like {{ic|1=vga=792}}.<br />
You can get the list of supported resolutions with the<br />
$ hwinfo --framebuffer<br />
command. Get the one that corresponds to your wanted resolution, and copy-paste it into kernel line of your bootloader, so it could look like ie. {{ic|1=vga=0x03d4}}<br />
<br />
=== 30 FPS / Tear-Free / V-Sync bug ===<br />
Bug introduced in Catalyst 13.6 beta, not fixed till now (13.9).<br />
<br />
After enabling "Tear-Free" functionality every freshly started OpenGL application is lagging, often generates only 30 FPS, it also touches composited desktop.<br />
<br />
Workaround is pretty simple and was found by M132. Here are the steps, do everything in "AMD Catalyst Control Center" (amdcccle) application:<br />
<br />
1. Enable Tear-Free, it will set 3D V-Sync option to "Always on".<br />
2. Set 3D V-Sync to "Always Off".<br />
3. Make sure Tear-Free is still on.<br />
4. Restart X / Re-login.<br />
<br />
It is working well on KDE 4.11.x, but in case of problems M132 suggests: "Try disabling "Detect refresh rate" and specify monitor's refresh rate in the Composite plugin."<br />
<br />
=== Backlight adjustment does not work===<br />
If you have a problem with backlight adjustment, you can try the following command: <br />
# aticonfig --set-pcs-u32=MCIL,PP_PhmUseDummyBackEnd,1<br />
Some users reported that this can decrease FPS. To restore defaults, run:<br />
# aticonfig --set-pcs-u32=MCIL,PP_PhmUseDummyBackEnd,0<br />
[http://ati.cchtml.com/show_bug.cgi?id=711 Read more about this bug]<br />
<br />
== See also ==<br />
<br />
* [http://wiki.cchtml.com/index.php/Main_Page Unofficial Wiki for the ATI Linux Driver]<br />
* [http://ati.cchtml.com/query.cgi Unofficial ATI Linux Driver Bugzilla]</div>Seletskiyhttps://wiki.archlinux.org/index.php?title=Bluetooth_mouse&diff=263781Bluetooth mouse2013-06-21T17:00:31Z<p>Seletskiy: Added bluetoothctl chapter</p>
<hr />
<div>[[Category:Mice]]<br />
[[Category:Bluetooth]]<br />
[[cs:Bluetooth Mouse]]<br />
[[ru:Bluetooth Mouse]]<br />
This article describes how to set up a [[Bluetooth]] mouse manually with no desktop assistance for Bluetooth. For example, a minimalist XFCE installation. <br />
<br />
== Installation ==<br />
<br />
You need the {{Pkg|bluez}} package from the extra repository.<br />
<br />
== Start Bluetooth service ==<br />
<br />
The pertinent options in /etc/conf.d/bluetooth are <br />
HIDD_ENABLE=true<br />
<br />
after that, start bluetooth services with<br />
# systemctl enable bluetooth.service<br />
# systemctl start bluetooth.service<br />
<br />
=== kernel modules ===<br />
No additional actions are necessary if the bluetooth service is started using systemd. If it does not work try following.<br />
<br />
The command<br />
# modprobe -v btusb bluetooth hidp l2cap<br />
loads the kernel modules you need, if they were not loaded automatically.<br />
<br />
=== Test ===<br />
The following command should show your bluetooth adapter:<br />
<br />
{{hc|# hciconfig|<br />
hci0: Type: BR/EDR Bus: USB<br />
BD Address: 00:22:43:E1:82:E0 ACL MTU: 1021:8 SCO MTU: 64:1<br />
UP RUNNING PSCAN <br />
RX bytes:1062273 acl:62061 sco:0 events:778 errors:0<br />
TX bytes:1825 acl:11 sco:0 commands:39 errors:0<br />
}}<br />
<br />
== Configure Bluetooth Mouse ==<br />
The method described here is based in three steps, in this order:<br />
<br />
# Make the PC learn about the bluetooth mouse.<br />
# Grant the mouse permissions to connect.<br />
# Make the mouse learn about the PC.<br />
<br />
=== Search your mouse ===<br />
First make your mouse discoverable. For example some mouse need to press a button. Then issue the following command as root:<br />
<br />
{{hc|# hcitool scan|<br />
Scanning ...<br />
00:07:61:F5:5C:3D Logitech Bluetooth Mouse M555b<br />
}}<br />
<br />
Your mouse bluetooth address will be similar to {{ic|12:34:56:78:9A:BC}}. You may also find it in the documentation or on the mouse itself.<br />
<br />
== Connecting the mouse ==<br />
hidd --search<br />
hcitool inq<br />
are good for device scanning (I needed to use sudo for 'hidd --search' to automatically connect mouse, searching worked even without sudo).<br />
hidd --connect <bdaddr><br />
to actually connect.<br />
hidd --show<br />
will show your currently connected devices. The mouse should show up in this list. If it does not, press the reset button to make it discoverable.<br />
<br />
Note: If you have the ipw3945 module loaded (wifi on HP computer) the bluetooth wont work.<br />
<br />
== Connecting the mouse at startup ==<br />
Edit /etc/conf.d/bluetooth:<br />
# Arguments to hidd<br />
HIDD_OPTIONS="--connect <enter here your bluetooth mouse address>"<br />
<br />
and test the new settings:<br />
/etc/rc.d/bluetooth stop<br />
hidd --killall (drop mouse connection)<br />
/etc/rc.d/bluetooth start<br />
<br />
Note: The above instructions to start the mouse at startup do not work with the now outdated 3.11 bluetooth packages. New versions such as the current (3.32) packages are not affected. If you are using an older version, then to start the mouse at startup, add:<br />
hidd --connect <enter here your bluetooth mouse address (No capitals!!!)><br />
to your /etc/rc.local file.<br />
<br />
Note #2: You can connect any bluetooth mouse and/or keyboard without any further configuration and without knowing the device address. You can do it by adding the --master and/or --server option in HIDD_OPTIONS depending on your device.<br />
<br />
== Configuring through bluetoothctl ==<br />
Since `bluez>=5` there is bluetoothctl util, that provide simple interface to configuring bluetooth devices.<br />
<br />
For example, configuring autoconnect bluetooth mouse can be done as described above:<br />
# bluetoothctl<br />
[bluetooth]# list<br />
Controller <cmac> BlueZ 5.5 [default]<br />
[bluetooth]# select <cmac><br />
[bluetooth]# power on<br />
[bluetooth]# scan on<br />
/// enable scanning mode on your mouse<br />
[bluetooth]# devices<br />
Device <mmac> Name: Bluetooth Mouse<br />
[bluetooth]# trust <mmac><br />
[bluetooth]# pairable on<br />
[bluetooth]# pair <mmac><br />
[bluetooth]# connect <mmac><br />
<br />
== Troubleshooting tips ==<br />
=== Mouse lag ===<br />
If you experience mouse lag you can try to increase the polling rate. There is a wiki article describing the procedure: [[Mouse Polling Rate]].<br />
<br />
=== Problems with the USB dongle ===<br />
If you have trouble with your USB dongle, you may also want to try<br />
# modprobe -v rfcomm<br />
<br />
At this point, you should get an hci0 device with<br />
# hcitool dev<br />
<br />
Sometimes the device is not active right away - try starting the interface with<br />
# hciconfig hci0 up<br />
and searching for devices as shown above.</div>Seletskiyhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_on_ZFS&diff=252867Install Arch Linux on ZFS2013-04-04T12:49:11Z<p>Seletskiy: Get rid of unnecessary filesystems for root, add some troubleshoot info, fstab generation command changed</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
{{Article summary start}}<br />
{{Article summary text|This article describes the necassary procedures for installing Arch Linux onto a ZFS root filesystem.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ZFS}}<br />
{{Article summary wiki|ZFS on FUSE}}<br />
{{Article summary end}}<br />
<br />
The [[Wikipedia:ZFS|Zettabyte File System (ZFS)]] is an advanced [[Wikipedia:Copy-on-write|copy-on-write]] filesystem designed to preserve data integrity from a multitude of possible corruption scenarios as well as provide simple administration features. ZFS makes disk administration effortless with support ZFS storage pools (zpools) and automatic mount handling. First released in 2005 for Solaris OS, ZFS has since become the flag bearer for next generation filesystems.<br />
<br />
ZFS was first developed and released by Sun (now owned by Oracle) as [[Wikipedia:Open source software|Open Source Software]] licensed under the [[Wikipedia:Common Development and Distribution License|Common Development and Distribution License]] (CDDL) which is famously [http://arstechnica.com/information-technology/2010/06/uptake-of-native-linux-zfs-port-hampered-by-license-conflict/ incompatible with the GNU Public License]. This incompatibility prevents ZFS from being merged into the mainline kernel, and generally presents some obstacles for users that want to use ZFS in Linux.<br />
<br />
[http://zfsonlinux.org/ ZFSonLinux.org] is a project funded by the [https://www.llnl.gov/ Lawrence Livermore National Laboratory] to develop a native Linux kernel module for its massive storage requirements and super computers.<br />
<br />
==Notes before installation==<br />
<br />
* This guide uses the unofficial archzfs repository hosted at http://demizerone.com/archzfs. This repository is maintained by Jesus Alvarez and is signed with his PGP key: [http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x5E1ABF240EE7A126 0EE7A126].<br />
<br />
* The ZFS packages are tied to the kernel version they were built against. This means it will not be possible to perform kernel updates until new packages (or package sources) are released by the ZFS package maintainer.<br />
<br />
==Boot from the installation media==<br />
<br />
It is a good idea make an installation media with the needed software included. Otherwise, you will need the latest archiso installation media burned to a CD or a USB key. <br />
<br />
To embed {{ic|zfs}} in the archiso, download the {{ic|archiso}} package.<br />
<br />
Start the process: <br />
# cp -r /usr/share/archiso/configs/releng /root/media<br />
<br />
Edit the {{ic|packages.x86_64}} file adding those lines:<br />
spl-utils<br />
spl<br />
zfs-utils<br />
zfs<br />
<br />
Edit the {{ic|pacman.conf}} file adding those lines (TODO, correctly embed keys in the installation media?):<br />
[archzfs]<br />
SigLevel = Never<br />
Server = <nowiki>http://demizerone.com/$repo/core/$arch</nowiki><br />
<br />
Add other packages in {{ic|packages.both}}, {{ic|packages.i686}}, or {{ic|packages.x86_64}} if needed and create the image.<br />
# ./build -v<br />
<br />
The image will be in the {{ic|/root/media/out}} directory.<br />
<br />
More informations about the process can be read in [http://kroweer.wordpress.com/2011/09/07/creating-a-custom-arch-linux-live-usb/ this guide] or in the [Archiso] article.<br />
<br />
If you are installing onto a UEFI system, see [[Unified Extensible Firmware Interface#Create UEFI bootable USB from ISO]] for creating UEFI compatible installation media.<br />
<br />
==Setup pacman==<br />
<br />
Activate the required network connection and then edit {{ic|/etc/pacman.d/mirrorlist}} and configure the mirrors for pacman to use. Once that is done, edit {{ic|/etc/pacman.conf}} and add the archzfs repository:<br />
<br />
{{hc|# nano /etc/pacman.conf|<nowiki><br />
[archzfs]<br />
Server = http://demizerone.com/$repo/core/$arch</nowiki><br />
}}<br />
<br />
Next, add the archzfs maintainer's PGP key to the local trust:<br />
<br />
# pacman-key -r 0EE7A126<br />
# pacman-key --lsign-key 0EE7A126<br />
<br />
Finally, update the pacman databases,<br />
<br />
# pacman -Syy<br />
<br />
==Install needed packages==<br />
<br />
This is also the best time to install your favorite text editor, otherwise nano will have to be used.<br />
<br />
# pacman -S archzfs dosfstools gptfdisk vim<br />
<br />
==Partition the destination drive==<br />
<br />
===UEFI systems===<br />
<br />
Use the cgdisk partition utility and create a GPT partition table:<br />
<br />
Part Size Type<br />
==== ===== =============<br />
1 512M EFI (ef00)<br />
2 512M Ext4 (8300)<br />
2 XXXG Solaris Root (bf00)<br />
<br />
{{Note|The EFI partion will be formatted to FAT32 and contain the UEFI boot loader. The Ext4 partition will contain the boot partition and kernel images.}}<br />
<br />
{{Note|The filesystem type codes for cgdisk are indicated in the parenthesis after the filesystem name.}}<br />
<br />
{{Warning|The EFI partition must be at least 512MB specified by the UEFI standard.}}<br />
<br />
===BIOS systems===<br />
<br />
Part Size Type<br />
==== ===== =============<br />
2 1007K BIOS Boot Partition (ef02)<br />
1 512M Ext4 (8300)<br />
3 XXXG Solaris Root (bf00)<br />
<br />
{{Note|You will have to create the ext4 partition first due to cgdisk's disk alignment policies. Start it at sector 2048 to leave room for the BIOS parition.}}<br />
<br />
==Format the destination disk==<br />
<br />
===UEFI systems===<br />
<br />
Format the EFI partition to FAT32<br />
<br />
mkfs.vfat -F 32 /dev/sda1 -n EFIBOOT<br />
<br />
Format the Ext4 boot partition<br />
<br />
mkfs.ext4 /dev/sda2 -L BOOT<br />
<br />
===BIOS systems===<br />
<br />
Format the Ext4 boot partition<br />
<br />
mkfs.ext4 /dev/sda1 -L BOOT<br />
<br />
{{Note|The boot filesystem is {{ic|sda1}} because of the order we created the partitions}}<br />
<br />
The BIOS partition does not need a filesystem.<br />
<br />
==Setup the ZFS filesystem==<br />
<br />
First, make sure the ZFS modules are loaded,<br />
<br />
# modprobe zfs<br />
<br />
===Create the root zpool===<br />
<br />
# zpool create zroot /dev/disk/by-id/<id-to-partition><br />
<br />
{{Warning|Always use id names when working with ZFS, otherwise import errors will occur.}}<br />
<br />
===Create necessary filesystems===<br />
<br />
If so desired, sub-filesystem mount points such as /home and /root can be created with the following commands:<br />
<br />
# zfs create zroot/home<br />
# zfs create zroot/root<br />
<br />
For safety, unmount all zfs filesystems if they are mounted:<br />
<br />
# zfs umount -a<br />
<br />
===Configure the root filesystem===<br />
<br />
Now it is time to set the mount point of the root filesystem:<br />
<br />
# zfs set mountpoint=/ zroot<br />
<br />
and optionally, any sub-filesystems:<br />
<br />
# zfs set mountpoint=/home zroot/home<br />
# zfs set mountpoint=/root zroot/root<br />
<br />
Set the bootfs property on the descendant root filesystem so the boot loader knows where to find the operating system.<br />
<br />
# zpool set bootfs=zroot zroot<br />
<br />
Export the pool,<br />
<br />
# zpool export zroot<br />
<br />
{{Warning|Don't skip this, otherwise you will be required to use -f when importing your pools. This unloads the imported pool.}}<br />
<br />
Finally, re-import the pool,<br />
<br />
# zpool import -d /dev/disk/by-id -R /mnt zroot<br />
<br />
{{Note|"-d" is not the actual device id, but the /dev/by-id directory containing the symlinks.}}<br />
<br />
If there is an error in this step, you can export the pool to redo the command. The ZFS filesystem is now ready to use.<br />
<br />
==Mount the boot partitions==<br />
<br />
===UEFI systems===<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sda2 /mnt/boot<br />
# mkdir /mnt/boot/efi<br />
# mount /dev/sda1 /mnt/boot/efi<br />
<br />
===BIOS systems===<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sda1 /mnt/boot<br />
<br />
==Install and configure the Arch Linux installation==<br />
<br />
Install the base packages,<br />
<br />
# pacstrap -i /mnt base base-devel archzfs sudo gnupg vim<br />
<br />
Generate the fstab,<br />
<br />
# genfstab -U -p /mnt | grep boot >> /mnt/etc/fstab<br />
<br />
{{Note|ZFS auto mounts its own partitions, so we do not need ZFS partitions in fstab file.}}<br />
<br />
If installing on a UEFI system, you will need to load the efivars kernel module before chrooting into the installation:<br />
<br />
# modprobe efivars<br />
<br />
Chroot into the installation<br />
<br />
# arch-chroot /mnt /bin/bash<br />
<br />
Next, follow the [[Beginners' Guide]] from the "Locale" section to the "Configure Pacman Section". Once done, edit {{ic|pacman.conf}}, add the archzfs repository, and update the pacman database,<br />
<br />
# pacman -Syy<br />
<br />
Re-create the initramfs, edit {{ic|/etc/mkinitcpio.conf}} and add {{ic|zfs}} before filesystems. Also, move {{ic|keyboard}} hook before {{ic|zfs}} so you can type in console if something goes wrong. Remove fsck and then regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
Finally, set root password and add a regular user.<br />
<br />
==Setup the bootloader==<br />
<br />
===UEFI systems===<br />
<br />
Use EFISTUB and rEFInd for the UEFI boot loader. See [[Beginners' Guide#For UEFI motherboards]]. The kernel parameters in refind_linux.conf for zfs should include "zfs=bootfs", or "zfs=zroot", so the system can boot from ZFS. The 'root' and 'rootfstype' parameters aren't needed.<br />
<br />
===BIOS systems===<br />
<br />
Follow the [[Grub2#BIOS_systems_2]] wiki. {{ic|grub-mkconfig}} fails for me, so I edited {{ic|grub.cfg}} manually.<br />
<br />
{{hc|/boot/grub/grub.cfg|<nowiki><br />
set timeout=2<br />
set default=0<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
set root=(hd0,1)<br />
linux /vmlinuz-linux zfs=zroot<br />
initrd /initramfs-linux.img<br />
}<br />
</nowiki><br />
}}<br />
<br />
==Unmount and restart==<br />
<br />
This is it, we are done!<br />
<br />
# exit<br />
# umount /mnt/boot<br />
# zfs umount -a<br />
# zpool export zroot<br />
# reboot<br />
<br />
{{Warning|If you do not properly export the zpool, the pool will refuse to import in the ramdisk environment and you will be stuck at the busybox terminal.}}<br />
<br />
==Troubleshooting==<br />
<br />
If the new installation does not boot because the zpool cannot be imported, you will need to chroot into the installation and properly export the zpool. See [[ZFS#Emergency chroot repair with archzfs]].<br />
<br />
Once inside the chroot environment, load the ZFS module and force import the zpool,<br />
<br />
# zpool import -a -f<br />
<br />
now export the pool:<br />
<br />
# zpool export <pool><br />
<br />
To see your available pools, use,<br />
<br />
# zpool status<br />
<br />
It is necessary to export a pool because of the way ZFS uses the hostid to track the system the zpool was created on. The hostid is generated partly based on your network setup. During the installation in the archiso your network configuration could be different generating a different hostid than the one contained in your new installation. Once the zfs filesystem is exported and then re-imported in the new installation, the hostid is reset. See [http://osdir.com/ml/zfs-discuss/2011-06/msg00227.html Re: Howto zpool import/export automatically? - msg#00227].<br />
<br />
If ZFS complains about "pool may be in use" after every reboot, you should properly export pool as described above, and then rebuild ramdisk in normally booted system:<br />
<br />
# mkinitcpio -p linux<br />
<br />
==See also==<br />
<br />
* [https://github.com/dajhorn/pkg-zfs/wiki/HOWTO-install-Ubuntu-to-a-Native-ZFS-Root-Filesystem HOWTO install Ubuntu to a Native ZFS Root]<br />
* [http://lildude.co.uk/zfs-cheatsheet ZFS Cheatsheet]</div>Seletskiy