https://wiki.archlinux.org/api.php?action=feedcontributions&user=Notasynonym&feedformat=atomArchWiki - User contributions [en]2024-03-29T00:34:24ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=ASUS_N82JV&diff=296693ASUS N82JV2014-02-09T19:09:50Z<p>Notasynonym: </p>
<hr />
<div>[[Category:ASUS]]<br />
<br />
{| style="float:right; border: 1px solid #000;" <br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|- <br />
| Intel || style="color:green" | '''Working''' || xf86-video-intel <br />
|-<br />
| Nvidia || style="color:orange" | '''Partially Working''' || nouveau<br />
|-<br />
| Ethernet || style="color:green" | '''Working''' || atl1c<br />
|-<br />
| Wireless || style="color:green" | '''Working''' || ath9k<br />
|-<br />
| Audio || style="color:green" | '''Working''' || snd_hda_intel<br />
|-<br />
| Touchpad || style="color:green" | '''Working''' ||<br />
|-<br />
| Camera || style="color:green" | '''Working''' || uvcvideo <br />
|-<br />
| USB 3.0 || style="color:green" | '''Working''' || xhci-hcd<br />
|-<br />
| USB 2.0 || style="color:green" | '''Working''' || ehci-hcd<br />
|-<br />
| eSATA || style="color:orange" | '''Untested''' ||<br />
|-<br />
| Card Reader || style="color:green" | '''Working''' || <br />
|-<br />
| Function Keys || style="color:orange" | '''Partially Working''' || <br />
|-<br />
| Suspend to RAM || style="color:green" | '''Working''' || <br />
|}<br />
<br />
=Hardware=<br />
''CPU'' Intel Core i5 430M<br />
<br />
''Mainboard'' | Intel HM55<br />
<br />
''RAM'' 4096 MB, 2x 2048 MByte DDR3-10700 (1066 MHz)<br />
<br />
''Display'' 14" HD LED (1366x768)<br />
<br />
''Graphics adapter'' NVIDIA GeForce GT 335M - 1024 MB, Core: 450 MHz, Memory: 790 MHz, Shader rate: 1080 MHz<br />
<br />
''Soundcard'' Realtek ALC269 @ Intel Ibex Peak PCH<br />
<br />
''Network'' Atheros AR8131 PCI-E Gigabit Ethernet Controller (1000MBit), Atheros AR9285 Wireless Network <br />
<br />
''Hard disk'' 320GB 5400rpm SATA<br />
<br />
''Webcam'' Chicony Electronics<br />
<br />
''Touchpad'' Elantech<br />
<br />
=Configuration=<br />
<br />
My particular model is Asus N82JV-VX038V but the contents of the page should remain valid for every N82JV[http://www.notebookcheck.net/Review-Asus-N82JV-Notebook.29437.0.html] model.<br />
<br />
==CPU==<br />
Works out of the box.<br />
<br />
Follow the [[SpeedStep]] guide to enable speed-stepping.<br />
<br />
==Video==<br />
This laptop sports two gpus. The Intel GMA HD (Core ix integrated) and the Nvidia Geforce GT 335M, with the ability to switch granted by Nvidia Optimus technology.<br />
===Intel===<br />
Follow these guides: [[Xorg]] and [[Intel]]<br />
<br />
No problems detected. VGA out and HDMI working.<br />
<br />
===Nvidia===<br />
The official proprietary Nvidia drivers for linux do not support Nvidia Optimus yet.<br />
<br />
====Switching / Using Nvidia card====<br />
While it still isn't possible to ''switch'' in the manner that Optimus is supposed to switch, in order to make use of the dedicated graphic card you need to use [[Bumblebee]]. In short, '''it is possible to run a specific program with Nvidia''', while the rest of the system is relying on the Intel card. <br />
<br />
{{Note| Bumblebee's development is rapidly progressing, so be sure to check it's website[https://github.com/MrMEEE/bumblebee] regularly; it's also worth checking Linux Hybrid Graphics blog[http://linux-hybrid-graphics.blogspot.com/] and the mailing list[https://lists.launchpad.net/hybrid-graphics-linux/].}} <br />
<br />
====Disabling the Nvidia card====<br />
There's more than one method to do this. Namely with '''vgaswitcheroo''' (not working reliably yet with these cards) and '''acpi_call (AUR[https://aur.archlinux.org/packages.php?ID=39470])''', which is recommended. <br />
{{Note|If you use the AUR version, the steps are different than the ones below, but they are explained during/after install; the scripts can be easily adapted to the new locations, if necessary}}<br />
<br />
=====acpi_call (manual)=====<br />
In order to switch following hack is available[http://linux-hybrid-graphics.blogspot.com/2010/07/using-acpicall-module-to-switch-onoff.html][http://github.com/mkottman/acpi_call].<br />
<br />
''What it is'': A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus).<br />
<br />
Instalation:<br />
<br />
{{bc|git clone http://github.com/mkottman/acpi_call.git<br />
cd acpi_call<br />
make<br />
sudo insmod acpi_call.ko<br />
./test_off.sh}}<br />
<br />
Usage:<br />
<br />
{{bc|# turn off discrete graphics card<br />
echo '\_SB.PCI0.PEG1.GFX0.DOFF' > /proc/acpi/call<br />
# turn it back on<br />
echo '\_SB.PCI0.PEG1.GFX0.DON' > /proc/acpi/call}}<br />
<br />
======Run on Startup======<br />
If you want run it on every startup add these lines to {{ic|/etc/rc.local}} {{Note|Running this without a delay on Kernel 2.6.35.x has problems (Boots fine but X and tty do not show up; to avoid that, simply add {{Ic|<nowiki>sleep <time></nowiki>}} before these lines and remember that sleep affects every line below it. If you mess up or decide to test it, just boot into recovery mode and edit {{ic|/etc/rc.local}} from cli, to either add the delay or remove the lines altogether}}<br />
<br />
{{bc|# Disable Nvidia<br />
insmod <path to acpi_call dir>/acpi_call.ko<br />
echo '\_SB.PCI0.PEG1.GFX0.DOFF' > /proc/acpi/call}}<br />
<br />
If want, you may verify the power usage, on battery, with {{Ic|grep rate /proc/acpi/battery/BAT0/state}}. There should be a difference of about 7500 mW in battery usage.<br />
<br />
======Enable/Disable Scripts======<br />
You can easily create a couple of scripts to enable and disable it.<br />
{{bc|<br />
#/bin/sh<br />
# Disable Nvidia<br />
sudo insmod /home/xehoz/build/acpi_call/acpi_call.ko<br />
echo '\_SB.PCI0.PEG1.GFX0.DOFF' > /proc/acpi/call}}<br />
{{bc|<br />
#/bin/sh<br />
# Enable Nvidia<br />
sudo insmod /home/xehoz/build/acpi_call/acpi_call.ko<br />
echo '\_SB.PCI0.PEG1.GFX0.DON' > /proc/acpi/call}}<br />
{{Ic|chmod +x}} both of them and type {{Ic|sh <name you've given them>}} to use them.<br />
<br />
==Audio==<br />
Follow the official documentation: [[ALSA]] and [[Pulseaudio]]<br />
<br />
{{Note|From my experience [[OSS]] doesn't work}}<br />
<br />
While it outputs sound to the speakers, the headphone jack won't work, and the speakers won't mute when a headphone is plugged in and the integrated mic won't work either. <br />
<br />
In order to fix this, follow these steps.<br />
<br />
1. Install ALSA drivers available at Realtek [http://218.210.127.131/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false]<br />
<br />
{{bc|1=tar xvf LinuxPkg_x.x<br />
tar xvf alsa-driver-1.0.xx<br />
cd alsa-driver-1.0.xx<br />
./configure --with-cards=hda-intel<br />
make<br />
make install}}<br />
<br />
{{Note|Realtek's ALSA drivers, currently 1.0.23-5.15rc5, aren't compiling properly in kernel 2.6.35. As an alternative, download the latest alsa-driver snapshot from here[http://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/alsa-driver/alsa-driver-snapshot.tar.gz] (tested with 01/09/2010 snapshot)}}<br />
<br />
2. Add {{Ic|options snd-hda-intel index<nowiki>=</nowiki>0 model<nowiki>=</nowiki>auto}} to {{ic|/etc/modprobe.d/modprobe.conf}}.<br />
<br />
Open {{ic|/etc/modprobe.d/sound.conf}} and add:<br />
{{bc|alias snd-card-0 snd-hda-intel<br />
alias sound-slot-0 snd-hda-intel}}<br />
<br />
===HDMI===<br />
<br />
Sound through HDMI works, but requires that the sound profile (mixer) be changed manually (not really a problem).<br />
<br />
==Touchpad==<br />
<br />
1. Follow the [[Synaptics]] guide.<br />
<br />
Type {{Ic|xinput list |grep pointer}}. What you want to see:<br />
{{bc|1=⎜ ↳ ETPS/2 Elantech Touchpad id=16 [slave pointer (2)]}}<br />
<br />
However, you'll see that the system is misinterpreting the touchpad for a wheel mouse. This is because this laptop (and so many others recently) is using an Elantech Touchpad. In order to fix it, enter this in the command line:<br />
<br />
{{bc|<nowiki>echo "options psmouse force_elantech=1" | sudo tee -a /etc/modprobe.d/psmouse.conf<br />
sudo rmmod psmouse && sudo modprobe psmouse</nowiki>}}<br />
<br />
Then, open {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}. A bare minimum configuration requires this text:<br />
<br />
{{bc|Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
Option "LeftEdge" "130"<br />
Option "RightEdge" "840"<br />
Option "TopEdge" "130"<br />
Option "BottomEdge" "640"<br />
EndSection}}<br />
<br />
{{Note|While I settled with these coordinates, they may require tuning: [[Touchpad Synaptics#Synclient]].}}<br />
<br />
===Working 10-synaptics.conf===<br />
<br />
Here's a fully working 10-synaptics.conf with Edge Scrolling, Two Finger Scrolling and with middle mouse click (LTCornerButton and RTCornerButton) on the top corners activated. Circular Scrolling works, but it's deactivated.<br />
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
Option "SHMConfig" "on"<br />
Option "LeftEdge" "130"<br />
Option "RightEdge" "840"<br />
Option "TopEdge" "130"<br />
Option "BottomEdge" "640"<br />
Option "VertEdgeScroll" "on"<br />
Option "HorizEdgeScroll" "on"<br />
Option "CornerCoasting" "on"<br />
Option "CoastingSpeed" "0.30"<br />
Option "VertTwoFingerScroll" "on"<br />
Option "HorizTwoFingerScroll" "on"<br />
Option "CircularScrolling" "off"<br />
Option "CricularTrigger" "0"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "2"<br />
Option "TapButton3" "3"<br />
Option "LTCornerButton" "2"<br />
Option "RTCornerButton" "2"<br />
EndSection}}<br />
<br />
==Suspend to RAM==<br />
<br />
{{Note|As far as I can tell, there is a general problem with USB 3.0 and suspending at the kernel level.}}<br />
{{Note|This is section was written in kernel 2.6.36.2-1 and with the packages available on 18th December.}}<br />
<br />
I achieved Suspension to RAM by using pm-utils with either the uswsusp and kernel method.<br />
<br />
1. Follow the [[pm-utils]] article . It is quite extense and can be confusing, but, if I recall, this is the very minimum of what is needed to do:<br />
<br />
1.1 Type {{Ic|pacman -S pm-utils uswsusp}}<br />
<br />
1.2 To a file inside {{ic|/etc/pm/config.d/}}, add:<br />
{{bc|1=SLEEP_MODULE="uswsusp"<br />
#SLEEP_MODULE="kernel"<br />
HIBERNATE_MODE="shutdown"}}<br />
<br />
1.3 Add the {{Ic|resume}} hook to {{ic|/etc/mkinitcpio.conf}}, before filesystems.<br />
{{bc|1=HOOKS="base udev autodetect block resume filesystems"}}<br />
<br />
1.4 Rebuild the initrd image with {{Ic|mkinitcpio -p linux}}.<br />
<br />
Now, to the hardware specific part.<br />
2. Add {{bc|1=SUSPEND_MODULES="xhci-hcd ehci-hcd"}} to {{ic|/etc/pm/config.d/usb3-suspend-workaround}}.<br />
<br />
After a surge of updates, somewhere on the end of November/start of December (bug report), suspend to ram only works if nouveau is explicitly disabled in rc.conf. Since nouveau isn't related to the ability to power the nvidia card off, powering it off is still possible, even after <br />
disabling that module.<br />
<br />
3. Add {{Ic|!nouveau}} to the {{Ic|MODULES}} line in {{ic|rc.conf}}. It should look like this:<br />
{{bc|1=MODULES=(fuse acpi-cpufreq cpufreq_ondemand cpufreq_powersave !snd-pcm-oss vboxdrv !nouveau)}}<br />
<br />
=Webcam=<br />
<br />
Working, since version v4l-utils 0.8.1-1 (in previous versions the picture was upside down).<br />
<br />
{{bc|<nowiki>$ lsusb |grep Chicony<br />
Bus 002 Device 003: ID 04f2:b1bb Chicony Electronics Co., Ltd</nowiki>}}<br />
<br />
=Function Keys=<br />
<br />
Most of them do work. Exceptions are the multimedia player commands (fn+arrows), fn+c, fn+v and fn+F9 (which should disable the touchpad). It should be possible to have them all working by following [[Extra Keyboard Keys]].</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Awesome&diff=290788Awesome2013-12-29T13:35:48Z<p>Notasynonym: </p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Dynamic WMs]]<br />
[[Category:Tiling WMs]]<br />
[[cs:Awesome]]<br />
[[es:Awesome]]<br />
[[fr:Awesome3]]<br />
[[it:Awesome]]<br />
[[ja:Awesome]]<br />
[[ko:Awesome]]<br />
[[ru:Awesome]]<br />
[[sv:Awesome]]<br />
[[zh-CN:Awesome]]<br />
From the [[Wikipedia:awesome (window manager)|awesome]] website:<br />
<br />
"''[http://awesome.naquadah.org/ awesome] is a highly configurable, next generation framework window manager for X. It is very fast, extensible and licensed under the GNU GPLv2 license.''<br />
<br />
''It is primarly targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on its graphical environment.''"<br />
<br />
==Installation==<br />
<br />
Install {{pkg|awesome}} from the [[official repositories]].<br />
<br />
For pre-release versions, an {{aur|awesome-git}} build is in the [[Arch User Repository|AUR]]. These versions are not considered stable and may have a different configuration syntax.<br />
<br />
== Run awesome ==<br />
<br />
=== Without login manager ===<br />
To run awesome without a login manager, simply add {{Ic|exec awesome}} to the startup script of your choice (e.g. ~/.xinitrc.)<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
You can also start awesome as preferred user without even logging in. See [[Start X at Login]].<br />
<br />
=== With login manager ===<br />
To start awesome from a login manager, see [[Display Manager|this article]].<br />
<br />
==== GDM, LightDM, others using /usr/share/xsessions/ ====<br />
<br />
Awesome automatically installs a config file for these display managers. You don't need to do anything special to see awesome offered at login.<br />
<br />
==== KDM ====<br />
<br />
Create as root:<br />
{{hc|/usr/share/apps/kdm/sessions/awesome.desktop|2=<br />
[Desktop Entry]<br />
Name=Awesome<br />
Comment=Tiling Window Manager<br />
Type=Application<br />
Exec=/usr/bin/awesome<br />
TryExec=/usr/bin/awesome<br />
}}<br />
<br />
==Configuration==<br />
Awesome includes some good default settings right out of the box, but sooner or later you'll want to change something. The lua based configuration file is at {{Ic|~/.config/awesome/rc.lua}}.<br />
<br />
===Creating the configuration file===<br />
First, run the following to create the directory needed in the next step:<br />
$ mkdir -p ~/.config/awesome/<br />
<br />
Whenever compiled, awesome will attempt to use whatever custom settings are contained in ~/.config/awesome/rc.lua. This file is not created by default, so we must copy the template file first:<br />
$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/<br />
<br />
The syntax of the configuration often changes when awesome updates. So, remember to repeat the command above when you get something strange with awesome, or you'd like to modify the configuration.<br />
<br />
For more information about configuring awesome, check out the [http://awesome.naquadah.org/wiki/Awesome_3_configuration configuration page at awesome wiki]<br />
<br />
===More configuration resources===<br />
{{Note|The syntax of awesome configuration changes regularly, so you will likely have to modify any file you download.}}<br />
<br />
Some good examples of rc.lua would be as follows:<br />
<br />
* http://git.sysphere.org/awesome-configs/tree/ - Awesome 3.4 configurations from Adrian C. (anrxc).<br />
* http://pastebin.com/f6e4b064e - Darthlukan's awesome 3.4 configuration. <br />
* http://www.ugolnik.info/downloads/awesome/rc.lua - Awesome 3.1 configuration with small titlebar and statusbar.<br />
* https://github.com/setkeh/Awesome - [[User:Setkeh|Setkeh]]'s 3.4 Configuration.<br />
* https://github.com/setkeh/Awesome-Laptop-3.5 - [[User:Setkeh|Setkeh]]'s 3.5 Configuration.<br />
* http://awesome.naquadah.org/wiki/User_Configuration_Files - Collection of user configurations on the awesome homepage.<br />
<br />
===Debugging rc.lua===<br />
<br />
====Using Xephyr====<br />
[https://www.archlinux.org/packages/?q=xephyr Xephyr] allows you to run X nested in another X's client window. This allows you to debug rc.lua without breaking your current desktop. Start by copying rc.lua into a new file (e.g. rc.lua.new), and modify it as needed. Then run new instance of awesome in Xephyr, supplying rc.lua.new as a config file like this:<br />
<br />
$ Xephyr :1 -ac -br -noreset -screen 1152x720 &<br />
$ DISPLAY=:1.0 awesome -c ~/.config/awesome/rc.lua.new<br />
<br />
The advantage of this approach is that if you introduce bugs you do not break your current awesome desktop, potentially crashing X apps and losing work. Once you are happy with the new configuration, copy rc.lua.new to rc.lua and restart awesome.<br />
<br />
====Using awmtt====<br />
{{aur|awmtt}} (Awesome WM Testing Tool) is an easy to use wrapper script around Xephyr. By default, it will use ~/.config/awesome/rc.lua.test. If it can't find that test file, it will use your actual rc.lua. You can also specify the location of the configuration file you want to test:<br />
$ awmtt start --config=~/.config/awesome/rc.lua.new<br />
<br />
When you are done testing, close the window with:<br />
<br />
$ awmtt stop<br />
<br />
Or immediately see the changes you're doing to the configuration file by issuing:<br />
<br />
$ awmtt restart<br />
<br />
===Changing Keyboard Layout===<br />
<br />
If it were necessary for someone to need a different keyboard layout [qwerty -> dvorak] there are methods for such listed [http://awesome.naquadah.org/wiki/Change_keyboard_maps#Display.2Fchange_keyboard_map here on the awesome wiki].<br />
<br />
==Themes==<br />
<br />
[http://awesome.naquadah.org/wiki/Beautiful Beautiful] is a lua library that allows you to theme awesome using an external file, it becomes very easy to dynamically change your whole awesome colours and wallpaper without changing your {{ic|rc.lua}}. <br />
<br />
The default theme is at {{ic|/usr/share/awesome/themes/default}}. Copy it to {{ic|~/.config/awesome/themes/default}} and change {{ic|theme_path}} in {{ic|rc.lua}}. <br />
beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua")<br />
<br />
More details [http://awesome.naquadah.org/wiki/Beautiful here]<br />
<br />
A few sample [http://awesome.naquadah.org/wiki/Beautiful_themes themes]<br />
<br />
===Setting up your wallpaper===<br />
<br />
Beautiful can handle your wallpaper, thus you do not need to set it up in your {{ic|.xinitrc}} or {{ic|.xsession}} files. This allows you to have a specific wallpaper for each theme.<br />
<br />
====version <3.5 (out of date)====<br />
<br />
If you take a look at the default theme file you'll see a wallpaper_cmd key, the given command is executed when {{ic|beautiful.init}}("path_to_theme_file") is run. You can put here you own command or remove/comment the key if you do not want Beautiful to interfere with your wallpaper business.<br />
<br />
For instance, if you use {{ic|awsetbg}} to set your wallpaper, you can write in the {{ic|theme.lua}} page that you just selected:<br />
<br />
theme.wallpaper_cmd = { "awsetbg -f .config/awesome/themes/awesome-wallpaper.png" }<br />
<br />
{{Note|For awsetbg to work you need to have a program that can manage desktop backgrounds installed. For example '''[[Feh]]'''.}}<br />
<br />
====version >= 3.5====<br />
<br />
With version 3.5 Awesome no longer provides a awsetbg command, instead it has a gears module. You can set your wallpaper inside {{ic|theme.lua}} with <br />
<br />
theme.wallpaper = "~/.config/awesome/themes/awesome-wallpaper.png" <br />
<br />
To load the wallpaper, make sure your {{ic|rc.lua}} contains<br />
<br />
beautiful.init("~/.config/awesome/themes/default/theme.lua")<br />
for s = 1, screen.count() do<br />
gears.wallpaper.maximized(beautiful.wallpaper, s, true)<br />
end<br />
<br />
====Random Background Image====<br />
<br />
add this to your {{ic|rc.lua}}(for awesome >= 3.5 ):<br />
{{bc|1=<br />
-- configuration - edit to your liking<br />
wp_index = 1<br />
wp_timeout = 10<br />
wp_path = "/path/to/wallpapers/"<br />
wp_files = { "01.jpg", "02.jpg", "03.jpg" }<br />
<br />
-- setup the timer<br />
wp_timer = timer { timeout = wp_timeout }<br />
wp_timer:connect_signal("timeout", function()<br />
<br />
-- set wallpaper to current index for all screens<br />
for s = 1, screen.count() do<br />
gears.wallpaper.maximized(wp_path .. wp_files[wp_index], s, true)<br />
end<br />
<br />
-- stop the timer (we don't need multiple instances running at the same time)<br />
wp_timer:stop()<br />
<br />
-- get next random index<br />
wp_index = math.random( 1, #wp_files)<br />
<br />
--restart the timer<br />
wp_timer.timeout = wp_timeout<br />
wp_timer:start()<br />
end)<br />
<br />
-- initial start when rc.lua is first run<br />
wp_timer:start()<br />
}}<br />
<br />
to automatically fetch images from a given directory you might want instead to add this to your {{ic|rc.lua}}(for awesome >= 3.5 ):<br />
{{bc|1=<br />
-- {{{ Function definitions<br />
<br />
-- scan directory, and optionally filter outputs<br />
function scandir(directory, filter)<br />
local i, t, popen = 0, {}, io.popen<br />
if not filter then<br />
filter = function(s) return true end<br />
end<br />
print(filter)<br />
for filename in popen('ls -a "'..directory..'"'):lines() do<br />
if filter(filename) then<br />
i = i + 1<br />
t[i] = filename<br />
end<br />
end<br />
return t<br />
end<br />
<br />
-- }}}<br />
<br />
-- configuration - edit to your liking<br />
wp_index = 1<br />
wp_timeout = 10<br />
wp_path = "/path/to/wallpapers/"<br />
wp_filter = function(s) return string.match(s,"%.png$") or string.match(s,"%.jpg$") end<br />
wp_files = scandir(wp_path, wp_filter)<br />
<br />
-- setup the timer<br />
wp_timer = timer { timeout = wp_timeout }<br />
wp_timer:connect_signal("timeout", function()<br />
<br />
-- set wallpaper to current index for all screens<br />
for s = 1, screen.count() do<br />
gears.wallpaper.maximized(wp_path .. wp_files[wp_index], s, true)<br />
end<br />
<br />
-- stop the timer (we don't need multiple instances running at the same time)<br />
wp_timer:stop()<br />
<br />
-- get next random index<br />
wp_index = math.random( 1, #wp_files)<br />
<br />
--restart the timer<br />
wp_timer.timeout = wp_timeout<br />
wp_timer:start()<br />
end)<br />
<br />
-- initial start when rc.lua is first run<br />
wp_timer:start()<br />
}}<br />
<br />
To rotate the wallpapers randomly, just comment the {{ic|wallpaper_cmd}} line above, and add a script into your {{ic|.xinitrc}} with the codes below(for awesome <= 3.4 ):<br />
{{bc|<br />
while true;<br />
do<br />
awsetbg -r <path/to/the/directory/of/your/wallpapers><br />
sleep 15m<br />
done &<br />
}}<br />
<br />
==Tips & Tricks==<br />
Feel free to add any tips or tricks that you would like to pass on to other awesome users.<br />
<br />
===Use awesome as GNOME's window manager===<br />
GNOME has the advantage of being very "ready to use" and integrating. You can set up GNOME to use awesome as the visual interface, but have GNOME work in the background for your pleasure. If you are using GNOME 3, you can simply install the {{AUR|awesome-gnome}} package, then when logging in with GDM, choose the session type "Awesome GNOME". See the [http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome awesome wiki] for details.<br />
<br />
===Expose effect like compiz===<br />
{{out of date | Revelation has been marked as deprecated in the awesome wiki and the repository may be deleted at any time.}}<br />
Revelation brings up a view of all your open clients; left-clicking a client pops to the first tag that client is visible on and raises/focuses the client. In addition, the Enter key pops to the currently focused client, and Escape aborts. <br />
<br />
http://awesome.naquadah.org/wiki/Revelation<br />
<br />
===Hide / show wibox in awesome 3===<br />
<br />
To map Modkey-b to hide/show default statusbar on active screen (as default in awesome 2.3), add to your ''globalkeys'' in rc.lua:<br />
<br />
awful.key({ modkey }, "b", function ()<br />
mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible<br />
end),<br />
<br />
===Enable printscreens===<br />
<br />
To enable printscreens in awesome through the PrtScr button you need to have a screen capturing program, e.g. [[Taking_a_Screenshot#scrot|scrot]]. See [[Taking a Screenshot]] for more options.<br />
<br />
Next of we need to get the key name for PrtScr, most often this is named "Print" but one can never be too sure.<br />
<br />
So we can run xev (found in {{pkg|xorg-xev}}) to find out:<br />
# xev<br />
<br />
And press the PrtScr button, the output should be something like:<br />
KeyPress event ....<br />
root 0x25c, subw 0x0, ...<br />
state 0x0, keycode 107 (keysym 0xff61, '''Print'''), same_screen YES,<br />
....<br />
<br />
In my case as you see, the keyname is Print.<br />
<br />
Now to the configuration of awesome!<br />
<br />
Somewhere in your globalkeys array (doesn't matter where) type:<br />
<br />
Lua code:<br />
<br />
awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/screenshots/ 2>/dev/null'") end),<br />
<br />
Also, this function saves screenshots inside ~/screenshots/, edit this to fit your needs.<br />
<br />
===Dynamic tagging===<br />
<br />
[http://awesome.naquadah.org/wiki/Eminent Eminent] is a small lua library that monkey-patches awful to provide you with effortless and quick wmii-style dynamic tagging. Unlike shifty, eminent does not aim to provide a comprehensive tagging system, but tries to make dynamic tagging as simple as possible. In fact, besides importing the eminent library, you do not have to change your rc.lua at all, eminent does all the work for you.<br />
<br />
[http://awesome.naquadah.org/wiki/Shifty Shifty] is an Awesome 3 extension that implements dynamic tagging. It also implements fine client matching configuration allowing YOU to be the master of YOUR desktop only by setting two simple config variables and some keybindings!<br />
<br />
===Space Invaders===<br />
[http://awesome.naquadah.org/wiki/Space_Invaders Space Invaders] is a demo to show the possibilities of the Awesome Lua API.<br />
<br />
Please note that it is no longer included in the Awesome package since the 3.4-rc1 release.<br />
<br />
===Naughty for popup notification===<br />
See [http://awesome.naquadah.org/wiki/Naughty the awesome wiki page on naughty].<br />
<br />
===Popup Menus===<br />
There's a simple menu by default in awesome3, and customed menus seem very easy now. However, if you're using 2.x awesome, have a look at ''[http://awesome.naquadah.org/wiki/Awful.menu awful.menu]''.<br />
<br />
If you want a freedesktop.org menu, you could take a look at ''[https://github.com/terceiro/awesome-freedesktop awesome-freedesktop]'' .<br />
<br />
An example for awesome3:<br />
{{bc|1=<br />
myawesomemenu = {<br />
{ "lock", "xscreensaver-command -activate" },<br />
{ "manual", terminal .. " -e man awesome" },<br />
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },<br />
{ "restart", awesome.restart },<br />
{ "quit", awesome.quit }<br />
}<br />
<br />
mycommons = {<br />
{ "pidgin", "pidgin" },<br />
{ "OpenOffice", "soffice-dev" },<br />
{ "Graphic", "gimp" }<br />
}<br />
<br />
mymainmenu = awful.menu.new({ items = { <br />
{ "terminal", terminal },<br />
{ "icecat", "icecat" },<br />
{ "Editor", "gvim" },<br />
{ "File Manager", "pcmanfm" },<br />
{ "VirtualBox", "VirtualBox" },<br />
{ "Common App", mycommons, beautiful.awesome_icon },<br />
{ "awesome", myawesomemenu, beautiful.awesome_icon }<br />
}<br />
})<br />
}}<br />
<br />
===More Widgets in awesome===<br />
''Widgets in awesome are objects that you can add to any widget-box (statusbars and titlebars), they can provide various information about your system, and are useful for having access to this information, right from your window manager. Widgets are simple to use and offer a great deal of flexibility.'' -- Source [http://awesome.naquadah.org/wiki/Widgets_in_awesome Awesome Wiki: Widgets].<br />
<br />
There's a widely used widget library called '''Wicked''' (compatible with awesome versions '''prior to 3.4'''), that provides more widgets, like MPD widget, CPU usage, memory usage, etc. For more details see the [http://awesome.naquadah.org/wiki/Wicked Wicked page].<br />
<br />
As a replacement for Wicked in awesome v3.4 check '''[http://awesome.naquadah.org/wiki/Vicious Vicious]''', '''[http://awesome.naquadah.org/wiki/Obvious Obvious]''' and '''[http://awesome.naquadah.org/wiki/Bashets Bashets]'''. If you pick vicious, you should also take a good look at [http://git.sysphere.org/vicious/tree/README vicious documentation].<br />
<br />
===Transparency===<br />
Awesome has support for true transparency through a [[Xorg#Composite | compositing manager]] such as {{Pkg|xcompmgr}}({{AUR|xcompmgr-git}}), compton({{AUR|compton-git}}) or {{AUR|cairo-compmgr-git}}.<br />
<br />
To use xcompmgr, add this to your {{ic|~/.xinitrc}}:<br />
xcompmgr &<br />
See ''man xcompmgr'' or [[xcompmgr]] for more options.<br />
<br />
{{Note|Some users have seen strange behavior such as windows not touching the bottom when enabling composite. To fix this problem, install {{AUR|unagi}} from the [[AUR]] and add this to your {{ic|~/.xinitrc}}:<br />
unagi &<br />
}}<br />
<br />
{{out of date | Awesome 3.5 has come and add_signal API has changed to connect_signal}}<br />
In awesome 3.4, window transparency can be set dynamically using signals. For example, your rc.lua could contain the following:<br />
<br />
client.add_signal("focus", function(c)<br />
c.border_color = beautiful.border_focus<br />
c.opacity = 1<br />
end)<br />
client.add_signal("unfocus", function(c)<br />
c.border_color = beautiful.border_normal<br />
c.opacity = 0.7<br />
end)<br />
'''If you got error messages about add_signal, use connect_signal instead.''' <br />
<br />
Note that if you are using conky, you must set it to create its own window instead of using the desktop. To do so, edit ~/.conkyrc to contain:<br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_type desktop<br />
<br />
Otherwise strange behavior may be observed, such as all windows becoming fully transparent. Note also that since conky will be creating a transparent window on your desktop, any actions defined in awesome's rc.lua for the desktop will not work where conky is.<br />
<br />
As of Awesome 3.1, there is built-in pseudo-transparency for wiboxes. To enable it, append 2 hexadecimal digits to the colors in your theme file (~/.config/awesome/themes/default, which is usually a copy of /usr/share/awesome/themes/default), like shown here:<br />
<br />
bg_normal = #000000AA<br />
<br />
where "AA" is the transparency value.<br />
<br />
To change transparency for the actual selected window by pressing Modkey + PageUp/PageDown you can also use tansset-df available through the community package repository and the following modification to your rc.lua:<br />
<br />
globalkeys = awful.util.table.join(<br />
-- your keybindings<br />
[...]<br />
awful.key({ modkey }, "Next", function (c)<br />
awful.util.spawn("transset-df --actual --inc 0.1")<br />
end),<br />
awful.key({ modkey }, "Prior", function (c)<br />
awful.util.spawn("transset-df --actual --dec 0.1")<br />
end),<br />
-- Your other key bindings<br />
[...]<br />
)<br />
<br />
==== ImageMagick ====<br />
You may have problems if you set your wallpaper with imagemagick's ''display'' command, it doesn't work well with xcompmgr. Please note that awsetbg may be using ''display'' if it doesn't have any other options. Installing habak, feh, hsetroot or whatever should fix the problem (''grep -A 1 wpsetters /usr/bin/awsetbg'' to see your options).<br />
<br />
===Autorun programs===<br />
''See also [https://awesome.naquadah.org/wiki/Autostart the Autostart page on the Awesome wiki].''<br />
<br />
awesome doesn't run programs set to autostart by the Freedesktop specification like GNOME or KDE. However, awesome does provide a few functions for starting programs (in addition to the Lua standard library function {{Ic|os.execute}}). To run the same programs on startup as GNOME or KDE, you can install {{AUR|dex-git}} from the [[AUR]] and then run that in your rc.lua:<br />
<br />
os.execute"dex -a -e Awesome"<br />
<br />
If you just want to set up a list of apps for awesome to launch at startup, you can create a table of all the commands you want to spawn and loop through it:<br />
<br />
do<br />
local cmds = <br />
{ <br />
"swiftfox",<br />
"mutt",<br />
"consonance",<br />
"linux-fetion",<br />
"weechat-curses",<br />
--and so on...<br />
}<br />
<br />
for _,i in pairs(cmds) do<br />
awful.util.spawn(i)<br />
end<br />
end<br />
<br />
(You could also run calls to {{Ic|os.execute}} with commands ending in '{{Ic|&}}', but it's probably a better idea to stick to the proper spawn function.)<br />
<br />
To run a program only if it is not currently running, you can spawn it with a shell command that runs the program only if {{Ic|pgrep}} doesn't find a running process with the same name:<br />
function run_once(prg)<br />
awful.util.spawn_with_shell("pgrep -u $USER -x " .. prg .. " || (" .. prg .. ")")<br />
end<br />
<br />
So, for example, to run {{Ic|parcellite}} only if there is not a {{Ic|parcellite}} process already running:<br />
<br />
run_once("parcellite")<br />
<br />
===Passing content to widgets with awesome-client===<br />
<br />
You can easily send text to an awesome widget. Just create a new widget:<br />
{{bc|<nowiki><br />
mywidget = widget({ type = "textbox", name = "mywidget" })<br />
mywidget.text = "initial text"<br />
</nowiki>}}<br />
To update the text from an external source, use awesome-client:<br />
{{bc|<nowiki> <br />
echo -e 'mywidget.text = "new text"' | awesome-client<br />
</nowiki>}}<br />
Don't forget to add the widget to your wibox.<br />
<br />
===Using a different panel with awesome===<br />
<br />
If you like awesome's lightweightness and functionality but do not like the way its default panel looks, you can install a different panel. Just install xfce4-panel by issuing:<br />
{{bc|<br />
sudo pacman -S xfce4-panel<br />
}}<br />
Of course any other panel will do as well. <br />
Then add it to autorun section of your rc.lua (how to do that is written elsewhere on this wiki). You can also comment out the section which creates wiboxes for each screen (starting from "mywibox[s] = awful.wibox({ position = "top", screen = s })" ) but it isn't necessary. Any way do not forget to check your rc.lua for errors by typing <br />
{{bc|<br />
awesome -k rc.lua<br />
}}<br />
Also you should change your "modkey+R" keybinding, in order to start some other application launcher instead of built in awesome. Xfrun4, bashrun, etc. Check the Application launchers section of [[Openbox_Themes_and_Apps#Application_launchers|Openbox]] article for examples. Don't forget to add<br />
{{bc|<nowiki><br />
properties = { floating = true } },<br />
{ rule = { instance = "$yourapplicationlauncher" },<br />
</nowiki>}}<br />
to your rc.lua.<br />
<br />
===Fix Java (GUI appears gray only)===<br />
Guide taken from [https://bbs.archlinux.org/viewtopic.php?pid=450870].<br />
#Install {{Pkg|wmname}} from community<br />
#Run the following command or add it to your {{ic|.xinitrc}}: {{bc|wmname LG3D}}<br />
<br />
{{Note|<br />
If you use a non-reparenting window manager and Java 6, you should uncomment the corresponding line in {{Ic|/etc/profile.d/openjdk6.sh}}<br />
<br />
If you use a non-reparenting window manager and Java 7, you should uncomment the corresponding line in <br />
{{Ic|/etc/profile.d/jre.sh}} <br />
}}<br />
<br />
{{Note|<br />
As of Java 1.7 and Awesome 3.5 (as installed by the awesome-git package) the fixes described above may cause undesirable behaviour related to menus not receiving proper focus. Awesome is now, apparently, a reparenting window manager as of [http://git.naquadah.org/?p&#61;awesome.git;a&#61;commit;h&#61;102063dbbdfb0bc9f43268d98f7dcb5269547395 this commit]. <br />
<br />
If you are experiencing problems having applied the 'wmname' and '_JAVA_AWT_WM_NONREPARENTING' fixes against a recent Java and Awesome, try removing both fixes.<br />
}}<br />
<br />
===Prevent Nautilus from displaying the desktop (Gnome3)===<br />
Run dconf-editor. Navigate to org->gnome->desktop->background and uncheck "draw-background" as well as "show-desktop-icons" for good measure. That's it!<br />
<br />
Another option is moving /usr/bin/nautilus to a new location and replacing it with a script that runs 'nautilus --no-desktop' passing any arguments it receives along.<br />
<br />
#!/bin/sh<br />
/usr/bin/nautilus-real --no-desktop $@<br />
<br />
===Transitioning away from Gnome3===<br />
Run 'gnome-session-properties' and remove programs that you won't be needing anymore (e.g Bluetooth Manager, Login Sounds, etc).<br />
<br />
If you'd like to get rid of GDM, make sure that your rc.conf DAEMONS list includes "dbus" (and "cupsd" if you have a printer). It's advisable to get a different login manager (like [[SLiM|SLiM]]), but you can do things manually if you wish. That entails setting up your [[Udev|.xinitrc properly]] and installing something like {{AUR|devmon}}.<br />
<br />
If you want to keep a few convenient systray applets and your GTK theme, append this to your rc.lua;<br />
function start_daemon(dae)<br />
daeCheck = os.execute("ps -eF | grep -v grep | grep -w " .. dae)<br />
if (daeCheck ~= 0) then<br />
os.execute(dae .. " &")<br />
end<br />
end<br />
<br />
procs = {"gnome-settings-daemon", "nm-applet", "kupfer", "gnome-sound-applet", "gnome-power-manager"}<br />
for k = 1, #procs do<br />
start_daemon(procs[k])<br />
end<br />
<br />
===Prevent the mouse scroll wheel from changing tags===<br />
In your rc.lua, change the Mouse Bindings section to the following;<br />
-- {{{ Mouse bindings<br />
root.buttons(awful.util.table.join(<br />
awful.button({ }, 3, function () mymainmenu:toggle() end)))<br />
-- }}}<br />
<br />
===Application directories in menubar===<br />
<br />
The awesome package in [community] includes [http://awesome.naquadah.org/wiki/Menubar/3.5 menubar] (by default, pressing modkey+p will open a dmenu-like applications menu at the top of the screen). However, it only searches for .desktop files in /usr/share/applications and /usr/local/share/applications (the latter of which may not exist on most Arch users' systems). To change this, add the following line to rc.lua (ideally, under the "Menubar configuration" section):<br />
<br />
app_folders = { "/usr/share/applications/", "~/.local/share/applications/" }<br />
<br />
Note that the {{ic|.desktop}} files are re-read each time awesome starts, thereby slowing down the startup. If you prefer other means of launching programs, the menubar can be disabled via {{ic|rc.lua}} by removing {{ic|local menubar &#61; require("menubar")}} and other references to the {{ic|menubar}} variable.<br />
<br />
===Applications menu===<br />
<br />
If you prefer to see a more traditional applications menu when you click on the Awesome icon, or right-click on an empty area of the desktop, you can follow the instructions in [[Xdg-menu#Awesome]]. However this menu is not updated when you add or remove programs. So, be sure to run the command to update your menu. It may look something like:<br />
xdg_menu --format awesome --root-menu /etc/xdg/menus/arch-applications.menu >~/.config/awesome/archmenu.lua<br />
<br />
==Troubleshooting==<br />
<br />
===Grey Java GUIs===<br />
Some Java Applications may render just grey, empty windows. This is related to nonreparenting.<br />
<br />
A fix might be uncommenting the last line in /etc/profile.d/jre.sh or set this manually.<br />
<br />
export _JAVA_AWT_WM_NONREPARENTING=1<br />
<br />
other Methods could be found here: http://awesome.naquadah.org/wiki/Problems_with_Java<br />
<br />
===LibreOffice===<br />
If you encounter UI problems with libreoffice install libreoffice-gnome.<br />
<br />
===Mod4 key===<br />
<br />
The Mod4 is by default the '''Win key'''. If it's not mapped by default, for some reason, you can check the keycode of your Mod4 key with<br />
<br />
$ xev<br />
<br />
It should be 115 for the left one. Then add this to your ~/.xinitrc<br />
<br />
xmodmap -e "keycode 115 = Super_L" -e "add mod4 = Super_L"<br />
exec awesome<br />
<br />
The problem in this case is that some xorg installations recognize keycode 115, but incorrectly as the 'Select' key. The above command explictly remaps keycode 115 to the correct 'Super_L' key.<br />
<br />
====Mod4 key vs. IBM ThinkPad users====<br />
<br />
IBM ThinkPads do not come equipped with a Window key (although Lenovo have changed this tradition on their ThinkPads). As of writing, the Alt key is not used in command combinations by the default rc.lua (refer to the Awesome wiki for a table of commands), which allows it be used as a replacement for the Super/Mod4/Win key. To do this, edit your rc.lua and replace:<br />
<br />
modkey = "Mod4"<br />
<br />
by:<br />
<br />
modkey = "Mod1"<br />
<br />
Note: Awesome does a have a few commands that make use of Mod4 plus a single letter. Changing Mod4 to Mod1/Alt could cause overlaps for some key combinations. The small amount of instances where this happens can be changed in the rc.lua file.<br />
<br />
If you do not like to change the awesome standards, you might like to remap a key. For instance the caps lock key is rather useless (for me) adding the following contents to ~/.Xmodmap <br />
<br />
clear lock <br />
add mod4 = Caps_Lock<br />
<br />
and run {{ic|xmodmap ~/.Xmodmap}} to (re)load the file.<br />
This will change the caps lock key into the mod4 key and works nicely with the standard awesome settings. In addition, if needed, it provides the mod4 key to other X-programs as well.<br />
<br />
Not confirmed, but if recent updates of xorg related packages break mentioned remapping the second line can be replaced by (tested on a DasKeyboard with no left Super key):<br />
<br />
keysym Caps_Lock = Super_L Caps_Lock<br />
<br />
===Eclipse: cannot resize/move main window===<br />
If you get stuck and cannot move or resize the main window (using mod4 + left/right mouse button) edit the workbench.xml and set fullscreen/maximized to false (if set) and reduce the width and height to numbers smaller than your single screen desktop area.<br />
{{Note|workbench.xml can be found in: <eclipse_workspace>/.metadata/.plugins/org.eclipse.ui.workbench/ and the line to edit is <window height&#61;"xx" maximized&#61;"true" width&#61;"xx" x&#61;"xx" y&#61;"xx">.}}<br />
<br />
===YouTube: fullscreen appears in background===<br />
[https://bbs.archlinux.org/viewtopic.php?pid=1085494#p1085494] If YouTube videos appear underneath your web browser when in fullscreen mode, or underneath the panel with controls hidden, add this to your rc.lua<br />
<br />
{ rule = { instance = "plugin-container" },<br />
properties = { floating = true } },<br />
<br />
With Chromium add<br />
<br />
{ rule = { instance = "exe" },<br />
properties = { floating = true } },<br />
<br />
===Starting console clients on specific tags===<br />
It does not work when the console application is invoked from a GTK terminal (e.g. LXTerminal). [[URxvt]] is known to work. <br />
<br />
===Redirecting console output to a file===<br />
Some GUI application are very verbose when launched from a terminal. As a consequence, when started from Awesome, they output everything to the TTY from where Awesome was started, which tend to get messy. To remove the garbage output, you have to redirect it. However, the {{ic|awful.util.spawn}} function does not handle pipes and redirections very well as stated in [http://awesome.naquadah.org/wiki/FAQ#How_to_execute_a_shell_command.3F the official FAQ].<br />
<br />
As example, let's redirect [[Luakit]] output to a temporary file:<br />
<br />
awful.key({ modkey, }, "w", function () awful.util.spawn_with_shell("luakit 2>>/tmp/luakit.log") end),<br />
<br />
Also from the official FAQ, here's an easy way to redirect AwesomeWMs own output:<br />
exec /usr/bin/awesome >> ~/.cache/awesome/stdout 2>> ~/.cache/awesome/stderr<br />
<br />
==External Links==<br />
* http://awesome.naquadah.org/wiki/FAQ - FAQ<br />
* http://www.lua.org/pil/ - Programming in Lua (first edition)<br />
* http://awesome.naquadah.org/ - The official awesome website<br />
* http://awesome.naquadah.org/wiki/Main_Page - the awesome wiki<br />
* http://www.penguinsightings.org/desktop/awesome/ - A review<br />
* https://bbs.archlinux.org/viewtopic.php?id=88926 - share your awesome!</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=KDE&diff=290616KDE2013-12-28T00:57:29Z<p>Notasynonym: </p>
<hr />
<div>[[Category:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE_Masaüstü_Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|Plasma}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
From [http://www.kde.org/community/whatiskde/softwarecompilation.php KDE Software Compilation] and [http://www.kde.org/download/ Getting KDE Software]:<br />
<br />
:''The KDE Software Compilation is the set of frameworks, workspaces, and applications produced by KDE to create a beautiful, functional and free desktop computing environment for Linux and similar operating systems. It consists of a large number of individual applications and a desktop workspace as a shell to run these applications. ''<br />
<br />
The KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Users can get detailed information about most KDE applications there.<br />
<br />
== Installation ==<br />
<br />
Before installing KDE, make sure you have a working [[Xorg]] installation on your system.<br />
<br />
KDE 4.x is ''modular''. You can install an entire set of packages or only install your preferred KDE applications.<br />
<br />
=== Full install ===<br />
<br />
[[pacman|Install]] {{Grp|kde}} or {{Grp|kde-meta}} available in the [[official repositories]]. For differences between {{Grp|kde}} and {{Grp|kde-meta}} see the [[KDE Packages]] article.<br />
<br />
=== Minimal install ===<br />
<br />
If you want to have a minimal installation of the KDE Software Compilation, install {{Grp|kdebase}}.<br />
<br />
=== Language pack ===<br />
<br />
If you need language files, install {{ic|kde-l10n-yourlanguagehere}} (e.g. {{Pkg|kde-l10n-de}} for the German language).<br />
<br />
For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Upgrading ==<br />
<br />
'''KDE 4.11''' Software Compilation is the current major [http://kde.org/announcements/ release of KDE]. Important hints for upgraders:<br />
* Always check if your mirror is '''up to date'''.<br />
* '''Do not force an update using {{ic|# pacman --force}}'''. If pacman complains about conflicts please '''file a bug report'''.<br />
* You can remove the meta packages and the sub packages you do not need after the update.<br />
* If you do not like split packages just keep using the kde-meta packages.<br />
<br />
== Starting KDE ==<br />
<br />
Starting KDE depends on your preferences. Basically there are two ways of starting KDE. Using '''KDM''' or '''xinitrc'''.<br />
<br />
=== Using a Display Manager ===<br />
A [[display manager]], or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell. It allows easily logging in straight to KDE. KDE has its own display manager, KDM.<br />
<br />
==== KDM (KDE Display Manager) ====<br />
<br />
''See the [[KDM]] page for more information.''<br />
<br />
[[systemd#Using units|Enable/start]] {{ic|kdm.service}} to start the display manager.<br />
<br />
=== Using xinitrc ===<br />
<br />
''See the [[xinitrc]] page for more information.''<br />
<br />
{{hc|~/.xinitrc|<br />
exec startkde<br />
}}<br />
<br />
Execute {{ic|startx}} or {{ic|xinit}} to start KDE.<br />
<br />
{{Note|If you want to start Xorg at boot, please read the [[Start X at Login]] article.}}<br />
<br />
== Configuration ==<br />
<br />
All KDE configuration is saved in the {{ic|~/.kde4}} folder. If KDE is giving you a lot of trouble or if you ever want a fresh installation of KDE, just backup and rename this folder and restart your X session. KDE will re-create it with all the default configuration files. If you want very fine-grained control over KDE programs, you may want to edit the files in this folder.<br />
<br />
However, configuring KDE is primarily done in '''System Settings'''. A few other options for the desktop are available in '''Default Desktop Settings''' in the desktop's context menu.<br />
<br />
For other personalization options not covered below such as activities, different wallpapers on one cube, etc., please refer to the [[Plasma]] wiki page.<br />
<br />
=== Personalization ===<br />
<br />
How to set up the KDE desktop to your personal style: use different Plasma themes, window decorations and icon themes.<br />
<br />
==== Plasma desktop ====<br />
<br />
[[Plasma]] is a desktop integration technology that provides many functions like displaying the wallpaper, adding widgets to the desktop, and handling the panel(s), or "taskbar(s)".<br />
<br />
===== Themes =====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] can be installed through the Desktop Settings control panel. Plasma themes define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
===== Widgets =====<br />
<br />
Plasmoids are little scripted (plasmoid scripts) or coded (plasmoid binaries) KDE applications designed to enhance the functionality of your desktop.<br />
<br />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<br />
<br />
The easiest way to install plasmoid scripts is by right-clicking onto a panel or the desktop:<br />
<br />
Add Widgets > Get new Widgets > Download Widgets<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
Install Kmix ({{Pkg|kdemultimedia-kmix}}) from the official repositories and start it from the application launcher. Since KDE, by default, autostarts programs from the previous session, it does not need to be started manually upon every login.<br />
<br />
{{Note|1=To adjust the [https://bugs.kde.org/show_bug.cgi?id=313579#c28 step size of volume increments/decrements], add e.g. {{ic|1=VolumePercentageStep=1}} in the {{ic|[Global]}} section of {{ic|~/.kde4/share/config/kmixrc}}}}<br />
<br />
===== Adding a Global Menu to the desktop =====<br />
<br />
Install {{Pkg|appmenu-qt}} from the official repositories and {{aur|appmenu-gtk}} and {{aur|appmenu-qt5}} from the AUR in order to complete the preliminaries for a Mac OS X style always-on global menu. To get Firefox and LibreOffice to use the global menu as well, install {{aur|firefox-extension-globalmenu}} and {{aur|libreoffice-extension-menubar}} from the AUR.<br />
<br />
{{Warning|{{aur|firefox-extension-globalmenu}} has been deprecated as of Firefox 25 and there is no other recommended method for getting the global menu. However, there is a patched package, {{aur|firefox-ubuntu}} available in the AUR which has Canonical's patch for getting the global menu to work with the current version of Firefox (as of this writing).}}<br />
<br />
To actually get the global menu, install {{aur|kdeplasma-applets-menubar}} from the AUR. Create a plasma-panel on top of your screen and add the window menubar applet to the panel. To export the menus to your global menu, go to ''System Settings > Application Appearance > Style''. Now click the fine-tuning tab and use the drop-down list to select ''only export'' as your menubar style.<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in:<br />
System Settings > Workspace Appearance > Window Decorations<br />
There you can also directly download and install more themes with one click, and some are available in the [https://aur.archlinux.org/packages.php?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up ''System Settings > Application Appearance > Icons'' and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
==== Fonts ====<br />
<br />
===== Fonts in KDE look poor =====<br />
<br />
Try installing the {{Pkg|ttf-dejavu}} and {{Pkg|ttf-liberation}} packages.<br />
<br />
After the installation, be sure to log out and back in. You should not have to modify anything in ''System Settings > Fonts''.<br />
<br />
If you have personally set up how your [[Fonts]] render, be aware that System Settings may alter their appearance. When you go ''System Settings > Appearance > Fonts'', System Settings will likely alter your font configuration file ({{ic|fonts.conf}}).<br />
<br />
There is no way to prevent this, but, if you set the values to match your {{ic|fonts.conf}} file, the expected font rendering will return (it will require you to restart your application or in a few cases restart your desktop). Note that Gnome's Font Preferences also does this.<br />
<br />
===== Fonts are huge or seem disproportional =====<br />
<br />
Try to force font DPI to '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<br />
<br />
==== Space efficiency ====<br />
<br />
Users with small screens (e.g. netbooks) can change some setting to make KDE more space efficient. See the [http://userbase.kde.org/KWin#Using_with_small_screens_(eg_Netbooks) upstream wiki] for more information. Also, you can use [http://www.kde.org/workspaces/plasmanetbook/ KDE's Plasma Netbook] which is a workspace made specifically for small, lightweight netbook devices.<br />
<br />
=== Networking ===<br />
<br />
You can choose from the following tools:<br />
* NetworkManager. See [[NetworkManager#KDE4|NetworkManager]] for more information.<br />
* Wicd. See [[Wicd]] for more information.<br />
<br />
=== Printing ===<br />
<br />
{{Tip|Use the [[CUPS]] web interface for faster configuration. Printers configured in this way can be used in KDE applications. }}<br />
<br />
You can also configure printers in ''System Settings > Printer Configuration''. To use this method, you must first install {{Pkg|kdeutils-print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon}} and {{ic|cupsd}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cupsd.conf}}.<br />
<br />
Adding {{ic|lp}} to {{ic|SystemGroup}} allows anyone who can print to configure printers. You can, of course, add another group instead of {{ic|lp}}.<br />
{{hc|/etc/cups/cupsd.conf|# Administrator user group...<br />
SystemGroup sys root lp}}<br />
<br />
=== Samba/Windows support ===<br />
<br />
If you want to have access to Windows services, install [[Samba]] (package {{Pkg|samba}}).<br />
<br />
You can then configure Samba shares through:<br />
<br />
System Settings > Sharing > Samba<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
KDE has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
Since KDE 4.6, CPU frequency scaling is no longer managed by KDE. Instead it is assumed to be handled automatically by the the hardware and/or kernel. Arch has used {{ic|ondemand}} as the default CPU frequency governor since kernel version 3.3, so no additional configuration in needed in most cases. For details on fine-tuning the governor, see [[CPU Frequency Scaling]].<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
== System administration ==<br />
<br />
=== Set keyboard ===<br />
<br />
Navigate to:<br />
System Settings > Hardware > Input Devices > Keyboard<br />
In the first tab, you can choose your keyboard model.<br />
<br />
In the "'''Layouts'''" tab, you can choose the languages you may want to use by pressing the "Add Layout" button and subsequently choosing the variant and the language.<br />
<br />
In the "'''Advanced'''" tab, you can choose the keyboard combination you want in order to change the layouts in the "Key(s) to change layout" sub-menu.<br />
<br />
=== Terminate Xorg server through KDE system settings ===<br />
<br />
Navigate to the submenu:<br />
System Settings > Input Devices > Keyboard > Advanced (tab) > "Key Sequence to kill the X server"<br />
and tick the checkbox.<br />
<br />
=== KCM ===<br />
<br />
KCM stands for '''KC'''onfig '''M'''odule. KCMs can help you configure your system by providing interfaces in System Settings.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}<br />
* {{AUR|kcm-grub2}}<br />
<br />
'''Configuration for Synaptics touchpads.'''<br />
* {{AUR|synaptiks}}<br />
* {{AUR|kcm_touchpad}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search and semantic desktop ==<br />
<br />
According to [[wikipedia:Semantic_desktop|Wikipedia]], ''"the Semantic Desktop is a collective term for ideas related to changing a computer's user interface and data handling capabilities so that data is more easily shared between different applications or tasks and so that data that once could not be automatically processed by a computer can be (automatically processed)."''<br />
<br />
The KDE implementation of this concept is tied to (as of KDE 4.10) two major pieces of software, Akonadi and Nepomuk. Between the two of them, these programs look at your data and make an easily searchable index of it. The idea behind these pieces of software is to make your system "aware" of your data and give it context using meta-data and user-supplied tags.<br />
<br />
Soprano and Virtuoso are two dependencies of the Nepomuk Semantic Desktop. Since the relationship between the two major components and their dependencies is not very clear, the following sections try to shed some light on their inner workings.<br />
<br />
=== Virtuoso and Soprano ===<br />
<br />
The database used to store all the metadata used by the semantic desktop is a ''[[wikipedia:Resource_Description_Framework|Resource Description Framework (RDF)]]'' database called Virtuoso. Internally, Virtuoso may be looked as a relational database. (A [[wikipedia:Relational_model|relational database]] is different from a traditional single-table based database in the sense that it uses multiple tables related by a single key in order to store data.) It is currently controlled by OpenLink and is available under a commercial and an open source license.<br />
<br />
From the [http://techbase.kde.org/Projects/Nepomuk/ComponentOverview#Soprano KDE Techbase], ''Soprano is a Qt abstraction over databases. It provides a friendly Qt-based API for accessing different RDF stores. It currently supports 3 database backends - Sesame, Redland and Virtuoso. The KDE Semantic Stack only works with Virtuoso. Soprano also provides additional features such as serializing, parsing RDF data, and a client server architecture that is heavily used in Nepomuk.''<br />
<br />
=== Nepomuk ===<br />
<br />
Nepomuk stands for "Networked Environment for Personal, Ontology-based Management of Unified Knowledge". It is what allows all the tagging and labeling of files as well to take place and also serves as the way to actually read the Virtuoso databases. It provides an API to application developers which allows them to read the data collected by it.<br />
<br />
In the past, the "Strigi" service was used to collect data about the various files present on the system. However, due to many reasons, the most important of them being CPU and Memory usage, Strigi was replaced by a homegrown indexing service which is integrated with Nepomuk-Core.<br />
<br />
For further information about Nepomuk, [http://techbase.kde.org/Projects/Nepomuk/ComponentOverview#Nepomuk_Components this page] is a good resource. However, some of the information in the previous page has been rendered outdated according to [http://vhanda.in/blog/2012/11/nepomuk-without-strigi/ this blog post].<br />
<br />
==== Using and configuring Nepomuk ====<br />
<br />
In order to search using Nepouk on the KDE desktop, press {{ic|ALT+F2}} and type in your query. Nepomuk is enabled by default. It can be turned on and off in:<br />
System Settings > Desktop Search<br />
<br />
Nepomuk has to keep track of a lot of files. It is for this reason that it is recommended to increase the number of files that can be watched with inotify. In order to do that this command is a good option.<br />
# sysctl fs.inotify.max_user_watches=524288<br />
<br />
To do it persistently:<br />
# echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.d/99-inotify.conf<br />
<br />
Restart Nepomuk to see the changes.<br />
<br />
==== KDE without Nepomuk ====<br />
<br />
If you wish to run KDE without Nepomuk, there exists a {{AUR|nepomuk-core-fake}} package in the AUR.<br />
{{Warning|As of now, Dolphin depends on {{Pkg|nepomuk-widgets}} and hence will break if used with the fake Nepomuk package.}}<br />
<br />
=== Akonadi ===<br />
<br />
Akonadi is a system meant to act as a local cache for PIM data, regardless of its origin, which can be then used by other applications. This includes the user's emails, contacts, calendars, events, journals, alarms, notes, and so on. It interfaces with the Nepomuk libraries to provide searching capabilities.<br />
<br />
Akonadi does not store any data by itself: the storage format depends on the nature of the data (for example, contacts may be stored in vCard format).<br />
<br />
For more information on Akonadi and its relationship with Nepomuk, see [http://blogs.kde.org/node/4503] and [http://cmollekopf.wordpress.com/2013/02/13/kontact-nepomuk-integration-why-data-from-akonadi-is-indexed-in-nepomuk/].<br />
<br />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
<br />
==== Running KDE without Akonadi ====<br />
<br />
The package {{AUR|akonadi-fake}} is a good option for those who wish to run KDE without Akonadi.<br />
<br />
== Phonon ==<br />
<br />
=== What is Phonon? ===<br />
<br />
From [[Wikipedia:Phonon|Wikipedia]]:<br />
''Phonon is the multimedia API for KDE 4. Phonon was created to allow KDE 4 to be independent of any single multimedia framework such as GStreamer or xine and to provide a stable API for KDE 4's lifetime. It was done for various reasons: to create a simple KDE/Qt style multimedia API, to better support native multimedia frameworks on Windows and Mac OS X, and to fix problems of frameworks becoming unmaintained or having API or ABI instability.<br />
''<br />
<br />
'''Phonon''' is being widely used within KDE, for both audio (e.g., the System notifications or KDE audio apps) and video (e.g., the Dolphin video thumbnails).<br />
<br />
=== Which backend should I choose? ===<br />
<br />
You can choose between various backends like GStreamer ({{Pkg|phonon-gstreamer}}) or VLC ({{Pkg|phonon-vlc}}), available in the [[official repositories]], and MPlayer ({{AUR|phonon-mplayer-git}}), ({{AUR|phonon-quicktime-git}}), and ({{AUR|phonon-avkode-git}}); available in the [[AUR]]. Most users will want GStreamer or VLC which have the best upstream support. Note that multiple backends can be installed at once and chosen at ''System Settings > Multimedia > Phonon > Backend''.<br />
<br />
{{Note|According to the [http://userbase.kde.org/Phonon#Backend_libraries KDE UserBase], Phonon-MPlayer is currently unmaintained}}<br />
<br />
According to [http://lists.kde.org/?l=kde-multimedia&m=137994906723790&w=2 this mail in the KDE-Multimedia mailing list], users should prefer VLC over GStreamer.<br />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[http://yakuake.kde.org/ Yakuake] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://community.kde.org/KTp KDE Telepathy] is a project with the goal to closely integrate Instant Messaging with the KDE desktop. It utilizes the Telepathy framework as a backend and is intended to replace Kopete.<br />
<br />
To install all Telepathy protocols, install the {{Grp|telepathy}} group.<br />
To use the KDE Telepathy client, install the {{Pkg|kde-telepathy-meta}} package that includes all the packages contained in the {{Grp|kde-telepathy}} group .<br />
<br />
== Tips and tricks ==<br />
<br />
=== Using Openbox in KDE ===<br />
{{tip|The native window manager for KDE is {{ic|kwin}}.}}<br />
<br />
The [[Openbox]] window manager works very well within KDE, combined with a noticable improvement in performance and responsiveness. By default, a {{ic|KDE/Openbox}} session will be made automatically available upon installing Openbox, even if the KDE environment itself has not been installed. Most popular display managers will therefore allow KDE with Openbox as the window manager to be selected as a session.<br />
<br />
To manually start KDE with Openbox as the window manager - as a default session for [[SLiM]], or where not using a display manager at all - add the following command to the [[Xinitrc]] file:<br />
<br />
exec openbox-kde-session<br />
<br />
==== When using KDM ====<br />
<br />
To use [[Openbox]] as a default windows manager when logging in with [[KDM]] just go to Default Applications -> Window Manager -> Use a different windows manager then select Openbox within the dropdown box.<br />
<br />
<br />
==== Re-enabling compositing effects ====<br />
Where replacing the native {{ic|kwin}} window manager with Openbox, any desktop compositing effects - such a transparency - provided will also be lost. This is because Openbox itself does not provide any compositing functionality. However, it is easily possible to use a seperate compositing program to [[Openbox#Compositing_effects|re-enable compositing]].<br />
<br />
=== Integrate Android with the KDE Desktop ===<br />
<br />
Install {{AUR|kdeconnect}} from the AUR and [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp&hl=en KDE Connect] from the Google Play store for great Android-KDE integration.<br />
<br />
=== Get notifications for software updates ===<br />
<br />
Install {{Pkg|apper}} to get notifications about package updates in your KDE system tray and a basic package manager GUI. See the [http://www.packagekit.org/index.html PackageKit website] for more information.<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
<br />
Beginning with KWin version 4.8 it is possible to use the separately built binary '''kwin_gles''' as a replacement for kwin. It behaves almost the same as the kwin executable in OpenGL2 mode with the slight difference that it uses ''egl'' instead of ''glx'' as the native platform interface. To test kwin_gles you just have to run {{ic|kwin_gles --replace}} in Konsole.<br />
If you want to make this change permanent you have to create a script in {{ic|$(kde4-config --localprefix)/env/}} which exports {{ic|1=KDEWM=kwin_gles}}.<br />
<br />
=== Enabling audio thumbnails under Konqueror/Dolphin file managers ===<br />
<br />
For thumbnails of audio files in Konqueror and Dolphin install {{AUR|audiothumbs}} from AUR.<br />
<br />
=== Enabling video thumbnails under Konqueror/Dolphin file managers ===<br />
<br />
For thumbnails of videos in konqueror and dolphin install {{Pkg|kdemultimedia-mplayerthumbs}} or {{Pkg|kdemultimedia-ffmpegthumbs}}.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob wrote on his blog this "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir -p ~/.compose-cache/<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Hiding partitions ===<br />
<br />
In Dolphin, it is as simple as right-clicking on the partition in the {{ic|Places}} sidebar and selecting {{ic|Hide ''partition''}}. Otherwise...<br />
<br />
If you wish to prevent your internal partitions from appearing in your file manager, you can create an udev rule, e.g:<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|2=<br />
KERNEL=="sda[0-9]", ENV{UDISKS_IGNORE}="1"<br />
}}<br />
<br />
The same thing for a certain partition:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
=== Konqueror tips ===<br />
<br />
==== Disabling smart key tooltips (browser) ====<br />
<br />
To disable those smart key tooltips in Konqueror (pressing {{ic|Ctrl}} on a web page), use ''Settings > Configure Konqueror > Web Browsing'' and uncheck ''Enable Access Key activation with Ctrl key'' o<br />
<br />
{{hc|~/.kde4/share/config/konquerorrc|2=<br />
[Access Keys]<br />
Enabled=false<br />
}}<br />
<br />
==== Using WebKit ====<br />
<br />
WebKit is an open source browser engine developed by Apple Inc. It is a derivative from the KHTML and KJS libraries and contains many improvements. WebKit is used by Safari, Google Chrome and rekonq.<br />
<br />
It is possible to use WebKit in Konqueror instead of KHTML. First install the {{Pkg|kwebkitpart}} package.<br />
<br />
Then, after executing Konqueror, navigate to ''Settings > Configure Konqueror > General > Default web browser engine'' and set it as {{ic|WebKit}}.<br />
<br />
=== Firefox integration ===<br />
<br />
See [[Firefox#KDE_integration|Firefox]].<br />
<br />
=== Setting the screensaver background to the same as the current one ===<br />
<br />
Kscreensaver's background can be changed from the default.<br />
<br />
KDE by default is [https://bugs.kde.org/show_bug.cgi?id=312828 not able] to change this for the 'Simple Lock', but a [http://lists.opensuse.org/opensuse-kde/2013-02/msg00082.html workaround] [http://forum.kde.org/viewtopic.php?f=66&t=110039 exists]:<br />
<br />
{{hc|/usr/share/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui/|<br />
[...]<br />
''#source: theme.wallpaperPathForSize(parent.width, parent.height)''<br />
source: "1920x1080.jpg"<br />
[...]<br />
}}<br />
<br />
Now you copy your current background image to {{ic|"1920x1080.jpg"}}.<br />
<br />
Note you have to redo this for each update of the package {{Pkg|kdebase-workspace}}.<br />
<br />
=== Setting lockscreen wallpaper to arbitrary image ===<br />
<br />
Copy an existing wallpaper profile as a template:<br />
$ cp -r /usr/share/wallpapers/''ExistingWallpaper'' ~/.kde4/share/wallpapers/<br />
<br />
Change the name of the directory, and edit {{ic|metadata.desktop}}:<br />
<br />
{{hc|~/.kde4/share/wallpapers/''MyWallpaper''/metadata.desktop|2=<br />
[Desktop Entry]<br />
Name=MyWallpaper<br />
X-KDE-PluginInfo-Name=MyWallpaper<br />
}}<br />
<br />
Remove existing images ({{ic|contents/screenshot.png}} and {{ic|images/*}}):<br />
$ rm ~/.kde4/share/wallpapers/MyWallpaper/contents/screenshot.png<br />
$ rm ~/.kde4/share/wallpapers/MyWallpaper/contents/images/*<br />
<br />
Copy new image in:<br />
$ cp ''path/to/MyWallpaper.png'' MyWallpaper/contents/images/1920x1080.png<br />
<br />
Edit the metadata profile for the current theme:<br />
{{hc|~/.kde4/share/apps/desktoptheme/MyTheme/metadata.desktop|2=<br />
[Wallpaper]<br />
defaultWallpaperTheme=NewWallpaper<br />
defaultFileSuffix=.png<br />
defaultWidth=1920<br />
defaultHeight=1080<br />
}}<br />
<br />
Lock the screen to check that it worked.<br />
<br />
{{Note|This method sets the lockscreen background without changing any system-wide settings. For a system-wide change, create the new wallpaper profile in {{ic|/usr/share/wallpapers}}.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration. One way to resolve upgrade problems is to start over with a fresh KDE config.<br />
<br />
==== Reset all KDE configuration ====<br />
<br />
To test whether your config is the problem try quitting your KDE session by logging out and, in a tty, run<br />
$ cp ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated by KDE automatically. Now start a new KDE session to see the results.<br />
<br />
If the problem is resolved, you will have a fresh, problem-free {{ic|~/.kde4/}}. You can gradually move parts of your saved configuration back, restarting your session regularly to test, to identify the problematic parts of your config. Some files here are named after applications so you will probably be able to test these without needing to restart KDE.<br />
<br />
==== File Indexer Service not working even after enabling everything properly ====<br />
<br />
This is caused due to a corrupted Nepomuk database. It may be remedied by moving the database or deleting it all together. Log out of KDE and issue this command from a virtual console:<br />
<br />
$ mv ~/.kde4/share/apps/nepomuk ~/.kde4/share/apps/nepomuk_backup<br />
<br />
to move your existing (and corrupt) nepomuk database. It will be recreated when you log in again.<br />
<br />
==== Plasma desktop behaves strangely ====<br />
<br />
Plasma problems are usually caused by unstable '''plasmoids''' or '''plasma themes'''. First, find which was the last plasmoid or plasma theme you had installed and disable it or uninstall it.<br />
<br />
So, if your desktop suddenly exhibits "locking up", this is likely caused by a faulty installed widget. If you cannot remember which widget you installed before the problem began (sometimes it can be an irregular problem), try to track it down by removing each widget until the problem ceases. Then you can uninstall the widget, and file a bug report (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org and inform the developer of that widget about the problem (detailing steps to reproduce, etc).<br />
<br />
If you cannot find the problem, but you do not want ''all'' the KDE settings to be lost, do:<br />
<br />
$ rm -r ~/.kde4/share/config/plasma*<br />
<br />
This command will '''delete all plasma related configs''' of your user and when you will relogin into KDE, you will have the '''default''' settings back. You should know that this action '''cannot be undone'''. You should create a backup folder and copy all the plasma related configs in it.<br />
<br />
==== Clean cache to resolve upgrade problems ====<br />
<br />
The [https://bbs.archlinux.org/viewtopic.php?id=135301 problem] may be caused by old cache. Sometimes after an upgrade, the old cache might introduce strange, hard to debug behaviour such as unkillable shells, hangs when changing various settings and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and QT programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://blog.martin-graesslin.com/blog/2012/03/on-getting-help-for-kwin-and-helping-kwin/ Martin's blog].<br />
<br />
$ qdbus org.kde.kwin /KWin supportInformation<br />
<br />
=== KDE4 does not finish loading ===<br />
<br />
There might be a situation in which the graphic driver might create a conflict when starting KDE4. This situation happens after the login but before finishing loading the desktop, making the user wait indefinitely at the loading screen. Until now the only users confirmed to be affected by this are the ones that use [[NVIDIA|Nvidia drivers]] and KDE4.<br />
<br />
A solution for Nvidia users:<br />
<br />
{{hc|~/.kde4/share/config/kwinrc|2=<br />
[Compositing]<br />
Enabled=false<br />
}}<br />
For more information, see [https://bbs.archlinux.org/viewtopic.php?pid=932598 this] thread.<br />
<br />
If a minimal install was done, make sure you installed the required font by your phonon backend listed here: [[#Minimal install]]<br />
<br />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full KDE session (specifically, you did not run {{ic|startkde}}), then as of KDE 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). qtconfig should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt/plugins/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through:<br />
<br />
System Settings > Qt Graphics System<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in:<br />
System Settings > Desktop Effects<br />
and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
{{Note|With the recent update of KDE to 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
KWin may suffer from screen tearing while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled ({{ic|amdccle}} for [[Catalyst]] users, and nvidia-settings for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
Installing {{Pkg|kscreen}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to:<br />
System Settings > Multimedia > Phonon<br />
and set the device named {{ic|default}} above all the other devices in each box you see.<br />
<br />
===== MP3 files cannot be played when using the GStreamer Phonon backend =====<br />
<br />
This can be solved by installing the GStreamer plugins (package group {{Grp|gstreamer0.10-plugins}}). If you still encounter problems, you can try changing the Phonon backend used by installing another such as {{Pkg|phonon-vlc}}.<br />
Then, make sure the backend is preferred via:<br />
<br />
System Settings > Multimedia > Phonon > Backend (tab)<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== KDE password prompts display three bullets per char ===<br />
<br />
This setting can be changed at ''System Settings > Account Details > Password & User Account'':<br />
* Show one bullet for each letter<br />
* Show three bullets for each letter<br />
* Show nothing<br />
<br />
=== Nepomukserver process still autostarts even with semantic desktop disabled ===<br />
<br />
Go to ''System Settings > Startup and Shutdown > Service Manager > Startup Services'' and uncheck the Nepomuk Search Module.<br />
<br />
=== Dolphin and File Dialogs are extremely slow to start ===<br />
<br />
This may be caused by the upower service. If the upower service is not needed on your system, it can be disabled:<br />
<br />
# systemctl disable upower<br />
# systemctl mask upower<br />
<br />
Obviously this will not have any side effect on a desktop system.<br />
<br />
=== Default PDF viewer in GTK applications under KDE ===<br />
<br />
In some cases when you have installed [[Inkscape]], [[Gimp]] or other graphic programs, GTK applications ([[Firefox]] among all) might not select Okular as the default PDF application, and they are not going to follow the KDE settings on default applications. You can use the following user command to make Okular the default application again.<br />
<br />
$ xdg-mime default kde4-okularApplication_pdf.desktop application/pdf<br />
<br />
If you are using a different PDF viewer application, or a different mime-type is misbehaving, you should change {{ic|kde4-okularApplication_pdf.desktop}} and {{ic|application/pdf}} respectively according to your needs.<br />
<br />
For more information, consult [[Default Applications]] wiki page.<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the [kde-unstable] repository. They stay there until KDE is declared stable and passes to [extra].<br />
<br />
You can add [kde-unstable] with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
# [kde-unstable] is based upon testing. Therefore, you need to enable the repositories in the following order: [kde-unstable], [testing], [core], [extra], [community-testing], [community].<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Distro_and_Upstream_bug_report|you make bug reports]] if you find any problems.<br />
<br />
== Other KDE projects ==<br />
<br />
=== Trinity ===<br />
<br />
From the release of KDE 4.x, the developers dropped support for KDE 3.5.x. Trinity Desktop Environment is a fork of KDE3 developed by Timothy Pearson ([http://trinitydesktop.org/ trinitydesktop.org]). This project aims to keep the KDE3.5 computing style alive, as well as polish off any rough edges that were present as of KDE 3.5.10. See [[Trinity]] for more info.<br />
<br />
{{Warning|KDE 3 is no longer maintained and supported by the KDE developers. The "Trinity KDE" is maintained by the Trinity project commmunity. Use KDE 3 on your own risk, regarding any bugs, performance problems or security risks.}}<br />
<br />
== Bugs ==<br />
<br />
It is preferrable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org] - KDE homepage<br />
* [https://bugs.kde.org] - KDE bug tracker<br />
* [https://bugs.archlinux.org] - Arch Linux bug tracker<br />
* [https://projects.kde.org] - KDE Projects</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Sudo&diff=290614Sudo2013-12-28T00:52:51Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Security]]<br />
[[cs:Sudo]]<br />
[[es:Sudo]]<br />
[[fr:Sudo]]<br />
[[it:Sudo]]<br />
[[ja:Sudo]]<br />
[[ru:Sudo]]<br />
[[sr:Sudo]]<br />
[[tr:Sudo]]<br />
[[uk:Sudo]]<br />
[[zh-CN:Sudo]]<br />
{{Related articles start}}<br />
{{Related|Users and Groups}}<br />
{{Related|su}}<br />
{{Related articles end}}<br />
<br />
[http://www.gratisoft.us/sudo/ sudo] ("substitute user do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.<br />
<br />
== Rationale ==<br />
<br />
Sudo is an alternative to [[su]] for running commands as root. Unlike [[su]], which launches a root shell that allows all further commands root access, sudo instead grants temporary privilege escalation to a single command. By enabling root privileges only when needed, sudo usage reduces the likelyhood that a typo or a bug in an invoked command will ruin the system.<br />
Sudo can also be used to run commands as other users; additionally, sudo logs all commands and failed access attempts for security auditing.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|sudo}} package, available in the [[Official Repositories|official repositories]]:<br />
<br />
# pacman -S sudo<br />
<br />
To begin using {{ic|sudo}} as a non-privileged user, it must be properly configured. So make sure you read the configuration section.<br />
<br />
== Usage ==<br />
<br />
With sudo, users can prefix commands with {{ic|sudo}} to run them with superuser (or other) privileges.<br />
<br />
For example, to use pacman:<br />
<br />
$ sudo pacman -Syu<br />
<br />
See the [http://www.gratisoft.us/sudo/man/sudo.html sudo manual] for more information.<br />
<br />
== Configuration ==<br />
<br />
=== View current settings ===<br />
<br />
Run {{ic|sudo -ll}} to print out the current sudo configuration.<br />
<br />
=== Using visudo ===<br />
<br />
The configuration file for sudo is {{ic|/etc/sudoers}}. It should '''always''' be edited with the {{ic|visudo}} command. {{ic|visudo}} locks the {{ic|sudoers}} file, saves edits to a temporary file, and checks that file's grammar before copying it to {{ic|/etc/sudoers}}.<br />
<br />
{{Warning|It is imperative that {{ic|sudoers}} be free of syntax errors! Any error makes sudo unusable. '''Always''' edit it with {{ic|visudo}} to prevent errors.}}<br />
<br />
The default editor for visudo is {{ic|vi}}. It will be used if you do not specify another editor, by setting either VISUAL or EDITOR environment variables (used in that order) to the desired editor, e.g. {{ic|nano}}. The command is run as root:<br />
<br />
# EDITOR=nano visudo<br />
<br />
You can permanently change the setting for your user to e.g. {{ic|nano}} by appending:<br />
<br />
export EDITOR=nano<br />
<br />
to your {{ic|~/.bashrc}} file. Note that this won't take effect for already-running shells.<br />
<br />
To change the editor of choice permanently system-wide only for {{ic|visudo}}, add the following line to {{ic|/etc/sudoers}} where {{ic|nano}} is your prefered editor:<br />
<br />
# Reset environment by default<br />
Defaults env_reset<br />
# Set default EDITOR to nano, and do not allow visudo to use EDITOR/VISUAL.<br />
Defaults editor=/usr/bin/nano, !env_editor<br />
<br />
=== Example Entries ===<br />
<br />
To allow a user to gain full root privileges when he/she precedes a command with {{ic|sudo}}, add the following line:<br />
<br />
USER_NAME ALL=(ALL) ALL<br />
<br />
To allow a user to run all commands as any user but only the machine with hostname HOST_NAME:<br />
<br />
USER_NAME HOST_NAME=(ALL) ALL<br />
<br />
To allow members of group {{ic|wheel}} sudo access:<br />
<br />
%wheel ALL=(ALL) ALL<br />
<br />
To disable asking for a password for user USER_NAME:<br />
<br />
Defaults:USER_NAME !authenticate<br />
<br />
Enable explicitly defined commands only for user USER_NAME on host HOST_NAME:<br />
<br />
USER_NAME HOST_NAME=/usr/bin/halt,/usr/bin/poweroff,/usr/bin/reboot,/usr/bin/pacman -Syu<br />
{{note| the most customized option should go at the end of the file, as the later lines overrides the previous ones. In particular such a line should be after the {{ic|%wheel}} line if your user is in this group.}}<br />
Enable explicitly defined commands only for user USER_NAME on host HOST_NAME without password:<br />
USER_NAME HOST_NAME= NOPASSWD: /usr/bin/halt,/usr/bin/poweroff,/usr/bin/reboot,/usr/bin/pacman -Syu<br />
<br />
A detailed sudoers example can be found [http://www.gratisoft.us/sudo/sample.sudoers here]. Otherwise, see the [http://www.gratisoft.us/sudo/man/sudoers.html sudoers manual] for detailed information.<br />
<br />
=== Sudoers default file permissions ===<br />
<br />
The owner and group for the sudoers file must both be 0. The file permissions must be set to 0440. These permissions are set by default, but if you accidentally change them, they should be changed back immediately or sudo will fail.<br />
<br />
# chown -c root:root /etc/sudoers<br />
# chmod -c 0440 /etc/sudoers<br />
<br />
=== Password cache timeout ===<br />
<br />
Users may wish to change the default timeout before the cached password expires. This is accomplished with the timestamp_timeout option in {{ic|/etc/sudoers}} which is in minutes.<br />
Set timeout to 20 minutes.<br />
<br />
Defaults:USER_NAME timestamp_timeout=20<br />
<br />
{{Tip|To ensure sudo always asks for a password, set the timeout to 0. To ensure the password never times out, set to less than 0.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== File example ===<br />
<br />
This example is especially helpful for those using terminal multiplexers like screen, tmux, or ratpoison, and those using sudo from scripts/cronjobs:<br />
<br />
{{hc|/etc/sudoers|<nowiki><br />
Cmnd_Alias WHEELER = /usr/bin/lsof, /bin/nice, /bin/ps, /usr/bin/top, /usr/local/bin/nano, /usr/bin/ss, /usr/bin/locate, /usr/bin/find, /usr/bin/rsync<br />
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/kill, /usr/bin/killall, /usr/bin/ps, /usr/bin/pkill<br />
Cmnd_Alias EDITS = /usr/bin/vim, /usr/bin/nano, /usr/bin/cat, /usr/bin/vi<br />
Cmnd_Alias ARCHLINUX = /usr/bin/gparted, /usr/bin/pacman<br />
<br />
root ALL = (ALL) ALL<br />
USER_NAME ALL = (ALL) ALL, NOPASSWD: WHEELER, NOPASSWD: PROCESSES, NOPASSWD: ARCHLINUX, NOPASSWD: EDITS<br />
<br />
Defaults !requiretty, !tty_tickets, !umask<br />
Defaults visiblepw, path_info, insults, lecture=always<br />
Defaults loglinelen = 0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth<br />
Defaults mailto=webmaster@foobar.com, mail_badpass, mail_no_user, mail_no_perms<br />
Defaults passwd_tries = 8, passwd_timeout = 1<br />
Defaults env_reset, always_set_home, set_home, set_logname<br />
Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"<br />
Defaults timestamp_timeout=360<br />
Defaults passprompt="Sudo invoked by [%u] on [%H] - Cmd run as %U - Password for user %p:"<br />
</nowiki>}}<br />
<br />
=== Enabling Tab-completion in Bash ===<br />
<br />
{{ic|Tab}}-completion, by default, will not work when a user is initially added to the sudoers file. For example, normally john only needs to type:<br />
<br />
$ fire<{{ic|Tab}}><br />
<br />
and the shell will complete the command for him as:<br />
<br />
$ firefox<br />
<br />
If, however, john is added to the sudoers file and he types:<br />
<br />
$ sudo fire<{{ic|Tab}}><br />
<br />
the shell will do nothing.<br />
<br />
To enable {{ic|Tab}}-completion with sudo, [[pacman|install]] the {{pkg|bash-completion}} package from the [[Official Repositories|official repositories]]. see [[bash#Tab_completion]] for more information.<br />
<br />
Alternatively, add the following to your {{ic|~/.bashrc}}:<br />
<br />
complete -cf sudo<br />
<br />
=== Run X11 apps using sudo ===<br />
<br />
To allow sudo to start graphical application in X11, you need to add:<br />
<br />
Defaults env_keep += "HOME"<br />
<br />
to visudo.<br />
<br />
=== Disable per-terminal sudo ===<br />
<br />
{{Warning|This will let any process use your sudo session.}}<br />
<br />
If you are annoyed by sudo's defaults that require you to enter your password every time you open a new terminal, disable '''tty_tickets''':<br />
<br />
Defaults !tty_tickets<br />
<br />
=== Environment variables ===<br />
<br />
If you have a lot of environment variables, or you export your proxy settings via {{ic|1=export http_proxy="..."}}, when using sudo these variables do not get passed to the root account unless you run sudo with the {{ic|-E}} option.<br />
<br />
$ sudo -E pacman -Syu<br />
<br />
The recommended way of preserving environment variables is to append them to {{ic|env_keep}}:<br />
{{hc|/etc/sudoers|<nowiki><br />
Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"<br />
</nowiki>}}<br />
<br />
=== Passing aliases ===<br />
<br />
If you use a lot of aliases, you might have noticed that they do not carry over to the root account when using sudo. However, there is an easy way to make them work. Simply add the following to your {{ic|~/.bashrc}} or {{ic|/etc/bash.bashrc}}:<br />
<br />
alias sudo='sudo '<br />
<br />
=== Insults ===<br />
<br />
Users can configure sudo to display clever insults when an incorrect password is entered instead of printing the default "wrong password" message. Find the Defaults line in {{ic|/etc/sudoers}} and append "insults" after a comma to existing options. The final result might look like this:<br />
<br />
#Defaults specification<br />
Defaults insults<br />
<br />
To test, type {{ic|sudo -K}} to end the current session and let sudo ask for the password again.<br />
<br />
=== Root password ===<br />
<br />
Users can configure sudo to ask for the root password instead of the user password by adding "rootpw" to the Defaults line in {{ic|/etc/sudoers}}:<br />
<br />
Defaults timestamp_timeout=0,rootpw<br />
<br />
=== Disable root login ===<br />
<br />
{{Warning|Arch Linux is not fine-tuned to run with a disabled root account. Users may encounter problems with this method.}}<br />
<br />
With sudo installed and configured, users may wish to disable the root login. Without root, attackers must first guess a user name configured as a sudoer as well as the user password.<br />
<br />
{{Warning|Ensure a user is properly configured as a sudoer ''before'' disabling the root account!}}<br />
<br />
The account can be locked via {{ic|passwd}}:<br />
<br />
# passwd -l root<br />
<br />
A similar command unlocks root.<br />
<br />
$ sudo passwd -u root<br />
<br />
Alternatively, edit {{ic|/etc/shadow}} and replace the root's encrypted password with "!":<br />
<br />
root:!:12345::::::<br />
<br />
To enable root login again:<br />
<br />
$ sudo passwd root<br />
<br />
==== kdesu ====<br />
<br />
kdesu may be used under KDE to launch GUI applications with root privileges. It is possible that by default kdesu will try to use su even if the root account is disabled. Fortunately one can tell kdesu to use sudo instead of su. Create/edit the file {{ic|~/.kde4/share/config/kdesurc}}:<br />
<br />
[super-user-command]<br />
super-user-command=sudo<br />
<br />
==== PolicyKit ====<br />
<br />
When disabling the root account, it is necessary to change the [[PolicyKit]] configuration for local authorization to reflect that. The default is to ask for the root password, so that must be changed. With polkit-1, this can be achieved by editing {{ic|/etc/polkit-1/localauthority.conf.d/50-localauthority.conf}} so that {{ic|1=AdminIdentities=unix-user:0}} is replaced with something else, depending on the system configuration. It can be a list of users and groups, for example:<br />
<br />
AdminIdentities=unix-group:wheel<br />
<br />
or<br />
<br />
AdminIdentities=unix-user:me;unixuser:mom;unix-group:wheel<br />
<br />
For more information, see {{ic|man pklocalauthority}}.<br />
<br />
==== NetworkManager ====<br />
<br />
Even with the above PolicyKit configuration you still need to configure a policy for NetworkManager. This is documented on the [[NetworkManager#Can.27t_edit_connections_as_normal_user|NetworkManager]] page of this wiki.<br />
<br />
=== Harden with Sudo Example ===<br />
<br />
Lets say you create 3 users: admin, devel, and Joe<br />
admin is used for journalctl, systemctl, mount, kill, and iptables.<br />
devel is used for installing packages, and editing config's<br />
Joe is the user you log in with. Let's let him reboot, shutdown, and use netctl<br />
<br />
Edit /etc/pam.d/su and /etc/pam.d/su-1<br />
Require user be in the wheel group, but don't put anyone in it.<br />
#%PAM-1.0<br />
auth sufficient pam_rootok.so<br />
# Uncomment the following line to implicitly trust users in the "wheel" group.<br />
#auth sufficient pam_wheel.so trust use_uid<br />
# Uncomment the following line to require a user to be in the "wheel" group.<br />
auth required pam_wheel.so use_uid<br />
auth required pam_unix.so<br />
account required pam_unix.so<br />
session required pam_unix.so<br />
<br />
Limit SSH login to the 'ssh' group, Only put Joe in it<br />
groupadd -r ssh<br />
gpasswd -a Joe ssh<br />
echo 'AllowGroups ssh' >> /etc/ssh/sshd_config<br />
systemctl restart sshd.service<br />
<br />
Lets add users to other goups.<br />
for g in power network ;do ;gpasswd -a Joe $g ;done<br />
for g in network power storage ;do ;gpasswd -a admin $g ;done<br />
<br />
Set permissions on configs so devel can edit them.<br />
chown -R devel:root /etc/{http,openvpn,cups,zsh,vim,screenrc}<br />
<br />
Cmnd_Alias POWER = /usr/bin/shutdown -h now, /usr/bin/halt, /usr/bin/poweroff, /usr/bin/reboot<br />
Cmnd_Alias STORAGE = /usr/bin/mount, /usr/bin/umount<br />
Cmnd_Alias SYSTEMD = /usr/bin/journalctl, /usr/bin/systemctl<br />
Cmnd_Alias KILL = /usr/bin/kill, /usr/bin/killall<br />
Cmnd_Alias PKGMAN = /usr/bin/pacman<br />
Cmnd_Alias NETWORK = /usr/bin/netctl<br />
Cmnd_Alias FIREWALL = /usr/bin/iptables, /usr/bin/ip6tables<br />
Cmnd_Alias SHELL = /usr/bin/zsh, /usr/bin/bash<br />
%power ALL = (root) NOPASSWD: POWER<br />
%network ALL = (root) NETWORK<br />
%storage ALL = (root) STORAGE<br />
root ALL = (ALL) ALL<br />
admin ALL = (root) SYSTEMD, KILL, FIREWALL<br />
devel ALL = (root) PKGMAN<br />
Joe ALL = (devel) SHELL, (admin) SHELL <br />
<br />
With this setup, you will almost never need to login as the Root user.<br />
<br />
Joe can connect to his home WiFi<br />
sudo netctl start home<br />
sudo poweroff<br />
<br />
Joe can not use netctl as any other user like admin...<br />
sudo -u admin -- netctl start home<br />
<br />
When Joe needs to use journalctl or kill run away process he can switch to that user<br />
sudo -i -u devel<br />
sudo -i -u admin<br />
<br />
But not Root<br />
sudo -i -u root<br />
<br />
If joe want to start a gnu-screen session as admin he can do it like this<br />
sudo -i -u admin<br />
admin% chown admin:tty `echo $TTY`<br />
admin% screen<br />
<br />
== Troubleshooting ==<br />
<br />
=== SSH TTY Problems ===<br />
<br />
SSH does not allocate a tty by default when running a remote command. Without a tty, sudo cannot disable echo when prompting for a password. You can use ssh's {{ic|-tt}} option to force it to allocate a tty (or {{ic|-t}} twice).<br />
<br />
The {{ic|Defaults}} option {{ic|requiretty}} only allows the user to run sudo if they have a tty.<br />
<br />
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear text. You have to run "ssh -t hostname sudo <cmd>".<br />
#<br />
#Defaults requiretty<br />
<br />
=== Display User Privileges ===<br />
<br />
You can find out what privileges a particular user has with the following command:<br />
<br />
$ sudo -lU yourusename<br />
<br />
Or view your own with:<br />
<br />
{{hc|$ sudo -l|<nowiki><br />
Matching Defaults entries for yourusename on this host:<br />
loglinelen=0, logfile=/var/log/sudo.log, log_year, syslog=auth, mailto=webmaster@gmail.com, mail_badpass, mail_no_user,<br />
mail_no_perms,env_reset, always_set_home, tty_tickets, lecture=always, pwfeedback, rootpw, set_home<br />
<br />
User yourusename may run the following commands on this host:<br />
<br />
(ALL) ALL<br />
(ALL) NOPASSWD: /usr/bin/lsof, /bin/nice, /usr/bin/su, /usr/bin/locate, /usr/bin/find, /usr/bin/rsync, /usr/bin/strace,<br />
(ALL) /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/killall, /usr/bin/ps, /usr/bin/pkill<br />
(ALL) /usr/bin/gparted, /usr/bin/pacman<br />
(ALL) /usr/local/bin/synergyc, /usr/local/bin/synergys<br />
(ALL) /usr/bin/vim, /usr/bin/nano, /usr/bin/cat<br />
(root) NOPASSWD: /usr/local/bin/synergyc</nowiki>}}<br />
<br />
=== Permissive Umask ===<br />
<br />
Sudo will union the user's [[umask]] value with its own umask (which defaults to 0022). This prevents sudo from creating files with more open permissions than the user's umask allows. While this is a sane default if no custom umask is in use, this can lead to situations where a utility run by sudo may create files with different permissions than if run by root directly. If errors arise from this, sudo provides a means to fix the umask, even if the desired umask is more permissive than the umask that the user has specified. Adding this (using {{ic|visudo}}) will override sudo's default behavior:<br />
<br />
Defaults umask = 0022<br />
Defaults umask_override<br />
<br />
This sets sudo's umask to root's default umask (0022) and overrides the default behavior, always using the indicated umask regardless of what umask the user as set.<br />
<br />
<br />
=== Defaults Skeleton ===<br />
<br />
The authors site has a [http://www.gratisoft.us/sudo/sudoers.man.html#sudoers_options list of all the options] that can be used with the {{ic|Defaults}} command in the {{ic|/etc/sudoers}} file.<br />
<br />
The full list of options ''(parsed from the version 1.8.7 source code)'' is below in a format optimized for copying and pasting into your sudoers files for quick editing.<br />
<br />
{{bc|<nowiki>#Defaults always_set_home<br />
# If enabled, sudo will set the HOME environment variable to the home directory of the target user<br />
# (which is root unless the -u option is used). This effectively means that the -H option<br />
# always_set_home is only effective for configurations where either env_reset is disabled or HOME is present<br />
# in the env_keep list. Default: OFF<br />
<br />
#Defaults authenticate<br />
# If set, users must authenticate themselves via a password (or other means of authentication)<br />
# before they may run commands. This default may be overridden via the PASSWD and NOPASSWD<br />
<br />
#Defaults closefrom_override<br />
# If set, the user may use sudo's -C option which overrides the default starting<br />
# point at which sudo begins closing open file descriptors. Default: OFF<br />
<br />
#Defaults compress_io<br />
# If set, and sudo is configured to log a command's input or output, the I/O logs will be<br />
# compressed using zlib. This flag is on by default when sudo is compiled with zlib support.<br />
<br />
#Defaults env_editor<br />
# If set, visudo will use the value of the EDITOR or VISUAL environment variables before falling back on the default<br />
# editor list. Note that this may create a security hole as it allows th separated list of editors in the editor<br />
# variable. visudo will then only use the EDITOR or VISUAL if they match a value specified in editor. On by default.<br />
<br />
#Defaults env_reset<br />
# If set, sudo will run the command in a minimal environment containing the TERM, PATH, HOME, MAIL, SHELL, LOGNAME,<br />
# USER, USERNAME and SUDO_* variables. Any variables in the caller's env in the file specified by the env_file<br />
# option (if any). The default contents of the env_keep and env_check lists are displayed when sudo is run by<br />
# root with the -V option.<br />
<br />
#Defaults fast_glob<br />
# Normally, sudo uses the glob(3) function to do shell-style globbing when matching path names.<br />
# However, since it accesses the file system, glob(3) can take a long time to complete for som (automounted).<br />
# The fast_glob option causes sudo to use the fnmatch(3) function, which does not access the file system to do<br />
# its matching. The disadvantage of fast_glob is that it is unable to ma names that include globbing characters<br />
# are used with the negation operator, '!', as such rules can be trivially bypassed. As such, this option should<br />
# not be used when sudoers contains rules that<br />
<br />
#Defaults fqdn<br />
# Set this flag if you want to put fully qualified host names in the sudoers file. I.e., instead of myhost you<br />
# would use myhost.mydomain.edu. You may still use the short form if you wish (and sudo unusable if DNS stops<br />
# working (for example if the machine is not plugged into the network). Also note that you must use the<br />
# host's official name as DNS knows it. That is, you may not use a all aliases from DNS. If your machine's<br />
# host name (as returned by the hostname command) is already fully qualified you shouldn't need to set fqdn.<br />
# Default: OFF<br />
<br />
#Defaults ignore_dot<br />
# If set, sudo will ignore '.' or '' (current dir) in the PATH environment variable; the PATH<br />
# itself is not modified. Default: OFF<br />
<br />
#Defaults ignore_local_sudoers<br />
# If set via LDAP, parsing of /etc/sudoers will be skipped. This is intended for Enterprises that wish to prevent<br />
# the usage of local sudoers files so that only LDAP is used. /etc/sudoers does not even need to exist.<br />
# Since this option tells sudo how to behave when no specific LDAP entries have been matched, this sudo<br />
# Option is only meaningful for the cn=default<br />
<br />
#Defaults insults<br />
# If set, sudo will insult users when they enter an incorrect password. Default: OFF<br />
<br />
#Defaults log_host<br />
# If set, the host name will be logged in the (non-syslog) sudo log file. Default: OFF<br />
<br />
#Defaults log_input<br />
# If set, sudo will run the command in a pseudo tty and log all user input. If the standard<br />
# input is not connected to the user's tty, due to I/O redirection or because the command is part Input is logged<br />
# to the directory specified by the iolog_dir option (/var/log/sudo-io by default) using a unique session ID that<br />
# is included in the normal sudo log line, prefixed with TSID=. Note that user input may contain sensitive<br />
# information such as passwords (even if they are not echoed to the screen), which will be stored in the log file<br />
# unencrypted.<br />
<br />
#Defaults log_output<br />
# If set, sudo will run the command in a pseudo tty and log all output that is sent to the<br />
# screen, similar to the script(1) command. If the standard output or standard error is not connec is also captured and<br />
# stored in separate log files. Output is logged to the directory specified by the iolog_dir option (/var/log/sudo-io<br />
# by default) using a unique session ID that is included in the normal sudo log line, prefixed with TSID=. The Output<br />
# logs may be viewed with the sudoreplay(8) utility, which can also be used to list or search the available logs.<br />
<br />
#Defaults log_year<br />
# If set, the four-digit year will be logged in the (non-syslog) sudo log file. Default: OFF<br />
<br />
#Defaults long_otp_prompt<br />
# When validating with a One Time Password (OTP) scheme such as S/Key or OPIE, a two-line<br />
# prompt is used to make it easier to cut and paste the challenge to a local window<br />
<br />
#Defaults mail_always<br />
# Send mail to the mailto user every time a users runs sudo. Default: OFF<br />
<br />
#Defaults mail_badpass<br />
# Send mail to the mailto user if the user running sudo does not enter the correct password.<br />
# Default: OFF<br />
<br />
#Defaults mail_no_host<br />
# If set, mail will be sent to the mailto user if the invoking user exists in the sudoers<br />
# file, but is not allowed to run commands on the current host. Default: OFF<br />
<br />
#Defaults mail_no_perms<br />
# If set, mail will be sent to the mailto user if the invoking user is allowed to use sudo<br />
# but the command they are trying is not listed in their sudoers file entry or is explicitly denied<br />
<br />
#Defaults mail_no_user<br />
# If set, mail will be sent to the mailto user if the invoking user is not in the sudoers file.<br />
# Default: ON<br />
<br />
#Defaults noexec<br />
# If set, all commands run via sudo will behave as if the NOEXEC tag has been set, unless overridden<br />
# by a EXEC tag. See the description of NOEXEC and EXEC below as well as the "PREVENTING SHE<br />
<br />
#Defaults path_info<br />
# Normally, sudo will tell the user when a command could not be found in their PATH environment<br />
# variable. Some sites may wish to disable this as it could be used to gather information on t the executable is<br />
# simply not in the user's PATH, sudo will tell the user that they are not allowed to run it, which can be confusing.<br />
# Default: ON<br />
<br />
#Defaults passprompt_override<br />
# The password prompt specified by passprompt will normally only be used if the password prompt provided by<br />
# systems such as PAM matches the string "Password:"<br />
<br />
#Defaults preserve_groups<br />
# By default, sudo will initialize the group vector to the list of groups the target<br />
# user is in. When preserve_groups is set, the user's existing group vector is left unaltered.<br />
<br />
#Defaults pwfeedback<br />
# By default, sudo reads the password like most other Unix programs, by turning off echo<br />
# until the user hits the return (or enter) key. Some users become confused by this as it appears to the user<br />
# presses a key. Note that this does have a security impact as an onlooker may be able to determine the length of<br />
# the password being entered. Default: OFF<br />
<br />
#Defaults requiretty<br />
# If set, sudo will only run when the user is logged in to a real tty. When this flag is set,<br />
# sudo can only be run from a login session and not via other means such as cron(8) or cgi-bin<br />
<br />
#Defaults root_sudo<br />
# If set, root is allowed to run sudo too. Disabling this prevents users from "chaining" sudo<br />
# commands to get a root shell by doing something like "sudo sudo /bin/sh". Note, however, that real additional<br />
# security; it exists purely for historical reasons. Default: ON<br />
<br />
#Defaults rootpw<br />
# If set, sudo will prompt for the root password instead of the password of the invoking user.<br />
# Default: OFF<br />
<br />
#Defaults runaspw<br />
# If set, sudo will prompt for the password of the user defined by the runas_default option<br />
# (defaults to root) instead of the password of the invoking user. Default: OFF<br />
<br />
#Defaults set_home<br />
# If enabled and sudo is invoked with the -s option the HOME environment variable will be set<br />
# to the home directory of the target user (which is root unless the -u option is used). So set_home is only<br />
# effective for configs where either env_reset is disabled or HOME is present in the env_keep list. Default: OFF<br />
<br />
#Defaults set_logname<br />
# Normally, sudo will set the LOGNAME, USER and USERNAME environment variables to the name<br />
# of the target user (usually root unless the -u option is given). However, since some programs ( may be desirable<br />
# to change this behavior. This can be done by negating the set_logname option. Note that if the env_reset option<br />
# has not been disabled, entries in the env_keep list will override<br />
<br />
#Defaults set_utmp<br />
# When enabled, sudo will create an entry in the utmp (or utmpx) file when a pseudo-tty is<br />
# allocated. A pseudo-tty is allocated by sudo when the log_input, log_output or use_pty flags are e the tty, time,<br />
# type and pid fields updated. Default: ON<br />
<br />
#Defaults setenv<br />
# Allow the user to disable the env_reset option from the command line via the -E option.<br />
# Additionally, environment variables set via the command line are not subject to the restrictions impo variables<br />
# in this manner. Default: OFF<br />
<br />
#Defaults shell_noargs<br />
# If set and sudo is invoked with no arguments it acts as if the -s option had been given.<br />
# That is, it runs a shell as root (the shell is determined by the SHELL environment variable if is off by default.<br />
<br />
#Defaults stay_setuid<br />
# Normally, when sudo executes a command the real and effective UIDs are set to the target<br />
# user (root by default). This option changes that behaviour such that the real UID is left as the systems that<br />
# disable some potentially dangerous functionality when a program is run setuid. This option is only effective on<br />
# systems with either the setreuid() or setresuid() function. This flag<br />
<br />
#Defaults targetpw<br />
# If set, sudo will prompt for the password of the user specified by the -u option (defaults to root) instead<br />
# of the password of the invoking user. In addition, the timestamp file name will passwd database as an argument<br />
# to the -u option. Default: OFF<br />
<br />
#Defaults tty_tickets<br />
# If set, users must authenticate on a per-tty basis. With this flag enabled, sudo will<br />
# use a file named for the tty the user is logged in on in the user's time stamp directory.<br />
<br />
#Defaults umask_override<br />
# If set, sudo will set the umask as specified by sudoers without modification. This makes<br />
# it possible to specify a more permissive umask in sudoers than the user's own umask and match user's umask and what<br />
# is specified in sudoers. Default: OFF<br />
<br />
#Defaults use_pty<br />
# If set, sudo will run the command in a pseudo-pty even if no I/O logging is being gone.<br />
# A malicious program run under sudo could conceivably fork a background process that retains to the u that impossible.<br />
# Default: OFF<br />
<br />
#Defaults utmp_runas<br />
# If set, sudo will store the name of the runas user when updating the utmp (or utmpx) file.<br />
# By default, sudo stores the name of the invoking user. Default: OFF<br />
<br />
#Defaults visiblepw<br />
# By default, sudo will refuse to run if the user must enter a password but it is not possible to disable echo on the <br />
# terminal. If the visiblepw flag is set, sudo will prompt for a password even when it would be visible on the screen. <br />
# This makes it possible to run things like "rsh somehost sudo ls" since rsh(1) does not allocate a tty. Default: OFF<br />
<br />
#Defaults closefrom<br />
# Before it executes a command, sudo will close all open file descriptors other than standard<br />
# input, standard output and standard error (ie: file descriptors 0-2).<br />
<br />
#Defaults passwd_tries<br />
# The number of tries a user gets to enter his/her password before sudo logs the failure<br />
# and exits. The default is 3.<br />
<br />
#Defaults loglinelen<br />
# Number of characters per line for the file log. This value is used to decide when to wrap<br />
# lines for nicer log files. This has no effect on the syslog log file, only the file log.<br />
<br />
#Defaults passwd_timeout<br />
# Number of minutes before the sudo password prompt times out, or 0 for no timeout.<br />
# The timeout may include a fractional component if minute granularity is insufficient, for example 2<br />
<br />
#Defaults timestamp_timeout<br />
# Number of minutes that can elapse before sudo will ask for a passwd again. The timeout<br />
# may include a fractional component if minute granularity is insufficient, for example 2.5. timestamp will never expire.<br />
# This can be used to allow users to create or delete their own timestamps via sudo -v and sudo -k respectively.<br />
<br />
#Defaults umask<br />
# Umask to use when running the command. Negate this option or set it to 0777 to preserve<br />
# the user's umask. The actual umask that is used will be the union of the user's umask and the value o running<br />
# a command. Note on systems that use PAM, the default PAM configuration may specify its own umask which will<br />
# override the value set in sudoers.<br />
<br />
#Defaults badpass_message<br />
# Message that is displayed if a user enters an incorrect password. The default is Sorry,<br />
# try again. unless insults are enabled.<br />
<br />
#Defaults editor<br />
# A colon (':') separated list of editors allowed to be used with visudo. visudo will choose<br />
# the editor that matches the user's EDITOR environment variable if possible, or the first editor in<br />
<br />
#Defaults iolog_dir<br />
# The top-level directory to use when constructing the path name for the input/output log<br />
# directory. Only used if the log_input or log_output options are enabled or when the LOG_INPUT or L directory.<br />
# The default is "/var/log/sudo-io". The following percent (%) escape sequences are supported:<br />
# %{seq} - expanded to base-36 sequence number, such as 0100A5, to form a new directory, e.g. 01/00/A5<br />
# %{user} - expanded to the invoking user's login name<br />
# %{group} - expanded to the name of the invoking user's real group ID<br />
# %{runas_user} - expanded to the login name of the user the command will be run as (e.g. root)<br />
# %{runas_group} - expanded to the group name of the user the command will be run as (e.g. wheel)<br />
# %{hostname} - expanded to the local host name without the domain name<br />
# %{command} - expanded to the base name of the command being run In addition, any escape sequences supported by<br />
# strftime() function will be expanded. To include a literal % character, the string %% should be used.<br />
<br />
#Defaults iolog_file<br />
# The path name, relative to iolog_dir, in which to store input/output logs when the log_input or log_output options are<br />
# enabled or when the LOG_INPUT or LOG_OUTPUT tags are present for a See the iolog_dir option above for a list of<br />
# supported percent (%) escape sequences. In addition to the escape sequences, path names that end in six or more Xs will<br />
# have the Xs replaced with a unique combination of digits and letters, similar to the mktemp() function.<br />
<br />
#Defaults mailsub<br />
# Subject of the mail sent to the mailto user. The escape %h will expand to the host name of<br />
# the machine. Default is *** SECURITY information for %h ***.<br />
<br />
#Defaults noexec_file<br />
# This option is no longer supported. The path to the noexec file should now be set in the /etc/sudo.conf file.<br />
<br />
#Defaults passprompt<br />
# The default prompt to use when asking for a password; can be overridden via the -p option or the SUDO_PROMPT<br />
# environment variable. The following percent (%) escape sequences are supported:<br />
# %H - expanded to the local host name including the domain (only if the host name is fqdn or fqdn option is set)<br />
# %h - expanded to the local host name without the domain name<br />
# %p - expanded to the user whose password is being asked for (respects the rootpw, targetpw and runaspw flags)<br />
# %U - expanded to the login name of the user the command will be run as (defaults to root)<br />
# %u - expanded to the invoking user's login name<br />
# %% - two consecutive % characters are collapsed into a single % character<br />
# The default value is Password:.<br />
<br />
#Defaults runas_default<br />
# The default user to run commands as if the -u option is not specified on the command line. This defaults to root.<br />
<br />
#Defaults syslog_badpri<br />
# Syslog priority to use when user authenticates unsuccessfully. Defaults to alert.<br />
# alert, crit, debug, emerg, err, info, notice, and warning.<br />
<br />
#Defaults syslog_goodpri<br />
# Syslog priority to use when user authenticates successfully. Defaults to notice. See syslog_badpri for the priorities.<br />
<br />
#Defaults sudoers_locale<br />
# Locale to use when parsing the sudoers file, logging commands, and sending email.<br />
# Note that changing the locale may affect how sudoers is interpreted. Defaults to "C".<br />
<br />
#Defaults timestampdir<br />
# The directory in which sudo stores its timestamp files. The default is /var/db/sudo.<br />
<br />
#Defaults timestampowner<br />
# The owner of the timestamp directory and the timestamps stored therein. The default is root.<br />
<br />
#Defaults env_file<br />
# The env_file option specifies the fully qualified path to a file containing variables to<br />
# be set in the environment of the program being run. Entries in this file should either be of the f quotes.<br />
# Variables in this file are subject to other sudo environment settings such as env_keep and env_check.<br />
<br />
#Defaults exempt_group<br />
# Users in this group are exempt from password and PATH requirements. The group name specified should not include<br />
# a % prefix. This is not set by default.<br />
<br />
#Defaults group_plugin<br />
# A string containing a sudoers group plugin with optional arguments. This can be used to implement support for the<br />
# nonunix_group syntax described earlier. The string should consist of configuration arguments the plugin requires.<br />
# These arguments (if any) will be passed to the plugin's initialization function. If arguments are present, the<br />
# string must be enclosed in double quote For example, given /etc/sudo-group, a group file in Unix group format,<br />
# the sample group plugin can be used: Defaults group_plugin="sample_group.so /etc/sudo-group"<br />
# For more information see sudo_plugin(5).<br />
<br />
#Defaults lecture<br />
# This option controls when a short lecture will be printed along with the password prompt. The default value is once.<br />
# It has the following possible values:<br />
# always - Always lecture the user.<br />
# never - Never lecture the user.<br />
# once - Only lecture the user the first time they run sudo.<br />
# If no value is specified, a value of once is implied. Negating the option results in a value of never being used.<br />
<br />
#Defaults lecture_file<br />
# Path to a file containing an alternate sudo lecture that will be used in place of the standard lecture if the named<br />
# file exists. By default, sudo uses a built-in lecture.<br />
<br />
#Defaults listpw<br />
# This option controls when a password will be required when a user runs sudo with the -l option.<br />
# It has the following possible values:<br />
# all - All the user's sudoers entries for the current host must have the NOPASSWD set to avoid entering a pass.<br />
# always - The user must always enter a password to use the -l option.<br />
# any - At least one of the user's sudoers entries for the current host must have the NOPASSWD set to avoid pass.<br />
# never - The user need never enter a password to use the -l option.<br />
# If no value is specified, a value of any is implied. The default value is any.<br />
<br />
#Defaults logfile<br />
# Path to the sudo log file (not the syslog log file). Setting a path turns on logging to a file;<br />
# negating this option turns it off. By default, sudo logs via syslog.<br />
<br />
#Defaults mailerflags<br />
# Flags to use when invoking mailer. Defaults to -t.<br />
<br />
#Defaults mailerpath<br />
# Path to mail program used to send warning mail. Defaults to the path to sendmail found at configure time.<br />
<br />
#Defaults mailfrom<br />
# Address to use for the "from" address when sending warning and error mail. The address should<br />
# be enclosed in double quotes (") to protect against sudo interpreting the @ sign.<br />
<br />
#Defaults mailto<br />
# Address to send warning and error mail to. The address should be enclosed in double quotes<br />
# (") to protect against sudo interpreting the @ sign. Defaults to root.<br />
<br />
#Defaults secure_path<br />
# Path used for every command run from sudo. If you don't trust the people running sudo to have a sane PATH environment<br />
# variable you may want to use this. Another use is if you want to option are not affected by secure_path.<br />
# This option is not set by default.<br />
<br />
#Defaults syslog<br />
# Syslog facility if syslog is being used for logging (negate to disable syslog logging). Defaults to auth.<br />
# authpriv (if OS supports it), auth, daemon, user, local0, local1, local2, local3, local4, local5, local6, and local7.<br />
<br />
#Defaults verifypw<br />
# This option controls when a password will be required when a user runs sudo with the -v option.<br />
# It has the following possible values:<br />
# all - All the user's sudoers entries for the current host must have the NOPASSWD flag to avoid pw.<br />
# always - The user must always enter a password to use the -v option.<br />
# any - At least one of the user's sudoers entries for the current host must have NOPASSWD to avoid pw.<br />
# never - The user need never enter a password to use the -v option<br />
# If no value is specified, a value of all is implied. Negating the option results in a value of never being used.<br />
# The default value is all.<br />
<br />
#Defaults env_check<br />
# Environment variables to be removed from the user's environment if the variable's value contains % or / characters.<br />
# This can be used to guard against printf-style format vulnerabilities value without double-quotes. The list can be<br />
# replaced, added to, deleted from, or disabled by using the =, +=, -=, and ! operators respectively. Regardless of<br />
# whether the env_reset option is ena they pass the aforementioned check. The default list of environment variables<br />
# to check is displayed when sudo is run by root with the -V option.<br />
<br />
#Defaults env_delete<br />
# Environment variables to be removed from the user's environment when the env_reset option is not in effect. The<br />
# argument may be a double-quoted, space-separated list or a single value w +=, -=, and ! operators respectively.<br />
# The default list of environment variables to remove is displayed when sudo is run by root with the -V option.<br />
<br />
#Defaults env_keep<br />
# Environment variables to be preserved in the user's environment when the env_reset option is in effect. This<br />
# allows fine-grained control over the environment sudo-spawned processes will r quotes. The list can be replaced,<br />
# added to, deleted from, or disabled by using the =, +=, -=, and ! operators respectively.</nowiki>}}</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=TeX_Live&diff=290613TeX Live2013-12-28T00:49:40Z<p>Notasynonym: </p>
<hr />
<div>[[Category:TeX]]<br />
[[it:TeXLive]]<br />
[[ja:TeX Live]]<br />
[[zh-CN:TeXLive]]<br />
{{Article summary start}}<br />
{{Article summary text|Introduce how install and use TeX Live.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|TeX Live FAQ}}<br />
{{Article summary wiki|TeX Live and CJK}}<br />
{{Article summary wiki|LaTeX}}<br />
{{Article summary end}}<br />
[http://www.tug.org/texlive/ TeX Live] is an "easy way to get up and running with the [[Wikipedia:TeX|TeX]] document production system. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world."<br />
<br />
For more information see: [[:Category:TeX]]<br />
<br />
== Installation ==<br />
The TeX Live packages are arranged into two groups in the [[Official Repositories|official repositories]]: <br />
* {{grp|texlive-most}} includes TeX Live applications.<br />
* {{grp|texlive-lang}} provides various character sets and non-English features.<br />
<br />
The essential package {{Pkg|texlive-core}} contains the basic texmf-dist tree, while {{Pkg|texlive-bin}} contains the binaries, libraries, and the texmf tree. {{Pkg|texlive-core}} is based on the “medium” install scheme of the upstream distribution. All other packages are based on the eponymous collections in TeX Live. To determine which CTAN packages are included in each package, lookup the files:<br />
/var/lib/texmf/arch/installedpkgs/<package>_<revnr>.pkgs<br />
<br />
=== texlive-most ===<br />
{| width="100%"<br />
|- valign="top"<br />
|<br />
* {{Pkg|texlive-core}}<br />
* {{Pkg|texlive-bibtexextra}}<br />
* {{Pkg|texlive-fontsextra}}<br />
* {{Pkg|texlive-formatsextra}}<br />
* {{Pkg|texlive-games}}<br />
|<br />
* {{Pkg|texlive-genericextra}}<br />
* {{Pkg|texlive-htmlxml}}<br />
* {{Pkg|texlive-humanities}}<br />
* {{Pkg|texlive-latexextra}}<br />
* {{Pkg|texlive-music}}<br />
|<br />
* {{Pkg|texlive-pictures}}<br />
* {{Pkg|texlive-plainextra}}<br />
* {{Pkg|texlive-pstricks}}<br />
* {{Pkg|texlive-publishers}}<br />
* {{Pkg|texlive-science}}<br />
|}<br />
<br />
=== texlive-lang ===<br />
* {{Pkg|texlive-langcjk}}<br />
* {{Pkg|texlive-langcyrillic}}<br />
* {{Pkg|texlive-langgreek}}<br />
* {{Pkg|texlive-langextra}}<br />
<br />
{{note|{{Pkg|texlive-langextra}} provides language support for African, Arabic, Armenian, Croatian, Hebrew, Indic, Mongolian, Tibetan and Vietnamese.}}<br />
<br />
=== Alternative: TeX Live network install ===<br />
<br />
Installing TeX Live manually honors the Arch Way in that it gives you much more control and lets you understand the process. It's the only way you can get a full-featured LaTeX distribution under 100 MB that fits your needs without install a thousand of packages you will never use.<br />
<br />
A detailed guide for TeX Live network install can be found on the [http://en.wikibooks.org/wiki/LaTeX/Installation#Custom_installation_with_TeX_Live LaTeX Wikibook].<br />
<br />
Information about making TeX Live network install : http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-140003<br />
<br />
A [https://bbs.archlinux.org/viewtopic.php?id=109427 discussion] of the pros and cons of making the TeX Live network install.<br />
<br />
For all those programs that require texlive to be installed (e.g. kile) you can use the {{AUR|texlive-dummy}} package from AUR.<br />
<br />
== Important information ==<br />
<br />
* The way to handle font mappings for updmap has been improved in Sept. 2009, and installation should now be much more reliable than in the past. In the meanwhile, if you encounter error messages about unavailable map file, simply remove them by hand from the {{ic|updmap.cfg}} file (ideally using {{Ic|updmap-sys --edit}}). You can also run {{Ic|updmap-sys --syncwithtrees}} to automatically comment out outdated map lines from the config file.<br />
<br />
* The ConTeXt formats (for MKII and MKIV) are not automatically generated upon installation. See [http://wiki.contextgarden.net '''the ConTeXT wiki'''] for instructions on how to do this.<br />
<br />
* The packages containing the documentation and sources are available in the [community] repository. You can also consult it online at http://tug.org/texlive/Contents/live/doc.html or on CTAN. <br />
<br />
* TeX Live (upstream) now provides a tool for incremental updates of CTAN packages. On that basis, we also plan to update our packages on a regular basis (we have written tools that almost automate that task).<br />
<br />
* Some tools and utilities included in TeX Live rely on {{Pkg|ghostscript}}, {{Pkg|perl}}, and {{Pkg|ruby}}. <br />
<br />
* For help and information about TeX Live see: http://tug.org/texlive/doc.html and http://tug.org/texlive/doc/texlive-en/texlive-en.html<br />
<br />
* System-wide configuration files are under {{ic|/usr/share/texmf-config}}. User-specific ones should be put under {{ic|~/.texlive/texmf-config}}. {{Ic|$TEXMFHOME}} is {{ic|~/texmf}} and {{Ic|$TEXMFVAR}} is {{ic|~/.texlive/texmf-var}}.<br />
<br />
* A skeleton of a local texmf tree is at {{ic|/usr/local/share/texmf}}: this directory is writable for members of the group '''tex'''.<br />
<br />
===Paper Size===<br />
If you would like to set the default page size to something other than A4 (such as "Letter"), run the following command:<br />
$ texconfig<br />
This command is also capable of changing other useful settings.<br />
<br />
===Error with "formats not generated" upon update===<br />
<br />
See [https://bugs.archlinux.org/task/16467 this bug report]. ('''Note that if you do not use the experimental engine ''LuaTeX'', you can ignore this.''') This situation typically occurs when the configuration files {{ic|language.def}} and/or {{ic|language.dat}} for hyphenation patterns contain references to files from earlier releases of {{Ic|texlive-core}}, in particular to the latest experimental hyphenation patterns for German, whose file name changes frequently. Currently they should point to {{ic|dehyph{n,t}-x-2009-06-19.tex}}. <br />
<br />
To solve this, you need to either remove these files: {{ic|/usr/share/texmf-config/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}}<br />
or update them using the newest version under: {{ic|/usr/share/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}}<br />
and then run<br />
# fmtutil-sys --missing<br />
<br />
===Fonts===<br />
<br />
By default, the fonts that come with the various TeX Live packages are not automatically available to Fontconfig. If you want to use them with, say XeTeX or [[LibreOffice]], the easiest approach is to make symlinks as follows:<br />
mkdir /usr/share/texmf/fonts<br />
mkdir /usr/share/texmf/fonts/opentype<br />
mkdir /usr/share/texmf/fonts/opentype/public<br />
ln -s /usr/share/texmf-dist/fonts/opentype/public/<some_fonts_you_want> ~/.fonts/OTF/ (or TTF or Type1) <br />
<br />
If you want to know more about this pathes, test commands below:<br />
kpsewhich -var-value TEXMFLOCAL<br />
And you can get $FOO_PATH:$BAR_PATH style path list that show setting path for *TeX.<br />
<br />
To make them available to fontconfig, run: <br />
fc-cache ~/.fonts<br />
mkfontscale ~/.fonts/OTF (or TTF or Type1) <br />
mkfontdir ~/.fonts/OTF (or TTF or Type1)<br />
<br />
Alternatively, {{Pkg|texlive-bin}} contains the file {{ic|/etc/fonts/conf.avail/09-texlive-fonts.conf}} that contains a list of the font directories used by TeX Live. You can use this file with:<br />
<br />
{{bc|# ln -s /etc/fonts/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf}}<br />
<br />
And then update fontconfig:<br />
<br />
{{bc|# fc-cache && mkfontscale && mkfontdir}}<br />
<br />
{{Note|This may cause conflicts with XeTeX/XeLaTeX if the same fonts are (separately) available to both TeX and Fontconfig, i.e. if multiple copies of the same font are available on the search path.}}<br />
<br />
== TeXLive Local Manager ==<br />
<br />
The TeXLive Local Manager is a utility provided by Firmicus which allows to conveniently manage a TeX Live installation on Arch Linux.<br />
See {{AUR|texlive-localmanager-git}} in the [[Arch User Repository|AUR]].<br />
<br />
Usage: tllocalmgr <br />
tllocalmgr [options] [command] [args]<br />
<br />
Running tllocalmgr alone starts the TeXLive local manager shell <br />
for Arch Linux. This shell is capable of command-line completion!<br />
There you can look at the available updates with the command 'status' <br />
and you can install individual CTAN packages using 'install' or 'update'<br />
under $TEXMFLOCAL. This is done by creating a package texlive-local-<pkg><br />
and installing it with pacman. Note that this won’t interfere with your <br />
standard texlive installation, but files under $TEXMFLOCAL will take<br />
precedence. <br />
<br />
Here are the commands available in the shell:<br />
<br />
Commands: <br />
status -- Current status of TeXLive installation<br />
shortinfo * -- Print a one-liner description of CTAN packages<br />
info * -- Print info on CTAN packages<br />
update * -- Locally update CTAN packages<br />
install * -- Locally install new CTAN packages<br />
installdoc * -- Locally install documentation of CTAN packages<br />
installsrc * -- Locally install sources of CTAN packages<br />
listfiles * -- List all files in CTAN packages<br />
search * -- Search info on CTAN packages<br />
searchfiles * -- Search for files in CTAN packages<br />
texhash -- Refresh the TeX file database<br />
clean -- Clean local build tree<br />
help -- Print helpful information<br />
quit -- Quit tllocalmgr<br />
<br />
The commands followed by * take one of more package names as arguments.<br />
Note that these can be completed automatically by pressing TAB.<br />
<br />
You can also run tllocalmgr as a standard command-line program, with<br />
one of the above commands as argument, then the corresponding task will<br />
be performed and the program will exit (except when the command is 'status').<br />
<br />
tllocalmgr accepts the following options:<br />
<br />
Options: --help Shows this help<br />
--version Show the version number<br />
--forceupdate Force updating the TeXLive database<br />
--skipupdate Skip updating the TeXLive database<br />
--localsearch Search only installed packages<br />
--location #TODO?<br />
--mirror CTAN mirror to use (default is mirror.ctan.org)<br />
--nocolor #TODO<br />
<br />
=== Recent "langukenglish" errors ===<br />
For problems involving this error when trying to run {{ic|tllocalmgr}} commands,<br />
Can't get object for collection-langukenglish at /usr/bin/tllocalmgr line 103<br />
See ary0's solution at the AUR: {{AUR|texlive-localmanager}}. In summary, edit {{ic|/usr/share/texmf-var/arch/tlpkg/TeXLive/Arch.pm}} and remove "langukenglish" from the section of the file shown here:<br />
my @core_colls =<br />
qw/ basic context genericrecommended fontsrecommended langczechslovak<br />
langdutch langfrench langgerman langitalian langpolish langportuguese<br />
langspanish **langukenglish** latex latexrecommended luatex mathextra metapost<br />
texinfo xetex /;<br />
<br />
== Install .sty files == <br />
TeX Live (and teTeX) uses its own directory indexes (files named {{ic|ls-R}}), and you need to refresh them after you copy something into one of the TeX trees. Or TeX can not see them. Magic command:<br />
{{bc|# mktexlsr}}<br />
or<br />
{{bc|# texhash}}<br />
or<br />
{{bc|# texconfig[-sys] rehash}}<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
=== Manual Installation ===<br />
Normally, new .sty files go in {{ic|/usr/share/texmf-dist/tex/latex/<package name>/*}}. Create this directory if you do not have it. This directory will automatically be searched when *tex is executed. Further discussion can be found here: https://bbs.archlinux.org/viewtopic.php?id=85757<br />
<br />
=== Using PKGBUILDs ===<br />
To install a LaTeX package on a global level, you should use a [[PKGBUILD]] for the sake of simplifying maintenance. Look at this example.<br />
<pre><br />
# Original autor: Martin Kumm <pluto@ls68.de> <br />
# Maintainer: masterkorp <masterkorp@gmail.com> irc: masterkorp at freenode.org<br />
# Last edited: 2nd April 2011<br />
<br />
pkgname=texlive-gantt<br />
pkgver=1.3<br />
pkgrel=1<br />
license=('GPL')<br />
depends=('texlive-core')<br />
pkgdesc="A LaTeX package for drawing gantt plots using pgf/tikz"<br />
url="http://www.martin-kumm.de/tex_gantt_package.php"<br />
arch=('any')<br />
install=texlive-gantt.install<br />
source=(http://www.martin-kumm.de/tex/gantt.sty)<br />
md5sums=('e942191eb0024633155aa3188b4bbc06')<br />
<br />
build()<br />
{<br />
mkdir -p $pkgdir/usr/share/texmf/tex/latex/gantt<br />
cp $srcdir/gantt.sty $pkgdir/usr/share/texmf/tex/latex/gantt<br />
}<br />
</pre><br />
<br />
And the {{ic|.install}} file:<br />
<pre><br />
post_install() {<br />
post_remove<br />
echo "The file was installed in:"<br />
kpsewhich gantt.sty<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
echo "Upgrading package database..."<br />
mktexlsr<br />
}<br />
</pre><br />
<br />
From the {{AUR|texlive-gantt}} package in the [[Arch User Repository|AUR]].</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Kernel_mode_setting&diff=290612Kernel mode setting2013-12-28T00:47:32Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:Kernel]]<br />
[[Category:X Server]]<br />
[[es:Kernel Mode Setting]]<br />
[[hu:Kernel Mode Setting]]<br />
[[ja:Kernel Mode Setting]]<br />
[[zh-CN:Kernel Mode Setting]]<br />
[[zh-TW:Kernel Mode Setting]]<br />
{{Related articles start}}<br />
{{Related|ATI}}<br />
{{Related|Intel Graphics}}<br />
{{Related|Nouveau}}<br />
{{Related articles end}}<br />
Kernel [[Wikipedia:Mode-setting|Mode Setting]] (KMS) is a method for setting display resolution and depth in the kernel space rather than user space.<br />
<br />
The Linux kernel's implementation of KMS enables native resolution in the framebuffer and allows for instant console (tty) switching. KMS also enables newer technologies (such as DRI2) which will help reduce artifacts and increase 3D performance, even kernel space power-saving.<br />
<br />
{{Note|The proprietary [[NVIDIA|nvidia]] and [[AMD Catalyst|catalyst]] drivers also implement kernel mode-setting, but as they do not use the built-in kernel implementation, they lack an fbdev driver for the high-resolution console.}}<br />
<br />
== Background ==<br />
Previously, setting up the video card was the job of the X server. Because of this, it was not easily possible to have fancy graphics in virtual consoles. Also, each time a switch from X to a virtual console was made ({{ic|Ctrl+Alt+F1}}), the server had to give control over the video card to the kernel, which was slow and caused flickering. The same "painful" process happened when the control was given back to the X server ({{ic|Ctrl+Alt+F7}}).<br />
<br />
With Kernel Mode Setting (KMS), the kernel is now able to set the mode of the video card. This makes fancy graphics during bootup, virtual console and X fast switching possible, among other things.<br />
== Installation ==<br />
At first, note that for ''any'' method you use, you should ''always'' disable:<br />
* Any "vga=" options in your bootloader as these will conflict with the native resolution enabled by KMS.<br />
* Any "video=" lines that enable a framebuffer that conflicts with the driver.<br />
* Any other framebuffer drivers (such as [[uvesafb]]).<br />
<br />
=== Late KMS start===<br />
[[Intel]], [[Nouveau]] and [[ATI]] drivers already enable KMS automatically for all chipsets, so you need not install it manually.<br />
<br />
The proprietary [[NVIDIA]] and [[AMD Catalyst]] drivers do not use the open driver stack. In order to use KMS you should replace them with open source drivers.<br />
<br />
=== Early KMS start ===<br />
<br />
To load KMS as early as possible in boot process, add the module [[radeon]] (for ATI/AMD cards), [[Intel|i915]] (for Intel integrated graphics) or [[nouveau]] (for Nvidia cards) to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}. For example:<br />
{{hc|/etc/mkinitcpio.conf|2=MODULES="... i915 ..."}}<br />
If you are using a custom EDID file (not applicable for the built-in resolutions), you should embed it into initramfs as well:<br />
<br />
{{hc|/etc/mkinitcpio.conf|<br />
2=FILES="/lib/firmware/edid/your_edid.bin"}}<br />
<br />
Rebuild your kernel image (refer to the [[mkinitcpio]] article for more info):<br />
<br />
{{bc|# mkinitcpio -p <name of your kernel preset; e.g. ''linux''>}}<br />
<br />
==Troubleshooting==<br />
<br />
===My fonts are too tiny===<br />
See [[Fonts#Changing_the_default_font | changing the default font]] for how to change your console font to a large font. Terminus font in [community] is available in many sizes, including larger sizes.<br />
<br />
===Problem upon bootloading and dmesg===<br />
Polling for connected display devices on older systems can be quite expensive. Poll will happen periodically and can in worst cases take several hundred milliseconds, depending on the hardware. This will cause visible stalls, for example in video playback. These stalls might happen even when your video is on HDP output but you have other non HDP outputs in your hw configuration. If you experience stalls in display output occurring every 10 seconds, disabling polling might help.<br />
<br />
If you see an error code of 0x00000010 (2) while booting up, (You will get about 10 lines of text, the last part denoting that error code), then add the following line into {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options drm_kms_helper poll=0<br />
<br />
==Forcing modes and EDID==<br />
<br />
{{Note|This section is a WIP. Improvements and corrections are more than welcome}}<br />
<br />
In case that your monitor/TV is not sending the appropriate [[Wikipedia:EDID|EDID]] data or similar problems, you will notice that the native resolution is not automatically configured or no display at all. The kernel has a provision to load the binary EDID data, and provides as well data to set four of the most typical resolutions.<br />
<br />
If you have the EDID file for your monitor the process is easy. If you do not have, you can either use one of the built-in resolution-EDID binaries (or generate one during kernel compilation, [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/EDID/HOWTO.txt more info here]) or build your own EDID.<br />
<br />
In case you have an EDID file (e.g. extracted from Windows drivers for your monitor), create a dir {{ic|edid}} under {{ic|/lib/firmware}}:<br />
<br />
# mkdir /lib/firmware/edid<br />
<br />
and then copy your binary into the {{ic|/lib/firmware/edid}} directory.<br />
<br />
To load it at boot, specify the following in the kernel command line:<br />
<br />
{{bc|1=drm_kms_helper.edid_firmware=edid/your_edid.bin}}<br />
<br />
You can also specify it only for a specified connection:<br />
<br />
{{bc|1=drm_kms_helper.edid_firmware=VGA-1:edid/your_edid.bin}}<br />
<br />
For the four built-in resolutions, see table below for the name to specify:<br />
<br />
{| border="1" <br />
|-<br />
| '''Resolution''' || '''Name to specify''' <br />
|-<br />
| 1024x768 || edid/1024x768.bin <br />
|-<br />
| 1280x1024 || edid/1280x1024.bin <br />
|-<br />
| 1600x1200 (kernel 3.10 or higher) || edid/1600x1200.bin<br />
|-<br />
| 1680x1050 || edid/1680x1050.bin <br />
|-<br />
| 1920x1080 || edid/1920x1080.bin <br />
|}<br />
<br />
If you are doing early KMS, you must include the custom EDID file in the initramfs or you will run into problems.<br />
<br />
You can also construct your own EDID with the makefile included in the {{ic|Documentation/EDID}} sources of the kernel. The full information can be read [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/EDID/HOWTO.txt here] and [https://www.osadl.org/Single-View.111+M591850c02b5.0.html there].<br />
<br />
{{Warning|The method described below is somehow incomplete because e.g. Xorg does not take into account the resolution specified, so users are encouraged to use the method described above; however, specifying resolution with {{ic|1=video=}} command line may be useful in some scenarios}}<br />
<br />
From [http://nouveau.freedesktop.org/wiki/KernelModeSetting the nouveau wiki]:<br />
<br />
A mode can be forced on the kernel command line. Unfortunately, the command line option video is poorly documented in the DRM case. Bit and pieces on how to use it can be found in<br />
<br />
*http://cgit.freedesktop.org/nouveau/linux-2.6/tree/Documentation/fb/modedb.txt<br />
*http://cgit.freedesktop.org/nouveau/linux-2.6/tree/drivers/gpu/drm/drm_fb_helper.c <br />
<br />
The format is: <br />
video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]<br />
<br />
*<conn>: Connector, e.g. DVI-I-1, see {{ic|/sys/class/drm/}} for available connectors<br />
*<xres> x <yres>: resolution<br />
*M: compute a CVT mode?<br />
*R: reduced blanking?<br />
*-<bpp>: color depth<br />
*@<refresh>: refresh rate<br />
*i: interlaced (non-CVT mode)<br />
*m: margins?<br />
*e: output forced to on<br />
*d: output forced to off<br />
*D: digital output forced to on (e.g. DVI-I connector) <br />
<br />
You can override the modes of several outputs using "video" several times, for instance, to force DVI to 1024x768 at 85 Hz and TV-out off: <br />
video=DVI-I-1:1024x768@85 video=TV-1:d<br />
<br />
To get the name and current status of connectors, you can use the following shell oneliner:<br />
<br />
{{hc|<nowiki>for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done</nowiki>| <br />
DVI-I-1: connected<br />
HDMI-A-1: disconnected<br />
VGA-1: disconnected<br />
}}<br />
<br />
==Disabling modesetting==<br />
<br />
You may want to disable KMS for various reasons, such as getting a blank screen or a "no signal" error from the display, when using the Catalyst driver, etc. To disable KMS add {{ic|nomodeset}} as a kernel parameter. See [[Kernel parameters]] for more info.<br />
<br />
Along with {{ic|nomodeset}} kernel parameter, for Intel graphics card you need to add {{ic|1=i915.modeset=0}} and for Nvidia graphics card you need to add {{ic|1=nouveau.modeset=0}}. For Nvidia Optimus dual-graphics system, you need to add all the three kernel parameters (i.e. {{ic|1="nomodeset i915.modeset=0 nouveau.modeset=0"}}).<br />
<br />
{{Note|Some [[Xorg]] drivers will not work with KMS disabled. See the wiki page on your specific driver for details.}}</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Install_bundled_32-bit_system_in_64-bit_system&diff=290610Install bundled 32-bit system in 64-bit system2013-12-28T00:35:21Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Arch64]]<br />
[[cs:32bit chroot]]<br />
[[fr:Install environnement 32 sur un systeme 64]]<br />
[[zh-CN:Install bundled 32-bit system in Arch64]]<br />
This article presents one way of running 32-bit applications, which may be of use to those who do not wish to install the lib32-* libraries from the multilib repository and instead prefer to isolate 32bit applications. The approach involves creating a "chroot jail" to handle 32-bit apps.<br />
<br />
== Make the i686 Chroot ==<br />
===Install the Base 32-bit System===<br />
<br />
1. Create the directory:<br />
mkdir /opt/arch32<br />
<br />
2. Generate temporary [[pacman]] configuration files for chroot:<br />
sed -e 's/\$arch/i686/g' /etc/pacman.d/mirrorlist > /opt/arch32/mirrorlist<br />
sed -e 's@/etc/pacman.d/mirrorlist@/opt/arch32/mirrorlist@g' -e '/Architecture/ s,auto,i686,' /etc/pacman.conf > /opt/arch32/pacman.conf<br />
<br />
*These files would conflict with the normal pacman files, which will be installed in the later steps.<br />
*For this reason they must be put ''into'' a temporary location ({{ic|/opt/arch32}} is used here).<br />
*Remember to delete/comment the multilib repo, if you have enabled it, in the {{ic|/opt/arch32/pacman.conf}} file<br />
<br />
3. Create the directory:<br />
mkdir -p /opt/arch32/var/{cache/pacman/pkg,lib/pacman}<br />
<br />
4. Sync pacman:<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg --config /opt/arch32/pacman.conf -Sy<br />
<br />
5. Install the base and optionally base-devel groups:<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg --config /opt/arch32/pacman.conf -S base base-devel<br />
<br />
Optionally add your favorite text editor and distcc if you plan to compile within the chroot with other machines:<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg --config /opt/arch32/pacman.conf -S base base-devel sudo vim distcc<br />
<br />
Optionally move the pacman mirror list into place:<br />
mv /opt/arch32/mirrorlist /opt/arch32/etc/pacman.d<br />
<br />
===Configuration files===<br />
Key configuration files should be copied over:<br />
<br />
cd /opt/arch32/etc<br />
<br />
cp /etc/passwd* .<br />
cp /etc/shadow* .<br />
cp /etc/group* .<br />
cp /etc/sudoers .<br />
cp /etc/resolv.conf .<br />
cp /etc/localtime .<br />
cp /etc/locale.gen .<br />
cp /etc/profile.d/locale.sh profile.d<br />
cp /etc/vimrc .<br />
cp /etc/mtab .<br />
cp /etc/inputrc .<br />
<br />
Be sure to include the "." character!<br />
<br />
Remember to define the correct the number of MAKEFLAGS and other vars in {{ic|/opt/arch32/etc/makepkg.conf}} before attempting to build.<br />
<br />
== Create an Arch32 Daemon Script and Systemd Service ==<br />
{{hc|/etc/systemd/system/arch32.service|<nowiki><br />
[Unit]<br />
Description=32-bit chroot<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/usr/local/bin/arch32 start<br />
ExecStop=/usr/local/bin/arch32 stop<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/usr/local/bin/arch32|<nowiki><br />
#!/bin/bash<br />
<br />
MOUNTPOINT=/opt/arch32<br />
PIDFILE=/run/arch32<br />
<br />
# Leave this blank if not using distccd from within the chroot.<br />
USEDISTCC=<br />
DISTCC_SUBNET='192.168.0.0/24'<br />
<br />
start_distccd() {<br />
[[ ! -L $MOUNTPOINT/usr/bin/distccd-chroot ]] && ln -s /usr/bin/distccd $MOUNTPOINT/usr/bin/distccd-chroot<br />
DISTCC_ARGS="--user nobody --allow $DISTCC_SUBNET --port 3692 --log-level warning --log-file /tmp/distccd-i686.log"<br />
<br />
if [[ -z "$(pgrep distccd-chroot)" ]]; then<br />
linux32 chroot $MOUNTPOINT /bin/bash -c "/usr/bin/distccd-chroot --daemon ${DISTCC_ARGS}"<br />
else<br />
echo "/usr/bin/distccd-chroot seems to be running so doing nothing!"<br />
fi<br />
}<br />
<br />
stop_distccd() {<br />
if [[ -n "$(pgrep distccd-chroot)" ]]; then<br />
linux32 chroot $MOUNTPOINT /bin/bash -c "pkill -SIGTERM distccd-chroot"<br />
else<br />
echo "/usr/bin/distccd-chroot does NOT seems to be running so doing nothing!"<br />
fi<br />
}<br />
<br />
case $1 in<br />
start)<br />
# Only relevant for users with an arch32 chroot on a separate partition.<br />
# Edit to fit your system and take note of the corresponding unmount option in the stop function!<br />
# mountpoint -q $MOUNTPOINT || mount LABEL="arch32" $MOUNTPOINT<br />
<br />
dirs=(/tmp /dev /dev/pts /home)<br />
for d in "${dirs[@]}"; do<br />
mount -o bind $d $MOUNTPOINT$d<br />
done<br />
<br />
mount -t proc none $MOUNTPOINT/proc<br />
mount -t sysfs none $MOUNTPOINT/sys<br />
touch $PIDFILE<br />
[[ -n "$USEDISTCC" ]] && start_distccd<br />
;;<br />
stop)<br />
dirs=(/home /dev/pts /dev /tmp)<br />
[[ -n "$USEDISTCC" ]] && stop_distccd<br />
umount $MOUNTPOINT/{sys,proc}<br />
for d in "${dirs[@]}"; do<br />
umount -l "$MOUNTPOINT$d"<br />
done<br />
# Only relevant for users with an arch32 chroot on a separate partition.<br />
# umount -l $MOUNTPOINT<br />
rm -f $PIDFILE<br />
;;<br />
*)<br />
echo "usage: $0 (start|stop)"<br />
exit 1<br />
esac<br />
<br />
# vim:set ts=2 sw=2 et:<br />
</nowiki>}}<br />
<br />
Be sure to make the init script executable:<br />
# chmod +x /usr/local/bin/arch32<br />
<br />
Enable the service as any other systemd service.<br />
<br />
==Configure the new system==<br />
=== Configure the chroot ===<br />
Chroot into the new system:<br />
/usr/local/bin/arch32 start<br />
xhost +SI:localuser:usernametogiveaccesstogoeshere <br />
chroot /opt/arch32<br />
<br />
It is recommended to use a custom bash prompt inside the 32-bit chroot installation in order to differentiate from the regular system. You can, for example, add a ''ARCH32'' string to the ''PS1'' variable defined in {{ic|~/.bashrc}}. In fact, the default Debian .bashrc prompt string contains appropriate logic to report whether the working directory is within a chroot.<br />
<br />
=== First-time Setup ===<br />
Fix possible locale problems:<br />
/usr/sbin/locale-gen<br />
<br />
Initialize pacman:<br />
sed -i 's/CheckSpace/#CheckSpace/' /etc/pacman.conf<br />
pacman-key --init<br />
pacman-key --populate archlinux<br />
<br />
=== Install Needed Packages ===<br />
Install the needed packages including apps, fonts, etc. for example:<br />
<br />
pacman -S firefox<br />
pacman -S flashplugin<br />
<br />
=== Regain Space (Optional) ===<br />
{{Warning| This cleanup is for the '''32-bit''' root environment and must then be done inside it NOT the native 64-bit environment!}}<br />
<br />
The following shows recommended packages for removal:<br />
<br />
pacman -Rd linux mkinitcpio dhcpcd xfsprogs reiserfsprogs jfsutils logrotate lvm2 pcmciautils netctl iputils iproute2 man-pages mdadm inetutils man-db cronie vi<br />
<br />
Also consider regularly clearing out pacman's cache:<br />
pacman -Scc<br />
<br />
== Install and Configure Schroot ==<br />
<br />
Install "schroot" to the native '''64-bit''' installation:<br />
pacman -S schroot<br />
<br />
Edit {{ic|/etc/schroot/schroot.conf}}, and create an ''[Arch32]'' section.<br />
<br />
[Arch32]<br />
type=directory<br />
profile=arch32<br />
description=Arch32<br />
directory=/opt/arch32<br />
users=user1,user2,user3<br />
groups=users<br />
root-groups=root<br />
personality=linux32<br />
aliases=32,default<br />
<br />
Optionally edit {{ic|/etc/schroot/arch32/mount}} to match the mounts created within {{ic|/usr/local/bin/arch32}}.<br />
<br />
== Using Schroot to run a 32-bit application ==<br />
<br />
The general syntax for calling an application ''inside'' the chroot is:<br />
<br />
schroot -p -- htop<br />
<br />
In this example, htop is called from within the 32-bit environment.<br />
<br />
==Troubleshooting==<br />
<br />
===Compilation and installing===<br />
Ensure the desired options are set in the local {{ic|/etc/makepkg.conf}}.<br />
<br />
Some packages may require a {{ic|--host}} flag be added to the ./configure script in the PKBUILD:<br />
./configure --host="i686-pc-linux" ...<br />
This is the case when the build makes use of values (for example, the output of the {{ic|uname}} command) inherited from your base system.<br />
<br />
You may need to give users write access to your chroot's /dev/null to stop some scripts from failing:<br />
chmod 666 /dev/null<br />
<br />
===Video problems===<br />
If you get:<br />
X Error of failed request: BadLength (poly request too large or internal Xlib length error)<br />
while trying to run an application that requires video acceleration, make sure you have installed appropriate video drivers in your chroot. For example,<br />
pacman -S nvidia<br />
<br />
===Sound in flash (youtube, etc.)===<br />
<br />
To get sound from the flash player in Firefox, open a terminal and chroot inside the 32-bit system:<br />
chroot /opt/arch32<br />
<br />
From there, install alsa-oss:<br />
pacman -S alsa-oss<br />
<br />
Then type:<br />
export FIREFOX_DSP="aoss"<br />
<br />
Every chroot into the 32-bit system will require this export command to be entered so it may be best to incorporate it into a script.<br />
<br />
Finally, launch Firefox.<br />
<br />
For [[Wine]] this works the same way. The package alsa-oss will also install the alsa libs required by [[Wine]] to output sound.<br />
<br />
==Tips and tricks==<br />
===Java in a chroot===<br />
See [[Java]] for installation instructions.<br />
<br />
After installing, adjust the path to get Java working:<br />
export PATH="/opt/java/bin/:$PATH"<br />
===arch32-light===<br />
Xyne has created a package that installs a minimalist 32-bit chroot as described above. More information can be found [https://bbs.archlinux.org/viewtopic.php?id=97629 on the forum] and [http://xyne.archlinux.ca/projects/arch32-light on the project page].<br />
<br />
===Allowing 32-bit applications access to 64-bit Pulseaudio===<br />
<br />
Add these lines in {{ic|/usr/local/bin/arch32}}, before the daemon is started:<br />
mount --bind /var/run /opt/arch32/var/run<br />
mount --bind /var/lib/dbus /opt/arch32/var/lib/dbus<br />
<br />
And before the daemon is stopped:<br />
umount /opt/arch32/var/run<br />
umount /opt/arch32/var/lib/dbus<br />
<br />
More information is available at the [[Pulseaudio]] article, especially the section on [[PulseAudio#Pulseaudio_from_within_a_chroot_.28ex._32-bit_chroot_in_64-bit_install.29|Pulseaudio from within a chroot]].<br />
<br />
===Enabling sound in Firefox===<br />
Open a text editor and save the following in {{ic|/usr/bin/firefox32}} as root:<br />
#!/bin/sh<br />
schroot -p firefox $1;export FIREFOX_DSP="aoss"<br />
<br />
Make it executable:<br />
sudo chmod +x /usr/bin/firefox32<br />
<br />
Now you can make an alias for Firefox, if desired:<br />
alias firefox="firefox32"<br />
<br />
Add this to the end of file {{ic|~/.bashrc}} and source it to enable its usage. Or you can just change all your desktop environment's launchers to firefox32 if you still want 64-bit Firefox to be available.<br />
<br />
===Enabling 3D acceleration===<br />
You need to install the corresponding package under your "native" arch for 3D support. <br />
<br />
For information on how to set up your graphic adapter refer to:<br />
<br />
* [[ATI]]<br />
* [[Intel]]<br />
* [[NVIDIA]]<br />
<br />
===Script for wine===<br />
In order to compile wine, you need a 32-bit system installed. Compiling wine is needed for applying patches in order to get [http://art.ified.ca/?page_id=40 PulseAudio] working. See also [https://aur.archlinux.org/packages.php?ID=19675 wine-hacks] from AUR.<br />
<br />
Add the following alias to {{ic|~/.bashrc}}:<br />
alias wine='schroot -pqd "$(pwd)" -- wine'<br />
The {{ic|-q}} switch makes schroot operate in quiet mode, so it works like "regular" wine does. Also note that If you still use dchroot instead of schroot, you should use switch {{ic|-d}} instead of {{ic|-s}}.<br />
<br />
===Printing===<br />
<br />
For accessing CUPS printers intalled in the base system from the chroot environment, see [[CUPS#Installing_CUPS_a_32_bit_chroot_environment|the applicable section]] of the [[CUPS|Arch CUPS Wiki page]].</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=265335NVIDIA2013-07-06T20:56:31Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X Server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[tr:Nvidia]]<br />
[[zh-CN:NVIDIA]]<br />
{{Article summary start}}<br />
{{Article summary text|Information on installing, configuring and troubleshooting the proprietary NVIDIA Drivers.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Nouveau}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]].<br />
<br />
== Installing ==<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} package. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
{{Tip|It is usually beneficial to install the NVIDIA driver through [[pacman]] rather than through the package provided by the NVIDIA site, this allows the driver to be updated when upgrading the system.}}<br />
<br />
1. If you do not know what graphics card your have, find out by issuing:<br />
# lspci -k | grep -A 2 -i "VGA"<br />
2. Install the appropriate driver for your card:<br />
:* For GeForce 8 series and newer [NVC0 and newer] cards, install {{Pkg|nvidia}} package, available in the [[Official Repositories|official repositories]].<br />
:* For GeForce 6/7 series cards [NV40-NVAF], install {{Pkg|nvidia-304xx}} package, available in the [[Official Repositories|official repositories]].<br />
:* For GeForce 5 FX series cards [NV30-NV38], install {{AUR|nvidia-173xx}} package, available in the [[Arch User Repository|AUR]].<br />
:* For GeForce 2/3/4 MX/Ti series cards [NV11 and NV17-NV28], install {{AUR|nvidia-96xx}} package, available in the [[Arch User Repository|AUR]].<br />
<br />
{{Tip|If you are not sure, visit NVIDIA's [http://www.nvidia.com/Download/index.aspx driver download site] to find out the appropriate driver for a given card. You could also check the [http://www.nvidia.com/object/IO_32667.html legacy card list] and the [http://nouveau.freedesktop.org/wiki/CodeNames nouveau wiki's code names page].}}<br />
<br />
:For the very latest GPU models, it may be required to install {{AUR|nvidia-beta}} from the [[Arch User Repository]], since the stable drivers may not support the newly introduced features.<br />
<br />
{{Note|<br />
* The {{Pkg|nvidia-libgl}} or ''nvidia-{304xx,173xx,96xx}-utils'' package is a dependency and will be pulled in automatically. It may conflict with the {{Pkg|libgl}} package; this is normal. If pacman asks to remove {{Pkg|libgl}} and fails due to unsatisfied dependencies, remove it with {{ic|pacman -Rdd libgl}}. Or, if pacman asks to remove {{Pkg|mesa-libgl}} and fails due to unsatisfied dependencies, remove it with {{ic|pacman -Rdd mesa-libgl}}.<br />
* The {{AUR|nvidia-96xx-utils}} package requires a legacy X.Org server release ({{AUR|xorg-server1.12}}). It conflicts with the {{Pkg|xorg-server}} from the official repositories.<br />
}}<br />
<br />
:If you are on 64-bit and also need 32-bit OpenGL support, you must also install the equivalent ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-libgl}} or ''lib32-nvidia-{304xx,173xx}-utils'').<br />
<br />
:{{Tip|The legacy nvidia-96xx and nvidia-173xx drivers can also be installed from the unofficial [http://pkgbuild.com/~bgyorgy/city.html <nowiki>[city] repository</nowiki>].}}<br />
<br />
3. '''Reboot'''. The '''nvidia''' package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Configuring|configure]].<br />
<br />
=== Alternate install: custom kernel ===<br />
<br />
First of all, it's good to know how the ABS works by reading some of the other articles about it:<br />
<br />
* Main article for [[Arch Build System|ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[Creating Packages]]<br />
<br />
{{Note|You can also find the {{AUR|nvidia-all}} package in [[Arch User Repository|AUR]] which makes it easier to use with custom kernels and multiple kernels.}}<br />
<br />
The following is a short tutorial for making a custom NVIDIA driver package using [[ABS]]:<br />
<br />
[[Pacman|Install]] {{Pkg|abs}} from the [[Official Repositories|official repositories]] and generate the tree with:<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/abs<br />
Make a copy of the {{ic|nvidia}} package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/abs/<br />
Go into the temporary {{ic|nvidia}} build directory:<br />
$ cd ~/abs/nvidia<br />
It is required to edit the files {{ic|nvidia.install}} and {{ic|PKGBUILD}} file so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropriate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4-ARCH'}} variable with the custom kernel version, such as {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4'}} or {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4-custom'}} depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the {{ic|_extramodules<nowiki>=</nowiki>extramodules-3.4-ARCH}} variable to match the appropriate version, as above.<br />
# If there are more than one kernels in the system installed in parallel (such as a custom kernel alongside the default -ARCH kernel), change the {{ic|pkgname<nowiki>=</nowiki>nvidia}} variable in the PKGBUILD to a unique identifier, such as nvidia-344 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. You will also need to comment the line in {{ic|package()}} that blacklists the nvidia module in {{ic|/usr/lib/modprobe.d/nvidia.conf}} (no need to do it again).<br />
<br />
Then do:<br />
$ makepkg -ci<br />
The {{ic|-c}} operand tells makepkg to clean left over files after building the package, whereas {{ic|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
=== Automatic re-compilation of the NVIDIA module with every update of any kernel ===<br />
<br />
{{out of date|Neither {{AUR|nvidia-source}} nor {{AUR|nvidia-source-beta}} are available.}}<br />
This is possible thanks to {{AUR|nvidia-hook}} from the [[AUR]]. You will need to install the module sources: either {{AUR|nvidia-source}} for the stable drivers or {{AUR|nvidia-source-beta}} for the beta drivers. In '''nvidia-hook''', the 'automatic re-compilation' functionality is done by a '''nvidia hook''' on [[mkinitcpio]] after forcing to update the '''linux-headers''' package. You will need to add 'nvidia' to the HOOKS array in /etc/mkinitcpio.conf as well as 'linux-headers' and your custom kernel(s) headers to the SyncFirst array in /etc/pacman.conf for this to work.<br />
<br />
The hook will call the '''dkms''' command to update the NVIDIA module for the version of your new kernel.<br />
<br />
{{Note|<br />
* If you are using this functionality it's '''important''' to look at the installation process of the linux (or any other kernel) package. nvidia hook will tell you if anything goes wrong.<br />
* If you would like to do this manually please see this section [[Dynamic Kernel Module Support#Usage| in the dkms arch wiki.]]<br />
}}<br />
<br />
== Configuring ==<br />
<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running| a test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a {{ic|/etc/X11/xorg.conf}} configuration file in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
:{{Note|Since 1.8.x Xorg uses separate configuration files in {{ic|/etc/X11/xorg.conf.d/}} - check out [[NVIDIA#Advanced:_20-nvidia.conf|advanced configuration]] section.}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
{{Warning|That may still not work properly with Xorg-server 1.8 }}<br />
<br />
=== Minimal configuration ===<br />
<br />
A basic {{ic|xorg.conf}} would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
EndSection<br />
}}<br />
<br />
{{Tip|If upgrading from nouveau make sure to remove "{{ic|nouveau}}" from {{ic|/etc/mkinitcpio.conf}}. See [[NVIDIA#Switching between NVIDIA and nouveau drivers|Switching between NVIDIA and nouveau drivers]], if switching between the open and proprietary drivers often.}}<br />
<br />
=== Multiple monitors ===<br />
<br />
:''See [[Multihead]] for more general information''<br />
<br />
To activate dual screen support, you just need to edit the {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}} file which you made before.<br />
<br />
Per each physical monitor, add one Monitor, Device, and Screen Section entry, and then a ServerLayout section to manage it. Be advised that when Xinerama is enabled, the NVIDIA proprietary driver automatically disables compositing. If you desire compositing, you should comment out the {{ic|Xinerama}} line in "{{ic|ServerLayout}}" and use TwinView (see below) instead.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "DualSreen"<br />
Screen 0 "Screen0"<br />
Screen 1 "Screen1" RightOf "Screen0" #Screen1 at the right of Screen0<br />
Option "Xinerama" "1" #To move windows between screens<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Screen 1<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Device0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "0"<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1280x800_75.00"<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen1"<br />
Device "Device1"<br />
Monitor "Monitor1"<br />
DefaultDepth 24<br />
Option "TwinView" "0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used instead of Xinerama (see above), if you desire compositing.<br />
Option "TwinView" "1"<br />
<br />
TwinView only works on a per card basis: If you have multiple cards, you'll have to use xinerama or zaphod mode (multiple X screens). You can combine TwinView with zaphod mode, ending up, for example, with two X screens covering two monitors each. Most window managers fail miserably in zaphod mode. Awesome is the shining exception, and KDE almost works.<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[http://us.download.nvidia.com/XFree86/Linux-x86/304.51/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Manual CLI configuration with xrandr =====<br />
<br />
If the latest solutions doesn't works for you, you can use the ''autostart'' trick of your window manager to run a {{ic|xrandr}} command like this one :<br />
<br />
xrandr --output DVI-I-0 --auto --primary --left-of DVI-I-1<br />
<br />
or:<br />
<br />
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0<br />
<br />
When:<br />
<br />
* {{ic|--output}} is used to indicate to which "monitor" set the options.<br />
* {{ic|DVI-I-1}} is the name of the second monitor.<br />
* {{ic|--pos}} is the position of the second monitor respect to the first.<br />
* {{ic|--mode}} is the resolution of the second monitor.<br />
* {{ic|--rate}} is the Hz refresh rate.<br />
<br />
You must adapt the {{ic|xrandr}} options with the help of the output of the command {{ic|xrandr}} run alone in a terminal.<br />
<br />
==== Using NVIDIA Settings ====<br />
<br />
You can also use the {{ic|nvidia-settings}} tool provided by {{Pkg|nvidia-utils}}. With this method, you will use the proprietary software NVIDIA provides with their drivers. Simply run {{ic|nvidia-settings}} as root, then configure as you wish, and then save the configuration to {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver doesn't properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor.<br />
<br />
===== Base mosaic =====<br />
<br />
Base mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from withing the nvidia-setting GUI. You must either use the nvidia-xconfig command line program or edit xorg.conf by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
== Tweaking ==<br />
<br />
=== GUI: nvidia-settings ===<br />
<br />
The NVIDIA package includes the {{ic|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
The desktop environment's auto-startup method 'may' not work for loading nvidia-settings properly (KDE). To be sure that settings are really loaded put the command in ~/.xinitrc file (create if not present).<br />
<br />
For a dramatic 2D graphics performance increase in pixmap-intensive applications, e.g. Firefox, set the {{ic|InitialPixmapPlacement}} parameter to 2:<br />
<br />
$ nvidia-settings -a InitialPixmapPlacement=2<br />
<br />
This is documented in [http://cgit.freedesktop.org/~aplattner/nvidia-settings/tree/src/libXNVCtrl/NVCtrl.h?id=b27db3d10d58b821e87fbe3f46166e02dc589855#n2797 nvidia-settings source code]. For this setting to persist, this command needs to be run on every startup. You can add it to ~/.xinitrc file for auto-startup with X.<br />
<br />
{{Tip|On rare occasions the {{ic|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the problem.}}<br />
<br />
=== Enabling MSI (Message Signaled Interrupts) ===<br />
<br />
By default, the graphics card uses a shared interrupt system. To give a small performance boost, edit {{ic|/etc/modprobe.d/modprobe.conf}} and add:<br />
options nvidia NVreg_EnableMSI=1<br />
Be warned, as this has been known to damage some systems running older hardware! <br />
<br />
To confirm, run:<br />
<br />
{{hc|# grep nvidia /proc/interrupts|<br />
43: 0 49 4199 86318 PCI-MSI-edge nvidia<br />
}}<br />
<br />
=== Advanced: 20-nvidia.conf ===<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}, and add the option to the correct section. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [http://http.download.nvidia.com/XFree86/Linux-x86/304.51/README/ NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Enabling desktop composition ====<br />
<br />
As of NVIDIA driver version 180.44, support for GLX with the Damage and Composite X extensions is enabled by default. Refer to [[Xorg#Composite|Xorg page]] for detailed instructions.<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Enabling hardware acceleration ====<br />
<br />
{{Note|RenderAccel is enabled by default since drivers version 97.46.xx}}<br />
Add the {{ic|"RenderAccel"}} option under section {{ic|Device}}:<br />
Option "RenderAccel" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI digital connections only.}}<br />
<br />
==== Enabling triple buffering ====<br />
<br />
Enable the use of triple buffering by adding the {{ic|"TripleBuffer"}} Option under section {{ic|Device}}:<br />
Option "TripleBuffer" "1"<br />
<br />
Use this option if the graphics card has plenty of ram (equal or greater than 128MB). The setting only takes effect when syncing to vblank is enabled, one of the options featured in nvidia-settings.<br />
<br />
{{Note|This option may introduce full-screen tearing and reduce performance. As of the R300 drivers, vblank is enabled by default.}}<br />
<br />
==== Using OS-level events ====<br />
<br />
Taken from the NVIDIA driver's [http://http.download.nvidia.com/XFree86/Linux-x86/304.51/README/xconfigoptions.html 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."'' It may help improving performance, but it is currently incompatible with SLI and Multi-GPU modes.<br />
<br />
Add under section {{ic|Device}}:<br />
Option "DamageEvents" "1"<br />
{{Note|This option is enabled by default in newer driver versions.}}<br />
<br />
==== Enabling power saving ====<br />
<br />
Add under section {{ic|Monitor}}:<br />
Option "DPMS" "1"<br />
<br />
==== Enabling brightness control ====<br />
<br />
Add under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
{{Note|If you already have this enabled<br />
and your brightness control doesn't work try to comment it out.}}<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|As of May 7, 2011, you may experience sluggish video performance in GNOME 3 after enabling SLI.}}<br />
<br />
Taken from the NVIDIA driver's [http://http.download.nvidia.com/XFree86/Linux-x86/304.51/README/xconfigoptions.html README] appendix: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs. See NVIDIA's [http://www.slizone.com/page/home.html SLI Zone] for more information.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
{{hc|<nowiki>$ lspci | grep VGA</nowiki>|<br />
03:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
05:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "SLIAA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| border="1"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| SLIAA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=SLIAA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
==== Forcing Powermizer performance level (for laptops) ====<br />
<br />
Add under section {{ic|Device}}:<br />
# Force Powermizer to a certain level at all times<br />
# level 0x1=highest<br />
# level 0x2=med<br />
# level 0x3=lowest<br />
<br />
# AC settings:<br />
Option "RegistryDwords" "PowerMizerLevelAC=0x3"<br />
# Battery settings:<br />
Option "RegistryDwords" "PowerMizerLevel=0x3"<br />
<br />
===== Letting the GPU set its own performance level based on temperature =====<br />
<br />
Add under section {{ic|Device}}:<br />
Option "RegistryDwords" "PerfLevelSrc=0x3333"<br />
<br />
==== Disable vblank interrupts (for laptops) ====<br />
<br />
When running the interrupt detection utility [[powertop]], it can be observed that the Nvidia driver will generate an interrupt for every vblank. To disable, place in the {{ic|Device}} section:<br />
Option "OnDemandVBlankInterrupts" "1"<br />
This will reduce interrupts to about one or two per second.<br />
<br />
==== Enabling overclocking ====<br />
<br />
{{Warning|Please note that overclocking may damage 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 />
To enable GPU and memory overclocking, place the following line in the {{ic|Device}} section:<br />
Option "Coolbits" "1"<br />
<br />
This will enable on-the-fly overclocking within an X session by running:<br />
$ nvidia-settings<br />
{{Note|GeForce 400/500/600/700 series Fermi/Kepler cores cannot currently be overclocked using <br />
the Coolbits method. The alternative is to edit and reflash the GPU BIOS either under DOS (preferred), or within a Win32 environment by way of [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,127/orderby,2/page,1/ nvflash]{{linkrot|2013|05|25}} and [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,135/orderby,2/page,1/ NiBiTor 6.0]{{linkrot|2013|05|25}}. The advantage of BIOS flashing is that not only can voltage limits be raised, but stability is generally improved over software overclocking methods such as Coolbits.}}<br />
<br />
===== Setting static 2D/3D clocks =====<br />
<br />
Set the following string in the {{ic|Device}} section to enable PowerMizer at its maximum performance level:<br />
Option "RegistryDwords" "PerfLevelSrc=0x2222"<br />
Set one of the following two strings in the {{ic|Device}} section to enable manual GPU fan control within {{ic|nvidia-settings}}:<br />
Option "Coolbits" "4"<br />
<br />
Option "Coolbits" "5"<br />
<br />
== Tips and tricks ==<br />
<br />
=== Fixing terminal resolution ===<br />
<br />
Transitioning from nouveau may cause your startup terminal to display at a lower resolution. A possible solution (if you are using GRUB) is to edit the {{ic|GRUB_GFXMODE}} line of {{ic|/etc/default/grub}} with desired display resolutions. Multiple resolutions can be specified, including the default {{ic|auto}}, so it is recommended that you edit the line to resemble {{ic|GRUB_GFXMODE&#61;<desired resolution>,<fallback such as 1024x768>,auto}}. See http://www.gnu.org/software/grub/manual/html_node/gfxmode.html#gfxmode for more information.<br />
<br />
=== Enabling Pure Video HD (VDPAU/VAAPI) ===<br />
<br />
'''Hardware Required:''' <br />
<br />
At least a video card with second generation PureVideo HD [http://en.wikipedia.org/wiki/Nvidia_PureVideo#Table_of_PureVideo_.28HD.29_GPUs].<br />
<br />
'''Software Required:'''<br />
<br />
Nvidia video cards with the proprietary driver installed will provide video decoding capabilities with the VDPAU interface at different levels according to PureVideo generation.<br />
<br />
You can also add support for the VA-API interface with {{Pkg|libva-vdpau-driver}}.<br />
<br />
Check VA-API support with:<br />
$ vainfo<br />
<br />
To take full advantage of the hardware decoding capability of your video card you will need a media player that supports VDPAU or VA-API.<br />
<br />
To enable hardware acceleration in [[MPlayer]] edit {{ic|~/.mplayer/config}}<br />
<br />
vo=vdpau<br />
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,<br />
<br />
To enable hardware acceleration in [[VLC media player|VLC]] go:<br />
<br />
{{ic|Tools > Preferences > Input & Codecs}}, then check '''Use GPU accelerated decoding'''.<br />
<br />
To enable hardware acceleration in '''smplayer''' go:<br />
<br />
{{ic|Options > Preferences > General > Video Tab}}, then select {{ic|vdpau}} as {{ic|'''output driver'''}}<br />
<br />
To enable hardware acceleration in '''gnome-mplayer''' go:<br />
<br />
{{ic|Edit > Preference}}, then set {{ic|'''video output'''}} to {{ic|vdpau}}<br />
<br />
'''Playing HD movies on cards with low memory:'''<br />
<br />
If your graphic card does not have a lot of memory (>512MB?), you can experience glitches when watching 1080p or even 720p movies.<br />
To avoid that start simple window manager like TWM or MWM.<br />
<br />
Additionally increasing the MPlayer's cache size in {{ic|~/.mplayer/config}} can help, when your hard drive is spinning down when watching HD movies.<br />
<br />
=== Hardware accelerated video decoding with XvMC ===<br />
<br />
Accelerated decoding of MPEG-1 and MPEG-2 videos via [[XvMC]] are supported on GeForce4, GeForce 5 FX, GeForce 6 and GeForce 7 series cards. To use it, create a new file {{ic|/etc/X11/XvMCConfig}} with the following content:<br />
libXvMCNVIDIA_dynamic.so.1<br />
<br />
See how to configure [[XvMC#Supported software|supported software]].<br />
<br />
=== Using TV-out ===<br />
<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here].<br />
<br />
=== X with a TV (DFP) as the only display ===<br />
<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force NVIDIA to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the {{ic|DFP}} section (again, {{ic|DFP-0}} or similar), click on the {{ic|Acquire Edid}} Button and store it somewhere, for example, {{ic|/etc/X11/dfp0.edid}}.<br />
<br />
Edit {{ic|xorg.conf}} by adding to the {{ic|Device}} section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The {{ic|ConnectedMonitor}} option forces the driver to recognize the DFP as if it were connected. The {{ic|CustomEDID}} provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
=== Check the power source ===<br />
<br />
The NVIDIA X.org driver can also be used to detect the GPU's current source of power. To see the current power source, check the 'GPUPowerSource' read-only parameter (0 - AC, 1 - battery):<br />
<br />
{{hc|$ nvidia-settings -q GPUPowerSource -t|1}}<br />
<br />
If you're seeing an error message similiar to the one below, then you either need to install [[acpid]] or start the systemd service via {{ic|systemctl start acpid.service}}<br />
ACPI: failed to connect to the ACPI event daemon; the daemon<br />
may not be running or the "AcpidSocketPath" X<br />
configuration option may not be set correctly. When the<br />
ACPI event daemon is available, the NVIDIA X driver will<br />
try to use it to receive ACPI event notifications. For<br />
details, please see the "ConnectToAcpid" and<br />
"AcpidSocketPath" X configuration options in Appendix B: X<br />
Config Options in the README.<br />
(If you are not seeing this error, it is not necessary to install/run acpid soley for this purpose. My current power source is correctly reported without acpid even installed.)<br />
<br />
=== Displaying GPU temperature in the shell ===<br />
<br />
==== Method 1 - nvidia-settings ====<br />
<br />
{{Note|This method requires that you are using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer NVIDIA cards such as the G210/220 as well as embedded GPUs such as the Zotac IONITX's 8800GS.}}<br />
<br />
To display the GPU temp in the shell, use {{ic|nvidia-settings}} as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
In order to get just the temperature for use in utils such as {{ic|rrdtool}} or {{ic|conky}}, among others:<br />
{{hc|$ nvidia-settings -q gpucoretemp -t|41}}<br />
<br />
==== Method 2 - nvidia-smi ====<br />
<br />
Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. <br />
To display the GPU temperature in the shell, use nvidia-smi as follows:<br />
<br />
$ nvidia-smi<br />
<br />
This should output something similar to the following:<br />
{{hc|$ nvidia-smi|<nowiki><br />
Fri Jan 6 18:53:54 2012 <br />
+------------------------------------------------------+ <br />
| NVIDIA-SMI 2.290.10 Driver Version: 290.10 | <br />
|-------------------------------+----------------------+----------------------+<br />
| Nb. Name | Bus Id Disp. | Volatile ECC SB / DB |<br />
| Fan Temp Power Usage /Cap | Memory Usage | GPU Util. Compute M. |<br />
|===============================+======================+======================|<br />
| 0. GeForce 8500 GT | 0000:01:00.0 N/A | N/A N/A |<br />
| 30% 62 C N/A N/A / N/A | 17% 42MB / 255MB | N/A Default |<br />
|-------------------------------+----------------------+----------------------|<br />
| Compute processes: GPU Memory |<br />
| GPU PID Process name Usage |<br />
|=============================================================================|<br />
| 0. ERROR: Not Supported |<br />
+-----------------------------------------------------------------------------+<br />
</nowiki><br />
}}<br />
<br />
Only for temperature:<br />
{{hc|$ nvidia-smi -q -d TEMPERATURE|<nowiki><br />
<br />
==============NVSMI LOG==============<br />
<br />
Timestamp : Fri Jan 6 18:50:57 2012<br />
<br />
Driver Version : 290.10<br />
<br />
Attached GPUs : 1<br />
<br />
GPU 0000:01:00.0<br />
Temperature<br />
Gpu : 62 C<br />
<br />
</nowiki><br />
}}<br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
<br />
{{hc|<nowiki>$ nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36</nowiki>|62}}<br />
<br />
Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli.<br />
<br />
==== Method 3 - nvclock ====<br />
<br />
Use {{Pkg|nvclock}} which is available from the official repositories.<br />
{{Note|{{ic|nvclock}} cannot access thermal sensors on newer NVIDIA cards such as the G210/220.}}<br />
<br />
There can be significant differences between the temperatures reported by nvclock and nvidia-settings/nv-control. According to [http://sourceforge.net/projects/nvclock/forums/forum/67426/topic/1906899 this post] by the author (thunderbird) of nvclock, the nvclock values should be more accurate.<br />
<br />
=== Set fan speed at login ===<br />
<br />
You can adjust the fan speed on your graphics card with '''nvidia-settings'''&#39s console interface. First ensure that your Xorg configuration sets the Coolbits option to {{ic|4}} or {{ic|5}} in your {{ic|Device}} section to enable fan control.<br />
<br />
Option "Coolbits" "4"<br />
<br />
{{Note|GTX 4xx/5xx series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}<br />
<br />
Place the following line in your [[xinitrc|{{ic|~/.xinitrc}}]] file to adjust the fan when you launch Xorg. Replace {{ic|''n''}} with the fan speed percentage you want to set.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
<br />
You can also configure a second GPU by incrementing the GPU and fan number.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" \ <br />
-a "[gpu:1]/GPUFanControlState=1" \<br />
-a "[fan:0]/GPUCurrentFanSpeed=''n''" \<br />
-a [fan:1]/GPUCurrentFanSpeed=''n''" &<br />
<br />
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{ic|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change {{ic|''n''}} to the speed percentage you want.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Exec=nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
X-GNOME-Autostart-enabled=true<br />
Name=nvidia-fan-speed<br />
<br />
=== Order of install/deinstall for changing drivers ===<br />
<br />
Where the old driver is nvidiaO and the new driver is nvidiaN.<br />
remove nvidiaO<br />
install nvidia-libglN<br />
install nvidiaN<br />
install lib32-nvidia-libgl-N (if required)<br />
<br />
=== Switching between NVIDIA and nouveau drivers ===<br />
<br />
{{Out of date|Fresh installs do not contain {{ic|/etc/modprobe.d/modprobe.conf}} by default. The {{ic|sed}} lines may not be needed.}}<br />
If you are switching between the NVIDIA and nouveau driver often, you can use these two scripts to make it easier (both need to be ran as root):<br />
<br />
#!/bin/bash<br />
# nouveau -> nvidia<br />
<br />
set -e<br />
<br />
# check if root<br />
if <nowiki>[[</nowiki> $EUID -ne 0 <nowiki>]]</nowiki>; then<br />
echo "You must be root to run this script. Aborting...";<br />
exit 1;<br />
fi<br />
<br />
sed -i 's/MODULES="nouveau"/#MODULES="nouveau"/' /etc/mkinitcpio.conf<br />
<br />
pacman -Rdds --noconfirm nouveau-dri xf86-video-nouveau mesa-libgl #lib32-nouveau-dri lib32-mesa-libgl<br />
pacman -S --noconfirm nvidia #lib32-nvidia-libgl<br />
<br />
mkinitcpio -p linux<br />
<br />
#!/bin/bash<br />
# nvidia -> nouveau<br />
<br />
set -e<br />
<br />
# check if root<br />
if <nowiki>[[</nowiki> $EUID -ne 0 <nowiki>]]</nowiki>; then<br />
echo "You must be root to run this script. Aborting...";<br />
exit 1;<br />
fi<br />
<br />
sed -i 's/#*MODULES="nouveau"/MODULES="nouveau"/' /etc/mkinitcpio.conf<br />
<br />
pacman -Rdds --noconfirm nvidia #lib32-nvidia-libgl<br />
pacman -S --noconfirm nouveau-dri xf86-video-nouveau #lib32-nouveau-dri<br />
<br />
mkinitcpio -p linux<br />
<br />
<br />
A reboot is needed to complete the switch.<br />
<br />
Adjust the scripts accordingly, if using other NVIDIA drivers (e.g. nvidia-173xx).<br />
<br />
Uncomment the lib32 packages if you run a 64-bit system and require the 32-bit libraries (e.g. 32-bit games/Steam).<br />
<br />
== Troubleshooting ==<br />
<br />
=== Bad performance, e.g. slow repaints when switching tabs in Chrome ===<br />
<br />
{{Out of date|This bug is most likely resolved. See the [https://bugs.freedesktop.org/show_bug.cgi?id&#61;49534 this bug report]}}<br />
<br />
On some machines, recent NVIDIA drivers introduce a bug(?) that causes X11 to redraw pixmaps really slow. Switching tabs in Chrome/Chromium (while having more than 2 tabs opened) takes 1-2 seconds, instead of a few milliseconds.<br />
<br />
It seems that setting the variable '''InitialPixmapPlacement''' to '''0''' solves that problem, although (like described some paragraphs above) '''InitialPixmapPlacement=2''' should actually be the faster method.<br />
<br />
The variable can be (temporarily) set with the command<br />
<br />
$ nvidia-settings -a InitialPixmapPlacement=0<br />
<br />
To make this permanent, this call can be placed in a startup script.<br />
<br />
=== Gaming using Twinview ===<br />
<br />
In case you want to play fullscreen games when using Twinview, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropiate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
=== Vertical sync using TwinView ===<br />
<br />
If you're using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port).<br />
<br />
=== Old Xorg settings ===<br />
<br />
If upgrading from an old installation, please remove old {{ic|/usr/X11R6/}} paths as it can cause trouble during installation.<br />
<br />
=== Corrupted screen: "Six screens" Problem ===<br />
<br />
For some users using Geforce GT 100M's, the screen turns out corrupted after X starts; divided into 6 sections with a resolution limited to 640x480.<br />
The same problem has been recently reported with Quadro 2000 and hi-res displays.<br />
<br />
To solve this problem, enable the Validation Mode {{ic|NoTotalSizeCheck}} in section {{ic|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
=== '/dev/nvidia0' input/output error ===<br />
<br />
{{Accuracy|Verify that the BIOS related suggestions work and are not coincidentally set while troubleshooting.|section='/dev/nvidia0' Input/Output error... suggested fixes}}<br />
This error can occur for several different reasons, and the most common solution given for this error is to check for group/file permissions, which in almost every case is ''not'' the problem. The NVIDIA documentation does not talk in detail on what you should<br />
do to correct this problem but there are a few things that have worked for some people. The problem can be a IRQ conflict with another device or bad routing by either the kernel or your BIOS.<br />
<br />
First thing to try is to remove other video devices such as video capture cards and see if the problem goes away. If there are too many video processors on the same system it can lead into the kernel being unable to start them because of memory allocation problems with the video controller. In particular on systems with low video memory this can occur even if there is only one video processor. In such case you should find out the amount of your system's video memory (e.g. with {{ic|lspci -v}}) and pass allocation parameters to the kernel, e.g.:<br />
vmalloc=64M<br />
or<br />
vmalloc=256M<br />
<br />
If running a 64bit kernel, a driver defect can cause the NVIDIA module to fail initializing when IOMMU is on. Turning it off in the BIOS has been confirmed to work for some users. [http://www.nvnews.net/vbulletin/showthread.php?s=68bb2fabadcb53b10b286aa42d13c5bc&t=159335][[User:Clickthem#nvidia module]]<br />
<br />
Another thing to try is to change your BIOS IRQ routing from {{ic|Operating system controlled}} to {{ic|BIOS controlled}} or the other way around. The first one can be passed as a kernel parameter:<br />
PCI=biosirq<br />
<br />
The {{ic|noacpi}} kernel parameter has also been suggested as a solution but since it disables ACPI completely it should be used with caution. Some hardware are easily damaged by overheating.<br />
<br />
{{Note|The kernel parameters can be passed either through the kernel command line or the bootloader configuration file. See your bootloader Wiki page for more information.}}<br />
<br />
=== '/dev/nvidiactl' errors ===<br />
<br />
Trying to start an opengl application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the {{ic|FREQUENTLY ASKED QUESTIONS}} <br />
section of {{ic|/usr/share/doc/NVIDIA_GLX-1.0/README}} <br />
for steps to correct.<br />
<br />
Solve by adding the appropiate user to the {{ic|video}} group and relogin:<br />
# gpasswd -a username video<br />
<br />
=== 32 bit applications do not start ===<br />
<br />
Under 64 bit systems, installing {{ic|lib32-nvidia-libgl}} that corresponds to the same version installed for the 64 bit driver fixes the problem.<br />
<br />
=== Errors after updating the kernel ===<br />
<br />
If a custom build of NVIDIA's module is used instead of the package from [extra], a recompile is required every time the kernel is updated. Rebooting is generally recommended after updating kernel and graphic drivers.<br />
<br />
=== Crashing in general ===<br />
<br />
* Try disabling {{ic|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add {{ic|nopat}} at the end of the {{ic|kernel}} line in {{ic|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{ic|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{ic|nopat}} to [[kernel parameters]].<br />
More information about troubleshooting the driver can be found in the [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums.]<br />
<br />
=== Bad performance after installing a new driver version ===<br />
<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on:<br />
$ glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No<br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
=== CPU spikes with 400 series cards ===<br />
<br />
If you are experiencing intermittent CPU spikes with a 400 series card, it may be caused by PowerMizer constantly changing the GPU's clock frequency. Switching PowerMizer's setting from Adaptive to Performance, add the following to the {{ic|Device}} section of your Xorg configuration:<br />
<br />
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"<br />
<br />
=== Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace ===<br />
<br />
If while using the legacy NVIDIA drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{ic|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt NVIDIA Driver's Readme:Appendix K] for more information.<br />
<br />
=== Refresh rate not detected properly by XRandR dependant utilities ===<br />
<br />
The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the {{ic|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 {{ic|DynamicTwinView}}, the NVIDIA driver must make each MetaMode appear to be unique to XRandR. Presently, the NVIDIA driver accomplishes this by using the refresh rate as a unique identifier.<br />
<br />
Use {{ic|$ 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 {{ic|DynamicTwinView}} X configuration option to {{ic|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 />
=== No screens found on a laptop/NVIDIA Optimus ===<br />
<br />
On a laptop, if the NVIDIA driver cannot find any screens, you may have an NVIDIA Optimus setup : an Intel chipset connected to the screen and the video outputs, and a NVIDIA card that does all the hard work and writes to the chipset's video memory.<br />
<br />
Check if {{ic|<nowiki>$ lspci | grep VGA</nowiki>}}<br />
outputs something similar to:<br />
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)<br />
01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1)<br />
<br />
NVIDIA has [http://www.phoronix.com/scan.php?page=news_item&px=MTE3MzY announced plans] to support Optimus in their Linux drivers at some point in the future.<br />
<br />
You need to install the [[Intel]] driver to handle the screens, then if you want 3D software you should run them through [[Bumblebee]] to tell them to use the NVIDIA card.<br />
<br />
==== Possible Workaround ====<br />
<br />
Enter the BIOS and changed the default graphics setting from 'Optimus' to 'Discrete' and the install NVIDIA drivers (295.20-1 at time of writing) recognized the screens.<br />
<br />
Steps:<br />
# Enter BIOS.<br />
# Find Graphics Settings (should be in tab ''Config > Display'').<br />
# Change 'Graphics Device' to 'Discrete Graphics' (Disables Intel integrated graphics).<br />
# Change OS Detection for Nvidia Optimus to "Disabled".<br />
# Save and exit.<br />
<br />
Tested on a Lenovo W520 with a Quadro 1000M and Nvidia Optimus<br />
<br />
=== Screen(s) found, but none have a usable configuration ===<br />
<br />
On a laptop, sometimes NVIDIA driver cannot find the active screen.<br />
It may be caused because you own a graphic card with vga/tv outs.<br />
You should examine Xorg.0.log to see what is wrong.<br />
<br />
Another thing to try is adding invalid {{ic|"ConnectedMonitor" Option}} to {{ic|Section "Device"}}<br />
to force Xorg throws error and shows you how correct it.<br />
[http://http.download.nvidia.com/XFree86/Linux-x86/304.51/README/xconfigoptions.html Here]<br />
more about ConnectedMonitor setting.<br />
<br />
After re-run X see Xorg.0.log to get valid CRT-x,DFP-x,TV-x values.<br />
<br />
{{ic|nvidia-xconfig --query-gpu-info}} could be helpful.<br />
<br />
=== No brightness control on laptops ===<br />
<br />
Try to add the following line on '''20-nvidia.conf''':<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
If it still not working, you can try install [https://aur.archlinux.org/packages.php?ID=25467 nvidia-bl] or [https://aur.archlinux.org/packages.php?ID=50749 nvidiabl].<br />
<br />
=== Black Bars while watching full screen flash videos with TwinView ===<br />
<br />
Follow the instructions presented here:<br />
[http://al.robotfuzz.com/content/workaround-fullscreen-flash-linux-multiheaded-desktops link].<br />
<br />
=== Backlight is not turning off in some occasions ===<br />
<br />
By default, DPMS should turn off backlight with the timeouts set or by running xset. However, probably due to a bug in the proprietary Nvidia drivers the result is a blank screen with no powersaving whatsoever. To workaround it, until the bug has been fixed you can use the {{ic|vbetool}} as root.<br />
<br />
Install the {{Pkg|vbetool}} package.<br />
<br />
Turn off your screen on demand and then by pressing a random key backlight turns on again:<br />
<br />
vbetool dpms off && read -n1; vbetool dpms on<br />
<br />
Alternatively, xrandr is able to disable and re-enable monitor outputs without requiring root.<br />
<br />
xrandr --output DP-1 --off; read -n1; xrandr --output DP-1 --auto<br />
<br />
=== Blue tint on videos with Flash ===<br />
<br />
A problem with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. There are a few potential fixes for this bug:<br />
<br />
# Install the latest {{Pkg|libvdpau}}.<br />
# Patch {{ic|vdpau_trace.so}} with [https://bbs.archlinux.org/viewtopic.php?pid=1078368#p1078368 this makepkg].<br />
# Right click on a video, select "Settings..." and uncheck "Enable hardware acceleration". Reload the page for it to take affect. Note that this disables GPU acceleration.<br />
# [[Downgrading Packages|Downgrade]] the {{Pkg|flashplugin}} package to version 11.1.102.63-1 at most.<br />
# Use {{AUR|google-chrome}} with the new Pepper API {{AUR|hromium-pepper-flash}}.<br />
# Try one of the few Flash alternatives.<br />
<br />
The merits of each are discussed in [https://bbs.archlinux.org/viewtopic.php?id=137877 this thread]. To summarize: if you want all flash sites (YouTube, Vimeo, etc) to work properly in non-Chrome browsers, without feature regressions (such as losing hardware acceleration), without crashes/instability (enabling hardware decoding), without security concerns (multiple CVEs against older flash versions) and without breaking the vdpau tracing library from its intended purpose, the LEAST objectionable is to install {{AUR|libvdpau-git-flashpatch}}.<br />
<br />
=== Bleeding overlay with Flash ===<br />
<br />
This bug is due to the incorrect colour key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 and causes the flash content to "leak" into other pages or solid black backgrounds. To avoid this problem simply install the latest {{Pkg|libvdpau}} or export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (E.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Full system freeze using Flash ===<br />
<br />
If you experience occasional full system freezes (only the mouse is moving) using flashplugin<br />
and get:<br />
<br />
{{hc|/var/log/errors.log|<br />
NVRM: Xid (0000:01:00): 31, Ch 00000007, engmask 00000120, intr 10000000<br />
}}<br />
<br />
A possible workaround is to switch off Hardware Acceleration in Flash, setting<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
=== XOrg fails to load or Red Screen of Death ===<br />
<br />
If you get a red screen and use GRUB disable the GRUB framebuffer by editing {{ic|/etc/defaults/grub}} and uncomment GRUB_TERMINAL_OUTPUT. For more information see [[GRUB#Disable_framebuffer|GRUB]].<br />
<br />
=== Black screen on systems with Intel integrated GPU ===<br />
<br />
If you have an Intel CPU with an integrated GPU (e.g. Intel HD 4000) and get a black screen on boot after installing the {{Pkg|nvidia}} package, this may be caused by a conflict between the graphics modules. This is solved by blacklisting the Intel GPU modules. Create the file /etc/modprobe.d/blacklist.conf and prevent the ''i915'' and ''intel_agp'' modules from loading on boot:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install i915 /bin/false<br />
install intel_agp /bin/false<br />
}}<br />
<br />
=== X fails with "no screens found" with Intel iGPU ===<br />
<br />
Like above, if you have an Intel CPU with an integrated GPU and X fails to start with <br />
<br />
[ 76.633] (EE) No devices detected.<br />
[ 76.633] Fatal server error:<br />
[ 76.633] no screens found<br />
<br />
then you need to add your discrete card's BusID to your X configuration. Find it:<br />
<br />
{{hc|<nowiki># lspci | grep VGA</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
}}<br />
<br />
then you fix it by adding it to the card's Device section in your X configuration. In my case:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-nvidia.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
Note how {{ic|01:00.0}} is written as {{ic|1:0:0}}.<br />
<br />
== See also ==<br />
<br />
* [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums]<br />
* [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt Official readme for NVIDIA drivers]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Xfce&diff=263171Xfce2013-06-17T22:35:08Z<p>Notasynonym: /* xfce4-power-manager */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-CN:Xfce]]<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Thunar}}<br />
{{Article summary wiki|Improve GTK Application Looks}}<br />
{{Article summary wiki|Autostart applications#Graphical}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Features:<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, notifications, and system tools are available in the {{Grp|xfce4-goodies}} group.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
{{Tip|Common tasks such as mounting removable drives and extracting archives can be accomplished with Thunar. If you do not install {{Grp|xfce4-goodies}} but still want these niceties, read the [[Thunar]] page.}}<br />
<br />
== Starting Xfce ==<br />
=== Automatically ===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a [[Display Manager]]<br />
* Run Xfce automatically using the {{pkg|xorg-xinit}} method at [[Start X at Login]] combining with [[Automatic login to virtual console ]]<br />
<br />
=== Manually ===<br />
{{Note|See [[xinitrc]] for details, such as preserving the logind session.}}<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|2=#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec startxfce4<br />
}}<br />
<br />
{{Note|<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.<br />
}}<br />
<br />
=== Automounting ===<br />
See [[General Troubleshooting#Session permissions]].<br />
<br />
If you have no problems shutting down and rebooting but cannot automount external media and disks, you may need to install {{pkg|gvfs}}. See the [[#Removable Devices|Removable Devices]] section.<br />
<br />
==Tips and tricks==<br />
===Xfconf settings===<br />
Xfconf is XFCE's system for storing configuration options, and most XFCE configuration is done by editing settings in Xfconf (one way or another). There are several ways to modify these settings:<br />
* The most obvious and easiest way is to go to "Settings" in the main menu and select the category you want to customize. However, not all customization options are available this way. <br />
* A less user-friendly but more general way is to go to {{bc|Main menu -> Settings -> Settings Editor}} where you can see and modify all the customization options. Any settings modified here will take effect immediately. The Settings Editor can also be launched from the command line by invoking {{ic|xfce4-settings-editor}}.<br />
* Customization can be done completely from the command line using the program {{ic|xfconf-query}}. See [http://docs.xfce.org/xfce/xfconf/xfconf-query the XFCE online documentation] for more information and examples and the rest of this wiki page for more examples. Settings changed here will take effect immediately.<br />
* The settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will not take effect immediately.<br />
* For more information: [http://docs.xfce.org/xfce/xfconf/start Xfconf documentation]<br />
===Panel===<br />
====xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== 'menu' panel replacement ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
==== Removing entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal: {{bc|1=# echo "NoDisplay=true" >> firefox.desktop}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the following in it:<br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
<br />
===== Method 4 =====<br />
Alternatively a tool called [http://www.redsquirrel87.com/XAME.html xame] can be used. XAME is a GUI tool written in Gambas designed specifically for editing menu entires in XFCE, it will NOT work in other DEs. XAME is available in the {{AUR|xame}} package from the [[AUR]].<br />
<br />
==== Missing applications ====<br />
When some applications are installed (for example via [[WINE]]), they may not be listed in {{ic|/usr/share/applications}}. Shortcuts ''might'' be found in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the {{pkg|wmctrl}} package from the [[Official Repositories]].<br />
<br />
Create a script in {{ic|~/.config/xfce4/xfce4-fix-panel}} with this content and make it executable (you can use {{ic|chmod 755 xfce4-fix-panel}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
# call the program with a list of panel numbers as arguments<br />
# for example, xfce4-fix-panel 1 2 3<br />
# for the first three panels<br />
for i in $* ;do<br />
putPanelDown $i<br />
done<br />
<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Transparent Background for Icon Titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide Selected Partitions ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop. Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
==== Remove Thunar Options from Right-click ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Kill Window Shortcut ====<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== Enabling the Compositor ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
==== Toggle Automatic Tiling of Windows at Edge of Screen ====<br />
XFWM4 has the ability to "tile" a window automatically when it is moved to the edge of the screen by resizing it to fill the top half of the screen. (The official XFCE website says this feature is disabled by default in XFCE 4.10, but it seems to be enabled by default on Arch Linux.) This behavior can be enabled or disabled in {{ic|Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge}}, or:<br />
<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable<br />
<br />
=== Settings Manager Commands ===<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Custom Startup Applications====<br />
<br />
=====Via the Settings Menu=====<br />
<br />
To launch custom applications when Xfce starts up, click the Applications Menu -> Settings -> Settings Manager and then choose the "Session and Startup" option and click the tab "Application Autostart".<br />
You'll see a list of programs that get launched on startup. To add an entry, click the "Add" button and fill out the form, specifying the path to an executable you want to run.<br />
<br />
=====Startup Script=====<br />
<br />
Alternatively you can use this method, to run a command line script to launch your applications. This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Lock the screen====<br />
To lock an Xfce4 session (through {{ic|xflock4}}) one of {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}} or {{Pkg|xlockmore}} packages needs to be installed.<br />
<br />
====Switch between users====<br />
Xfce4 allows this behavior under the 'action buttons' menu item. Currently, both [[gdm]] and [[Lightdm#User switching under xfce4|lightdm]] provide this functionality.<br />
<br />
==== Manually Modifying XML settings ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in Thunar when you plug in external devices, make sure {{Pkg|gvfs}} is installed. You could also need to install {{Pkg|gvfs-afc}} (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]). It is also a good idea to install {{Pkg|thunar-volman}} (already included in the {{Grp|xfce4}} base group). Additionally, [[udisks]] and a udisks wrapper are recommended if you want to automount optical and external drives easily.<br />
<br />
===Look and Feel===<br />
====Add themes to XFCE====<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
==== Cursors ====<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
==== Icons ====<br />
# First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org]; the [[AUR]] provides several PKGBUILDs for icon packs.<br />
# Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
# Move the extracted folder containing the icons to {{ic|~/.icons}} (if only you want to use the icons) or to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons), and in the lattter case consider creating a [[PKGBUILD]] for that.<br />
# Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
# Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it is also recommended to install the {{Pkg|hicolor-icon-theme}} package if it was not already installed.<br />
<br />
==== Fonts ====<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}} which can be [[pacman|installed]] from [[Official Repositories]]. <br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that does not work, you might need more or different gstreamer plugins. Try to [[pacman|install]] package {{pkg|gstreamer0.10-good-plugins}} or {{pkg|gstreamer0.10-bad-plugins}}.<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== Xfce4-mixer and OSS4 ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile {{pkg|gstreamer0.10-good-plugins}} yourself. Download the PKGBUILD and other files needed from ABS or [https://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="https://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR {{AUR|gstreamer0.10-good-plugins-ossv4}}, modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Keyboard Volume Buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== PulseAudio =====<br />
For the raise volume button:<br />
pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +1%<br />
For the lower volume button:<br />
pactl set-sink-mute 0 false ; pactl -- set-sink-volume 0 -1%<br />
For the mute button:<br />
pactl set-sink-mute 0 toggle<br />
<br />
These settings assume the device you want to control has index 0.<br />
Use {{ic|pactl list sinks short}} to list sinks.<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the problem (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute does not work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
===== Volumeicon =====<br />
<br />
{{pkg|volumeicon}} is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through {{pkg|xfce4-notifyd}}.<br />
<br />
==== Adding startup/boot sound ====<br />
<br />
Arch does not have a built-in startup sound configuration tool, but there is a workaround by adding the following command to your Application Autostart settings:<br />
<br />
aplay /boot/startupsound.wav<br />
<br />
The file location and filename can be whatever you want, but naming it descriptively and putting it in /boot keeps things tidy.<br />
<br />
=== xdg-open integration (Preferred Applications) ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to [[pacman|install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
Installing the package and allowing ''xdg-open'' to detect that you are running XFCE makes it forward all calls to ''exo-open'' instead, which correctly uses all your preferred applications preferences.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Screenshots ===<br />
<br />
XFCE has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
==== Print Screen key ====<br />
<br />
Go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "xfce4-screenshooter -f" command to use the "PrintScreen" key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking a Screenshot#scrot|scrot]] can be used.<br />
<br />
===Terminal color themes or pallets===<br />
Terminal color themes or pallets can be changed in GUI under Appearance tab in Preferences. These are the colors that are available to most console applications like [[Emacs]], [[Vi]] and so on. Their settings are stored individually for each system user in {{ic|~/.config/xfce4/terminal/terminalrc}} file. There are also so many other themes to choose from. Check forums post [[https://bbs.archlinux.org/viewtopic.php?pid=1194644|Terminal Colour Scheme Screenshots]] for hundreds of available choices and themes.<br />
<br />
====Changing default color theme====<br />
XFCE's {{ic|extra/terminal}} package comes with a darker color palette and colored text looks pretty horrid in default black background impeding user readability. Append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
ColorPalette5=#38d0fcaaf3a9<br />
ColorPalette4=#e013a0a1612f<br />
ColorPalette2=#d456a81b7b42<br />
ColorPalette6=#ffff7062ffff<br />
ColorPalette3=#7ffff7bd7fff<br />
ColorPalette13=#82108210ffff<br />
<br />
====Terminal tango color theme====<br />
To switch to tango color theme, open with your favorite editor<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
And add(replace) these lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Colour management ===<br />
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.<br />
<br />
==== Loading a profile ====<br />
If you wish to '''load an icc profile''' (that you have previously created or downloaded) to calibrate your display on startup, you can download {{AUR|xcalib}} from [[AUR]], then open the XFCE4 Settings Manager, click Session and Startup icon, the Autostart tab, and add a new entry where the command is {{ic|/usr/bin/xcalib /path/to/your/profile.icc}}. You still need to tell your applications, which display profile should be used to have the displayed images colour managed.<br />
<br />
Another option is dispwin. Dispwin not only calibrates the display, but also sets the _ICC_PROFILE atom in X so that some applications can use a "system" display profile instead of requiring the user to set the display profile manually (GIMP, Inkscape, darktable, UFRaw, etc.).<br />
<br />
See [[ICC Profiles#Loading ICC Profiles]] for more information.<br />
<br />
==== Creating a profile ====<br />
<br />
If you wish to '''create an icc profile''' for your display (ie. characterising/profiling, e.g. with the ColorHug, or some other colorimeter, or a spectrophotometer, or "by eye"), the simplest option may be to install {{AUR|dispcalGUI}} from [[AUR]]. <br />
<br />
Another option is to install {{ic|gnome-settings-daemon}} and {{ic|gnome-color-manager}} (available in extra). In order to start the calibration from the command line, first do {{ic|/usr/lib/gnome-settings-daemon/gnome-settings-daemon &}} (note: this might change your keyboard layout and who knows what else, so probably good to do it on a throwaway account), then {{ic|colormgr get-devices}} and look for the "Device ID" line of your monitor. If this is e.g. "xrandr-Lenovo Group Limited", you start calibration with the command {{ic|gcm-calibrate --device "xrandr-Lenovo Group Limited"}}.<br />
{{Note|1=The reason you need gnome-settings-daemon running is because XFCE does not yet have a session component for colord: https://bugzilla.xfce.org/show_bug.cgi?id=8559}}<br />
<br />
See [[ICC Profiles]] for more information.<br />
<br />
=== Multiple Monitors ===<br />
If you have configured X.org so that your display spans multiple monitors, usually when you login to an '''XFCE''' session, it will appear as if your monitors are simple clones of one another. You can use an '''xrandr''' tool to tweak your setup but if this is not called at an appropriate time in the startup sequence, some functionality may be lost with parts of your display being inaccessible to the mouse pointer.<br />
<br />
A better way is to configure XFCE to match your desired display arrangement. However, at present (xfce-settings 4.10), there is no tool available to assist with configuring multiple monitors directly. <br />
<br />
* The ''Settings -> Display'' tool does allow configuration of screen resolution, rotation and enabling individual monitors; '''warning''': ''using this tool to adjust display settings will reset or lose settings made manually for properties not explicitly offered as buttons in the tool (see below)''.<br />
* The ''Settings -> Settings Editor'' allows manipulation of all configuration items in particular the ''displays'' settings which are saved in the file '''displays.xml''' below<br />
~/.config/xfce4/xfconf/xfce-perchannel-xml<br />
* Alternatively, the ''displays.xml'' can be edited using your favourite editor.<br />
<br />
The main requirement for multiple monitors is their arrangement relative to one another. This can be controlled by setting the '''Position''' properties ('''X''' and '''Y''') to suit; an ''(x,y)'' position of ''0,0'' corresponds to the ''top, left'' position of the monitor array. This is the default position for all monitors and if several monitors are enabled they will appear as a cloned display area extending from this point. <br />
<br />
To extend the display area correctly across both monitors:<br />
<br />
* for side-by-side monitors, set the '''X''' property of the rightmost monitor to equal the width of the left-most monitor<br />
* for above-and-below monitors, set the '''Y''' property of the bottom monitor to equal the height of the upper monitor<br />
* for other arrangements, set the '''X''' and '''Y''' properties of each monitor to correspond to your layout<br />
<br />
Measurements are in ''pixels''. As an example, a pair of monitors with nominal dimensions of ''1920x1080'' which are rotated by 90 and placed side-by-side can be configured with a ''displays.xml'' like this:<br />
<br />
<channel name="displays" version="1.0"><br />
<property name="Default" type="empty"><br />
<property name="VGA-1" type="string" value="Idek Iiyama 23&quot;"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="0"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
<property name="DVI-0" type="string" value="Digital display"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="1080"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
<br />
Usually, editing settings in this way requires a logout/login to action them.<br />
<br />
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.<br />
<br />
=== XDG User Directories ===<br />
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See [[Xdg user directories]] for detailed info.<br />
<br />
=== SSH Agents ===<br />
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false<br />
<br />
To force using ssh-agent even if gpg-agent is installed, run the following instead:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent<br />
<br />
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session Manager'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.<br />
<br />
Source: http://docs.xfce.org/xfce/xfce4-session/advanced<br />
<br />
== Troubleshooting ==<br />
=== xfce4-power-manager ===<br />
Power-related [[Wikipedia:Advanced Configuration and Power Interface|ACPI]] events can be configured using [[systemd]] via options from {{ic|/etc/systemd/logind.conf}} to give control to xfce4-power-manager.<br />
<br />
{{hc|/etc/systemd/logind.conf|2=<br />
HandlePowerKey=ignore<br />
HandleSuspendKey=ignore<br />
HandleHibernateKey=ignore<br />
HandleLidSwitch=ignore}}<br />
<br />
This also solves the problem when the computer registers multiple suspend events.<br />
<br />
=== xfce4-xkb-plugin ===<br />
There is a bug in version {{Pkg|xkb-plugin}} ''0.5.4.1-1'' which causes xkb-plugin to ''lose keyboard, layout switching and compose key'' settings. As a workaround you may enable ''Use system defaults'' option in keyboard settings. To do so run<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Locales ignored with GDM ===<br />
Add your locale to {{ic|/var/lib/AccountsService/users/$USER}} (replace {{ic|hu_HU.UTF-8}} with your own locale):<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
# sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect. If upon logging in you get an error window with the heading "Unable to load a failsafe session," see the [[Xfce#Session_failure|Session Failure]] section on this page.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager does not load correctly, you maybe got a session error. Typical symptoms of this can include:<br />
<br />
* the mouse is an X and/or does not appear at all<br />
* window decorations have disappeared and windows cannot be closed<br />
* "Window Manager" settings tool ({{ic|xfwm4-settings}}) will not start, reporting <br />
These settings cannot work with your current window manager (unknown)<br />
* errors being reported by {{ic|slim}} or your login manager like<br />
No window manager registered on screen 0<br />
<br />
Restarting xfce or rebooting your system may resolve the problem but more likely the problem is a corrupt session. Delete the session folder below the {{ic|.cache}} folder:<br />
$ rm -r ~/.cache/sessions/<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
If you have set your preferred applications with ''exo-preferred-applications'', but they do not seem to be taken into consideration, see [[Xfce#xdg-open integration (Preferred Applications)]]<br />
<br />
=== Action Buttons/Missing Icons ===<br />
This happens if icons for some actions (Suspend, Hibernate) are missing from the icon theme, or at least do not have the expected names. First, find out the currently used icon theme in the Settings Manager (→Appearance→Icons). Match this with a subdirectory of {{ic|/usr/share/icons}}. For example, if the icon theme is GNOME, make a note of the directory name {{ic|/usr/share/icons/gnome}}.<br />
<br />
icontheme=/usr/share/icons/gnome<br />
<br />
Make sure that the {{Pkg|xfce4-power-manager}} is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the {{ic|hicolor}} icon theme.<br />
<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Enable cedilla ç/Ç instead of ć/Ć ===<br />
When you select the keyboard layout "U.S., alternative international" in Settings --> Keyboard --> Layout to enable accents, the typical combination for the cedilla ' + c results in ć instead of ç.To change this suffice edit files gtk.immodules for gtk-2.0 and immodules.cache for gtk-3.0 in line that contains "cedilla" adding both "en" in the list "az:ca:co:fr:gv:oc:pt:sq:tr:wa" but in alphabetical order, staying that way in /etc/gtk-2.0/gtk.immodules<br />
<br />
"/usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
and this in /usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
<br />
"/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
Then, do<br />
# echo "export GTK_IM_MODULE=cedilla" >> /etc/environment<br />
<br />
Done. Simply just close and reopen the gtk programs like gedit.<br />
<br />
=== Non ASCII characters when mounting USB sticks ===<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved by changing the default iocharset to UTF-8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
flush=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files, so be careful.<br />
<br />
It is possible to mount vfat devices with ''flush'' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until finished. Adding ''async'' instead will speed up write ops, but make sure to use ''Eject'' option in Thunar to unmount the stick. Globally, mount options for storage devices present at boot can be set in [[fstab]], and for other devices in [[udev]] rules.<br />
<br />
==See also==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=GNOME&diff=263170GNOME2013-06-17T22:34:03Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:GNOME]]<br />
[[de:GNOME]]<br />
[[es:GNOME]]<br />
[[fr:GNOME]]<br />
[[it:GNOME]]<br />
[[ja:GNOME]]<br />
[[nl:GNOME]]<br />
[[pl:GNOME]]<br />
[[pt:GNOME]]<br />
[[ru:GNOME]]<br />
[[sr:GNOME]]<br />
[[th:GNOME]]<br />
[[tr:Gnome_Masaüstü_Ortamı]]<br />
[[uk:GNOME]]<br />
[[zh-CN:GNOME]]<br />
[[zh-TW:GNOME]]<br />
{{Article summary start}}<br />
{{Article summary text|GNOME 3 provides a modern desktop, rewritten from scratch, using the GTK3+ toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|GTK+}}<br />
{{Article summary wiki|GDM}}<br />
{{Article summary wiki|Nautilus}}<br />
{{Article summary end}}<br />
<br />
From [http://www.gnome.org/about/ About Us | GNOME]:<br />
<br />
:''The GNOME Project was started in 1997 by two then university students, Miguel de Icaza and Federico Mena. Their aim: to produce a free (as in freedom) [[desktop environment]]. Since then, GNOME has grown into a hugely successful enterprise. Used by millions of people across the world, it is the most popular desktop environment for GNU/Linux and UNIX-type operating systems. The desktop has been utilised in successful, large-scale enterprise and public deployments, and the project’s developer technologies are utilised in a large number of popular mobile devices.''<br />
<br />
== Introduction ==<br />
<br />
GNOME 3 has ''two'' interfaces:<br />
<br />
*'''GNOME Shell''' is the new standard layout using the Mutter window manager. It acts as a composite manager for the desktop, employing hardware graphics acceleration to provide effects aimed at reducing screen clutter.<br />
<br />
*'''Classic mode''' is the successor of the discontinued "fallback mode" starting with GNOME 3.8. It aims at implementing a more traditional desktop interface while using standard GNOME 3 technologies (including graphic acceleration). It does so through the use of pre-activated extensions and parameters (see [http://worldofgnome.org/welcome-to-gnome-3-8-flintstones-mode/ here] for a list) and relies on llvmpipe for graphic acceleration. Hence it consists more of a customized GNOME Shell than a truly distinct mode.<br />
<br />
GNOME-session automatically detects if your computer is incapable of running GNOME Shell and starts Classic mode with llvmpipe when appropriate.<br />
<br />
==Installation==<br />
<br />
GNOME 3 is available in the [[official repositories]] and can be [[pacman|installed]] with two groups of packages:<br />
*{{Grp|gnome}} contains the core desktop environment and applications required for the standard GNOME experience.<br />
<br />
*{{Grp|gnome-extra}} contains various optional tools such as a media player, a calculator, an editor and other non-critical applications that go well with the GNOME desktop. Installing this group is optional.<br />
<br />
Note that installing only {{Grp|gnome-extra}} will not pull the whole {{Grp|gnome}} group by dependencies: if you really want everything you must explicitly install both groups.<br />
<br />
=== Starting GNOME ===<br />
<br />
'''Graphical log-in'''<br />
<br />
For the best desktop integration, login manager '''GDM''' is recommended. Other login managers can be used in place of GDM. Check out the [[Display_Manager|wiki article on display managers]] to learn how desktop environments are started.<br />
<br />
The login manager is a limited process entrusted with duties that impact the system. The [[PolicyKit|PolicyKit wiki article]] addresses the topic of system‑wide access control.<br />
<br />
{{Tip|Refer to the [[GDM]] article for installation and configuration instructions.}}<br />
<br />
'''Starting GNOME manually'''<br />
<br />
If you prefer to start GNOME manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec gnome-session<br />
</nowiki>}}<br />
<br />
After the {{ic|exec}} command is placed, GNOME can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.<br />
<br />
== Using the shell ==<br />
<br />
=== GNOME cheat sheet ===<br />
<br />
The GNOME web site has a helpful [https://live.gnome.org/GnomeShell/CheatSheet GNOME Shell cheat sheet] explaining task switching, keyboard use, window control, the panel, overview mode, and more.<br />
<br />
=== Restarting the shell ===<br />
<br />
After appearance tweaks you are often asked to restart the GNOME shell. You could log out and log back in, but it is simpler and faster to issue the following keyboard command. Restart the shell by pressing {{Keypress|Alt}} + {{Keypress|F2}} then {{Keypress|r}} then {{Keypress|Enter}}<br />
<br />
=== Shell crashes ===<br />
<br />
Certain tweaks and/or repeated shell restarts may cause the shell to crash when a restart is attempted. In this case, you are informed about the crash and then forced to log out. Some shell changes, such as switching between '''''GNOME Shell''''' and '''''fallback mode,''''' cannot be accomplished via a keyboard restart; you must log out and log back in to effect them.<br />
<br />
It is common sense — but worth repeating — that valuable documents should be saved (and perhaps closed) before attempting a shell restart. It is not strictly necessary; open windows and documents usually remain intact after a shell restart.<br />
<br />
=== Shell freezes ===<br />
<br />
Sometimes shell extensions freeze the GNOME Shell. In this case a possible strategy is to switch to another terminal via {{Keypress|Ctrl+Alt+F2}} through {{Keypress|Ctrl+Alt+F6}}, log in, and restart gnome-shell with:<br />
<br />
# pkill -HUP gnome-shell<br />
<br />
All open applications will still be available after restarting the shell.<br />
<br />
Sometimes, however, merely restarting the shell might not be enough. Then you will have to restart X, losing all work in progress. You can restart X by:<br />
<br />
# pkill X<br />
<br />
The GNOME Shell then restarts automatically.<br />
<br />
If this doesn't work, you can try to restart your login manager. For instance, if you use GDM, try:<br />
<br />
# systemctl restart gdm.service<br />
<br />
{{Tip|You can also use '''htop''' in tty; press ''t'', select the ''gnome-shell'' tree, press ''k'' and send ''SIGKILL''.}}<br />
<br />
== Customizing GNOME appearance ==<br />
<br />
=== Overall appearance ===<br />
<br />
GNOME 3 may have "started from scratch", but like most large software projects it is assembled from parts dating to different eras. There is not '''one''' all-encompassing configuration tool. The new ''Systems Settings'' tool is a big improvement over previous control panels. ''System Settings'' is well-organized, but you may find yourself wishing for more control over system appearance.<br />
<br />
You may be familiar with existing configuration tools: some of these still work; many will not. Some settings are not readily exposed for you to change. Indubitably, many settings will migrate to newer tools and/or become exposed as time progresses and the wider community embraces and extends the latest GNOME desktop.<br />
<br />
==== Gsettings ====<br />
<br />
A new command-line tool '''gsettings''' stores data in a binary format, unlike previous tools using XML text. A tutorial [http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html Customizing the GNOME Shell] explores the power of gsettings.<br />
<br />
==== GNOME tweak tool ====<br />
<br />
This graphical tool customizes fonts, themes, titlebar buttons and other settings. <br />
<br />
# pacman -S gnome-tweak-tool<br />
<br />
==== GTK3 theme via settings.ini ====<br />
<br />
Like {{ic|~/.gtkrc-2.0}} with GTK2+, it is possible to set a GTK3 theme via {{ic|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini}}.<br />
<br />
Variable {{ic|$XDG_CONFIG_HOME}} is usually set to {{ic|~/.config}}<br />
<br />
''Adwaita,'' the default GNOME 3 theme, is a part of {{pkg|gnome-themes-standard}}. Additional GTK3 themes can be found at [http://browse.deviantart.com/customization/skins/linuxutil/desktopenv/gnome/gtk3/ Deviantart web site.] For example:<br />
{{hc|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-theme-name = Adwaita<br />
gtk-fallback-icon-theme = gnome<br />
# next option is applicable only if selected theme supports it<br />
gtk-application-prefer-dark-theme = true<br />
# set font name and dimension<br />
gtk-font-name = Sans 10<br />
</nowiki>}}<br />
<br />
It is necessary to [[#Restarting_the_shell|restart the GNOME shell]] for settings to be applied. More GTK options are found at [http://developer.gnome.org/gtk3/3.0/GtkSettings.html#GtkSettings.properties GNOME developer documentation.]<br />
<br />
==== Icon theme ====<br />
<br />
Using {{pkg|gnome-tweak-tool}} version 3.0.3 and later, you can place any icon theme you wish to use inside {{ic|~/.icons}}.<br />
<br />
Usefully, GNOME 3 is compatible with GNOME 2 icon themes, which means you are not stuck with the default icons. To install a new set of icons, copy your desired icon theme's directory to {{ic|~/.icons}}. As an example:<br />
<br />
$ cp -R /home/user/Desktop/my_icon_theme ~/.icons<br />
<br />
The new theme ''my_icon_theme'' is now selectable using {{ic|gnome-tweak-tool}} under ''interface''.<br />
<br />
Alternatively, you may textually select your icon theme with no need for gnome-tweak-tool. Add the GTK icon theme name to {{ic|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini}}. Please note, not to use "" as your settings would not be recognised then.<br />
<br />
{{hc|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini|<nowiki>... previous lines ...<br />
<br />
gtk-icon-theme-name = my_new_icon_theme</nowiki>}}<br />
<br />
=== Nautilus ===<br />
<br />
''See [[Nautilus]].''<br />
<br />
=== Totem ===<br />
<br />
To play back h.264 videos, you need to install {{Pkg|gst-libav}}<br />
<br />
For more information on gstreamer hardware acceleration, see [[GStreamer#Hardware_Acceleration|Gstreamer: Hardware Acceleration]].<br />
<br />
=== GNOME panel ===<br />
<br />
==== Show date in top bar ====<br />
<br />
By default GNOME displays only the weekday and time in the top bar. This can be changed with the following command. Changes take effect immediately. <br />
<br />
GNOME 3.4.2:<br />
# gsettings set org.gnome.shell.clock show-date true<br />
<br />
GNOME 3.6.2:<br />
# gsettings set org.gnome.desktop.interface clock-show-date true<br />
<br />
==== Always show the "Log Out" entry in the user menu ====<br />
<br />
Since GNOME 3.6, the "Log Out" entry in the user menu is only shown when multiple non-root users are present in the system.<br />
<br />
To always enable this entry, run the following command from a terminal:<br />
<br />
# gsettings set org.gnome.shell always-show-log-out true<br />
<br />
You can also change this in dconf-editor: Navigate to org.gnome.shell, then check the "always-show-log-out" checkbox.<br />
<br />
Then, restart the GNOME shell:<br />
#{{Keypress|Alt+F2}}<br />
#{{Keypress|r}}<br />
#{{Keypress|Enter}}<br />
<br />
==== Hiding icons in the top bar ====<br />
<br />
When doing a GNOME install, some unwanted icons might appear in the panel. These icons can be removed either with GNOME shell extensions or by manually editing the GNOME panel script.<br />
<br />
===== Hiding icons with shell extensions =====<br />
<br />
To remove the accessibility icon, one can use the https://extensions.gnome.org/extension/112/remove-accesibility/. <br />
<br />
The best way to use extensions is installing them from the gnome extensions web page like the one above.<br />
<br />
===== Manually editing the GNOME panel script =====<br />
<br />
For example, to remove the '''universal access icon''', comment out the 'a11y' line in PANEL_ITEM_IMPLEMENTATIONS:<br />
<br />
{{hc|/usr/share/gnome-shell/js/ui/panel.js|<nowiki><br />
const PANEL_ITEM_IMPLEMENTATIONS = {<br />
'activities': ActivitiesButton,<br />
'appMenu': AppMenuButton,<br />
'dateMenu': imports.ui.dateMenu.DateMenuButton,<br />
// 'a11y': imports.ui.status.accessibility.ATIndicator,<br />
'volume': imports.ui.status.volume.Indicator,<br />
'battery': imports.ui.status.power.Indicator,<br />
'lockScreen': imports.ui.status.lockScreenMenu.Indicator,<br />
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,<br />
'powerMenu': imports.gdm.powerMenu.PowerMenuButton,<br />
'userMenu': imports.ui.userMenu.UserMenuButton<br />
};<br />
</nowiki>}}<br />
<br />
Then, save your results and restart the shell:<br />
<br />
#{{Keypress|Alt+F2}}<br />
#{{Keypress|r}}<br />
#{{Keypress|Enter}}<br />
<br />
==== Show battery icon ====<br />
<br />
To show the battery tray icon, [[pacman|install]] {{Pkg|gnome-power-manager}} from the [[Official Repositories|official repositories]].<br />
<br />
==== Disable "Suspend" in the status and gdm menu ====<br />
<br />
A quick way to do it system-wide for GNOME 3.2 is to change line 539 of {{ic|/usr/share/gnome-shell/js/ui/userMenu.js}} and line 103 of {{ic|/usr/share/gnome-shell/js/gdm/powerMenu.js}}. (For GNOME versions prior to 3.2, look at line 153 of {{ic|/usr/share/gnome-shell/js/ui/statusMenu.js}}.) This change takes effect the next time GNOME Shell is started.<br />
<br />
{{hc|/usr/share/gnome-shell/js/ui/userMenu.js|<nowiki><br />
// this._haveSuspend = this._upClient.get_can_suspend(); // Comment this line out.<br />
this._haveSuspend = false; // Use this line instead.<br />
</nowiki>}}<br />
<br />
To accomplish this, paste the following command(s) in your terminal:<br />
GNOME_SHELL=/usr/share/gnome-shell<br />
SCRIPTS=`grep -lr get_can_suspend $GNOME_SHELL/js`<br />
for FILE in $SCRIPTS ; do<br />
sed -r -i -e 's/[^= ]+.get_can_suspend\(\)/false/' "$FILE"<br />
done<br />
<br />
The above change does not persist after a GNOME version update, however. A more perennial solution is to add the code above in some gdm or system startup script (eg: /etc/rc.local), to keep the "suspend" option disabled after updates.<br />
<br />
Alternatively you can install the [[#GNOME shell extensions|GNOME shell extension]] {{ic|alternative status menu}} in package {{Pkg|gnome-shell-extension-alternative-status-menu}}.<br />
<br />
==== Eliminate delay when logging out ====<br />
<br />
The following tweak removes the confirmation dialog and sixty second delay for logging out.<br />
<br />
This dialog normally appears when you log out with the status menu. This tweak affects the '''''Power Off''''' dialog as well. This is not a system-wide change; it affects only the user who enters this command. The change takes effect immediately after entering the command.<br />
<br />
$ gsettings set org.gnome.SessionManager logout-prompt 'false'<br />
<br />
==== Show system monitor ====<br />
<br />
Install the {{AUR|gnome-shell-system-monitor-applet-git}} extension available in the [[AUR]].<br />
<br />
==== Show weather information ====<br />
<br />
Install {{AUR|gnome-shell-extension-weather-git}} from [[AUR]].<br />
<br />
=== Activity view ===<br />
<br />
==== Remove entries from Applications view ====<br />
<br />
Like other desktop environments, GNOME uses .desktop files to populate its Applications view. These text files are in '''{{ic|/usr/share/applications}}'''. It is not possible to edit these files from a folder view ‒ Nautilus does not treat their icons as text files. Use a terminal to display or edit .desktop file entries.<br />
<br />
# ls /usr/share/applications<br />
# nano /usr/share/applications/foo.desktop<br />
<br />
For system wide changes, edit files in '''{{ic|/usr/share/applications}}'''. For local changes, make a copy of ''foo.desktop'' in your home folder.<br />
<br />
$ cp /usr/share/applications/foo.desktop ~/.local/share/applications/<br />
<br />
Edit .desktop files to fit your wishes. <br />
<br />
{{Note|Removing a .desktop file does not uninstall an application, but instead removes its desktop integration: MIME types, shortcuts, and so forth.}}<br />
<br />
The following command appends one line to a .desktop file and hides its associated icon from Applications view:<br />
<br />
$ echo "NoDisplay=true" >> foo.desktop<br />
<br />
==== To Remove Wine Launchers from the Applications menu ====<br />
<br />
Enter {{ic|~/.local/share/applications/wine/Programs/}} and look for the wine application's name. In the directories are the ".desktop" files which configure the launchers. Remove the program directory to easily remove the launchers.<br />
<br />
==== Change application icon size ====<br />
<br />
One awkward selection of the GNOME designers is their choice of large icons for Applications view. This view is painful when working with a small screen containing many large application icons. There is a way to reduce the icon size. It is done by editing the GNOME-Shell theme.<br />
<br />
Edit system files directly (make a backup first) or copy theme files to your local folder and edit these files. <br />
* For the '''default''' theme, edit '''{{ic|/usr/share/gnome-shell/theme/gnome-shell.css}}'''<br />
<br />
* For '''user themes''', edit '''{{ic|/usr/share/themes/<UserTheme>/gnome-shell/gnome-shell.css}}'''<br />
<br />
Edit ''gnome-shell.css'' and replace the following values. Afterward, [[#Restarting_the_shell|restart the GNOME shell.]]<br />
{{hc|gnome-shell.css|<nowiki><br />
...<br />
/* Application Launchers and Grid */<br />
<br />
.icon-grid {<br />
spacing: 18px;<br />
-shell-grid-horizontal-item-size: 82px;<br />
-shell-grid-vertical-item-size: 82px;<br />
}<br />
<br />
.icon-grid .overview-icon {<br />
icon-size: 48px;<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
==== Change dash icon size ====<br />
GNOME's Activities view has a dash on the left hand side, the size of the icons in this dash will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/dash.js}}.<br />
<br />
{{hc|dash.js|<nowiki><br />
...<br />
<br />
let iconSizes = [ 16, 22, 24, 32, 48, 64 ];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change switcher (alt-tab) icon size ====<br />
GNOME comes with a built in task switcher, the size of the icons in this task switcher will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/altTab.js}}<br />
<br />
{{hc|altTab.js|<nowiki><br />
...<br />
<br />
const iconSizes = [96, 64, 48, 32, 22];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change system tray icon size ====<br />
GNOME comes with a built in system tray, visible when the mouse is hovered over the bottom right corner of the screen. The size of the icons in this tray is set to a fixed value of 24. To change this value, edit {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}<br />
{{hc|messageTray.js|<nowiki><br />
...<br />
<br />
ICON_SIZE: 24,<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Disable Activity hot corner hovering ====<br />
<br />
To disable automatic activity view when the hot corner is hovered, edit {{ic|/usr/share/gnome-shell/js/ui/layout.js}} (that was ''panel.js'' in GNOME 3.0.x) :<br />
{{hc|layout.js|<nowiki><br />
this._corner = new Clutter.Rectangle({ name: 'hot-corner',<br />
width: 1,<br />
height: 1,<br />
opacity: 0,<br />
reactive: true });icon-size: 48px;<br />
}<br />
</nowiki>}}<br />
and set {{ic|reactive}} to {{ic|false}}. GNOME Shell needs to be restarted.<br />
<br />
==== Disable Message Tray hovering ====<br />
<br />
The message tray is shown when the mouse hovers at the bottom of the screen for one second. To disable this behavior, comment out the following line in {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}:<br />
{{hc|messageTray.js|<nowiki><br />
//pointerWatcher.addWatch(TRAY_DWELL_CHECK_INTERVAL, Lang.bind(this, this._checkTrayDwell));<br />
</nowiki>}}<br />
GNOME Shell needs to be restarted. The message tray is still visible in activity view.<br />
<br />
=== Titlebar ===<br />
==== Remove title bar ====<br />
Install [https://extensions.gnome.org/extension/354/maximus/ Maximus] GNOME shell extension.<br />
<br />
It can also have white list / black list of application.<br />
<br />
This extension requires xorg-xprop, install it if you don't have it already.<br />
<br />
{{bc|pacman -S xorg-xprop}}<br />
<br />
More about [[#GNOME shell extensions | GNOME shell extensions]].<br />
<br />
==== Reduce title bar height ====<br />
* ''' global''' - edit {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and and reduce its value to a minimum of {{ic|0}}.<br />
* '''user-only''' - copy {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}} to {{ic|/home/$USER/.themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and reduce its value to a minimum of {{ic|0}}.<br />
<br />
Then [[#Restarting_the_shell|Restart the GNOME shell.]] <br />
<br />
To restore the original values, [[pacman|install]] the package {{Pkg|gnome-themes-standard}} from the [[Official Repositories|official repositories]] or remove {{ic|/home/$USER/.themes/Adwaita/metacity-1/metacity-theme-3.xml}}<br />
<br />
==== Reorder titlebar buttons ====<br />
<br />
At present this setting can be changed through '''dconf-editor.'''<br />
<br />
For example, we move the close and minimize buttons to the left side of the titlebar. Open '''dconf-editor''' and locate the '''''org.gnome.shell.overrides.button_layout''''' key. Change its value to '''{{ic|close,minimize:}}''' (Colon symbol designates the spacer between left side and right side of the titlebar.) Use whichever buttons in whatever order you prefer. You cannot use a button more than once. Also, keep in mind that certain buttons are deprecated. [[#Restarting_the_shell|Restart the shell]] to see your new button arrangement.<br />
<br />
==== Hide titlebar when maximized ====<br />
<br />
# sed -i -r 's|(<frame_geometry name="max")|\1 has_title="false"|' /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml<br />
<br />
[[#Restarting_the_shell|Restart the GNOME shell.]] After this tweak, you may find it difficult to un-maximize a window when there is no titlebar to grab.<br />
<br />
With suitable keybindings, you should be able to use {{Keypress|Alt+F5}}, {{Keypress|Alt+F10}} or {{Keypress|Alt+Space}} to remedy the situation.<br />
<br />
To prevent {{ic|metacity-theme-3.xml}} from being overwritten each time package {{pkg|gnome-themes-standard}} is upgraded, add its name to {{ic|/etc/pacman.conf}} with {{ic|NoUpgrade}}.<br />
<br />
{{hc|/etc/pacman.conf|<nowiki>... previous lines ...<br />
<br />
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
# IgnorePkg =<br />
# IgnoreGroup =<br />
<br />
NoUpgrade = usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml # Do not add a leading slash to the path<br />
<br />
... more lines ...</nowiki>}}<br />
<br />
To restore original Adwaita theme values, install the {{pkg|gnome-themes-standard}} package.<br />
<br />
=== Login screen ===<br />
{{Merge|GDM|Login managers have their own wiki pages and information should be maintained separately.}}<br />
To modify characteristics of the login screen (GDM, the GNOME display manager) the following lines can be executed. The first command allows all users, including "gdm", to access X settings (albeit temporarily). This command creates a temporary vulnerability, so be advised. The second command opens a bash session with the credentials of user "gdm". {{Note|For exposition, user gdm's terminal prompt is shown as '''$'''. In actuality, it shows something like -bash-4.2$.}}<br />
<br />
# xhost +<br />
# su - gdm -s /bin/bash<br />
$ dbus-launch<br />
<br />
The third command prints DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID. We must export these variables. Either manually export the below two variables shown in the output of dbus-launch like this:<br />
<br />
$ export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Jb433gMQHS,guid=fc14d4bf3d000e38276a5a2200000d38<br />
$ export DBUS_SESSION_BUS_PID=4283<br />
<br />
Or use the follow command:<br />
<br />
$ `dbus-launch | sed "s/^/export /"`<br />
<br />
Check to see if dconf-service is running and if not, start it like this<br />
<br />
$ /usr/lib/dconf/dconf-service &<br />
<br />
==== Login background image ====<br />
<br />
Once session variables have been exported as explained above, you may issue commands to retrieve or set items used by GDM. <br />
<br />
The easiest way to changes all the settings is by launching the Configuration Editor gui with the command<br />
<br />
$ dconf-editor<br />
<br />
The location of each setting is the same as in the command line style of configuration shown below:<br />
<br />
The following is the command-line approach to retrieve or set the file name used for GDM's wallpaper.<br />
{{bc|<nowiki><br />
$ GSETTINGS_BACKEND=dconf gsettings get org.gnome.desktop.background picture-uri<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/gnome/SundownDunes.jpg'<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.background picture-options 'zoom'<br />
## Possible values: centered, none, scaled, spanned, stretched, wallpaper, zoom</nowiki>}}<br />
{{Note|You must specify a file which user "gdm" has permission to read. GDM cannot read files in your home directory.}}<br />
<br />
An alternative graphical interface to changing themes (gtk3, icons and cursor), the wallpaper and minor other settings of the GDM login screen, you can install {{aur|gdm3setup}} from AUR.<br />
<br />
==== Larger font for login ====<br />
<br />
This tweak enlarges the login font with a scaling factor. It is the same method employed by ''Accessibility Manager'' on the desktop.<br />
<br />
You must [[#Login_screen|export the GDM session variables]] before performing this tweak.<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.interface text-scaling-factor '1.25'<br />
<br />
==== Turning off the sound ====<br />
<br />
This tweak disables the audible feedback heard when the system volume is adjusted (via keyboard) on the login screen. You must first export the GDM session variables.<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.sound event-sounds 'false'<br />
<br />
If the above tweak does not work for you or you are unable to export the GDM session variables, there is always the easiest solution to the "ready sound" problem: mute or lower the sound while in GDM login screen using the media keys (if available) of your keyboard.<br />
<br />
==== Make the power button interactive ====<br />
<br />
The default installation sets the power button to suspend the system. '''''Power off''''' or '''''Show dialog''''' is a better choice. You must first export the GDM session variables as [[#Login_screen|outlined previously.]]<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power button-power 'interactive'<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power button-hibernate 'interactive'<br />
$ gsettings list-recursively org.gnome.settings-daemon.plugins.power<br />
<br />
{{Warning|Please note that the [[Acpid|acpid]] daemon also handle the "power button" an "hibernate button" event. Running both systems at the same time may lead to unexpected behaviour.}}<br />
<br />
==== Prevent suspend when closing the lid ====<br />
<br />
On some systems it happens that your laptop suspends when you are closing the lid despite having set the options ''Laptop lid close action on battery'' and ''Laptop lid close action on AC'' to ''blank''. If this is the case, append the following line to {{ic|/etc/systemd/logind.conf}}:<br />
<br />
HandleLidSwitch=ignore<br />
<br />
==== Change Critical Battery Level Action (for Laptops) ====<br />
<br />
The {{pkg|gnome-power-manager}} gui doesn't have a choice for "do nothing" on laptops at critical battery level. To manually edit this, open the {{pkg|dconf}}-editor -> org -> gnome -> settings-daemon -> plugins -> power. Edit the "critical-battery-action" value to "nothing".<br />
<br />
==== GDM keyboard layout ====<br />
<br />
GDM does not know about your GNOME 3 desktop keyboard settings. To change keyboard settings used by GDM, set your layout using Xorg configuration. Refer to this section of the [[Beginners'_Guide#Non-US_keyboard|Beginner's Guide.]]<br />
<br />
=== Other tips ===<br />
See [[GNOME Tips]].<br />
<br />
== Miscellaneous settings ==<br />
<br />
=== Automatic program launch upon logging in ===<br />
<br />
Specify which programs start automatically after logging in using {{ic|gnome-session-properties}}. This tool is part of the {{Pkg|gnome-session}} package.<br />
<br />
$ gnome-session-properties<br />
<br />
=== Editing applications menu ===<br />
<br />
{{pkg|gnome-menus}} provides ''gmenu-simple-editor'' which can show/hide menu entries.<br />
<br />
{{pkg|alacarte}} provides a more complete menu editor for adding/editing menu entries.<br />
<br />
=== Some 'System Settings' not preserved ===<br />
<br />
GNOME 3 is using [[systemd]] (an init daemon for Linux) with more modern capabilities. Previously GNOME programs were altered to use Arch's init functionalities to gather settings but either the maintenance required to do this or possibly this is because of a transitioning to the new init system (read more about this [https://bbs.archlinux.org/viewtopic.php?pid=1115208#p1115208 here]). Areas that settings will not be preserved are '''Date and Time''' and adding ICC profiles in the '''Color''' menu and possibly others.<br />
<br />
To gain the functionality back, [[systemd]] needs to be installed and the ''gdm.service'' and ''NetworkManager.service'' services need to be enabled.<br />
<br />
=== Inner padding in Gnome Terminal===<br />
To move the terminal output away from the window borders create the stylesheet {{ic|~/.config/gtk-3.0/gtk.css}} with the following setting:<br />
<br />
TerminalScreen {<br />
-VteTerminal-inner-border: 10px 10px 10px 10px;<br />
}<br />
<br />
=== Disable sound effects in Terminal ===<br />
By default the terminal has these annoying sound effects when e.g. pushing the tab button on your keyboard. One solution is to turn off or mute all sound effects in the settings menu of Gnome. However, this will also turn off notification sounds in other application such as Skype. A better solution is to open a terminal, go to Edit -> Profile Preferences -> General and untick '''Terminal bell'''.<br />
<br />
=== Move dialog windows ===<br />
The default configuration for dialogs will not allow you to move them which causes problems in some cases. To change this you will need to use gconf-editor and change this setting:<br />
<br />
/desktop/gnome/shell/windows/attach_modal_dialogs<br />
<br />
After the change you will need to restart the shell for it to take affect.<br />
<br />
=== Show context menu icons ===<br />
Some programs do have context menu icons which, however, are disabled by default to show up in Gnome. In order to show them set {{ic| org.gnome.desktop.interface menus-have-icons}} to true.<br />
<br />
=== GNOME shell extensions ===<br />
<br />
GNOME Shell can be customized with extensions. These provide features such as a dock or a widget for changing the theme.<br />
<br />
Many extensions are collected and hosted by [https://extensions.gnome.org/ extensions.gnome.org]. They can be browsed and installed simply activating them in the browser. More information about gnome shell extensions can be found [https://extensions.gnome.org/about/ here].<br />
<br />
See [[#When_an_extension_breaks_GNOME|when an extension breaks GNOME]] for troubleshooting information.<br />
<br />
=== Default file browser/replace Nautilus ===<br />
<br />
You can trick GNOME into using another file browser by editing the {{ic|Exec}} line in {{ic|/usr/share/applications/nautilus.desktop}}. See the correct parameters in the {{ic|.desktop}} file of the file manager of your choice, e.g.:<br />
{{hc|/usr/share/applications/nautilus.desktop|<br />
2=[...]<br />
Exec=thunar %F<br />
OR<br />
Exec=pcmanfm %U<br />
OR<br />
Exec=nemo %U<br />
[...]<br />
}}<br />
<br />
=== Default PDF viewer ===<br />
In some cases when you have installed Inkscape or other graphic programs Evince Document Viewer might no longer be selected as the default PDF application. If it is not available in the '''Open With''' entry which would be the GUI solution, you can use the following user command to make it the default application again.<br />
<br />
xdg-mime default evince.desktop application/pdf<br />
<br />
=== Default terminal ===<br />
<br />
{{ic|gsettings}} (which replaces {{ic|gconftool-2}}) is used to set the default terminal. The setting affects ''nautilus-open-terminal'' (a Nautilus extension).<br />
To make [[rxvt-unicode|urxvt]] the default, run:<br />
<br />
gsettings set org.gnome.desktop.default-applications.terminal exec urxvtc<br />
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"<br />
<br />
{{Note|The {{ic|-e}} flag is for executing a command. When ''nautilus-open-terminal'' invokes {{ic|urxvtc}}, it puts a {{ic|cd}} command at the end of the command line so that the new terminal starts in the directory you opened it from. Other terminals will require a different (perhaps empty) {{ic|exec-arg}}.}}<br />
<br />
=== Default web browser ===<br />
<br />
To configure the web browser used by the AUR package {{AUR|gnome-gmail-notifier}}, open gconf-editor<br />
and edit the {{ic|/desktop/gnome/url-handlers/http/}} key. You may want to change {{ic|https/}}, {{ic|about/}}, and {{ic|unknown/}} keys while you are at it.<br />
<br />
=== Middle mouse button ===<br />
<br />
By default, GNOME 3 disables middle mouse button emulation regardless of [[Xorg]] settings ('''Emulate3Buttons'''). To enable middle mouse button emulation use:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true<br />
<br />
=== Natural scrolling touchpad ===<br />
<br />
GNOME 3 can be configured to use "natural" two finger scrolling, similar to that used in [http://www.apple.com/au/osx/what-is/gestures.html#gallery-gestures-scroll Mac OSX].<br />
<br />
Go to '''System Settings''' ({{ic|gnome-control-center}}) -> '''Mouse & Touchpad''' and set both '''Two finger scroll''' and '''Content sticks to fingers''' to {{ic|ON}}.<br />
<br />
You can alternatively configure the touchpad from a terminal with {{ic|gsettings}}:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.touchpad horiz-scroll-enabled true<br />
$ gsettings set org.gnome.settings-daemon.peripherals.touchpad scroll-method two-finger-scrolling<br />
$ gsettings set org.gnome.settings-daemon.peripherals.touchpad natural-scroll true<br />
<br />
=== Display dimming ===<br />
<br />
By default GNOME 3 has a ten second idle timeout to dim the screen regardless of the battery and AC state:<br />
<br />
gsettings get org.gnome.settings-daemon.plugins.power idle-dim-time<br />
<br />
To set a new value type the following<br />
<br />
gsettings set org.gnome.settings-daemon.plugins.power idle-dim-time <int><br />
<br />
where <int> is the value in seconds<br />
<br />
=== Alternate window manager ===<br />
<br />
You can use an alternate window manager with GNOME by [[#Enabling_fallback_mode|forcing fallback mode]] and creating two files:<br />
<br />
{{Note|Xmonad is used as an example, but this works for other window managers.}}<br />
<br />
{{hc|/usr/share/gnome-session/sessions/xmonad.session|<nowiki>[GNOME Session]<br />
Name=Xmonad session<br />
RequiredComponents=gnome-panel;gnome-settings-daemon;<br />
RequiredProviders=windowmanager;notifications;<br />
DefaultProvider-windowmanager=xmonad<br />
DefaultProvider-notifications=notification-daemon</nowiki>}}<br />
<br />
{{hc|/usr/share/xsessions/xmonad-gnome-session.desktop|<nowiki>[Desktop Entry]<br />
Name=Xmonad GNOME<br />
Comment=Tiling window manager<br />
TryExec=/usr/bin/gnome-session<br />
Exec=gnome-session --session=xmonad<br />
Type=XSession</nowiki>}}<br />
<br />
The next time you log in, you should have the ability to choose ''Xmonad GNOME'' as your session.<br />
<br />
If there isn't a .desktop file for the window manager, you'll need to create one. Example for [[wmii]]:<br />
<br />
{{hc|/usr/share/applications/wmii.desktop|<nowiki><br />
[Desktop Entry]<br />
Version=1.0<br />
Type=Application<br />
Name=wmii<br />
TryExec=wmii<br />
Exec=wmii</nowiki>}}<br />
<br />
For more information, see [http://makandra.com/notes/1367-running-the-awesome-window-manager-within-gnome this article on running awesome as the window manager in GNOME].<br />
<br />
== Hidden features ==<br />
<br />
GNOME 3 hides many useful options which you can customize with '''dconf-editor.''' GNOME 3 also supports '''gconf-editor''' for settings that have not yet migrated to dconf.<br />
<br />
=== Changing hotkeys ===<br />
Certain hotkeys cannot be changed directly via Settings -> Keyboard -> Shortcuts. In order to change these keys, use dconf-editor. An example of particular note is the hotkey Alt-Above_Tab. On US keyboards, this is Alt-`: is a hotkey often used in the [[Emacs]] editor. It can be changed by opening dconf-editor and modifying the ''switch-group'' key found in {{ic|org.gnome.desktop.wm.keybindings}}.<br />
<br />
It is possible to manually change the keys via an application's so-called accel map file. Where it is to be found is up to the application: For instance, Thunar's is at ~/.config/Thunar/accels.scm, whereas Nautilus's is located at ~/.config/nautilus/accels and ~/.gnome2/accels/nautilus on old release.<br />
<br />
The file should contain a list of possible hotkeys, each unchanged line commented out with a leading ";" that has to be removed for a change to become active.<br />
For example to replace the hotkey used by Nautilus to move files to the trash folder, change the line :<br />
; (gtk_accel_path "<Actions>/DirViewActions/Trash" "<Primary>Delete")<br />
to this :<br />
(gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")<br />
<br />
The file is regenerate regularly so don't waist time on commenting the file. The uncommented line will stay but every comment you may add will be lost.<br />
<br />
==== Nautilus 3.4 and older ====<br />
Firstly, use '''dconf-editor''' to place a checkmark next to {{ic|can-change-accels}} in the key named ''org.gnome.desktop.interface.''<br />
<br />
We will replace the hotkey — a.k.a. keyboard shortcut, keyboard accelerator — used by Nautilus to move files to the trash folder.<br />
The default assignment is a somewhat-awkward {{Keypress|Ctrl+Delete}}.<br />
* Open Nautilus, select any file, and click '''Edit''' on the menu bar.<br />
* Hover over the ''Move to Trash'' menu item.<br />
* While hovering, press {{Keypress|Delete}}. The current accelerator is now unset.<br />
* Press the key that you wish to become the new keyboard accelerator.<br />
* Press {{Keypress|Delete}} to make the new accelerator be the Delete key.<br />
Unless you select a file or folder, ''Move to Trash'' will be grayed-out. Finally, disable {{ic|can-change-accels}} to prevent accidental hotkey changes.<br />
<br />
=== Shutdown via the status menu ===<br />
<br />
Currently, the GNOME designers have hidden the ''Shutdown'' option inside the status menu. To shut down your system with the status menu, click the menu and hold down the {{Keypress|Alt}} key so that the '''''Suspend''''' item changes to '''''Power Off'''''. The subsequent dialog allows you to shut down or restart your system.<br />
<br />
If you disable the Suspend menu item system-wide as described [[#Disable_"Suspend"_in_the_status_menu|elsewhere in this document]] you do not have to go through these motions.<br />
<br />
Another option is to install the ''Alternative Status Menu'' extension. See the section on shell extensions. The alternative menu extension installs a new status menu with a non-hidden '''''Power Off''''' entry.<br />
<br />
=== Screencast recording ===<br />
<br />
Gnome features the built-in possbility to create screencasts easily. Thereby Control+Shift+Alt+R keybinding starts and stops the recording. A red circle is displayed in the bottom right corner of the screen when the recording is in progress. After the recording is finished, a file named 'Screencast from %d%u-%c.webm' is saved in the Videos directory. In order to use the screencast feature you need to have installed the gst plugins which are:<br />
<br />
$ pacman -Qs gst<br />
<br />
=== Modify Keyboard with XkbOptions ===<br />
<br />
Using the '''dconf-editor''', navigate to the key named ''org.gnome.desktop.input-sources.xkb-options'' and add desired XkbOptions (e.g. 'caps:swapescape') to the list.<br />
<br />
See /usr/share/X11/xkb/rules/xorg for all XkbOptions and then /usr/share/X11/xkb/symbols/* for the respective descriptions.<br />
<br />
=== Toggle keyboard layouts ===<br />
Since Gnome does not consider any configuration in {{ic|/etc/X11/conf.d/*.conf}} you have to set the command for layout switching either via the control center with the options ''Switch to previous source'' and ''Switch to next source'' or if you want to use Alt - Shift combination you have to use the Gnome-Tweak-Tool and set ''Typing -> Modifiers-only input sources -> select Alt-shift''. For more information see also the forum [https://bbs.archlinux.org/viewtopic.php?id=152127 thread].<br />
<br />
== Integrated messaging (Empathy) ==<br />
<br />
Empathy, the engine behind integrated messaging, and all system settings based on messaging accounts will not show up unless the {{grp|telepathy}} group of packages or at least one of the backends ({{pkg|telepathy-gabble}}, or {{pkg|telepathy-haze}}, for example) is installed.<br />
<br />
These packages are not included in default Arch GNOME installs. You can install the Telepathy and optionally any backends with:<br />
<br />
# pacman -S telepathy<br />
<br />
Without telepathy, Empathy will not open the account management dialog and can get stuck in this state. If this happens -- even after quitting Empathy cleanly -- the {{ic|/usr/bin/empathy-accounts}} application can remain running and will need to be killed before you can add any new accounts.<br />
<br />
View descriptions of telepathy components on the [http://telepathy.freedesktop.org/wiki/Components Freedesktop.org Telepathy Wiki.]<br />
<br />
== Forcing fallback mode ==<br />
<br />
Your session automatically starts in fallback mode when '''gnome-shell''' is not present, or when your hardware cannot handle graphics acceleration — such as running within a virtual machine or running on old hardware.<br />
<br />
If you wish to enable fallback mode while still having '''gnome-shell''' installed, make the following system change:<br />
<br />
Go to '''System Settings''' ({{ic|gnome-control-center}}) -> '''Details''' -> '''Graphics''' and set '''Forced Fallback Mode''' to {{ic|ON}}.<br />
<br />
You can alternatively choose the type of session from a terminal with {{ic|gsettings}}:<br />
<br />
$ gsettings set org.gnome.desktop.session session-name gnome-fallback<br />
<br />
You may want to log out after making the change. You will see the chosen type of session upon your next login.<br />
<br />
To disable the forced-fallback mode change it back to {{ic|gnome}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== When an extension breaks GNOME ===<br />
<br />
When enabling shell extensions causes GNOME breakage, you should first remove the ''user-theme'' and ''auto-move-windows'' extensions from their installation directory.<br />
<br />
The installation directory could be one of '''{{ic|~/.local/share/gnome‑shell/extensions,}}''' '''{{ic|/usr/share/gnome‑shell/extensions,}}''' or '''{{ic|/usr/local/share/gnome‑shell/extensions}}'''. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.<br />
<br />
Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the [https://live.gnome.org/GnomeShell/Extensions GNOME web site.]<br />
<br />
=== Extensions do not work after GNOME 3 update ===<br />
<br />
Locate the folder where your extensions are installed. It might be '''{{ic|~/.local/share/gnome-shell/extensions}}''' or '''{{ic|/usr/share/gnome-shell/extensions}}'''.<br />
<br />
Edit each occurrence of '''{{ic|metadata.json}}''' which appears in each extension sub-folder. <br />
<br />
{| border="0"<br />
| Insert: || '''{{ic|"shell-version": ["3.6"]}}'''<br />
|-<br />
| Instead of (for example): || '''{{ic|"shell-version": ["3.4"]}}'''<br />
|}<br />
<br />
<br />
'''"3.x"''' indicates the extension works with every Shell version. If it breaks, you'll know to change it back.<br />
<br />
=== The "Windows" key ===<br />
By default, this key is mapped to the "overlay-key" to launch the Overview. You can remove this key mapping to free up your {{ic|Windows Key}} (also called {{ic|Mod4}}), which GNOME calls {{ic|Super_L}}, by utilizing {{ic|gsettings}}.<br />
<br />
Example:<br />
{{ic| gsettings set org.gnome.mutter overlay-key 'Foo';}}.<br />
You can leave out '''Foo''' to simply remove any binding to that function.<br />
<br />
{{Note| GNOME also uses {{ic|Alt+F1}} to launch the Overview.}}<br />
<br />
=== Keyboard Shortcut do not work with only conky running ===<br />
The gnome-shell keyboard shortcuts like {{keypress|Alt+F2}}, {{keypress|Alt+F1}}, and the media key shortcuts do not work if conky is the only program running. However if another application like gedit is running, then the keyboard shortcuts work.<br />
<br />
solution: edit .conkyrc <br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_argb_visual yes<br />
own_window_type dock<br />
own_window_class Conky<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
=== xf86-video-ati driver: flickers from time to time ===<br />
<br />
If you use that driver, your desktop might flicker a lot when you hover the bottom right corner, and also when you start up gdm.<br />
Write the following in your '''{{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}''' and see if it works then:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "EnablePageFlip" "off"<br />
EndSection<br />
<br />
https://wiki.archlinux.org/index.php/Intel_Graphics#Choose_acceleration_method<br />
<br />
=== Intel card: Black Screen, Crashes, or Freezes===<br />
If freezing, crashing, or a black screen occur while using an Intel graphics card, it may help to create {{ic|/etc/X11/xorg.conf.d/20-intel.conf}} with the the following to enable SNA acceleration. More information can be found [https://wiki.archlinux.org/index.php/Intel_Graphics#Choose_acceleration_method here].<br />
<br />
Section "Device"<br />
Identifier "Intel Graphics"<br />
Driver "intel"<br />
Option "AccelMethod" "sna"<br />
EndSection<br />
<br />
=== Window opens behind other windows when using multiple monitors ===<br />
<br />
This is possibly a bug in GNOME Shell which causes new windows to open behind others.<br />
Unchecking "workspaces_only_on_primary" in desktop/gnome/shell/windows using gconf-editor solves this problem.<br />
<br />
=== Multiple monitors and dock extension ===<br />
<br />
If you have multiple monitors configured using Nvidia Twinview, the dock extension may get sandwiched in-between the monitors. You can edit the source of this extension to reposition the dock to a position of your choosing.<br />
<br />
Edit {{ic|/usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/extension.js}} and locate this line in the source:<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-2, (primary.height-height)/2);<br />
<br />
The first parameter is the X position of the dock display, by subtracting 15 pixels as opposed to 2 pixels from this it correctly positioned on my primary monitor, you can play around with any X,Y coordinate pair to position it correctly.<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-15, (primary.height-height)/2);<br />
<br />
=== No event sounds for Empathy and other programs ===<br />
<br />
If you are using [[OSS]], you may want to install {{AUR|libcanberra-oss}} from the [[AUR]].<br />
<br />
=== Gnome sets the keyboard layout to USA after every log in === <br />
<br />
See the [[https://bugzilla.redhat.com/show_bug.cgi?id=530452 this]] bug report for more information. It is related to GDM and can be fixed by choosing the correct layout at GDM login startup. However, users who do not use GDM or any login manager but a pure startx approach have to use a workaround. Create the file {{ic|~/.keyboard}} and make it executable {{ic|chmod +x}}:<br />
<br />
# Set the correct keyboard layout after Gnome start<br />
setxkbmap -layout "us,pl" -variant altgr-intl -option "grp:alt_shift_toggle" nodeadkeys<br />
<br />
Now run {{ic|gnome-session-properties}} and add this .keyboard file to the programs run at startup:<br />
<br />
Name: Keyboard layout <br />
Command: /home/username/.keyboard<br />
Comment: Sets the correct keyboard layout after Gnome start<br />
<br />
Further you need to create the executable file {{ic|/etc/pm/sleep.d/90_keyboard}} with the following content in order to run the script on resume from suspend and hibernation.<br />
<br />
#!/bin/bash<br />
case $1 in<br />
resume|thaw)<br />
/home/username/.keyboard<br />
;;<br />
esac<br />
<br />
=== Panels do not respond to right-click in fallback mode ===<br />
<br />
Check Configuration Editor: /apps/metacity/general/mouse_button_modifier. This modifier key ({{Keypress|Alt}}, {{Keypress|Super}}, etc) used for normal windows is also used by panels and their applets.<br />
<br />
=== "Show Desktop" keyboard shortcut does not work ===<br />
<br />
GNOME developers treated the corresponding binding as bug (see https://bugzilla.gnome.org/show_bug.cgi?id=643609) due to Minimization being deprecated. To show the desktop again assign ALT+STRG+D to the following setting:<br />
<br />
System Settings --> Keyboard --> Shortcuts --> Navigation --> Hide all normal windows<br />
<br />
=== Nautilus does not start ===<br />
<br />
# Press {{keypress|Alt+F2}}<br />
# Enter {{ic|gnome-tweak-tool}}<br />
# Select the ''File Manager'' tab.<br />
# Locate option ''Have file manager handle the desktop'' and assure it is toggled '''off'''.<br />
<br />
=== Epiphany does not play Flash videos ===<br />
<br />
Adobe Flash Player is buggy and does not work directly in Epiphany. See [[Epiphany#Flash]] for a workaround involving nspluginwrapper.<br />
<br />
=== Unable to apply stored configuration for monitors ===<br />
<br />
If you encounter this message try to disable the xrandr gnome-settings-daemon plugin :<br />
<br />
$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false<br />
<br />
=== Lock button fails to re-enable touchpad ===<br />
<br />
Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. It appears currently that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can do the following to unlock it.<br />
# Start a terminal. You can do this by pressing {{keypress|Alt+F2}}, then typing {{ic|gnome-terminal}} followed by pressing {{keypress|Enter}}.<br />
# Type in the following command<br />
$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1<br />
<br />
=== Unable to connect to secured Wi-Fi networks ===<br />
<br />
You can see the network connections listing, but choosing an encrypted network fails to show a dialog for key entry. You may need to [[pacman|install]] {{Pkg|network-manager-applet}}. See [[NetworkManager#GNOME|GNOME NetworkManager setup]].<br />
<br />
=== "Any command has been defined 33" ===<br />
<br />
When you press the {{Keypress|Print Screen}} key (sometimes labeled {{Keypress|PrntScr}} or {{Keypress|PrtSc}}) to take a screenshot, and you got "Any command has been defined 33", [[pacman|install]] {{Pkg|metacity}}.<br />
<br />
=== GDM and GNOME use X11 cursors ===<br />
<br />
To fix this problem, become root and put the following into {{ic|/usr/share/icons/default/index.theme}} (creating the directory {{ic|/usr/share/icons/default}} if necessary):<br />
{{hc|/usr/share/icons/default/index.theme|<nowiki><br />
[Icon Theme]<br />
Inherits=Adwaita<br />
</nowiki>}}<br />
<br />
Note: Instead of "Adwaita", you can choose another cursor theme (e.g. Human).<br />
Alternatively, you can install {{AUR|gnome-cursors-fix}} from the [[AUR]].<br />
<br />
=== Tracker & Documents don't list any local files ===<br />
<br />
In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in directories that it knows of. If your documents are contained in one of the usual XDG standard directories (i.e. "Documents" or "Music"), you should install [https://www.archlinux.org/packages/extra/x86_64/xdg-user-dirs/ xdg-user-dirs] and run:<br />
<br />
# xdg-user-dirs-update<br />
<br />
This will create all of the usual XDG home directories if they don't already exist and it will create the config file definining these directories that Tracker and Documents depend upon.<br />
<br />
=== Passwords are not remembered ===<br />
<br />
If you get a password prompt every time you login, and you find password are not saved, you might need to create/set a default keyring:<br />
<br />
$ pacman -S seahorse<br />
<br />
Open "Passwords and Keys" from the menu or run "seahorse". Select View > By Keyring. If there is no keyring in the left column (it will be marked with a lock icon), go to File > New > Password Keyring and give it a nice name. You will be asked to enter a password. If you do not give it a password it will be unlocked automatically even when using autologin, but passwords will not be stored securely. Finally, right-click on the keyring you just created and select "Set as default".<br />
<br />
=== Windows can't be modified with Alt-Key + Mouse-Button ===<br />
<br />
Change the dconf-setting "org.gnome.desktop.wm.preferences.mouse-button-modifier" from <Super> back to <Alt>. It is not possible to change this with ''System Settings'' > "Keyboard" > "Shortcuts", you will find there only the regular keybindings. The developers of GNOME decided to change this from 3.4 to 3.6 because of this bug report https://bugzilla.gnome.org/show_bug.cgi?id=607797<br />
<br />
=== Gnome-shell 3.8.x fails to load with a black screen + cursor ===<br />
<br />
If you have a non-UTF8 language enabled, Gnome 3 can fail to load. Disable non-UTF-8 locales and perform a locale-gen until this is resolved.<br />
For more information see this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=698952<br />
<br />
== External links ==<br />
* [http://www.gnome.org/ The Official Website of GNOME]<br />
* [http://extensions.gnome.org/ Extensions for GNOME-shell]<br />
* Themes, icons, and backgrounds:<br />
** [http://art.gnome.org/ GNOME Art]<br />
** [http://www.gnome-look.org/ GNOME Look]<br />
* GTK/GNOME programs:<br />
** [http://www.gnomefiles.org/ GNOME Files]<br />
** [http://www.gnome.org/projects/ GNOME Project Listing]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Backlight&diff=263169Backlight2013-06-17T22:32:07Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
Screen brightness can often be tricky to control. On many machines, physical hardware switches are missing and software solutions may or may not work well. Make sure to find a working method for your hardware! Too bright screens can cause eye strain.<br />
<br />
There are many ways to adjust the screen backlight of a monitor, laptop or integrated panel (such as the iMac) using software, but depending on hardware and model, sometimes only some options are available. This article aims to summarize all possible ways to adjust the backlight.<br />
<br />
==Overview==<br />
There are many ways to control brightness. According to this discussion[https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617] and this wiki page [https://wiki.ubuntu.com/Kernel/Debugging/Backlight], the control method could be divided into these categories:<br />
* brightness is controlled by vendor specified hotkey. And there is no interface for OS to adjust brightness. <br />
* brightness is controlled by OS:<br />
** brightness could be controlled by ACPI<br />
** brightness could be controlled by graphic driver.<br />
All methods expose themselves to the user by /sys/class/brightness. And xrandr/xbacklight could use this folder and choose one method to control brightness. But it is still not very clear which one xbacklight prefers by default.<br />
''See FS#27677 for xbacklight, if you get "No outputs have backlight property."'' There is a temporary fix if xrandr/xbacklight does not choose the right directory in /sys/class/brightness: You can specify the one you want in xorg.conf by setting the "Backlight" option of the Device section to the name of that directory (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 at the bottom of the page for details).<br />
* brightness is controlled by HW register throught setpci<br />
<br />
==ACPI==<br />
It is often possible to adjust the backlight by ACPI. This controls the actual LEDs or cathodes of the screen. When this ACPI option is available, the illumination is controllable using a GUI slider in the Display/Screen system settings or by simple commands on the CLI.<br />
<br />
Different cards might manage this differently. Check {{ic|/sys/class/backlight}} to find out:<br />
{{hc|# ls /sys/class/backlight/|<br />
intel_backlight<br />
}}<br />
<br />
So this particular backlight is managed by an Intel card. It is called {{ic|acpi_video0}} on an ATI card. In the following example, acpi_video0 is used.<br />
<br />
The directory contains the following files and folders:<br />
<br />
actual_brightness brightness max_brightness subsystem/ uevent <br />
bl_power device/ power/ type<br />
<br />
The maximum brightness (often 15) can be found by running {{ic|cat}}:<br />
<br />
# cat /sys/class/backlight/acpi_video0/max_brightness<br />
15<br />
<br />
Brightness can then be set (as root) with {{ic|echo}}. Obviously you cannot go any higher than your screen's maximum brightness. The values for maximum brightness and brightness in general vary wildly among cards. <br />
<br />
# echo 5 > /sys/class/backlight/acpi_video0/brightness<br />
<br />
Sometimes ACPI does not work well due to different motherboard implementations and ACPI quirks. This include some models with dual graphics (e.g. Nvidia-optimus/Radeon with intel (i915)) and some examples with this problem in notebooks such as Dell Studio, Dell XPS 14/15/17 and some Lenovo series, Kamal Mostafa kernel developer make [https://launchpad.net/~kamalmostafa/+archive/linux-kamal-mjgbacklight patches] for solved this problem included after 3.1 kernel version. You can try adding the following kernel parameters in your bootloader(grub, syslinux...) to adjust ACPI model:<br />
<br />
acpi_osi=Linux acpi_backlight=vendor<br />
<br />
or<br />
<br />
acpi_osi=Linux acpi_backlight=legacy<br />
''acpi_backlight=vendor will prefer vendor specific driver (e.g. thinkpad_acpi, sony_acpi, etc.) instead of the ACPI video.ko driver.''<br />
<br />
==Switching off the backlight==<br />
<br />
Switching off the backlight (for example when one locks the notebook) can be useful to conserve battery energy. Ideally the following command inside of a graphical session should work:<br />
sleep 1 && xset dpms force off<br />
The backlight should switch on again on mouse movement or keyboard input. If the previous command does not work, there is a chance that {{ic|vbetool}} works. Note, however, that in this case the backlight must be manually activated again. The command is as follows:<br />
vbetool dpms off<br />
To activate the backlight again:<br />
vbetool dpms on<br />
<br />
For example, this can be put to use when closing the notebook lid as outlined in the entry for [[Acpid#Laptop_Monitor_Power_Off|Acipd]].<br />
<br />
<br />
==Backlight utilities==<br />
===xbacklight===<br />
You can adjust the backlight through the xorg-server command {{ic|xbacklight}}. The utility is provided by the {{Pkg|xorg-xbacklight}} package in [extra].<br />
<br />
A useful demonstration was posted by [http://www.youtube.com/watch?v=_pi3iKMAJcY gotbletu on YouTube]. He suggests the following commands to adjust the backlight:<br />
<br />
* brighten up:<br />
xbacklight -inc 40<br />
<br />
* dim down:<br />
xbacklight -dec 40<br />
<br />
===xcalib===<br />
The program [http://xcalib.sourceforge.net/ xcalib] can be downloaded from [https://aur.archlinux.org/packages.php?ID=10969 AUR] and used to dim the screen. Again, the user gotbletu posted a demonstration on [http://www.youtube.com/watch?v=A9xsvntT6i4 Youtube]. This program can correct gamma, invert colors and reduce contrast, the latter of which we use in this case:<br />
<br />
* dim down:<br />
xcalib -co 40 -a<br />
<br />
This program uses ICC technology to interact with X11 and while the screen is dimmed, you may find that the mouse cursor is just as bright as before.<br />
<br />
===redshift===<br />
The program [http://jonls.dk/redshift/ redshift] in the community repository uses {{ic|randr}} to adjust the screen brightness depending on the time of day and your geographic position. It can also do RGB gamma corrections and set color temperatures. As with {{ic|xcalib}}, this is very much a software solution and the look of the mouse cursor is unaffected. To execute a single quick adjustment of the brightness, try something like this:<br />
<br />
redshift -o -l 0:0 -b 0.8 -t 6500:6500<br />
<br />
{{Tip|If your longitude is west or your latitude is south, you should input it as negative.<br />
Example for Berkeley, CA: <br />
gtk-redshift -l 37.8717:-122.2728 <br />
}}<br />
<br />
===relight===<br />
[http://xyne.archlinux.ca/projects/relight relight] is available in [http://xyne.archlinux.ca/repos Xyne's repos] and [https://aur.archlinux.org/packages.php?ID=66487 the AUR]. The package provides a service to automatically restore previous backlight settings during reboot along using the ACPI method explained above. The package also contains a dialog-based menu for selecting and configuring backlights for different screens.<br />
<br />
===setpci (use with great care)===<br />
It is possible to set the register of the graphic card to adjust the backlight. It means you adjust the backlight by manipulating the hardware directly, which can be risky and generally is not a good idea. Not all of the graphic cards support this method.<br />
<br />
When using this method, you need to use {{ic|lspci}} first to find out where your graphic card is.<br />
# setpci -s 00:02.0 F4.B=0<br />
<br />
===Calise===<br />
The software [http://calise.sourceforge.net/wordpress/ calise] can be found in AUR.<br />
* Stable version: {{AUR|calise}}<br />
* Development version: {{AUR|calise-git}} <br />
<br />
It basically computes ambient brightness, and set screen's correct backlight, simply making captures from the webcam, for laptop without light sensor.<br />
For more information, calise has its own wiki: [http://calise.sourceforge.net/mediawiki/index.php/Main_Page Calise wiki].<br />
<br />
The main features of this program are that it's very precise, very light on resource usage, and with the daemon version (.service file for systemd users available too), it has practically no impact on battery life.<br />
<br />
===brightd===<br />
Macbook-inspired {{AUR|brightd}} automatically dims (but doesn't put to standby) the screen when there is no user input for some time. A good companion of [[Display Power Management Signaling]] so that the screen doesn't blank out in a sudden.<br />
<br />
== KDE ==<br />
[[KDE]] users can adjust the backlight via System Settings -> Power Management -> Power Profiles.<br />
If you want set backlight before kdm just put in /usr/share/config/kdm/Xsetup :<br />
<br />
xbacklight -inc 10<br />
<br />
== NVIDIA Settings ==<br />
Users of [[NVIDIA|NVIDIA's proprietary drivers]] users can change display brightness via the nvidia-settings utility under "X Server Color Correction." However, note that this has absolutely nothing to do with backlight (intensity), it merely adjusts the color output. (Reducing brightness this way is a power-inefficient last resort when all other options fail; increasing brightness spoils your color output completely, in a way similar to overexposed photos.)<br />
<br />
== Backlight PWM modulation frequency (Intel i915 only) ==<br />
Laptops with LED backlight are known to have screen flicker sometimes. The reason for this, is that it is hard enough to dim LEDs by limiting direct current flowing through. It is easier to control brightness by switching LEDs on and off fast enough.<br />
<br />
However, frequency of the switching (so-called PWM modulation frequency) is not high enough actually, and some people may notice flicker either explicitly or by feeling headache and eyestrain.<br />
<br />
If you have an Intel i915 GPU, then it may be possible to adjust PWM modulation frequency to eliminate flicker.<br />
<br />
Install intel-gpu-tools from community repo<br />
<br />
# pacman -S intel-gpu-tools<br />
<br />
Get value of the register, that determines PWM modulation frequency<br />
<br />
# intel_reg_read 0xC8254<br />
0xC8254 : 0x12281228<br />
<br />
The value returned represents period of PWM modulation. So to increase PWM modulation frequency, value of the register has to be reduced. For example, to double frequency from the previous listing, execute<br />
<br />
# intel_reg_write 0xC8254 0x09140914<br />
<br />
You can use online calculator to calculate desired value http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html<br />
<br />
Refer to dedicated topic for details https://bbs.archlinux.org/viewtopic.php?pid=1245913</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=263168ASUS Zenbook Prime UX31A2013-06-17T22:29:04Z<p>Notasynonym: </p>
<hr />
<div>{{poor writing|reason=This should '''only''' have information specific to the hardware. Other content should not be duplicated here.}}<br />
[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
To install Arch Linux on UX31A, you can follow the official [[Installation_Guide]]. Since the UX31A uses UEFI and GPT, make sure to also read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages. It is recommended to use [[GRUB]] as a bootloader. To prepare an UEFI USB device, read [[UEFI#Create_UEFI_bootable_USB_from_ISO]].<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Grub2 Installation ===<br />
The UX31A should come with an EFI System Partition ("ESP", see [[UEFI#Booting_an_OS_using_UEFI]]). For an Arch-only installation, following normal install procedure without formatting that partition -- thus using Windows' bootloader -- will result in a bootable system. However, partitioning the disk from scratch, creating a new ESP, and installing Arch will result in a non bootable system, because Grub will not be added to the UEFI boot option menu (instead, the user will likely be dropped to the UEFI BIOS). To fix this, after following normal installation procedure, follow the instructions at [[GRUB_EFI_Examples#Z68_Family_and_U47_Family]]. (UX31A's BIOS has the "Launch EFI shell from filesystem device" option, so only follow the instructions for that specific case). You should now be able to boot into your newly installed system.<br />
<br />
== Kernel Parameters ==<br />
These kernel parameters offer some speed optimizations and longer battery life. It is recommended to enable them. To add kernel paramaters to GRUB2 you have to edit {{ic|/etc/default/grub}} and add them to the GRUB_CMDLINE_LINUX_DEFAULT line.<br />
<br />
{{ic|1=add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1}}<br />
<br />
== Function keys ==<br />
<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.}}<br />
<br />
This table shows the function keys, their intended function, what keycode (if any) X recognizes and whether the function key operates at the BIOS level or if it needs a shortcut.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Keys!! Function !! X sees !! shortcut needed <br />
|-<br />
| {{keypress|Fn+F1}} || Sleep || XF86Sleep || no <br />
|-<br />
| {{keypress|Fn+F2}} || Turn off WLAN and Bluetooth || XF86WLAN & XF86Bluetooth || no<br />
|-<br />
| {{keypress|Fn+F3}} || Dim keyboard backlight || XF86KbdBrightnessDown || yes<br />
|-<br />
| {{keypress|Fn+F4}} || Brighten keyboard backlight || XF86KbdBrightnessUp || yes<br />
|-<br />
| {{keypress|Fn+F5}} || Dim LCD backlight || XF86MonBrightnessDown || no<br />
|-<br />
| {{keypress|Fn+F6}} || Brighten LCD backlight || XF86MonBrightnessUp || no<br />
|-<br />
| {{keypress|Fn+F7}} || Turn off LCD || No named key || no<br />
|-<br />
| {{keypress|Fn+F8}} || Toggle display || XF86Display || yes<br />
|-<br />
| {{keypress|Fn+F9}} || Toggle touchpad || XF86TouchpadToggle || yes<br />
|-<br />
| {{keypress|Fn+F10}} || Audio mute/unmute || XF86AudioMute|| yes<br />
|-<br />
| {{keypress|Fn+F11}} || Audio volume down || XF86AudioLowerVolume || yes<br />
|-<br />
| {{keypress|Fn+F12}} || Audio volume up || XF86AudioRaiseVolume || yes<br />
|-<br />
| {{keypress|Fn+a}} || Ambient light sensor || No recognized key ||N/A<br />
|-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes<br />
|-<br />
| {{keypress|Fn+v}} || Webcam || XF86WebCam || yes<br />
|-<br />
| {{keypress|Fn+space}} || Switch power profiles || XF86Launch6 || yes<br />
|}<br />
<br />
=== Screen backlight ===<br />
{{note | Since kernel 3.7.3 screen brightness keys are working out of the box (with boot parameter acpi_osi&#61;"!Windows 2012" - depending on the bootloader, it might be necessary to escape the doublequotes.), so this section is legacy and will soon be moved }}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018, UX31A BIOS 206 UGDM Base Address is 0xDA8CE018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Keyboard backlight ===<br />
Load the {{ic|asus-nb-wmi}} kernel module:<br />
# modprobe asus-nb-wmi<br />
<br />
You'll also want to create the file {{ic|/etc/modules-load.d/asus-kbd-backlight.conf}} with the following content, to ensure that the module is loaded when the laptop is booted:<br />
# Enable control of keyboard backlight using asus-kbd-backlight (<nowiki>https://aur.archlinux.org/packages/asus-kbd-backlight/</nowiki>)<br />
asus-nb-wmi<br />
<br />
Next, install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
==== Automatic Backlight Control ====<br />
This C program will automatically turn off the backlight after a given idle time, and turn it on proportionally to the screen brightness. Written for Asus N56DP but will probably work here as well. Please email me if not. Note that you must run it as root, or if using some other user, give that user write permission to the backlight brightness file. This program works in plain tty mode as well as in X, but if you're using X you must start the X server first before starting this program, otherwise the X server will hang.<br />
[[User:Hyc|Hyc]] ([[User talk:Hyc|talk]]) 13:24, 16 January 2013 (UTC)<br />
/* Author: Howard Chu <hyc@symas.com> 2013-01-15<br />
*<br />
* monitor keyboard activity and toggle keyboard backlight<br />
* for Asus laptops. Tested on Asus N56DP.<br />
*/<br />
#include <sys/types.h><br />
#include <sys/stat.h><br />
#include <fcntl.h><br />
#include <poll.h><br />
<br />
static char dummybuf[8192];<br />
<br />
/** @brief How many milliseconds before turning off kbd light */<br />
#ifndef IDLE_MSEC<br />
#define IDLE_MSEC 7000<br />
#endif<br />
<br />
int main(int argc, char *argv[])<br />
{<br />
struct pollfd pfd;<br />
int rc, blfd, scfd;<br />
int brt, timeout, prev = -1;<br />
char bm[2] = "0\n";<br />
<br />
scfd = open("/sys/class/backlight/acpi_video0/brightness", O_RDONLY);<br />
blfd = open("/sys/class/leds/asus::kbd_backlight/brightness", O_WRONLY);<br />
pfd.fd = open("/dev/input/by-path/platform-i8042-serio-0-event-kbd", O_RDONLY);<br />
pfd.events = POLLIN;<br />
<br />
timeout = IDLE_MSEC;<br />
while (1) {<br />
rc = poll(&pfd, 1, timeout);<br />
/* Kbd brightness ranges from 0 to 3.<br />
* Screen brightness ranges from 1 to 10.<br />
* Make the keyboard brightness<br />
* depend on the screen brightness.<br />
*<br />
* Assume 10 means working in a bright room.<br />
* In that case, leave the kbd light off.<br />
* map screen 1-9 to kbd 1-3.<br />
*/<br />
if (rc) {<br />
/* got keyboard input, flush it all and<br />
* wait for the next event. Also check<br />
* the screen brightness and set the kbd<br />
* backlight accordingly.<br />
*/<br />
read(pfd.fd, dummybuf, sizeof(dummybuf));<br />
timeout = IDLE_MSEC;<br />
read(scfd, dummybuf, sizeof(dummybuf));<br />
lseek(scfd, 0, SEEK_SET);<br />
brt = atoi(dummybuf);<br />
if (brt == 10) {<br />
brt = 0;<br />
} else {<br />
brt = (brt + 2) / 3;<br />
}<br />
} else {<br />
/* once we've gotten a timeout, turn off<br />
* kbd backlight and wait forever for<br />
* the next keypress<br />
*/<br />
timeout = -1;<br />
brt = 0;<br />
}<br />
if (brt == prev)<br />
continue;<br />
bm[0] = brt + '0';<br />
write(blfd, bm, 2);<br />
lseek(blfd, 0, SEEK_SET);<br />
prev = brt;<br />
}<br />
}<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
== Touchpad ==<br />
[[Touchpad_Synaptics#Buttonless_TouchPads_.28aka_ClickPads.29| Instructions to activate the right button]].<br />
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).<br />
<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
=== Multitouch gestures ===<br />
To enable multitouch gestures like those under Windows, one can install {{AUR|touchegg}} from the AUR. Using {{ic|touchegg}} will require disabling some input-handling that is done by the synaptics input driver. Edit your {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}<br />
<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "0"<br />
Option "TapButton3" "0"<br />
Option "ClickFinger2" "0"<br />
Option "ClickFinger3" "0"<br />
Option "HorizTwoFingerScroll" "0"<br />
Option "VertTwoFingerScroll" "0"<br />
Option "ClickPad" "true"<br />
Option "EmulateMidButtonTime" "0"<br />
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"<br />
EndSection<br />
<br />
An alternative to X.org configuration files is to use the {{ic|synclient}} command within the {{ic|.xinitrc}} script. This method will limit changes to your desktop environment.<br />
<br />
synclient TapButton2=0 TapButton3=0 ClickFinger2=0 ClickFinger3=0 HorizTwoFingerScroll=0 VertTwoFingerScroll=0<br />
<br />
{{ic|touchegg}} will need to be autostarted for multitouch gestures to be activated. This can be done with {{ic|touchegg &}} in your {{ic|.xinitrc}}, or using the autostart/startup applications functionality of your desktop environment. {{ic|~/.config/touchegg/touchegg.conf}} can then be configured as necessary.<br />
<br />
=== Multitouch gestures in Gnome 3 ===<br />
GNOME 3's gnome-shell does its own mouse-handling, which can interfere with synaptics and touchegg settings unless the appropriate plugin is disabled.<br />
<br />
gsettings set org.gnome.settings-daemon.plugins.mouse active false<br />
<br />
Note that disabling this plugin will cause the the current settings within the Mouse & Touchpad section of System Settings to be ignored.<br />
<br />
=== Disable Touchpad While Typing ===<br />
<br />
One of the criticisms this laptop gets (see reviews at Amazon) is that the placement of the touchpad results in frequent touchpad brushing during typing. You should use whatever touchpad disabling method you prefer. See [[ Touchpad_Synaptics#Disable_Trackpad_while_Typing ]].<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be a problem whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
For automatic powersaving when on battery configure [[Laptop_Mode_Tools]]. For manual power saving see [[Power saving]]<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lspci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". <br />
<br />
The MEI driver speaks to or through the "Local Manageability Service" or LMS. The LMS driver is available here. Note that with GCC 4.7.2-2, the driver will refuse to compile. I was able to convince it to compile by:<br />
*adding "#include <unistd.h>" to src/tools/ATVersion.cpp<br />
*adding "#include <stdio.h>" to src/tools/ATNetworkTool.cpp<br />
<br />
It then installs the driver file lms in /usr/local/sbin and the init.d-type daemon file lms in /etc/init.d/.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Problem with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real problem.<br />
<br />
====Problem with USB and Laptop_Mode_Tools====<br />
<br />
USB mouse problems and hotplug does not working in some cases with messages in dmesg like:<br />
<br />
xhci_hcd 0000:00:14.0: setting latency timer to 64<br />
xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 0 with no TDs queued?<br />
<br />
The solution is to set "CONTROL_USB_AUTOSUSPEND" in /etc/laptop-mode/conf.d/usb-autosuspend.conf to 1 and having a long "AUTOSUSPEND_TIMEOUT"<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any problems sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the problem, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same problem, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
==BIOS Version Problems==<br />
<br />
It seems that updating the BIOS to versions 215 and higher causes problems with ACPI handling of the battery charge levels. In particular it seems that one cannot charge the battery beyond 91%-93%. The problem does not seem to be present in Windows however. For further details please see the forum thread [https://bbs.archlinux.org/viewtopic.php?pid=1211033#p1211033 here]. The most up to date BIOS version without any problems is 212. Unless it's absolutely necessary, refrain from updating your BIOS.<br />
<br />
==See also==<br />
*[[Power saving]]<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime<br />
*http://ubuntuforums.org/showthread.php?t=2005999<br />
*[[Wikipedia:Zenbook#UX32.2C_UX42_and_UX52]]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_UX31E&diff=259709ASUS Zenbook UX31E2013-05-30T23:04:42Z<p>Notasynonym: </p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31E Ultrabook.<br />
''(There is probably little/no difference with his 11" little brother, the UX21E)<br />
<br />
== Installation problems ==<br />
<br />
If you get an error trying to format partitions when installing Arch try adding this line to the kernel parameters<br />
libata.dma=0<br />
<br />
== Compatibility ==<br />
<br />
=== Touch Pad ===<br />
There are different versions of the UX31, some have Sentelic and some have Elantec - Touch pads.<br />
<br />
==== Elantec Touch pads ====<br />
Touch & Scroll works out of the box. Clickpad functionality does not. (However, using two and three finger touches for right an middle click works fine).<br />
<br />
If higher pressure must be applied to your touchpad in order to function properly, tweak the following properties according to your needs [http://linux.die.net/man/4/synaptics]<br />
synclient FingerLow=5<br />
synclient FingerHigh=15<br />
Alternatively, edit your {{Ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "VertTwoFingerScroll" "1"<br />
Option "HorizTwoFingerScroll" "1"<br />
Option "FingerLow" "5"<br />
Option "FingerHigh" "15"<br />
EndSection<br />
<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
==== Sentelic Touchpads ====<br />
<br />
The Sentelic Touchpad drivers have been added to the 3.2 kernel, so it should work out of the box by now. Since 3.4 this supports scrolling and multi-touch features. (In case of problems with the touchpad after resume see [[#Suspend to RAM|Suspend to RAM]].) However it seems that [https://bugs.freedesktop.org/show_bug.cgi?id=51403 two finger tapping and two finger scrolling are incompatible]. To have both working you must use one of the following two patches.<br />
<br />
===== ReubenBond =====<br />
<br />
ReubenBond has made contact with a sentelic representative who has provided him with official documentation on putting the device into absolute positioning mode. The latter can be accessed here:<br />
http://fsp-lnxdrv.svn.sourceforge.net/viewvc/fsp-lnxdrv/trunk/doc/fsp_packet.txt?revision=43&view=markup<br />
<br />
This looks very promising and ReubenBond is committed to developing a driver in the next few weeks. This is all referenced in the forum<br />
https://bbs.archlinux.org/viewtopic.php?id=125262&p=2<br />
<br />
===== Saaros =====<br />
<br />
[https://github.com/saaros/sentelic Saaros's driver] works well for two finger and side scrolling and is fairly straight forward to apply and build. Unfortunately however, it does slightly impede normal functionality, pointing does not seem quite as accurate, tapping does not seem quite as sensitive and tapping and dragging/selecting can be quite tricky. This code should eventually be accepted into the official kernel: https://github.com/saaros/sentelic/issues/2.<br />
<br />
=== Graphics ===<br />
<br />
Works out of the box<br />
<br />
==== HDMI Out ====<br />
<br />
There seems to be a problem whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
{{hc|ACTION&#61;&#61;"change", SUBSYSTEM&#61;&#61;"drm", RUN+&#61;"/usr/sbin/hdmi-plugged"|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
==== Colour Profiles ====<br />
<br />
Colour accuracy on the Zenbook is not very good. There is a [http://www.notebookcheck.net/uploads/tx_nbc2/UX31.icc UX31E ICC profile] on the [http://www.notebookcheck.net/Asus-Zenbook-UX31E-DH52B-Laptop-Review.65718.0.html Noteboocheck review]. However, I find that too green using xcalib and so use [http://www.notebookcheck.net/uploads/tx_nbc2/Asus_UX21E_1366x768_glare__P116NWR1_R2_.icc the UX21E version].<br />
<br />
=== Networking ===<br />
{{Warning|[[NetworkManager]] generally fails to work for one reason or another on the UX31E. Consider using an alternative such as [[netctl]].}}<br />
<br />
==== Wireless ====<br />
Works fine with the ath9k driver, included in the kernel since 2.6.27.<br />
<br />
{{Warning|Do not forget to install the wireless_tools and wpa_supplicant packages during the installation since you will get stuck with no internet access if you do not!}}<br />
<br />
===== Unstable Wireless when using Network Manager =====<br />
<br />
Some users experience connection drops when using wireless. For some users this can be fixed by setting the wireless connection's BSSID (usually the router's MAC address). This only works if your wireless connection only has one access point as the BSSID is unique for each access point.<br />
<br />
An alternative solution is to disable the ath9k driver ani feature, to do this use the following :<br />
<code>echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani</code><br />
<br />
==== Ethernet - Asix AX88772 USB Ethernet ====<br />
The Asix AX887722 USB Ethernet drivers are included in the kernel, so it should work out of the box.<br />
<br />
=== Solid State Drive ===<br />
Check [[Solid_State_Drives]]<br />
<br />
== Power Management ==<br />
<br />
=== Suspend to RAM ===<br />
The USB modules must be unloaded or the laptop will not come out of sleep mode.<br />
<br />
Put<br />
SUSPEND_MODULES="xhci_hcd ehci_hcd uhci_hcd"<br />
in<br />
/etc/pm/config.d/unload_module<br />
<br />
If you have patched the kernel to enable multitouch with the Sentelic touchpad, the touchpad may stop working after resume. In this case add the psmouse module to the list.<br />
SUSPEND_MODULES="xhci_hcd ehci_hcd uhci_hcd psmouse"<br />
<br />
=== PCIe ASPM ===<br />
Do not add the following option to the kernel line<br />
pcie_aspm=force <br />
if<br />
dmesg | grep -i "acpi fadt"<br />
outputs<br />
ACPI FADT declares the system does not support PCIe ASPM, so disable it.<br />
<br />
=== i915 ===<br />
<br />
Enabling {{ic|i915_enable_rc6}} will improve battery performance significantly. To enable it, add the following option to your kernel line.<br />
i915.i915_enable_rc6=1<br />
<br />
To check the current state of all {{ic|i915}} parameters execute as root (bash)<br />
for i in /sys/module/i915/parameters/*;do echo ${i}=`cat $i`;done<br />
<br />
Module parameter details<br />
modinfo i915<br />
<br />
=== Additional powersavings ===<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]]<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbook<br />
*http://www.lesswatts.org/</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Network_configuration&diff=257140Network configuration2013-05-15T18:46:03Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Getting and installing Arch]]<br />
[[cs:Configuring Network]]<br />
[[es:Configuring Network]]<br />
[[fr:Connexions reseau]]<br />
[[it:Configuring Network]]<br />
[[ja:Network Configuration]]<br />
[[nl:Configuring Network]]<br />
[[pt:Configuring Network]]<br />
[[ro:Configurare retea]]<br />
[[ru:Configuring Network]]<br />
[[sk:Configuring Network]]<br />
[[tr:Ağ_Yapılandırması]]<br />
[[zh-CN:Configuring Network]]<br />
{{Article summary start}}<br />
{{Article summary text|A simple guide for setting up and troubleshooting network.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Networking overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Jumbo Frames}}<br />
{{Article summary wiki|Firewalls}}<br />
{{Article summary wiki|Samba}}<br />
{{Article summary wiki|Wireless Setup}}<br />
{{Article summary end}}<br />
<br />
== Check the connection ==<br />
{{Note|If you receive an error like {{ic|ping: icmp open socket: Operation not permitted}} when executing ping, try to re-install the {{ic|iputils}} package.}} <br />
<br />
Many times, the basic installation procedure has created a working network configuration. To check if this is so, use the following command:<br />
<br />
{{Note|The {{ic|-c 3}} option calls it three times. See {{ic|man ping}} for more information.}}<br />
<br />
{{hc|$ ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.224.146) 56(84) bytes of data.<br />
64 bytes from 74.125.224.146: icmp_req=1 ttl=50 time=437 ms<br />
64 bytes from 74.125.224.146: icmp_req=2 ttl=50 time=385 ms<br />
64 bytes from 74.125.224.146: icmp_req=3 ttl=50 time=298 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 1999ms<br />
rtt min/avg/max/mdev = 298.107/373.642/437.202/57.415 ms}}<br />
<br />
If it works, then you may only wish to personalize your settings from the options below.<br />
<br />
If the previous command complains about unknown hosts, it means that your machine was unable to resolve this domain name. It might be related to your service provider or your router/gateway. You can try pinging a static IP address to prove that your machine has access to the Internet.<br />
<br />
{{hc|$ ping -c 3 8.8.8.8|2=<br />
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.<br />
64 bytes from 8.8.8.8: icmp_req=1 ttl=53 time=52.9 ms<br />
64 bytes from 8.8.8.8: icmp_req=2 ttl=53 time=72.5 ms<br />
64 bytes from 8.8.8.8: icmp_req=3 ttl=53 time=70.6 ms<br />
<br />
--- 8.8.8.8 ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2002ms<br />
rtt min/avg/max/mdev = 52.975/65.375/72.543/8.803 ms}}<br />
<br />
{{Note|{{ic|8.8.8.8}} is a static address that is easy to remember. It is the address of Google's primary DNS server, therefore it can be considered reliable, and is generally not blocked by content filtering systems and proxies.}}<br />
<br />
If you are able to ping this address, you may try adding this nameserver to your {{ic|/etc/resolv.conf}} file.<br />
<br />
== Set the hostname ==<br />
<br />
A [[Wikipedia:Hostname|hostname]] is a unique name created to identify a machine on a network: it is configured in {{ic|/etc/hostname}}. The file can contain the system's domain name, if any. To set the hostname, do:<br />
<br />
# hostnamectl set-hostname '''myhostname'''<br />
<br />
This will put '''myhostname''' in {{ic|/etc/hostname}}.<br />
<br />
See {{ic|man 5 hostname}} and {{ic|man 1 hostnamectl}} for details.<br />
<br />
{{Note|<br />
*{{ic|hostnamectl}} supports FQDNs<br />
*You no longer need to edit {{ic|/etc/hosts}}, {{pkg|systemd}} will provide host name resolution, and is installed on all systems by default.}}<br />
<br />
To set the hostname temporarily (until a reboot), use the {{ic|hostname}} command from {{Pkg|inetutils}}:<br />
<br />
# hostname ''myhostname''<br />
<br />
== Device Driver ==<br />
<br />
=== Check the driver status ===<br />
<br />
Udev should detect your network interface card ([[Wikipedia:Network_interface_controller|NIC]]) and automatically load the necessary module at start up. Check the "Ethernet controller" entry (or similar) from the {{ic|lspci -v}} output. It should tell you which kernel module contains the driver for your network device. For example:<br />
<br />
{{hc|$ lspci -v|<br />
02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0)<br />
...<br />
Kernel driver in use: atl1<br />
Kernel modules: atl1}}<br />
<br />
Next, check that the driver was loaded via {{ic|dmesg <nowiki>|</nowiki> grep ''module_name''}}. For example:<br />
<br />
$ dmesg | grep atl1<br />
...<br />
atl1 0000:02:00.0: eth0 link is up 100 Mbps full duplex<br />
<br />
Skip the next section if the driver was loaded successfully. Otherwise, you will need to know which module is needed for your particular model.<br />
<br />
=== Load the device module ===<br />
<br />
Google for the right module/driver for the chipset. Once you know which module to use, you can [[Kernel modules#Loading|load it]] with:<br />
<br />
# modprobe ''module_name''<br />
<br />
If udev is not detecting and loading the proper module automatically during bootup, you can add it to a {{ic|*.conf}} file from the {{ic|/etc/modules-load.d/}} folder so that you do not need to {{ic|modprobe}} it every time you boot. For example, if {{ic|tg3}} is the network module:<br />
<br />
# tee /etc/modules-load.d/tg3.conf <<< "tg3"<br />
<br />
Other common modules are {{ic|8139too}} for cards with a Realtek chipset, or {{ic|sis900}} for cards with a SiS chipset.<br />
<br />
== Network Interfaces ==<br />
<br />
=== Device names ===<br />
<br />
For motherboards that have integrated NICs, it is important to have fixed device name. Many configuration problems are caused by interface name changing.<br />
<br />
[[Udev]] is responsible for which device gets which name. Systemd v197 introduced [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames Predictable Network Interface Names], which automatically assigns static names to network devices. Interfaces are now prefixed with en (ethernet), wl (WLAN), or ww (WWAN) followed by an automatically generated identifier, creating an entry such as {{ic|enp0s25}}. <br />
<br />
This behavior may be disabled by adding a symlink:<br />
<br />
# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules<br />
<br />
Users upgrading from an earlier systemd version will have a blank rules file created automatically. So if you want to use persistent device names, just delete the file.<br />
<br />
==== Change device name ====<br />
You can change the device name by defining the name manually with an udev-rule. For example: <br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net1"<br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="net0"}}<br />
A couple things to note:<br />
<br />
* To get the MAC address of each card, use this command: {{ic|cat /sys/class/net/'''device-name'''/address}}<!-- {{ic|<nowiki>udevadm info -a -p /sys/class/net/<yourdevice> | grep address | tr [A-Z] [a-z]</nowiki>}} --><br />
* Make sure to use the lower-case hex values in your udev rules. It doesn't like upper-case. <br />
{{Note|When choosing the static names '''it should be avoided to use names in the format of "eth''X''" and "wlan''X''"''', because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: {{ic|net0}}, {{ic|net1}}, {{ic|wifi0}}, {{ic|wifi1}}. For further details please see the [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames systemd] documentation.}}<br />
<br />
=== Get current device names ===<br />
<br />
Current NIC names can be found via sysfs<br />
<br />
{{hc|$ ls /sys/class/net|<br />
lo eth0 eth1 firewire0}}<br />
<br />
=== Enabling and disabling network interfaces ===<br />
<br />
You can activate or deactivate network interfaces using:<br />
<br />
# ip link set eth0 up<br />
# ip link set eth0 down<br />
<br />
To check the result:<br />
<br />
{{hc|$ ip link show dev eth0|<br />
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT qlen 1000<br />
[...]}}<br />
<br />
== Configure the IP address ==<br />
<br />
You have two options: a dynamically assigned address using [[Wikipedia:Dynamic Host Configuration Protocol|DHCP]], or an unchanging "static" address.<br />
<br />
=== Dynamic IP address ===<br />
<br />
==== Manually run DHCP Client Daemon ====<br />
<br />
Please note that {{ic|dhcpcd}} is not {{ic|dhcpd}}.<br />
<br />
{{hc|# dhcpcd eth0|<br />
dhcpcd: version 5.1.1 starting<br />
dhcpcd: eth0: broadcasting for a lease<br />
...<br />
dhcpcd: eth0: leased 192.168.1.70 for 86400 seconds}}<br />
<br />
And now, {{ic|ip addr show dev eth0}} should show your inet address.<br />
<br />
For some people, {{ic|dhclient}} (from the {{Pkg|dhclient}} package) works where {{ic|dhcpcd}} fails.<br />
<br />
==== Run DHCP at boot ====<br />
<br />
If you simply want to use DHCP for your Ethernet connection, you can use {{ic|dhcpcd@.service}} (provided by the {{Pkg|dhcpcd}} package).<br />
<br />
To enable DHCP for {{ic|eth0}}, simply use:<br />
<br />
# systemctl start dhcpcd@eth0<br />
<br />
You can enable the service to automatically start at boot with:<br />
<br />
# systemctl enable dhcpcd@eth0<br />
<br />
If the dhcpd service starts before your network card module ({{bug|30235}}), manually add your network card to {{ic|/etc/modules-load.d/*.conf}}. For example, if your Realtek card needs {{ic|r8169}} to be loaded, create:<br />
<br />
{{hc|/etc/modules-load.d/realtek.conf|<br />
r8169}}<br />
<br />
{{Tip|To find out which modules are used by your network card, use {{ic|lspci -k}}.}}<br />
<br />
If you use DHCP and you do '''not''' want your DNS servers automatically assigned every time you start your network, be sure to add the following to the last section of {{ic|dhcpcd.conf}}:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
nohook resolv.conf}}<br />
<br />
To prevent {{ic|dhcpcd}} from adding domain name servers to {{ic|/etc/resolv.conf}}, use the {{ic|nooption}} option:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
nooption domain_name_servers}}<br />
<br />
Then add your own DNS name server to {{ic|/etc/resolv.conf}}.<br />
<br />
You may use the {{Pkg|openresolv}} package if several different processes want to control {{ic|/etc/resolv.conf}} (e.g. {{Pkg|dhcpcd}} and a VPN client). No additional configuration for {{Pkg|dhcpcd}} is needed to use {{Pkg|openresolv}}.<br />
<br />
{{Note|It is possible to have a static IP address using {{Pkg|dhcpcd}}. Simply edit your {{ic|/etc/conf.d/dhcpcd}} file to look something like this (where {{ic|x.x.x.x}} is your desired IP address):<br />
<br />
{{bc|1=DHCPCD_ARGS="-q -s x.x.x.x"}}}}<br />
<br />
=== Static IP address ===<br />
<br />
There are various reasons why you may wish to assign static IP addresses on your network. For instance, one may gain a certain degree of predictability with unchanging addresses, or you may not have a DHCP server available.<br />
<br />
{{Note|If you share your Internet connection from a Windows machine without a router, be sure to use static IP addresses on both computers to avoid LAN problems.}}<br />
<br />
You need:<br />
<br />
* Static IP address<br />
* [[Wikipedia:Subnetwork|Subnet mask]]<br />
* [[Wikipedia:Broadcast_address|Broadcast address]]<br />
* [[Wikipedia:Default_gateway|Gateway]]'s IP address<br />
<br />
If you are running a private network, it is safe to use IP addresses in 192.168.*.* for your IP addresses, with a subnet mask of 255.255.255.0 and a broadcast address of 192.168.*.255. The gateway is usually 192.168.*.1 or 192.168.*.254.<br />
<br />
==== Manual assignment ====<br />
<br />
You can assign a static IP address in the console:<br />
<br />
# ip addr add <IP address>/<subnet mask> dev <interface><br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
{{Note|The subnet mask was specified using [[Wikipedia:CIDR_notation|CIDR notation]].}}<br />
<br />
For more options, see {{ic|man ip}}.<br />
<br />
Add your gateway like so:<br />
<br />
# ip route add default via <default gateway IP address><br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
If you the get the error "No such process", it means you have to run {{ic|ip link set dev eth0 up}} as root.<br />
<br />
====Manual connection at boot using systemd====<br />
This section details how to manually connect using [[systemd]].<br />
<br />
{{Note|We use {{ic|net0}} as the interface name in these examples, you have to replace all occurrences (including those in the {{ic|BindsTo}} and {{ic|After}} values) with the name of the interface you are configuring.}}<br />
<br />
=====Using [[dhcpcd]]=====<br />
Create the file {{ic|/etc/systemd/system/network.service}} using your editor of choice. This example uses [[wpa_supplicant]].<br />
{{hc|/etc/systemd/system/network.service|<nowiki><br />
[Unit]<br />
Description=Network Connectivity<br />
Wants=network.target<br />
Before=network.target<br />
BindsTo=sys-subsystem-net-devices-net0.device<br />
After=sys-subsystem-net-devices-net0.device<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/sbin/ip link set dev net0 up<br />
ExecStart=/usr/sbin/wpa_supplicant -B -i net0 -c /etc/wpa_supplicant.conf # Remove this for wired connections<br />
ExecStart=/sbin/dhcpcd net0<br />
<br />
ExecStop=/sbin/dhcpcd -k net0<br />
ExecStop=/sbin/ip addr flush dev net0<br />
ExecStop=/sbin/ip link set dev net0 down<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
# systemctl enable network<br />
<br />
To test, reboot or stop all other network daemons and run as root:<br />
# systemctl start network<br />
<br />
=====Using a static IP address=====<br />
Create the file {{ic|/etc/systemd/system/network.service}} using your editor of choice. This example uses a static IP address and [[wpa_supplicant]].<br />
{{hc|/etc/systemd/system/network.service|<nowiki><br />
[Unit]<br />
Description=Wireless Static IP Connectivity<br />
Wants=network.target<br />
Before=network.target<br />
BindsTo=sys-subsystem-net-devices-net0.device<br />
After=sys-subsystem-net-devices-net0.device<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/sbin/ip link set dev net0 up<br />
ExecStart=/usr/sbin/wpa_supplicant -B -i net0 -c /etc/wpa_supplicant.conf # Remove this for wired connections<br />
ExecStart=/sbin/ip addr add 192.168.0.10/24 dev net0<br />
ExecStart=/sbin/ip route add default via 192.168.0.1<br />
<br />
ExecStop=/sbin/ip addr flush dev net0<br />
ExecStop=/sbin/ip link set dev net0 down<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
Do not forget to enable it!<br />
# systemctl enable network<br />
<br />
To test, reboot or make sure all other network daemons are stopped and then run as root<br />
# systemctl start network<br />
<br />
==== Calculating addresses ====<br />
<br />
You can use {{ic|ipcalc}} provided by the {{Pkg|ipcalc}} package to calculate IP broadcast, network, netmask, and host ranges for more advanced configurations. For example, I use ethernet over firewire to connect a windows machine to arch. For security and network organization, I placed them on their own network and configured the netmask and broadcast so that they are the only 2 machines on it. To figure out the netmask and broadcast addresses for this, I used ipcalc, providing it with the IP of the arch firewire nic 10.66.66.1, and specifying ipcalc should create a network of only 2 hosts.<br />
<br />
{{hc|$ ipcalc -nb 10.66.66.1 -s 1|2=<br />
Address: 10.66.66.1<br />
<br />
Netmask: 255.255.255.252 = 30<br />
Network: 10.66.66.0/30<br />
HostMin: 10.66.66.1<br />
HostMax: 10.66.66.2<br />
Broadcast: 10.66.66.3<br />
Hosts/Net: 2 Class A, Private Internet}}<br />
<br />
== Load configuration ==<br />
<br />
To test your settings either reboot the computer or reload the relevant systemd services:<br />
<br />
# systemctl restart dhcpcd@eth0<br />
<br />
Try pinging your gateway, DNS server, ISP provider and other Internet sites, in that order, to detect any connection problems along the way, as in this example:<br />
<br />
$ ping -c 3 www.google.com<br />
<br />
== Additional settings ==<br />
<br />
=== ifplugd for laptops ===<br />
<br />
{{Pkg|ifplugd}} in [[Official Repositories]] is a daemon which will automatically configure your Ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. Another use is when you just need to restart the network but do not want to restart the computer or do it from the shell.<br />
<br />
By default it is configured to work for the {{ic|eth0}} device. This and other settings like delays can be configured in {{ic|/etc/ifplugd/ifplugd.conf}}.<br />
<br />
Enabling {{ic|net-auto-wired.service}} should start ifplugd on bootup if you have {{Pkg|netcfg}} installed, otherwise you can use {{ic|ifplugd@eth0.service}}.<br />
<br />
=== Bonding or LAG ===<br />
<br />
You will need {{Pkg|netcfg}} from the [[Official Repositories]], as well as the {{AUR|netcfg-bonding}} package from the [[AUR]].<br />
<br />
Edit/create the following files:<br />
<br />
{{hc|/etc/network.d/bonded|2=<br />
CONNECTION="bonding"<br />
INTERFACE="bond0"<br />
SLAVES="eth0 eth1"<br />
IP="dhcp"<br />
DHCP_TIMEOUT=10}}<br />
<br />
{{hc|/etc/modules-load.d/bonding.conf|<br />
bonding}}<br />
<br />
Set up netcfg to use the bond0 interface.<br />
<br />
Start your network:<br />
$ systemctl enable netcfg@bonded<br />
<br />
{{Note|To change the bonding mode (default is round robin) to, e.g, dynamic link aggregation:<br />
<br />
Create {{ic|/etc/modprobe.d/bonding.conf}}:<br />
<br />
{{hc|/etc/modprobe.d/bonding.conf|2=<br />
options bonding mode=4<br />
options bonding miimon=100}}<br />
<br />
For more information about the different bonding policies (and other driver settings) see the [http://sourceforge.net/projects/bonding/files/Documentation/ Linux Ethernet Bonding Driver HOWTO].}}<br />
<br />
To activate the new bonded ports modprobe {{ic|bonding}}, stop {{ic|network}} and start the {{ic|net-profiles}} service:<br />
<br />
# modprobe bonding<br />
# systemctl stop network<br />
# systemctl start net-profiles<br />
<br />
To check the status and bonding mode:<br />
<br />
$ cat /proc/net/bonding/bond0<br />
<br />
==== Wired -> Wireless Failover ====<br />
<br />
Using {{ic|bonding}} to fallback to wireless when the wired ethernet goes down, this also detects the presence of either network connection and starts dhcpcd when either or both are connected.<br />
<br />
You'll need {{Pkg|netcfg}}, {{Pkg|ifplugd}}, and {{Pkg|wpa_supplicant}} from the official repositories.<br />
<br />
First configure the bonding driver to use active-backup:<br />
<br />
{{hc|/etc/modprobe.d/bonding.conf|2=<br />
options bonding mode=active-backup<br />
options bonding miimon=100<br />
options bonding primary=eth0<br />
options bonding max_bonds=0}}<br />
<br />
The `max-bonds` line avoids getting the "Interface bond0 already exists" error.<br />
<br />
Next, configure a {{Pkg|netcfg}} profile to enslave the two hardware interfaces:<br />
<br />
{{hc|/etc/network.d/failover|2=<br />
CONNECTION="bond"<br />
DESCRIPTION="A wired connection with failover to wireless"<br />
INTERFACE="bond0"<br />
SLAVE_INTERFACES=("eth0" "wlan0")<br />
IP="no"<br />
SKIPNOCARRIER="no"}}<br />
<br />
Enable the profile on startup.<br />
<br />
# systemctl enable netcfg@failover<br />
<br />
Configure wpa_supplicant to associate with known networks. This can be done with a netcfg profile (remember to use IP="no"), a wpa_supplicant service running constantly, or on-demand with [[wpa_cli]]. Ways to do this are covered on the [[wpa_supplicant]] page.<br />
<br />
Create an {{Pkg|ifplugd}} action for automatic DHCP assignment on the bonded interface:<br />
<br />
{{hc|/etc/ifplugd/bond_dhcp.action|2=<br />
#!/bin/sh<br />
<br />
case "$2" in<br />
up)<br />
systemctl start "dhcpcd@$1.service" && exit 0<br />
;;<br />
down)<br />
systemctl stop "dhcpcd@$1.service" && exit 0<br />
;;<br />
*)<br />
echo "Wrong arguments" > /dev/stderr<br />
;;<br />
esac<br />
exit 1}}<br />
<br />
and make it executable<br />
<br />
# chmod +x /etc/ifplugd/bond_dhcp.action<br />
<br />
Then create the [[systemd]] service which starts ifplugd for bond0:<br />
<br />
{{hc|/etc/systemd/system/net-auto-bonded@.service|2=<br />
[Unit]<br />
Description=Provides automatic dhcp resolution for bonded failover connection<br />
Requires=netcfg@failover.service<br />
After=netcfg@failover.service<br />
<br />
[Service]<br />
ExecStart=/usr/bin/ifplugd -i %i -r /etc/ifplugd/bond_dhcp.action -fIns<br />
<br />
[Install]<br />
WantedBy=multi-user.target}}<br />
<br />
Enable the net-auto-bonded service and reboot:<br />
<br />
# systemctl enable net-auto-bonded@bond0.service<br />
# reboot<br />
<br />
If you have a wired and wireless connection to the same network, you can probably now disconnect and reconnect the wired connection without losing connectivity. In most cases, even streaming music won't skip!<br />
<br />
=== IP address aliasing ===<br />
<br />
IP aliasing is the process of adding more than one IP address to a network interface. With this, one node on a network can have multiple connections to a network, each serving a different purpose.<br />
<br />
To use IP aliasing from [[netcfg]], change {{ic|POST_UP}} and {{ic|PRE_DOWN}} commands in your network profile to set up the additional IP addresses manually. See [https://bbs.archlinux.org/viewtopic.php?pid=1036395#p1036395 here] for details.<br />
<br />
==== Example ====<br />
<br />
You will need {{Pkg|netcfg}} from the [[Official Repositories]].<br />
<br />
Prepare the configuration:<br />
<br />
{{hc|/etc/network.d/mynetwork|2=<br />
<br />
CONNECTION='ethernet'<br />
DESCRIPTION='Five different addresses on the same NIC.'<br />
INTERFACE='eth0'<br />
IP='static'<br />
ADDR='192.168.1.10'<br />
GATEWAY='192.168.1.1'<br />
DNS=('192.168.1.1')<br />
DOMAIN=''<br />
POST_UP='x=0; for i in 11 12 13 14; do ip addr add 192.168.1.$i/24 brd 192.168.1.255 dev eth0 label eth0:$((x++)); done'<br />
PRE_DOWN='for i in 11 12 13 14; do ip addr del 192.168.1.$i/24 dev eth0; done'}}<br />
<br />
The simply execute: <br />
<br />
$ systemctl enable net-auto-wired.service<br />
<br />
=== Change MAC/hardware address ===<br />
<br />
See [[MAC Address Spoofing]].<br />
<br />
=== Internet Share ===<br />
<br />
See [[Internet Share]].<br />
<br />
=== Router Configuration ===<br />
<br />
See [[Router]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Swapping computers on the cable modem ===<br />
<br />
Most domestic cable ISPs (videotron for example) have the cable modem configured to recognize only one client PC, by the MAC address of its network interface. Once the cable modem has learned the MAC address of the first PC or equipment that talks to it, it will not respond to another MAC address in any way. Thus if you swap one PC for another (or for a router), the new PC (or router) will not work with the cable modem, because the new PC (or router) has a MAC address different from the old one. To reset the cable modem so that it will recognise the new PC, you must power the cable modem off and on again. Once the cable modem has rebooted and gone fully online again (indicator lights settled down), reboot the newly connected PC so that it makes a DHCP request, or manually make it request a new DHCP lease.<br />
<br />
If this method does not work, you will need to clone the MAC address of the original machine. See also [[Configuring Network#Change MAC/hardware address|Change MAC/hardware address]].<br />
<br />
=== The TCP window scaling problem ===<br />
<br />
TCP packets contain a "window" value in their headers indicating how much data the other host may send in return. This value is represented with only 16 bits, hence the window size is at most 64Kb. TCP packets are cached for a while (they have to be reordered), and as memory is (or used to be) limited, one host could easily run out of it.<br />
<br />
Back in 1992, as more and more memory became available, [http://www.faqs.org/rfcs/rfc1323.html RFC 1323] was written to improve the situation: Window Scaling. The "window" value, provided in all packets, will be modified by a Scale Factor defined once, at the very beginning of the connection.<br />
<br />
That 8-bit Scale Factor allows the Window to be up to 32 times higher than the initial 64Kb.<br />
<br />
It appears that some broken routers and firewalls on the Internet are rewriting the Scale Factor to 0 which causes misunderstandings between hosts.<br />
<br />
The Linux kernel 2.6.17 introduced a new calculation scheme generating higher Scale Factors, virtually making the aftermaths of the broken routers and firewalls more visible.<br />
<br />
The resulting connection is at best very slow or broken.<br />
<br />
==== How to diagnose the problem ====<br />
<br />
First of all, let's make it clear: this problem is odd. In some cases, you will not be able to use TCP connections (HTTP, FTP, ...) at all and in others, you will be able to communicate with some hosts (very few).<br />
<br />
When you have this problem, the {{ic|dmesg}}'s output is OK, logs are clean and {{ic|ip addr}} will report normal status... and actually everything appears normal.<br />
<br />
If you cannot browse any website, but you can ping some random hosts, chances are great that you're experiencing this problem: ping uses ICMP and is not affected by TCP problems.<br />
<br />
You can try to use Wireshark. You might see successful UDP and ICMP communications but unsuccessful TCP communications (only to foreign hosts).<br />
<br />
==== How to fix it (The bad way) ====<br />
<br />
To fix it the bad way, you can change the tcp_rmem value, on which Scale Factor calculation is based. Although it should work for most hosts, it is not guaranteed, especially for very distant ones.<br />
<br />
# echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem<br />
<br />
==== How to fix it (The good way) ====<br />
<br />
Simply disable Window Scaling. Since Window Scaling is a nice TCP feature, it may be uncomfortable to disable it, especially if you cannot fix the broken router. There are several ways to disable Window Scaling, and it seems that the most bulletproof way (which will work with most kernels) is to add the following line to {{ic|/etc/sysctl.conf}} (see also [[sysctl]])<br />
<br />
net.ipv4.tcp_window_scaling = 0<br />
<br />
==== How to fix it (The best way) ====<br />
<br />
This problem is caused by broken routers/firewalls, so let's change them. Some users have reported that the broken router was their very own DSL router.<br />
<br />
==== More about it ====<br />
<br />
This section is based on the LWN article [http://lwn.net/Articles/92727/ TCP window scaling and broken routers] and a Kernel Trap article: [http://kerneltrap.org/node/6723 Window Scaling on the Internet].<br />
<br />
There are also several relevant threads on the LKML.<br />
<br />
=== Realtek no link / WOL problem ===<br />
<br />
Users with Realtek 8168 8169 8101 8111(C) based NICs (cards / and on-board) may notice a problem where the NIC seems to be disabled on boot and has no Link light. This can usually be found on a dual boot system where Windows is also installed. It seems that using the offical Realtek drivers (dated anything after May 2007) under Windows is the cause. These newer drivers disable the Wake-On-LAN feature by disabling the NIC at Windows shutdown time, where it will remain disabled until the next time Windows boots. You will be able to notice if this problem is affecting you if the Link light remains off until Windows boots up; during Windows shutdown the Link light will switch off. Normal operation should be that the link light is always on as long as the system is on, even during POST. This problem will also affect other operative systems without newer drivers (eg. Live CDs). Here are a few fixes for this problem:<br />
<br />
==== Method 1 - Rollback/change Windows driver ====<br />
<br />
You can roll back your Windows NIC driver to the Microsoft provided one (if available), or roll back/install an official Realtek driver pre-dating May 2007 (may be on the CD that came with your hardware).<br />
<br />
==== Method 2 - Enable WOL in Windows driver ====<br />
<br />
Probably the best and the fastest fix is to change this setting in the Windows driver. This way it should be fixed system-wide and not only under Arch (eg. live CDs, other operative systems). In Windows, under Device Manager, find your Realtek network adapter and double-click it. Under the Advanced tab, change "Wake-on-LAN after shutdown" to Enable.<br />
<br />
In Windows XP (example)<br />
Right click my computer<br />
--> Hardware tab<br />
--> Device Manager<br />
--> Network Adapters<br />
--> "double click" Realtek ...<br />
--> Advanced tab<br />
--> Wake-On-Lan After Shutdown<br />
--> Enable<br />
<br />
{{Note|Newer Realtek Windows drivers (tested with ''Realtek 8111/8169 LAN Driver v5.708.1030.2008'', dated 2009/01/22, available from GIGABYTE) may refer to this option slightly differently, like ''Shutdown Wake-On-LAN --> Enable''. It seems that switching it to {{ic|Disable}} has no effect (you will notice the Link light still turns off upon Windows shutdown). One rather dirty workaround is to boot to Windows and just reset the system (perform an ungraceful restart/shutdown) thus not giving the Windows driver a chance to disable LAN. The Link light will remain on and the LAN adapter will remain accessible after POST - that is until you boot back to Windows and shut it down properly again.}}<br />
<br />
==== Method 3 - Newer Realtek Linux driver ====<br />
<br />
Any newer driver for these Realtek cards can be found for Linux on the realtek site. (untested but believed to also solve the problem).<br />
<br />
==== Method 4 - Enable ''LAN Boot ROM'' in BIOS/CMOS ====<br />
<br />
It appears that setting ''Integrated Peripherals --> Onboard LAN Boot ROM --> Enabled'' in BIOS/CMOS reactivates the Realtek LAN chip on system boot-up, despite the Windows driver disabling it on OS shutdown.<br />
<br><small>This was tested successfully multiple times with GIGABYTE system board GA-G31M-ES2L with BIOS version F8 released on 2009/02/05. YMMV.</small><br />
<br />
=== DLink G604T/DLink G502T DNS problem ===<br />
<br />
Users with a DLink G604T/DLink G502T router, using DHCP and have firmware v2.00+ (typically users with AUS firmware) may have problems with certain programs not resolving the DNS. One of these programs are unfortunatley pacman. The problem is basically the router in certain situations is not sending the DNS properly to DHCP, which causes programs to try and connect to servers with an IP address of 1.0.0.0 and fail with a connection timed out error<br />
<br />
==== How to diagnose the problem ====<br />
<br />
The best way to diagnose the problem is to use Firefox/Konqueror/links/seamonkey and to enable wget for pacman. If this is a fresh install of Arch Linux, then you may want to consider installing {{ic|links}} through the live CD.<br />
<br />
Firstly, enable wget for pacman (since it gives us info about pacman when it is downloading packages)<br />
Open {{ic|/etc/pacman.conf}} with your favourite editor and uncomment the following line (remove the # if it is there)<br />
<br />
XferCommand=/usr/bin/wget --passive-ftp -c -O %o %u<br />
<br />
While you are editing {{ic|/etc/pacman.conf}}, check the default mirror that pacman uses to download packages.<br />
<br />
Now open up the default mirror in an Internet browser to see if the mirror actually works. If it does work, then do {{ic|pacman -Syy}} (otherwise pick another working mirror and set it to the pacman default). If you get something similar to the following (notice the 1.0.0.0),<br />
<br />
<nowiki>ftp://mirror.pacific.net.au/linux/archlinux/extra/os/i686/extra.db.tar.gz</nowiki><br />
=> '/var/lib/pacman/community.db.tar.gz.part'<br />
Resolving mirror.pacific.net.au... 1.0.0.0<br />
<br />
then you most likely have this problem. The 1.0.0.0 means it is unable to resolve DNS, so we must add it to {{ic|/etc/resolv.conf}}.<br />
<br />
==== How to fix it ====<br />
<br />
Basically what we need to do is to manually add the DNS servers to our {{ic|/etc/resolv.conf}} file. The problem is that DHCP automatically deletes and replaces this file on boot, so we need to edit {{ic|/etc/conf.d/dhcpcd}} and change the flags to stop DHCP from doing this.<br />
<br />
When you open {{ic|/etc/conf.d/dhcpcd}}, you should see something close to the following:<br />
<br />
DHCPCD_ARGS="-t 30 -h $HOSTNAME"<br />
<br />
Add the {{ic|-R}} flag to the arguments, e.g.,<br />
<br />
DHCPCD_ARGS="-R -t 30 -h $HOSTNAME"<br />
<br />
{{Note|1=If you are using {{Pkg|dhcpcd}} >= 4.0.2, the {{ic|-R}} flag has been deprecated. Please see the [[#For DHCP assigned IP address]] section for information on how to use a custom {{ic|/etc/resolv.conf}} file.}}<br />
<br />
Save and close the file; now open {{ic|/etc/resolv.conf}}. You should see a single nameserver (most likely 10.1.1.1). This is the gateway to your router, which we need to connect to in order to get the DNS servers of your ISP. Paste the IP address into your browser and log in to your router. Go to the DNS section, and you should see an IP address in the Primary DNS Server field; copy it and paste it as a nameserver '''ABOVE''' the current gateway one.<br />
<br />
For example, {{ic|/etc/resolv.conf}} should look something along the lines of:<br />
<br />
nameserver 10.1.1.1<br />
<br />
If my primary DNS server is 211.29.132.12, then change {{ic|/etc/resolv.conf}} to:<br />
<br />
nameserver 211.29.132.12<br />
nameserver 10.1.1.1<br />
<br />
Now restart the network daemon by running {{ic|systemctl restart dhcpcd@<interface>}} and do {{ic|pacman -Syy}}. If it syncs correctly with the server, then the problem is solved.<br />
<br />
==== More about it ====<br />
<br />
This is the whirlpool forum (Australian ISP community) which talks about and gives the same solution to the problem:<br />
<br />
http://forums.whirlpool.net.au/forum-replies-archive.cfm/461625.html<br />
<br />
=== Check DHCP problem by releasing IP first ===<br />
<br />
Problem may occur when DHCP get wrong IP assignment. For example when two routers are tied together through VPN. The router that is connected to me by VPN may assigning IP address. To fix it. On a console, as root, release IP address:<br />
<br />
# dhcpcd -k<br />
<br />
Then request a new one:<br />
<br />
# dhcpcd<br />
<br />
Maybe you had to run those two commands many times.<br />
<br />
<br />
=== No eth0 with Atheros AR8161 ===<br />
<br />
With the Atheros AR8161 Gigabit Ethernet card, the ethernet connection is not working out-of-the-box (with the installation media of March 2013). The module "alx" needs to be loaded but is not present.<br />
<br />
The driver from [http://linuxwireless.org/en/users/Download/stable/#compat-wireless_stable_releases compat-wireless] (that has become [https://backports.wiki.kernel.org/index.php/Releases compat-drives] since linux 3.7) need to be installed. The "-u" postfix annotates that Qualcomm have applied a driver under a unified driver.<br />
$ wget https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5-u.tar.bz2<br />
$ tar xjf compat*<br />
$ cd compat*<br />
$ ./scripts/driver-select alx<br />
$ make<br />
$ sudo make install<br />
$ sudo modprobe alx<br />
<br />
The alx driver has not been added to Linux kernel due to various problems. Compatibility between the different kernel versions has been spotty. For better support follow the [http://lists.infradead.org/mailman/listinfo/unified-drivers mailing list]and [http://www.linuxfoundation.org/collaborate/workgroups/networking/alx alx page]for latest working solution for alx.<br />
<br />
The driver must be built and installed after every kernel change.<br />
<br />
Alternatively you can use the AUR package for [https://aur.archlinux.org/packages/compat-drivers-patched/ compat drivers], which installs many other drivers.<br />
<br />
=== No eth0 with Atheros AR9485 ===<br />
<br />
The ethernet (eth0) for Atheros AR9485 are not working out-of-the-box (with installation media of March 2013). The working solution for this is to install the package [https://aur.archlinux.org/packages/compat-drivers-patched/ compat-drivers-patched] from AUR.<br />
<br />
=== No carrier / no connection after suspend ===<br />
After suspend to RAM no connection is found although the network cable is plugged in. <br />
This may be caused by PCI power management. What is the output of<br />
<br />
# ip link show eth0<br />
<br />
If the line contains "NO-CARRIER" even though there's a cable connected to your eth0 port, it is possible that the device was auto-suspended and the media sense feature doesn't work. To solve this, first you need to find your ethernet controllers PCI address by<br />
<br />
# lspci<br />
<br />
This should look similar to this:<br />
<br />
...<br />
00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 06)<br />
...<br />
<br />
So the address is 00:19.0.<br />
Now check the PM status of the device by issuing<br />
<br />
# cat "/sys/bus/pci/devices/0000:00:19.0/power/control"<br />
<br />
substituting 00:19.0 with the address obtained from lspci.<br />
If the output reads "auto", you can try to bring the device out of suspend by<br />
<br />
# echo on > "/sys/bus/pci/devices/0000:00:19.0/power/control"<br />
<br />
Don't forget to substitute the address again.<br />
<br />
{{Note|1=This appears to be a bug in kernel 3.8.4.1- (3.8.8.1 is still affected): [https://bbs.archlinux.org/viewtopic.php?id=159837&p=2 Forum discussion.] It also appears a fix is [https://lkml.org/lkml/2013/1/18/147 on the way. (It will be likely fixed in 3.9.)] In the meantime, the above is a suitable workaround.}}</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Frequently_asked_questions&diff=252714Frequently asked questions2013-04-02T17:30:11Z<p>Notasynonym: </p>
<hr />
<div>[[Category:About Arch]]<br />
[[bg:FAQ]]<br />
[[cs:FAQ]]<br />
[[da:FAQ]]<br />
[[de:FAQ]]<br />
[[es:FAQ]]<br />
[[fa:پرسش و پاسخ]]<br />
[[fr:FAQ]]<br />
[[hr:FAQ]]<br />
[[id:FAQ]]<br />
[[it:FAQ]]<br />
[[ja:FAQ]]<br />
[[ko:FAQ]]<br />
[[lt:FAQ]]<br />
[[nl:FAQ]]<br />
[[pt:FAQ]]<br />
[[ro:Întrebări frecvente]]<br />
[[ru:FAQ]]<br />
[[sk:FAQ]]<br />
[[sv:FAQ]]<br />
[[th:FAQ]]<br />
[[tr:Sss]]<br />
[[zh-CN:FAQ]]<br />
[[zh-TW:FAQ]]<br />
Besides the questions covered below, you may find [[The Arch Way]] and [[Arch Linux]] helpful. Both articles contain a good deal of information about Arch Linux.<br />
<br />
== General ==<br />
<br />
===Q) What is Arch Linux?===<br />
'''A)''' See the article entitled [[Arch Linux]].<br />
<br />
===Q) Why would I want to use Arch?===<br />
'''A)''' If, after reading about the [[The Arch Way]] philosophy, you wish to embrace the 'do-it-yourself' approach and require or desire a simple, elegant, highly customizable, bleeding edge, general purpose GNU/Linux distribution, you may like Arch.<br />
<br />
===Q) Why would I not want to use Arch?===<br />
'''A)''' You may '''not''' want to use Arch, if:<br />
<br />
* after reading [[The Arch Way]], you disagree with the philosophy.<br />
* you do not have the ability/time/desire for a 'do-it-yourself' GNU/Linux distribution.<br />
* you require support for an architecture other than x86_64 or i686.<br />
* you take a strong stand on using a distribution which only provides free software as defined by GNU.<br />
* you believe an operating system should configure itself, run out of the box, and include a complete default set of software and desktop environment on the installation media.<br />
* you do not want a bleeding edge, rolling release GNU/Linux distribution.<br />
* you are happy with your current OS.<br />
* you want an OS that targets a different userbase.<br />
<br />
===Q) What distribution is Arch based on?===<br />
'''A)''' Arch is independently developed, was built from scratch and is not based on any other GNU/Linux distribution. Before creating Arch, Judd Vinet admired and used CRUX, a great, minimalist distribution created by Per Lidén. Originally inspired by ideas in common with CRUX, Arch was built from scratch, and pacman was then coded in C.<br />
<br />
===Q) I am a complete GNU/Linux beginner. Should I use Arch?===<br />
'''A)''' This question has had much debate. Arch is targeted more towards advanced GNU/Linux users, but some people feel that Arch is a good place to start for the motivated novice. If you are a beginner and want to use Arch, just be warned that you must be willing to invest significant time into learning a new system, as well as accept the fact that Arch is fundamentally designed as a DIY (Do-It-Yourself) distribution. It is the user who assembles the system and controls what it will become. Before asking for help, do your own independent research by Googling, searching the forum (and reading the rest of these FAQs) and searching the superb documentation provided by the Arch Wiki. ''There is a reason these resources were made available to you in the first place.'' Many thousands of ''volunteered'' hours have been spent compiling this excellent information.<br />
<br />
Recommended reading: The Arch Linux [[Beginners' Guide]].<br />
<br />
===Q) Arch requires too much time and effort to install and use. Also, the community keeps telling me to RTFM in so many words===<br />
'''A)''' Arch is designed for and used by a specifically targeted user base. Perhaps it is not right for you. See the [[#Q)_I_am_a_complete_GNU/Linux_beginner._Should_I_use_Arch?|above]].<br />
<br />
===Q) Is Arch designed to be used as a server? A desktop? A workstation?===<br />
'''A)''' Arch is not designed for any particular type of use. Rather, it is designed for a particular type of ''user''. Arch targets competent users who enjoy its do-it-yourself nature, and who further exploit it to shape the system to fit their unique needs. Therefore, in the hands of its target user base, Arch can be used for virtually any purpose. Many use Arch on both their desktops and workstations. And of course, archlinux.org runs on Arch.<br />
<br />
===Q) I really like Arch, except the development team needs to implement ''"feature X"''===<br />
'''A)''' Before going further, did you read [[The Arch Way]]? Have you provided the feature/solution? Does it conform to the Arch philosophy of ''minimalism'' and ''code-correctness over convenience''? Get involved, contribute your code/solution to the community. If it is well regarded by the community and development team, perhaps it will be merged. The Arch community thrives on contribution and sharing of code and tools.<br />
<br />
===Q) When will the new release be made available?===<br />
'''A)''' Arch Linux releases are merely a snapshot of the [core] repository, and are issued usually in the first half of every month.<br />
<br />
The rolling release model keeps every Arch Linux system current and on the bleeding edge by issuing one command. For this reason, releases are not terribly important in Arch, because they become out of date as soon as a package has been updated. If you are looking to obtain the latest Arch Linux release, you do not need to reinstall. You simply run the {{ic|pacman -Syu}} command, and your system will be identical to what you would get with a brand-new install. For this same reason, new Arch Linux releases are not typically full of new and exciting features. New and exciting features are released as needed with the packages that are updated, and can be obtained immediately via {{ic|pacman -Syu}}.<br />
<br />
===Q) Is Arch Linux a stable distribution? Will I get frequent breakage?===<br />
'''A)''' The short answer is: It is largely as stable as ''you'' make it.<br />
<br />
''You'' assemble your own Arch system, atop the simple base environment, and ''you'' control system upgrades. Obviously, a larger, more complicated system incorporating multitudes of customized packages, and a plethora of toolkits and desktop environments would be more likely to experience configuration problems due to upstream changes than a slimmer, more simple system would. Arch is targeted at capable, proactive users. General UNIX competence and good system maintenance and upgrade practices also play a large role in system stability. Also recall that Arch packages are predominantly unpatched, so most application problems are inherently upstream.<br />
<br />
Therefore, it is ''the user'' who is ultimately responsible for the stability of his own rolling release system. The user decides when to upgrade, and merges necessary changes when required. If the user reaches out to the community for help, it is often provided in a timely manner. The difference between Arch and other distributions in this regard is that Arch is truly a 'do-it-yourself' distribution; complaints of breakage are misguided and unproductive, since upstream changes are not the responsibility of Arch devs.<br />
<br />
===Q) Arch needs more press (i.e. advertisement)===<br />
'''A)''' Arch gets plenty of press as it is. The goal of Arch Linux is not to be large, but rather, to provide an elegant, minimalist and bleeding edge distribution focused on simplicity and code-correctness. Organic, sustainable growth occurs naturally amongst the target user base.<br />
<br />
===Q) Arch needs more developers===<br />
'''A)''' Possibly so. Feel free to volunteer your time! Visit the [https://bbs.archlinux.org forums], [[IRC_Channel|IRC channels]], and [https://mailman.archlinux.org/mailman/listinfo/ mailing lists], and see what needs to be done. Getting involved in the Community Contributions subforum is a good way to start.<br />
<br />
===Q) Why is my internet so slow compared to other operating systems?===<br />
'''A)''' Is your network configured correctly? Have a look at [[Beginners' Guide#Hostname|Hostname]] and [[Beginners' Guide#Configure the network|Configure the network]] from the Beginners' Guide.<br />
<br />
Also note that Arch Linux does not come with [[Wikipedia:Traffic_shaping|traffic shaping]] enabled. Thus, it is possible that if a program on it somehow utilizes your internet connection to the full – regardless if it's over P2P or classic client-server connections – other local ones will find it clogged, resulting in severe lags and timeouts. Relief can be provided by [[firewalls]] such as Shorewall or Vuurmuur; there are also static scripts for {{Pkg|iproute2}} (such as [http://serendipity.ruwenzori.net/index.php/2008/06/01/modified-wondershaper-for-better-voip-qos this derivative] of Wondershaper), which allow shaping on the network layer.<br />
<br />
===Q) Why is Arch using all my RAM?===<br />
'''A)''' Essentially, unused RAM is wasted RAM.<br />
<br />
Many new users notice how the Linux kernel handles memory differently than they are used to. Since accessing data from RAM is much faster than from a storage drive, the kernel caches recently accessed data in memory. The cached data is only cleared when the system begins to run out of available memory and new data needs to be loaded.<br />
<br />
Perhaps the most common culprit of this confusion is the {{ic|free}} command:<br />
<br />
{{hc|$ free -m|<br />
total used free shared buffers cached<br />
Mem: 1009 741 267 0 104 359<br />
-/+ buffers/cache: 278 731<br />
Swap: 1537 0 1537}}<br />
<br />
It is important to note the {{ic|-/+ buffers/cache:}} line -- a representation of the amount of memory that is actually in "active use" and the amount of "available" memory, rather than "unused".<br />
<br />
In the above example, a laptop with 1G of total RAM appears to be using 741M of it, with naught but a few idling terminals and a web browser open! However, upon examining the emphasized line, see that only 278M of it is in "active use", and in fact 731M is "available" for new data. Apparently, 104M of that "used" memory contains buffered data and 359M contains cached data, both of which can be cleared away if needed. Only 267M of the total is truly "free" of the burden of data storage.<br />
<br />
The result of all this? Performance!<br />
<br />
See [http://www.linuxjournal.com/article/2770 this wonderful article] if your curiosity has been piqued! There's also a website dedicated to clearing this confusion: http://www.linuxatemyram.com/<br />
<br />
===Q) Where did all my free space go?===<br />
'''A)''' The answer to this question depends on your system. There are some [[Common Applications#Disk usage display programs|fine utilities]] that may help you find the answer.<br />
<br />
== Package Management ==<br />
<br />
===Q) In which package is X in?===<br />
'''A)''' You can find out with [[pkgfile]].<br />
<br />
For example:<br />
<br />
$ pkgfile ''file_name''<br />
<br />
===Q) I've found an error with Package X. What should I do?===<br />
'''A)''' First, you need to figure out if this error is something the Arch team can fix. Sometimes it's not (e.g. Firefox crashes may be the fault of the Mozilla team); this is called an ''upstream error''. If it is an Arch problem, there is a series of steps you can take:<br />
<br />
# Search the forums for information. See if anyone else has noticed it.<br />
# Post a [[Reporting Bug Guidelines|bug report]] with detailed information at https://bugs.archlinux.org.<br />
# If you'd like, write a forum post detailing the problem and the fact that you have reported it already. This will help prevent a lot of people from reporting the same error.<br />
<br />
===Q) Arch packages need to use a unique naming convention. ".pkg.tar.gz" and ".pkg.tar.xz" are too long and/or confusing===<br />
'''A)''' This has been discussed on the Arch mailing list. Some proposed a {{ic|.pac}} file extension. As far as is currently known, there is no plan to change the package extension. As Tobias Kieslich, one of the Arch devs, put it, "''A package '''is''' a gzipped'' [xz] ''tarball! And it can be opened, investigated and manipulated by any tar-capable application. Moreover, the mime-type is automatically detected correctly by most applications.''"<br />
<br />
===Q) Pacman needs a library so other applications can easily access package information===<br />
'''A)''' Since version 3.0.0, pacman has been the front-end to libalpm, the "Arch Linux Package Management" library. This library allows alternative front-ends to be written (for instance, a GUI front-end).<br />
<br />
===Q) Why doesn't pacman have an official GUI front-end?===<br />
'''A)''' Please read [[The Arch Way]] and [[Arch Linux]]. Basically, the answer is that the Arch dev team will not be providing one. Feel free to use one developed by other users. A selective list can be found in [[Pacman GUI Frontends]].<br />
<br />
===Q) Pacman needs ''"feature X"!''===<br />
'''A)''' Please read [[The Arch Way]] and [[Arch Linux]]. The Arch philosophy is "Keep It Simple". If you think the idea has merit, and does not violate this simple litany, then you may choose to discuss it on the forum [https://bbs.archlinux.org/ here]. You might also like to check [https://bugs.archlinux.org here]; it is a place for feature requests if you find it is important.<br />
<br />
However, the best way to get a feature added to pacman or Arch Linux is to implement it yourself. The patch or code may or may not be officially accepted, but perhaps others will appreciate, test and contribute to your effort.<br />
<br />
===Q) Arch needs a stable package branch===<br />
'''A)''' Check out [http://www.archserver.org/ ArchServer].<br />
<br />
===Q) What is the difference between all these repositories?===<br />
'''A)''' See [[Official Repositories]].<br />
<br />
===Q) I just installed Package X. How do I start it?===<br />
'''A)''' If you're using a desktop environment like [[KDE]] or [[GNOME]], the program should automatically show up in your menu. If you're trying to run the program from a terminal and do not know the binary name, use:<br />
<br />
$ pacman -Qlq ''package_name'' | grep bin<br />
<br />
===Q) Why is there only a single version of each shared library in the official repositories?===<br />
'''A)''' Several distributions, such as Debian, have different versions of shared libraries packaged as different packages: {{ic|libfoo1}}, {{ic|libfoo2}}, {{ic|libfoo3}} and so on. In this way it is possible to have apps compiled against different versions of {{ic|libfoo}} installed on the same system.<br />
<br />
Unlike Debian, Arch is a rolling-release cutting-edge distribution. The most visible trait of a cutting-edge distribution is availability of the latest versions of software in the repositories; in case of a distribution like Arch, it also means that only the latest versions of all packages are officially supported. By dropping support for outdated software, package maintainers are able to spend more time ensuring that the newest versions work as expected. As soon as a new version of a shared library becomes available from upstream, it is added to the repositories and affected packages are rebuilt to utilize the new version.<br />
<br />
===Q) What if I run "pacman -Syu" and there will be an update for a shared library, but not for the apps that depend on it?===<br />
'''A)''' This scenario should not happen at all. Assuming an application called {{ic|foobaz}} is in one of the official repositories and builds successfully against a new version of a shared library called {{ic|libbaz}}, it will be updated along with {{ic|libbaz}}. If, however, it doesn't build successfully, {{ic|foobaz}} package will have a versioned dependency (e.g. ''libbaz 1.5''), and will be removed by pacman during {{ic|libbaz}} upgrade, due to a conflict.<br />
<br />
If {{ic|foobaz}} is a package that you built yourself and installed from AUR, you should try rebuilding {{ic|foobaz}} against the new version of {{ic|libbaz}}. If the build fails, report the bug to the {{ic|foobaz}} developers.<br />
<br />
===Q) Is it possible that there's a major kernel update in the repository, and that some of the driver packages haven't been updated?===<br />
'''A)''' No, it is not possible. Major kernel updates (e.g. ''linux 3.5.0-1'' to ''linux 3.6.0-1'') are always accompanied by rebuilds of all supported kernel driver packages. On the other hand, if you have an unsupported driver package installed on your system, such as {{AUR|catalyst}}, then a kernel update might break things for you if you do not rebuild it for the new kernel. Users are responsible for updating any unsupported driver packages that they have installed.<br />
<br />
===Q) Does Arch use package signing?===<br />
'''A)''' Yes. Package signing in [[pacman]] has been implemented since version 4. See [[package signing]] for more information.<br />
<br />
== Installation ==<br />
<br />
===Q) Arch needs an installer. Maybe a GUI installer===<br />
'''A)''' Since installation doesn't occur often (read the rest of this article to know more about what ''rolling release'' means), it is not a high priority for developers or users. The [[Installation Guide]] and [[Beginners' Guide]] have been fully updated to use the command-line method. If you're still interested in using an installer, consider using [[Archboot]].<br />
<br />
===Q) I installed Arch, and now I am at a shell! What now?===<br />
'''A)''' Have a look at the Arch Linux [[Beginners' Guide]].<br />
<br />
===Q) Which desktop environment or window manager should I use?===<br />
'''A)''' Since many are available to you, use the one you like the most to fit your needs. Have a look at the [[Desktop Environment]] and [[Window Manager]] articles.<br />
<br />
===Q) What makes Arch unique amongst other "minimal" distributions?===<br />
'''A)''' Some distributions may provide minimal installation methods, sharing some similarities to the Arch installation process. However, a few points must be noted:<br />
<br />
# Arch has been ''fundamentally designed'' as a lightweight, minimal base environment upon which to build.<br />
# The ''only'' way to install Arch is by building up from this minimal base.<br />
# The base system and the entire distribution are inherently a K.I.S.S. design approach, which makes it uniquely suitable for its target base of users.<br />
# Installing services and packages requires manual, interactive user configuration. Unlike other distributions which automatically configure services and startup behavior, the Arch philosophy puts emphasis on the power user's competence and prerogative to handle such responsibilities.<br />
# Arch packaging is designed to be minimal, and ''optional'' package dependencies are never automatically installed. Rather, the user is simply notified of their existence during package installation, resulting in a slimmer system.<br />
# Arch provides excellent, thorough documentation, aiding in the process of system assembly.<br />
<br />
== Other ==<br />
<br />
===Q) What is this AUR thing I keep hearing about?===<br />
'''A)''' See [[Arch User Repository#FAQ]].<br />
<br />
===Q) Why do I get a green screen whenever I try to watch a video?===<br />
'''A)''' Your color depth is set wrong. It may need to be 24 instead of 16, for example.<br />
<br />
===Q) Spellcheck is marking all of my text as incorrect!===<br />
'''A)''' Have you installed an {{Pkg|aspell}} dictionary? Use {{ic|pacman -Ss aspell}} to see available dictionaries for downloading.<br />
<br />
If installing the dictionary files did not resolve the problem, it is most likely a problem with {{ic|enchant}}. Check for known dictionary files:<br />
<br />
{{hc|$ aspell dicts|<br />
en<br />
en_GB<br />
...etc}}<br />
<br />
If your respective language dictionary is listed, add it to {{ic|/usr/share/enchant/enchant.ordering}}. From the above example, it would be:<br />
<br />
en_GB:aspell</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Pacman&diff=252713Pacman2013-04-02T17:24:30Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Package management]]<br />
[[cs:Pacman]]<br />
[[da:Pacman]]<br />
[[de:Pacman]]<br />
[[el:Pacman]]<br />
[[es:Pacman]]<br />
[[fr:Pacman]]<br />
[[id:Pacman]]<br />
[[it:Pacman]]<br />
[[ja:Pacman]]<br />
[[ko:Pacman]]<br />
[[lt:Pacman]]<br />
[[nl:Pacman]]<br />
[[pl:Pacman]]<br />
[[pt:Pacman]]<br />
[[ro:Pacman]]<br />
[[ru:Pacman]]<br />
[[sr:Pacman]]<br />
[[sv:Pacman]]<br />
[[tr:pacman]]<br />
[[uk:Pacman]]<br />
[[zh-CN:Pacman]]<br />
[[zh-TW:Pacman]]<br />
{{Lowercase title}}<br />
{{Article summary start}}<br />
{{Article summary text|Pacman is the Arch Linux [[Wikipedia:Package management system|package manager]]. Package managers are used to install, upgrade, and remove software. This article covers basic usage and troubleshooting tips.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Downgrading Packages}}<br />
{{Article summary wiki|Improve Pacman Performance}}<br />
{{Article summary wiki|Pacman GUI Frontends}}<br />
{{Article summary wiki|Pacman Rosetta}}<br />
{{Article summary wiki|Pacman Tips}}<br />
{{Article summary wiki|Pacman package signing}}<br />
{{Article summary wiki|FAQ#Package Management}}<br />
{{Article summary wiki|pacman-key}}<br />
{{Article summary wiki|Pacnew and Pacsave Files}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|libalpm(3) Manual Page|https://www.archlinux.org/pacman/libalpm.3.html}}<br />
{{Article summary link|pacman(8) Manual Page|https://www.archlinux.org/pacman/pacman.8.html}}<br />
{{Article summary link|pacman.conf(5) Manual Page|https://www.archlinux.org/pacman/pacman.conf.5.html}}<br />
{{Article summary link|repo-add(8) Manual Page|https://www.archlinux.org/pacman/repo-add.8.html}}<br />
{{Article summary end}}<br />
<br />
The '''[https://www.archlinux.org/pacman/ pacman]''' [[Wikipedia:Package management system|package manager]] is one of the major distinguishing features of Arch Linux. It combines a simple binary package format with an easy-to-use [[Arch Build System|build system]]. The goal of pacman is to make it possible to easily manage packages, whether they are from the [[Official Repositories|official Arch repositories]] or the user's own builds.<br />
<br />
Pacman keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows user to download/install packages with a simple command, complete with all required dependencies.<br />
<br />
Pacman is written in the C programming language and uses the {{ic|.pkg.tar.xz}} package format.<br />
<br />
{{Tip|The official {{Pkg|pacman}} package also contains other useful tools, such as '''makepkg''', '''pactree''', '''vercmp''' and more. The full list from {{ic|pacman -Ql pacman <nowiki>|</nowiki> grep bin}} }}<br />
<br />
== Configuration ==<br />
<br />
Pacman's settings are located in {{ic|/etc/pacman.conf}}. This is the place where the user configures the program to work in the desired manner. In-depth information about the configuration file can be found in [https://www.archlinux.org/pacman/pacman.conf.5.html man pacman.conf].<br />
<br />
=== General options ===<br />
<br />
General options are in the {{ic|[options]}} section. Read the man page or look in the default {{ic|pacman.conf}} for information on what can be done here.<br />
<br />
==== Skip package from being upgraded ====<br />
<br />
To skip upgrading a specific package, specify it as such:<br />
<br />
IgnorePkg=linux<br />
<br />
For multiple packages use a space-separated list, or use additional {{ic|IgnorePkg}} lines.<br />
<br />
==== Skip package group from being upgraded ====<br />
<br />
As with packages, skipping a whole package group is also possible:<br />
<br />
IgnoreGroup=gnome<br />
<br />
==== Skip files from being installed to system ====<br />
<br />
To always skip installation of specific directories list them under {{Ic|NoExtract}}. For example, to avoid installation of [[systemd]] units use this:<br />
<br />
NoExtract=usr/lib/systemd/system/*<br />
<br />
=== Repositories ===<br />
<br />
This section defines which [[Official Repositories|repositories]] to use, as referred to in {{ic|/etc/pacman.conf}}. They can be stated here directly or included from another file (such as {{ic|/etc/pacman.d/mirrorlist}}), thus making it necessary to maintain only one list. See [[Mirrors|here]] for mirror configuration.<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
#[testing]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
#[community-testing]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
# Users If you want to run 32 bit applications on your x86_64 system,<br />
# enable the multilib repositories as required here.<br />
<br />
#[multilib-testing]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
#[multilib]<br />
#SigLevel = PackageRequired<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
# An example of a custom package repository. See the pacman manpage for<br />
# tips on creating your own repositories.<br />
#[custom]<br />
#SigLevel = Optional TrustAll<br />
#Server = file:///home/custompkgs}}<br />
<br />
{{Warning|Care should be taken when using the [testing] repository. It is in active development and updating may cause some packages to stop working. People who use the [testing] repository are encouraged to subscribe to the [https://mailman.archlinux.org/mailman/listinfo/arch-dev-public arch-dev-public mailing list] for current information.}}<br />
<br />
=== Package security ===<br />
<br />
Pacman 4 supports signed packages, which adds an extra layer of security to the packages. To enable signature verification, take a look [[pacman-key|here]].<br />
<br />
== Usage ==<br />
<br />
What follows is just a small sample of the operations that pacman can perform. To read more examples, refer to [https://www.archlinux.org/pacman/pacman.8.html man pacman]. For an introduction, see [[pacman - An Introduction]]. <br />
<br />
=== Installing packages ===<br />
<br />
==== Installing specific packages ====<br />
<br />
To install a single package or list of packages (including dependencies), issue the following command:<br />
<br />
# pacman -S ''package_name1'' ''package_name2'' ...<br />
<br />
Sometimes there are multiple versions of a package in different repositories, e.g. [extra] and [testing]. To install the former version, the repository needs to be defined in front:<br />
<br />
# pacman -S extra/''package_name''<br />
<br />
==== Installing package groups ====<br />
<br />
Some packages belong to a group of packages that can all be installed simultaneously. For example, issuing the command:<br />
<br />
# pacman -S gnome<br />
<br />
will install all the packages that belong to the {{ic|gnome}} group. To see what packages belong to the gnome group, run:<br />
<br />
# pacman -Sg gnome<br />
<br />
Also visit https://www.archlinux.org/groups/ to see what package groups are available.<br />
<br />
{{Note|If a package in the list is already installed on the system, it will be reinstalled even if it is already up to date. This behavior can be overridden with the {{ic|--needed}} option.}}<br />
<br />
{{Warning|1=When installing packages, do '''not''' refresh the package list without [[#Upgrading packages|upgrading]] the system (i.e. {{ic|pacman -Sy ''package_name''}}); this can lead to dependency issues. See [[#Partial upgrades are unsupported]] and https://bbs.archlinux.org/viewtopic.php?id=89328.}}<br />
<br />
=== Removing packages ===<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
<br />
# pacman -R ''package_name''<br />
<br />
To remove a package and its dependencies which are not required by any other installed package:<br />
<br />
# pacman -Rs ''package_name''<br />
<br />
To remove a package, its dependencies and all the packages that depend on the target package:<br />
<br />
{{Warning|This operation is recursive, and must be used with care since it can remove many potentially needed packages.}}<br />
<br />
# pacman -Rsc ''package_name''<br />
<br />
To remove a package, which is required by another package, without removing the dependent package:<br />
<br />
# pacman -Rdd ''package_name''<br />
<br />
Pacman saves important configuration files when removing certain applications and names them with the extension: {{ic|.pacsave}}. To prevent the creation of these backup files use the {{ic|-n}} option:<br />
<br />
# pacman -Rn ''package_name''<br />
<br />
{{Note|Pacman will not remove configurations that the application itself creates (for example "dotfiles" in the home folder).}}<br />
<br />
=== Upgrading packages ===<br />
<br />
Pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. This command can synchronize the repository databases ''and'' update the system's packages (excluding 'local' packages that are not in the configured repositories):<br />
<br />
# pacman -Syu<br />
<br />
{{Warning|Instead of immediately updating as soon as updates are available, users must recognize that due to the nature of Arch's rolling release approach, an update may have unforeseen consequences. This means that it is not wise to update if, for example, one is about to deliver an important presentation. Rather, update during free time and be prepared to deal with any problems that may arise.}}<br />
<br />
Pacman is a powerful package management tool, but it does not attempt to handle all corner cases. Read [[The Arch Way]] if this causes confusion. Users must be vigilant and take responsibility for maintaining their own system. '''When performing a system update, it is essential that users read all information output by pacman and use common sense.''' If a user-modified configuration file needs to be upgraded for a new version of a package, a {{ic|.pacnew}} file will be created to avoid overwriting settings modified by the user. Pacman will prompt the user to merge them. These files require manual intervention from the user and it is good practice to handle them right after every package upgrade or removal. See [[Pacnew and Pacsave Files]] for more info.<br />
<br />
{{Tip|Remember that pacman's output is logged in {{ic|/var/log/pacman.log}}.}}<br />
<br />
Before upgrading, it is advisable to visit the [https://www.archlinux.org/ Arch Linux home page] to check the latest news (or subscribe to the RSS feed): when updates require out-of-the-ordinary user intervention (more than what can be handled simply by following the instructions given by pacman), an appropriate news post will be made.<br />
<br />
If one encounters problems that cannot be solved by these instructions, make sure to search the forum. It is likely that others have encountered the same problem and have posted instructions for solving it.<br />
<br />
=== Querying package databases ===<br />
<br />
Pacman queries the local package database with the {{ic|-Q}} flag; see:<br />
<br />
$ pacman -Q --help<br />
<br />
and queries the sync databases with the {{ic|-S}} flag; see:<br />
<br />
$ pacman -S --help<br />
<br />
Pacman can search for packages in the database, searching both in packages' names and descriptions:<br />
<br />
$ pacman -Ss ''string1'' ''string2'' ...<br />
<br />
To search for already installed packages:<br />
<br />
$ pacman -Qs ''string1'' ''string2'' ...<br />
<br />
To display extensive information about a given package:<br />
<br />
$ pacman -Si ''package_name''<br />
<br />
For locally installed packages:<br />
<br />
$ pacman -Qi ''package_name''<br />
<br />
Passing two {{ic|-i}} flags will also display the list of backup files and their modification states:<br />
<br />
$ pacman -Qii ''package_name''<br />
<br />
To retrieve a list of the files installed by a package:<br />
<br />
$ pacman -Ql ''package_name''<br />
<br />
For packages not installed, use [[pkgfile]].<br />
<br />
One can also query the database to know which package a file in the file system belongs to:<br />
<br />
$ pacman -Qo ''/path/to/file_name''<br />
<br />
To list all packages no longer required as dependencies (orphans):<br />
<br />
$ pacman -Qdt<br />
<br />
To list a dependency tree of a package:<br />
<br />
$ pactree ''package_name''<br />
<br />
To list all the packages depending on an ''installed'' package, use {{ic|whoneeds}} from [[pkgtools]]:<br />
<br />
$ whoneeds ''package_name''<br />
<br />
=== Additional commands ===<br />
<br />
Upgrade the system and install a list of packages (one-liner):<br />
<br />
# pacman -Syu ''package_name1'' ''package_name2'' ...<br />
<br />
Download a package without installing it:<br />
<br />
# pacman -Sw ''package_name''<br />
<br />
Install a 'local' package that is not from a remote repository (e.g. the package is from the [[Arch User Repository|AUR]]):<br />
<br />
# pacman -U /path/to/package/package_name-version.pkg.tar.xz<br />
<br />
{{Tip| To keep a copy of the local package in pacman's cache, use :<br />
{{bc|<nowiki><br />
# pacman -U file://path/to/package/package_name-version.pkg.tar.xz<br />
</nowiki>}}<br />
}}<br />
<br />
Install a 'remote' package (not from a repository stated in pacman's configuration files):<br />
<br />
# pacman -U <nowiki>http://www.example.com/repo/example.pkg.tar.xz</nowiki><br />
<br />
Clean the package cache of packages that are not currently installed ({{ic|/var/cache/pacman/pkg}}):<br />
<br />
{{Warning|Only do this if certain that the installed packages are stable and that a [[Downgrading Packages|downgrade]] will not be necessary, since it will remove all of the old versions from the cache folder, leaving behind only the versions of the packages that are currently installed. Having older versions of packages comes in handy in case a future upgrade causes breakage.}}<br />
<br />
# pacman -Sc<br />
<br />
Clean the entire package cache:<br />
<br />
{{Warning|This clears out the entire package cache. Doing this is considered a bad practice; it prevents the ability to downgrade something directly from the cache folder. Users will be forced to have to use an alternative source of deprecated packages such as the [[Downgrading Packages#ARM|Arch Rollback Machine]].}}<br />
<br />
# pacman -Scc<br />
<br />
{{Tip|As an alternative to both the {{ic|-Sc}} and {{ic|-Scc}} switches, consider using {{ic|paccache}} from {{pkg|pacman-contrib}}. This offers more control over what and how many packages are deleted. Run {{ic|paccache -h}} for instructions.}}<br />
<br />
=== Partial upgrades are unsupported ===<br />
<br />
Arch Linux is a rolling release, and new [[Wikipedia:Library (computing)|library]] versions will be pushed to the repositories. The developers and Trusted Users will rebuild all the packages in the repositories that need to be rebuilt against the libraries. If the system has locally installed packages (such as [[Arch User Repository|AUR]] packages), users will need to rebuild them when their dependencies receive a [[Wikipedia:soname|soname]] bump.<br />
<br />
This means that partial upgrades are '''not supported'''. Do not use {{ic|pacman -Sy package}} or any equivalent such as {{ic|pacman -Sy}} and then {{ic|pacman -S package}}. Always upgrade before installing a package -- particularly if pacman has refreshed the sync repositories. Be very careful when using {{ic|IgnorePkg}} and {{ic|IgnoreGroup}} for the same reason.<br />
<br />
If a partial upgrade scenario has been created, and binaries are broken because they cannot find the libraries they are linked against, '''do not "fix" the problem simply by symlinking'''. Libraries receive [[Wikipedia:soname|soname]] bumps when they are '''not backwards compatible'''. A simple {{ic|pacman -Syu}} to a properly synced mirror will fix the problem as long as pacman is not broken.<br />
<br />
== Troubleshooting ==<br />
<br />
{{FAQ<br />
|question=An update to package XYZ broke my system!<br />
|answer=Arch Linux is a rolling-release cutting-edge distribution. Package updates are available as soon as they are deemed stable enough for general use. However, updates sometimes require user intervention: configuration files may need to be updated, optional dependencies may change, etc.<br />
<br />
The most important tip to remember is to not "blindly" update Arch systems. Always read the list of packages to be updated. Note whether "critical" packages are going to be updated ({{Pkg|linux}}, {{Pkg|xorg-server}}, and so on). If so, it is usually a good idea to check for any news at https://www.archlinux.org/ and scan recent forum posts to see if people are experiencing problems as a result of an update.<br />
<br />
If a package update is expected/known to cause problems, packagers will ensure that pacman displays an appropriate message when the package is updated. If experiencing trouble after an update, double-check pacman's output by looking at the log ({{ic|/var/log/pacman.log}}). <br />
<br />
At this point, '''only after ensuring there is no information available through pacman, there is no relative news on https://www.archlinux.org/, and there are no forum posts regarding the update''', consider seeking help on the forum, over [[IRC Channel|IRC]], or [[Downgrading Packages|downgrading the offending package]].}}<br />
<br />
{{FAQ<br />
|question=I know an update to package ABC was released, but pacman says my system is up to date!<br />
|answer=Pacman mirrors are not synced immediately. It may take over 24 hours before an update is available to you. The only options are be patient or use another mirror. [https://www.archlinux.org/mirrors/status/ MirrorStatus] can help you identify an up-to-date mirror.}}<br />
<br />
{{FAQ<br />
|question=I get an error when updating: "file exists in filesystem"!<br />
|answer=ASIDE: ''Taken from https://bbs.archlinux.org/viewtopic.php?id=56373 by Misfit138.''<br />
<br />
error: could not prepare transaction<br />
error: failed to commit transaction (conflicting files)<br />
package: /path/to/file exists in filesystem<br />
Errors occurred, no packages were upgraded.<br />
<br />
Why this is happening: pacman has detected a file conflict, and by design, will not overwrite files for you. This is a design feature, not a flaw. <br />
<br />
The problem is usually trivial to solve. A safe way is to first check if another package owns the file ({{ic|pacman -Qo /path/to/file}}). If the file is owned by another package, [[Reporting Bug Guidelines|file a bug report]]. If the file is not owned by another package, rename the file which 'exists in filesystem' and re-issue the update command. If all goes well, the file may then be removed.<br />
<br />
If you had installed a program manually without using pacman or a frontend, you have to remove it and all its files and reinstall properly using pacman.<br />
<br />
Every installed package provides {{ic|/var/lib/pacman/local/$package-$version/files}} file that contains metadata about this package. If this file gets corrupted - is empty or missing - it results in "file exists in filesystem" errors when trying to update the package. Such an error usually concerns only one package and instead of manually renaming and later removing all the files that belong to the package in question, you can run {{ic|pacman -S --force $package}} to force pacman to overwrite these files.<br />
<br />
Do '''not''' run {{ic|pacman -Syu --force}}.}}<br />
<br />
{{FAQ<br />
|question=I get an error when installing a package: "not found in sync db"<br />
|answer=Firstly, ensure the package actually exists (and watch out for typos!). If certain the package exists, your package list may be out-of-date or your repositories may be incorrectly configured. Try running {{ic|pacman -Syy}} to force a refresh of all package lists.}}<br />
<br />
{{FAQ<br />
|question=Pacman is repeatedly upgrading the same package!<br />
|answer=This is due to duplicate entries in {{ic|/var/lib/pacman/local/}}, such as two {{ic|linux}} instances. {{ic|pacman -Qi}} outputs the correct version, but {{ic|pacman -Qu}} recognizes the old version and therefore will attempt to upgrade.<br />
<br />
Solution: delete the offending entry in {{ic|/var/lib/pacman/local/}}.<br />
<br />
{{Note|Pacman version 3.4 should display an error in case of duplicate entries, which should make this note obsolete.}}}}<br />
<br />
{{FAQ<br />
|question=Pacman crashes during an upgrade!<br />
|answer=In the case that pacman crashes with a "database write" error whilst removing packages, and reinstalling or upgrading packages fails:<br />
<br />
# Boot using the Arch install media.<br />
# Mount your root filesystem.<br />
# Update the pacman database via {{ic|pacman -Syy}}.<br />
# Reinstall the broken package via {{ic|pacman -r /path/to/root -S package}}.}}<br />
<br />
{{FAQ<br />
|question=I installed software using "make install"; these files do not belong to any package!<br />
|answer=If receiving a "conflicting files" error, note that pacman will overwrite manually-installed software if supplied with the {{ic|--force}} switch ({{ic|pacman -S --force}}). See [[Pacman Tips#Identify files not owned by any package]] for a script that searches the file system for ''disowned'' files.<br />
{{Warning|Take care when using the {{ic|--force}} switch because it can cause major problems if used improperly.}}}}<br />
<br />
{{FAQ<br />
|question=I need a package with a specific file. How do I know what provides it?<br />
|answer=Install [[pkgfile]] which uses a separate database with all files and their associated packages.}}<br />
<br />
{{FAQ<br />
|question=Pacman is completely broken! How do I reinstall it?<br />
|answer=In the case that pacman is broken beyond repair, manually download the necessary packages ({{Pkg|openssl}}, {{Pkg|libarchive}}, and {{Pkg|pacman}}) and extract them to root. The pacman binary will be restored along with its default configuration file. Afterwards, reinstall these packages with pacman to maintain package database integrity. Additional information and an example (outdated) script that automates the process is available in [https://bbs.archlinux.org/viewtopic.php?id=95007 this] forum post.}}<br />
<br />
{{FAQ<br />
|question=After updating my system, I get a "unable to find root device" error after rebooting and my system will no longer boot<br />
|answer=Most likely your initramfs got broken during a kernel update (improper use of pacman's {{ic|--force}} option can be a cause). You have two options:<br />
<br />
'''1.''' Try the ''Fallback'' entry.<br />
<br />
: {{Tip|In case you removed this entry for whatever reason, you can always press the {{Keypress|Tab}} key when the bootloader menu shows up (for Syslinux) or {{Keypress|e}} (for GRUB), rename it {{ic|initramfs-linux-fallback.img}} and press {{Keypress|Enter}} or {{Keypress|b}} (depending on your bootloader) to boot with the new parameters.}}<br />
<br />
: Once the system starts, run this command (for the stock {{Pkg|linux}} kernel) either from the console or from a terminal to rebuild the initramfs image:<br />
<br />
: {{bc|# mkinitcpio -p linux}}<br />
<br />
'''2.''' If that doesn't work, from a 2012 Arch release (CD/DVD or USB stick), run:<br />
<br />
: {{Note|If you don't have a 2012 release or if you only have some other "live" Linux distribution laying around, you can [[chroot]] using the old fashion way. Obviously, there will be more typing than simply running the {{ic|arch-chroot}} script.}}<br />
<br />
: {{bc|<nowiki><br />
# mount /dev/sdxY /mnt #Your root partition.<br />
# mount /dev/sdxZ /mnt/boot #If you use a separate /boot partition.<br />
# arch-chroot /mnt<br />
# pacman -Syu mkinitcpio systemd linux</nowiki>}}<br />
<br />
: Reinstalling the kernel (the {{Pkg|linux}} package) will automatically re-generate the initramfs image with {{ic|mkinitcpio -p linux}}. There is no need to do this separately.<br />
<br />
: Afterwards, it's recommended that you run {{ic|exit}}, {{ic|umount /mnt/{boot,} }} and {{ic|reboot}}.<br />
<br />
: {{Note|If you cannot enter the arch-chroot or chroot environment but need to re-install packages you can use the command pacman -r /mnt -Syu foo bar to use pacman on your root partition.}}}}<br />
<br />
{{FAQ<br />
|question=Signature from "User <email@gmail.com>" is unknown trust, installation failed<br />
|answer=Follow [[pacman-key#Resetting all the keys]]. Or you can try to manually upgrade {{ic|archlinux-keyring}} package first, i.e. {{ic|pacman -S archlinux-keyring}}. }}<br />
<br />
{{FAQ<br />
|question=I keep getting <br />
:error: PackageName: signature from "User <email@archlinux.org>" is invalid<br />
:error: failed to commit transaction (invalid or corrupted package (PGP signature))<br />
:Errors occured, no packages were upgraded. <br />
|answer=It happens when the system clock is wrong. Set the [[time]] and run : {{bc|# hwclock -w}} before to try to install/upgrade a package again. }}<br />
<br />
{{FAQ<br />
|question=I keep getting a "failed to commit transaction (invalid or corrupted package)" error<br />
|answer=Look for {{ic|*.part}} files (partially downloaded packages) in {{ic|/var/cache/pacman/pkg}} and remove them (often caused by usage of custom {{ic|XferCommand}} in {{ic|pacman.conf}}).}}<br />
<br />
{{FAQ<br />
|question=I get an error every time I use pacman saying 'warning: current locale is invalid; using default "C" locale'. What do I do?<br />
|answer=As the error message says, your locale isn't correctly configured. See [[Locale]].}}<br />
<br />
{{FAQ<br />
|question=How can I get Pacman to honor my proxy settings?<br />
|answer=Make sure that the relevant environment variables ({{ic|$http_proxy}}, {{ic|$ftp_proxy}} etc.) are set up. If you use Pacman with [[sudo]], you need to configure sudo to [[sudo#Environment variables (Outdated?)|pass these environment variables to Pacman]].<br />
}}<br />
<br />
== See also ==<br />
<br />
* [[Common Applications/Utilities#Package management]]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Xfce&diff=252712Xfce2013-04-02T17:21:49Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-CN:Xfce]]<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Thunar}}<br />
{{Article summary wiki|Improve GTK Application Looks}}<br />
{{Article summary wiki|Autostart applications#Graphical}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Features:<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, notifications, and system tools are available in the {{Grp|xfce4-goodies}} group.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
<br />
== Starting Xfce ==<br />
=== Automatically ===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a [[Display Manager]]<br />
* Run Xfce automatically using the {{pkg|xorg-xinit}} method at [[Start X at Login]] combining with [[Automatic login to virtual console ]]<br />
<br />
=== Manually ===<br />
{{Note|See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.}}<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|<nowiki>#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec startxfce4</nowiki>}}<br />
<br />
{{Note|<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.<br />
}}<br />
<br />
=== Automounting ===<br />
See [[General Troubleshooting#Session permissions]].<br />
<br />
If you have no problems shutting down and rebooting but cannot automount external media and disks, you may need to install {{pkg|gvfs}}. See the [[#Removable Devices|Removable Devices]] section.<br />
<br />
==Tips and tricks==<br />
===Xfconf settings===<br />
Xfconf is XFCE's system for storing configuration options, and most XFCE configuration is done by editing settings in Xfconf (one way or another). There are several ways to modify these settings:<br />
* The most obvious and easiest way is to go to "Settings" in the main menu and select the category you want to customize. However, not all customization options are available this way. <br />
* A less user-friendly but more general way is to go to {{bc|Main menu -> Settings -> Settings Editor}} where you can see and modify all the customization options. Any settings modified here will take effect immediately. The Settings Editor can also be launched from the command line by invoking {{ic|xfce4-settings-editor}}.<br />
* Customization can be done completely from the command line using the program {{ic|xfconf-query}}. See [http://docs.xfce.org/xfce/xfconf/xfconf-query the XFCE online documentation] for more information and examples and the rest of this wiki page for more examples. Settings changed here will take effect immediately.<br />
* The settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will not take effect immediately.<br />
* For more information: [http://docs.xfce.org/xfce/xfconf/start Xfconf documentation]<br />
===Panel===<br />
====xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== 'menu' panel replacement ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
==== Removing entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal:{{bc|1=$ sudo sh -c 'echo "NoDisplay=true" >> firefox.desktop'}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the following in it:<br />
{{bc|<nowiki><br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
</nowiki>}}<br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
<br />
===== Method 4 =====<br />
Alternatively a tool called [http://www.redsquirrel87.com/XAME.html xame] can be used. XAME is a GUI tool written in Gambas designed specifically for editing menu entires in XFCE, it will NOT work in other DEs. XAME is available in the {{AUR|xame}} package from the [[AUR]].<br />
<br />
==== Missing applications ====<br />
When some applications are installed (for example via [[WINE]]), they may not be listed in {{ic|/usr/share/applications}}. Shortcuts ''might'' be found in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the {{pkg|wmctrl}} package from the [[Official Repositories]].<br />
<br />
Create a script in {{ic|~/.config/xfce4/xfce4-fix-panel}} with this content and make it executable (you can use {{ic|chmod 755 xfce4-fix-panel}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
# call the program with a list of panel numbers as arguments<br />
# for example, xfce4-fix-panel 1 2 3<br />
# for the first three panels<br />
for i in $* ;do<br />
putPanelDown $i<br />
done<br />
<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Transparent Background for Icon Titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide Selected Partitions ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop. Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
==== Remove Thunar Options from Right-click ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Kill Window Shortcut ====<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== Enabling the Compositor ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
==== Toggle Automatic Tiling of Windows at Edge of Screen ====<br />
XFWM4 has the ability to "tile" a window automatically when it is moved to the edge of the screen by resizing it to fill the top half of the screen. (The official XFCE website says this feature is disabled by default in XFCE 4.10, but it seems to be enabled by default on Arch Linux.) This behavior can be enabled or disabled in {{ic|Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge}}, or:<br />
<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable<br />
<br />
=== Settings Manager Commands ===<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Custom Startup Applications====<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Switch between users====<br />
Xfce4 allows this behavior under the 'action buttons' menu item. Currently, both [[gdm]] and [[Lightdm#User_switching_under_xfce4|lightdm]] provide this functionality.<br />
<br />
==== Manually Modifying XML settings ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in Thunar when you plug in external devices, make sure {{Pkg|gvfs}} is installed. You could also need to install {{Pkg|gvfs-afc}} (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]). It is also a good idea to install {{Pkg|thunar-volman}} (already included in the {{Grp|xfce4}} base group). Additionally, [[udisks]] and a udisks wrapper are recommended if you want to automount optical and external drives easily.<br />
<br />
===Look and Feel===<br />
====Add themes to XFCE====<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
==== Cursors ====<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
==== Icons ====<br />
1. First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org].<br />
<br />
2. Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
<br />
3. Move the extracted folder containing the icons to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons) or {{ic|~/.icons}} (if only you want to use the icons).<br />
<br />
Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
<br />
4. Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it is also recommended to install the {{Pkg|hicolor-icon-theme}} package if it was not already installed.<br />
<br />
==== Fonts ====<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}} which can be [[pacman|installed]] from [[Official Repositories]]. <br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that does not work, you might need more or different gstreamer plugins. Try to [[pacman|install]] package {{pkg|gstreamer0.10-good-plugins}} or {{pkg|gstreamer0.10-bad-plugins}}.<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== Xfce4-mixer and OSS4 ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile gstreamer0.10-good-plugins yourself. Download the PKGBUILD and other files needed from ABS or [https://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="https://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR {{AUR|gstreamer0.10-good-plugins-ossv4}}, modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Keyboard Volume Buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the problem (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute does not work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
===== Volumeicon =====<br />
<br />
{{pkg|volumeicon}} is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through {{pkg|xfce4-notifyd}}.<br />
<br />
==== Adding startup/boot sound ====<br />
<br />
Arch does not have a built-in startup sound configuration tool, but there is a workaround by adding the following command to your Application Autostart settings:<br />
<br />
aplay /boot/startupsound.wav<br />
<br />
The file location and filename can be whatever you want, but naming it descriptively and putting it in /boot keeps things tidy.<br />
<br />
=== xdg-open integration (Preferred Applications) ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to [[pacman|install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
Installing the package and allowing ''xdg-open'' to detect that you are running XFCE makes it forward all calls to ''exo-open'' instead, which correctly uses all your preferred applications preferences.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Screenshots ===<br />
<br />
XFCE has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
==== Print Screen key ====<br />
<br />
Go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "xfce4-screenshooter -f" command to use the "PrintScreen" key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking_a_Screenshot#scrot|scrot]] can be used.<br />
<br />
===Terminal color themes or pallets===<br />
Terminal color themes or pallets can be changed in GUI under Appearance tab in Preferences. These are the colors that are available to most console applications like [[Emacs]], [[Vi]] and so on. Their settings are stored individually for each system user in {{ic|<nowiki>~/.config/xfce4/terminal/terminalrc</nowiki>}} file. There are also so many other themes to choose from. Check forums post [[https://bbs.archlinux.org/viewtopic.php?pid=1194644|Terminal Colour Scheme Screenshots]] for hundreds of available choices and themes.<br />
<br />
====Changing default color theme====<br />
XFCE's {{ic|extra/terminal}} package comes with a darker color palette and colored text looks pretty horrid in default black background impeding user readability. Append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
ColorPalette5=#38d0fcaaf3a9<br />
ColorPalette4=#e013a0a1612f<br />
ColorPalette2=#d456a81b7b42<br />
ColorPalette6=#ffff7062ffff<br />
ColorPalette3=#7ffff7bd7fff<br />
ColorPalette13=#82108210ffff<br />
<br />
====Terminal tango color theme====<br />
To switch to tango color theme, open with your favorite editor<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
And add(replace) these lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Colour management ===<br />
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.<br />
<br />
==== Loading a profile ====<br />
If you wish to '''load an icc profile''' (that you have previously created or downloaded) to calibrate your display on startup, you can download {{AUR|xcalib}} from [[AUR]], then open the XFCE4 Settings Manager, click Session and Startup icon, the Autostart tab, and add a new entry where the command is {{ic|/usr/bin/xcalib /path/to/your/profile.icc}}. You still need to tell your applications, which display profile should be used to have the displayed images colour managed.<br />
<br />
Another option is dispwin. Dispwin not only calibrates the display, but also sets the _ICC_PROFILE atom in X so that some applications can use a "system" display profile instead of requiring the user to set the display profile manually (GIMP, Inkscape, darktable, UFRaw, etc.).<br />
<br />
See [[ICC_Profiles#Loading_ICC_Profiles]] for more information.<br />
<br />
==== Creating a profile ====<br />
<br />
If you wish to '''create an icc profile''' for your display (ie. characterising/profiling, e.g. with the [[ColorHug]], or some other colorimeter, or a spectrophotometer, or "by eye"), the simplest option may be to install [https://aur.archlinux.org/packages.php?ID=25883 dispcalGUI] from [[AUR]]. <br />
<br />
Another option is to install {{ic|gnome-settings-daemon}} and {{ic|gnome-color-manager}} (available in extra). In order to start the calibration from the command line, first do {{ic|/usr/lib/gnome-settings-daemon/gnome-settings-daemon &}} (note: this might change your keyboard layout and who knows what else, so probably good to do it on a throwaway account), then {{ic|colormgr get-devices}} and look for the "Device ID" line of your monitor. If this is e.g. "xrandr-Lenovo Group Limited", you start calibration with the command {{ic|gcm-calibrate --device "xrandr-Lenovo Group Limited"}}.<br />
{{Note|1=The reason you need gnome-settings-daemon running is because XFCE does not yet have a session component for colord: https://bugzilla.xfce.org/show_bug.cgi?id=8559}}<br />
<br />
See [[ICC Profiles]] for more information.<br />
<br />
=== Multiple Monitors ===<br />
If you have configured X.org so that your display spans multiple monitors, usually when you login to an '''XFCE''' session, it will appear as if your monitors are simple clones of one another. You can use an '''xrandr''' tool to tweak your setup but if this is not called at an appropriate time in the startup sequence, some functionality may be lost with parts of your display being inaccessible to the mouse pointer.<br />
<br />
A better way is to configure XFCE to match your desired display arrangement. However, at present (xfce-settings 4.10), there is no tool available to assist with configuring multiple monitors directly. <br />
<br />
* The ''Settings -> Display'' tool does allow configuration of screen resolution, rotation and enabling individual monitors; '''warning''': ''using this tool to adjust display settings will reset or lose settings made manually for properties not explicitly offered as buttons in the tool (see below)''.<br />
* The ''Settings -> Settings Editor'' allows manipulation of all configuration items in particular the ''displays'' settings which are saved in the file '''displays.xml''' below<br />
~/.config/xfce4/xfconf/xfce-perchannel-xml<br />
* Alternatively, the ''displays.xml'' can be edited using your favourite editor.<br />
<br />
The main requirement for multiple monitors is their arrangement relative to one another. This can be controlled by setting the '''Position''' properties ('''X''' and '''Y''') to suit; an ''(x,y)'' position of ''0,0'' corresponds to the ''top, left'' position of the monitor array. This is the default position for all monitors and if several monitors are enabled they will appear as a cloned display area extending from this point. <br />
<br />
To extend the display area correctly across both monitors:<br />
<br />
* for side-by-side monitors, set the '''X''' property of the rightmost monitor to equal the width of the left-most monitor<br />
* for above-and-below monitors, set the '''Y''' property of the bottom monitor to equal the height of the upper monitor<br />
* for other arrangements, set the '''X''' and '''Y''' properties of each monitor to correspond to your layout<br />
<br />
Measurements are in ''pixels''. As an example, a pair of monitors with nominal dimensions of ''1920x1080'' which are rotated by 90 and placed side-by-side can be configured with a ''displays.xml'' like this:<br />
<br />
<channel name="displays" version="1.0"><br />
<property name="Default" type="empty"><br />
<property name="VGA-1" type="string" value="Idek Iiyama 23&quot;"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="0"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
<property name="DVI-0" type="string" value="Digital display"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="1080"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
<br />
Usually, editing settings in this way requires a logout/login to action them.<br />
<br />
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.<br />
<br />
=== XDG User Directories ===<br />
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See [[Xdg user directories]] for detailed info.<br />
<br />
=== SSH Agents ===<br />
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false<br />
<br />
To force using ssh-agent even if gpg-agent is installed, run the following instead:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent<br />
<br />
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session Manager'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.<br />
<br />
Source: http://docs.xfce.org/xfce/xfce4-session/advanced<br />
<br />
== Troubleshooting ==<br />
=== xfce4-power-manager ===<br />
If you are still using initscripts, check you have added dbus to the {{ic|DAEMONS}} array in {{ic|/etc/[[rc.conf]]}}.<br />
<br />
If you are using Systemd, try to configure power-related [[Wikipedia:Advanced_Configuration_and_Power_Interface|ACPI]] events via options from {{ic|/etc/systemd/logind.conf}} to give control to xfce4-power-manager according [[Systemd]].<br />
<br />
{{hc|/etc/systemd/logind.conf|<nowiki><br />
HandlePowerKey=ignore</nowiki>}}<br />
<br />
=== Xfce4-xkb-plugin ===<br />
There is a bug in version ''0.5.4.1-1'' which causes xkb-plugin to ''lose keyboard, layout switching and compose key'' settings. As a workaround you may enable ''Use system defaults'' option in keyboard settings. To do so run<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Thunar not displaying Thumbnail Images ===<br />
Thunar relies on '''Tumbler''' to generate thumbnails. You can install Tumbler by issuing<br />
<br />
pacman -S tumbler<br />
<br />
More details in [[Thunar#Thunar_thumbnails|Thunar's page]].<br />
<br />
=== Locales ignored with GDM ===<br />
Become superuser and add your locale to /var/lib/AccountsService/users/$USER:<br />
su -c "nano /var/lib/AccountsService/users/$USER"<br />
Replace hu_HU.UTF-8 with your own locale:<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
su -c "sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER"<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect. If upon logging in you get an error window with the heading "Unable to load a failsafe session," see the [[Xfce#Session_failure|Session Failure]] section on this page.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager does not load correctly, you maybe got a session error. Typical symptoms of this can include:<br />
<br />
* the mouse is an X and/or does not appear at all<br />
* window decorations have disappeared and windows cannot be closed<br />
* "Window Manager" settings tool ({{ic|xfwm4-settings}}) will not start, reporting <br />
These settings cannot work with your current window manager (unknown)<br />
* errors being reported by {{ic|slim}} or your login manager like<br />
No window manager registered on screen 0<br />
<br />
Restarting xfce or rebooting your system may resolve the problem but more likely the problem is a corrupt session. Delete the session folder below the {{ic|.cache}} folder:<br />
$ rm -r ~/.cache/sessions/<br />
<br />
=== Clock/notification area Fix ===<br />
<br />
Since Xfce 4.10, Clock/notification area no longer pushed to the right edge of the panel. This is due to a change in the Window Buttons panel plugin which no longer expands to fill the available space.<br />
<br />
To emulate the old behavior, add a transparent separator between the window buttons and the clock/notification area, setting its expand property.<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
If you have set your preferred applications with ''exo-preferred-applications'', but they do not seem to be taken into consideration, see [[Xfce#xdg-open_integration_.28Preferred_Applications.29]]<br />
<br />
=== Action Buttons/Missing Icons ===<br />
This happens if icons for some actions (Suspend, Hibernate) are missing from the icon theme, or at least do not have the expected names. First, find out the currently used icon theme in the Settings Manager (→Appearance→Icons). Match this with a subdirectory of {{ic|/usr/share/icons}}. For example, if the icon theme is GNOME, make a note of the directory name {{ic|/usr/share/icons/gnome}}.<br />
<br />
icontheme=/usr/share/icons/gnome<br />
<br />
Make sure that the {{Pkg|xfce4-power-manager}} is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the {{ic|hicolor}} icon theme.<br />
<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Enable cedilla ç/Ç instead of ć/Ć ===<br />
<br />
When you select the keyboard layout "U.S., alternative international" in Settings --> Keyboard --> Layout to enable accents, the typical combination for the cedilla ' + c results in ć instead of ç.To change this suffice edit files gtk.immodules for gtk-2.0 and immodules.cache for gtk-3.0 in line that contains "cedilla" adding both "en" in the list "az:ca:co:fr:gv:oc:pt:sq:tr:wa" but in alphabetical order, staying that way in /etc/gtk-2.0/gtk.immodules<br />
<br />
"/usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
and this in /usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
<br />
"/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
Then, do<br />
# echo "export GTK_IM_MODULE=cedilla" >> /etc/environment<br />
<br />
Done. Simply just close and reopen the gtk programs like gedit.<br />
<br />
{{Note|This does not work without the file ''locale.conf''. If you have configured it with only locale-gen, do this:<br />
# echo 'LANG<nowiki>=</nowiki>"en_US.UTF-8"' > /etc/locale.conf<br />
}}<br />
<br />
=== Non ASCII characters when mounting USB sticks ===<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved by changing the default iocharset to UTF-8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
flush=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files, so be careful.<br />
<br />
It is possible to mount vfat devices with ''flush'' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until finished. Adding ''async'' instead will speed up write ops, but make sure to use ''Eject'' option in Thunar to unmount the stick. Globally, mount options for storage devices present at boot can be set in [[fstab]], and for other devices in [[udev]] rules.<br />
<br />
==See also==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Steam&diff=251925Steam2013-03-25T17:15:39Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:Steam]]<br />
[[zh-CN:Steam]]<br />
{{Article summary start}}<br />
{{Article summary text|[http://store.steampowered.com/about/ Steam] is a content delivery system made by Valve Software. It is best known as the platform needed to play Source Engine games (e.g. Half-Life 2, Counter-Strike). Today it offers many games from many other developers.}}<br />
<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Wine}}<br />
{{Article summary end}}<br />
<br />
See the [[Wikipedia:Steam (software)|Steam Wikipedia page]] and the page in the [http://appdb.winehq.org/objectManager.php?sClass=version&iId=19444 Wine Application Database] for more info.<br />
<br />
== Native Steam on Linux ==<br />
<br />
{{Note|Arch Linux is not [https://support.steampowered.com/kb_article.php?ref&#61;1504-QHXN-8366 officially supported].}}<br />
<br />
{{Note|If you have a pure 64-bit installation, you will need to enable the [[multilib]] repository in pacman. This is because the Steam client is a 32-bit application. It may also make sense to install multilib-devel to provide some important multilib libraries. You also most likely need to install the 32-bit version of your graphics driver to run Steam.}}<br />
<br />
Install {{Pkg|steam}} from the [[multilib]] repository.<br />
<br />
Steam makes heavy usage of the Arial font. A decent Arial font to use is {{Pkg|ttf-liberation}} or the official Microsoft Arial fonts: {{aur|ttf-microsoft-arial}} or {{aur|ttf-ms-fonts}} packages from the [[AUR]]. Asian languages require {{Pkg|wqy-zenhei}} to display properly.<br />
<br />
Steam is '''not supported''' on this distribution. As such some fixes are needed on the users part to get things functioning properly. Several games have dependencies which may be missing from your system. If a game fails to launch (often without error messages) then make sure all of the libraries listed below that game are installed. Please install {{Pkg|libtxc_dxtn}} and {{Pkg|lib32-libtxc_dxtn}} as almost all games require it.<br />
<br />
===General troubleshooting===<br />
{{Note|In addition to being documented here, any bug/fix/error should be, if not already, reported on Valve's bug tracker on their [https://github.com/ValveSoftware/steam-for-linux GitHub page].}}<br />
<br />
{{Note|Connection problems may occur when using DD-WRT with peer-to-peer traffic filtering.}}<br />
<br />
====GUI problems with KDE====<br />
: Valve GitHub [https://github.com/ValveSoftware/steam-for-linux/issues/594 issue 594]<br />
<br />
If you are using KDE and you have problems with the GUI (such as lag or random crashes) modify the compositing type to OpenGL/Raster. In KDE system settings, go to "Desktop Effects" in the "Workspace Appearance and Behaviour" section. Open the "Advanced" tab. Change "Compositing type" from XRender to OpenGL.<br />
<br />
====The close button only minimizes the window====<br />
: Valve GitHub [https://github.com/ValveSoftware/steam-for-linux/issues/1025 issue 1025]<br />
<br />
If you have your tray icon working you have the option of making the close button close to tray instead of minimize. To do this, set the environment variable {{ic|STEAM_FRAME_FORCE_CLOSE}} to {{ic|1}}. You can do this by launching Steam using the following command.<br />
$ STEAM_FRAME_FORCE_CLOSE=1 steam<br />
<br />
====Flash not working on 64-bit systems====<br />
: Steam Support [https://support.steampowered.com/kb_article.php?ref=1493-GHZB-7612 article]<br />
<br />
First ensure {{pkg|lib32-flashplugin}} is installed. It should be working at this point, if not create a local Steam flash plugin folder<br />
mkdir ~/.steam/bin32/plugins/<br />
and set a symbolic link to the global lib32 flash plugin file in your upper new folder<br />
ln -s /usr/lib32/mozilla/plugins/libflashplayer.so ~/.steam/bin32/plugins/<br />
<br />
====Text is corrupt or missing====<br />
The Steam Support [https://support.steampowered.com/kb_article.php?ref=1974-YFKL-4947 instructions] for Windows seem to work on Linux also: Simply download [https://support.steampowered.com/downloads/1974-YFKL-4947/SteamFonts.zip SteamFonts.zip] and install them (copying to ~/.fonts/ works at least).<br />
<br />
====Error on some games: S3TC support is missing====<br />
Install the following dependencies:<br />
* {{pkg|libtxc_dxtn}}<br />
* {{pkg|lib32-libtxc_dxtn}}<br />
<br />
====Black screen on (Valve?) games (but audio works)====<br />
Check the Steam stdout/stderr for Error lines, some quick dependencies for reference:<br />
* {{pkg|lib32-intel-dri}} (not confirmed as absolutely necessary)<br />
<br />
run steam from console via primusrun steam<br />
<br />
====SetLocale('en_US.UTF-8') fails at game startup====<br />
Edit /etc/locale.gen in your favourite editor and uncomment the line {{ic|en_US.UTF-8 UTF-8}}. Then run {{ic|locale-gen}} as root.<br />
<br />
=== Game-specific depencencies and troubleshooting ===<br />
{{Note|Steam installs library dependencies of a game to a library directory, but some are missing at the moment. Report bugs involving missing libraries on Valve's bug tracker on their [https://github.com/ValveSoftware/steam-for-linux GIT page] before adding workarounds here, and then provide a link to the bug so it can be removed as the problems are fixed. Libraries like {{pkg|glu}} and {{pkg|libtxc_dxtn}} are exceptions to this, as they are just part of the implementation of the open drivers.}}<br />
<br />
====Amnesia: The Dark Descent====<br />
=====Dependencies=====<br />
* {{pkg|lib32-freealut}}<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-libxmu}}<br />
* {{pkg|lib32-sdl_ttf}}<br />
<br />
=====Troubleshooting=====<br />
======Segfault======<br />
If you are using open source drivers you will need {{pkg|lib32-libtxc_dxtn}} . See [http://www.frictionalgames.com/forum/thread-10924.html official forum] for details<br />
<br />
====And Yet It Moves====<br />
=====Dependencies=====<br />
* {{aur|lib32-libtheora}}<br />
* {{aur|lib32-libjpeg6}}<br />
* {{aur|lib32-libtiff4}}<br />
* {{pkg|lib32-libpng12}}<br />
<br />
=====Compatibility=====<br />
Game refuses to launch and one of the following messages can be observed on console<br />
readlink: extra operand ‘Yet’<br />
Try 'readlink --help' for more information.<br />
OR<br />
This script must be run as a user with write priviledges to game directory<br />
To fix this, open {{ic|~/.steam/root/SteamApps/common/And Yet It Moves/AndYetItMovesSteam.sh}} in text editor and replace line<br />
ayim_dir="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"<br />
with<br />
ayim_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"<br />
<br />
====Bastion====<br />
=====Dependencies=====<br />
* {{pkg|lib32-libtxc_dxtn}}<br />
<br />
====Counter-Strike: Source====<br />
=====Troubleshooting=====<br />
======Game crashes upon joining======<br />
If the game is constantly crashing when trying to join a game and in {{ic|~/.steam/root/SteamApps/your@account/Counter Strike Source/hl2.sh}} you have {{ic|1=__GL_THREADED_OPTIMIZATIONS=1}}, try changing it to {{ic|0}}.<br />
<br />
====Crusader Kings II====<br />
Game is installed into {{ic|$HOME/Steam/SteamApps/common/Crusader Kings II}}.<br />
<br />
Game can be started directly, without need of running Steam on background, using command {{ic|$HOME/Steam/SteamApps/common/Crusader Kings II/ck2}}.<br />
<br />
Saves are stored in {{ic|$HOME/Documents/Paradox Interactive/Crusader Kings II/save games/}}.<br />
<br />
=====Troubleshooting=====<br />
======No audio======<br />
<br />
The default audio driver used by Crusader Kings 2 is for [[PulseAudio]], so an override is necessary:<br />
<br />
{{hc|~/.pam_environment|2=SDL_AUDIODRIVER=alsa}}<br />
<br />
====Defender's Quest: Valley of the Forgotten====<br />
=====Dependencies=====<br />
* {{aur|adobe-air-sdk}}<br />
* {{pkg|xterm}}<br />
<br />
=====Troubleshooting=====<br />
======Game does not start======<br />
* Package {{pkg|adobe-air-sdk}} installs Adobe Air not in the place where the game expects it to be, fix this by creating a simlink (requires root permissions):<br />
{{bc|ln -s /opt/adobe-air-sdk/runtimes/air/linux/Adobe\ AIR /opt/Adobe\ AIR}}<br />
<br />
* Adobe AIR will want to check whether the EULA was accepeted and fail in doing so. To fix it, issue the following commands (from under your user, not under root):<br />
{{bc|mkdir -p ~/.appdata/Adobe/AIR<br />
echo 2 > ~/.appdata/Adobe/AIR/eulaAccepted}}<br />
Note that by issuing these commands you're accepting Adobe Air's EULA.<br />
<br />
====Dwarfs F2P====<br />
=====Dependencies=====<br />
* {{pkg|lib32-libgdiplus}}<br />
<br />
=====Troubleshooting=====<br />
======Game does not start======<br />
There was a bug that stopped Steam from fetching all the needed files. It should be resolved, if you still bump into this problem, try verifying integrity of game cache from game properties, local files tab.<br />
<br />
====FTL: Faster than Light====<br />
=====Dependencies=====<br />
Libraries are downloaded and and placed in the game's data directory for both architectures. As long as you run FTL by the launcher script (or via the shortcut in Steam) you should not need to download any further libraries.<br />
<br />
=====Compatibility=====<br />
After installation, FTL may fail to run due to a 'Text file busy' error (characterised in Steam by your portrait border going green then blue again). The easiest way to mend this is to just reboot your system. Upon logging back in FTL should run.<br />
<br />
The Steam overlay in FTL does not function as it is not a 3D accelerated game. Because of this the desktop notifications will be visible. If playing in fullscreen, therefore, these notifications in some systems may steal focus and revert you back to windowed mode with no way of going back to fullscreen without relaunching. The binaries for FTL on Steam have no DRM and it is possible to run the game ''without'' Steam running, so in some cases that may be optimum - just ensure that you launch FTL via the launcher script in {{ic|~/.steam/root/SteamApps/common/FTL Faster than Light/data/}} rather than the FTL binary in the $arch directory.<br />
<br />
=====Problems with open-source video driver=====<br />
FTL may fail to run if you are using an opensource driver for your video card. There are two solutions: install a proprietary video driver or delete (rename if you are unsure) the library "libstdc++.so.6" inside {{ic|~/.steam/root/SteamApps/common/FTL\ Faster\ Than\ Light/data/amd64/lib}} This is if you are using a 64bit system, I suppose that in case you are using a 32bit system you have to remove (rename) the same library located into {{ic|~/.steam/root/SteamApps/common/FTL\ Faster\ Than\ Light/data/x86/lib}}.<br />
<br />
====Harvest: Massive Encounter====<br />
=====Dependencies=====<br />
* {{pkg|lib32-gtk2}}<br />
* {{pkg|lib32-libvorbis}}<br />
* {{pkg|lib32-openal}}<br />
* {{aur|lib32-nvidia-cg-toolkit}}<br />
* {{aur|lib32-libjpeg6}}<br />
<br />
=====Compatibility=====<br />
Game refuses to launch and throws you to library installer loop. Just edit {{ic| ~/.steam/root/SteamApps/common/Harvest Massive Encounter/run_harvest}} and remove everything but<br />
#!/bin/bash<br />
exec ./Harvest<br />
<br />
====Killing Floor====<br />
=====Troubleshooting=====<br />
======Screen resolution======<br />
Killing Floor runs pretty much from scratch, although you might have to change in-game resolution screen as the default one is '''800x600''' and a '''4:3''' screen format.<br />
If you try to modify screen resolution in-game, it might crash your desktop enviroment.<br />
To fix this, please set the desired resolution screen size by modifing your {{ic|~/.killingfloor/System/KillingFloor.ini}} with your prefered editor.<br />
{{hc|# nano ~/.killingfloor/System/KillingFloor.ini|<nowiki><br />
...<br />
<br />
[WinDrv.WindowsClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=???<br />
MenuViewportY=???<br />
<br />
...<br />
<br />
[SDLDrv.SDLClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=????<br />
MenuViewportY=????<br />
<br />
...<br />
</nowiki>}}<br />
{{Note|Replace all the '''????''' with the corresponding numbers according the desired resolution. If you have an 1366x768 screen and want to use it at it's fullest, change all the Viewport fields to something like '''ViewportX&#61;1366''' and '''ViewportY&#61;768''' in the corresponding areas.}}<br />
{{Note| The dots in the middle indicate that there are more fields in that .ini file. But for screen resolution troubleshooting, you do not need to modify anything else.}}<br />
<br />
Save the file and restart the game, it should work now.<br />
<br />
======Windowed Mode======<br />
Uncheck fullscreen in the options menu, and use {{Keypress|Ctrl+g}} to stop mouse capturing (that was non-obvious to discover..). This way you can easily minimize it and do other other things..and let your WM handle things.<br />
<br />
====Multiwinia====<br />
=====Dependencies=====<br />
* {{pkg|lib32-openal}}<br />
<br />
Game will not launch without {{pkg|lib32-openal}}.<br />
<br />
====Penumbra: Overture====<br />
=====Dependencies=====<br />
(Taken from {{aur|penumbra-collection}} and {{aur|penumbra-overture-ep1-demo}})<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-libxft}}<br />
* {{pkg|lib32-libvorbis}}<br />
* {{pkg|lib32-openal}}<br />
* {{pkg|lib32-sdl_ttf}}<br />
* {{pkg|lib32-sdl_image}}<br />
<br />
=====Troubleshooting=====<br />
======Windowed Mode======<br />
There is no in-game option to change to the windowed mode, you will have to edit {{ic|~/.frictionalgames/Penumbra/Overture/settings.cfg}} to activate it.<br />
Find {{ic|FullScreen&#61;"true"}} and change it to {{ic|FullScreen&#61;"false"}}, after this the game should start in windowed mode.<br />
<br />
====Postal 2====<br />
Postal 2 runs without any additional dependencies.<br />
<br />
====Psychonauts====<br />
=====Dependencies=====<br />
* {{pkg|libtxc_dxtn}} and {{pkg|lib32-libtxc_dxtn}}<br />
<br />
====Revenge of the Titans====<br />
=====Dependencies=====<br />
* {{pkg|libxtst}} and {{pkg|lib32-libxtst}}<br />
<br />
====Serious Sam 3: BFE====<br />
=====Dependencies=====<br />
* {{pkg|lib32-libtxc_dxtn}}<br />
<br />
=====Troubleshooting=====<br />
======No audio======<br />
Try running:<br />
# pacman -S lib32-alsa-plugins<br />
# mkdir -p /usr/lib/i386-linux-gnu/alsa-lib/<br />
# ln -s /usr/lib32/alsa-lib/libasound_module_pcm_pulse.so /usr/lib/i386-linux-gnu/alsa-lib/<br />
<br />
If that does not work, try tweaking ~/.alsoftrc as proposed by the [http://steamcommunity.com/app/221410/discussions/3/846940248238406974/ Steam community] (Serious Sam 3: BFE uses OpenAL to output sound). If you are not using Pulse Audio, you may want to write the following configuration:<br />
<br />
{{hc|$ nano ~/.alsoftrc|<nowiki><br />
[general]<br />
drivers = alsa<br />
[alsa]<br />
device = default<br />
capture = default<br />
mmap = true<br />
</nowiki>}}<br />
<br />
====Spacechem====<br />
=====Dependencies=====<br />
* {{pkg|lib32-sqlite}}<br />
* {{pkg|lib32-sdl_image}}<br />
* {{aur|lib32-sdl_mixer}}<br />
<br />
=====Troubleshooting=====<br />
======Game crash======<br />
The shipped x86 version of Spacechem does not work on x64 with the game's own libSDL* files, and crashes with some strange output.<br />
<br />
To solve this just remove or move the three files {{ic|libSDL-1.2.so.0}}, {{ic|libSDL_image-1.2.so.0}}, {{ic|libSDL_mixer-1.2.so.0}} from {{ic|~/.steam/root/SteamApps/common/SpaceChem}}<br />
<br />
====Space Pirates and Zombies====<br />
=====Dependencies=====<br />
* {{pkg|lib32-openal}}<br />
=====Troubleshooting=====<br />
======No audio======<br />
Apply the fix documented in Serious Sam 3: BFE above.<br />
<br />
====Splice====<br />
Splice comes with both x86 and x64 binaries. Steam does not have to be running to launch this game.<br />
=====Dependencies=====<br />
* {{pkg|glu}}<br />
* {{pkg|mono}}<br />
<br />
====Steel Storm: Burning Retribution====<br />
=====Troubleshooting=====<br />
======Start with black screen======<br />
The game tries to launch in 1024x768 resolution with fullscreen mode by default. It is impossible on some devices.<br />
(for example laptop Samsung Series9 with intel hd4000 video).<br />
<br />
You can launch the game in windowed mode. To do this open game Properties in Steam, in General tab select "Set launch options..." and type "-window".<br />
<br />
Now you can change the resolution in game.<br />
<br />
======No English fonts======<br />
If you use intel video card, just disable S3TC in DriConf.<br />
<br />
====Superbrothers: Sword & Sworcery EP====<br />
=====Dependencies=====<br />
* {{pkg|lib32-glu}}<br />
<br />
====Team Fortress 2 ====<br />
=====Dependencies=====<br />
* {{pkg|lib32-libtxc_dxtn}}<br />
<br />
=====Troubleshooting=====<br />
======No audio======<br />
It happens if there is no PulseAudio in your system.<br />
If you want to use [[ALSA]], you need to launch Steam or the game directly with {{ic|1=SDL_AUDIODRIVER=alsa}} <br />
(From [http://steamcommunity.com/app/221410/discussions/0/882966056462819091/#c882966056470753683 SteamCommunity]).<br />
<br />
If it still does not work, you may also need to set the environment variable AUDIODEV. For instance {{ic|1=AUDIODEV=Live}}. Use {{ic|aplay -l}} to list the available sound cards.<br />
<br />
====The Book of Unwritten Tales====<br />
If the game does not start, go to Properties --> Uncheck "Enable Steam Community In-Game".<br />
<br />
The game may segfault upon clicking the Setting menu and possibly during or before gameplay. This is a known problem and you will unfortunately have to wait for a fix from the developer. A workaround (taken from the [http://steamcommunity.com/app/221410/discussions/3/846939071081758230/#p2 steam forums]) is to replace the game's RenderSystem_GL.so with one from debian's repositories. To do that download this [https://launchpad.net/ubuntu/+archive/primary/+files/libogre-1.7.4_1.7.4-3_i386.deb deb file], extract it and replace the following file:<br />
~/.local/share/Steam/SteamApps/common/The Book of Unwritten Tales/lib/32/RenderSystem_GL.so<br />
with the one that comes with the .deb package.<br />
=====Dependencies=====<br />
* {{aur|lib32-libxaw}}<br />
* {{aur|lib32-jasper}}<br />
<br />
====The Clockwork Man====<br />
=====Dependencies=====<br />
* {{pkg|lib32-libidn}}<br />
<br />
====Trine 2====<br />
=====Dependencies=====<br />
* {{pkg|lib32-glu}}<br />
* {{pkg|lib32-libxxf86vm}}<br />
* {{pkg|lib32-libdrm}}<br />
* {{pkg|lib32-openal}}<br />
* {{pkg|xorg-xwininfo}}<br />
<br />
=====Troubleshooting=====<br />
* If colors are wrong with FOSS drivers (r600g at least), try to run the game in windowed mode, rendering will be corrected. ([https://bugs.freedesktop.org/show_bug.cgi?id=60553 bugreport])<br />
* If sound plays choppy, try to edit {{ic|/etc/openal/alsoft.conf}} with values<br />
<br />
drivers=pulse,alsa<br />
frequency=48000<br />
<br />
* If the game resolution is wrong when using a dual monitor setup and you can't see the whole window edit {{ic|~/.frozenbyte/Trine2/options.txt}} and change the options ForceFullscreenWidth and ForceFullscreenHeight to the resolution of your monitor on which you want to play the game.<br />
<br />
====Unity of Command====<br />
=====Dependencies=====<br />
* {{pkg|lib32-pango}}<br />
<br />
=====Troubleshooting=====<br />
* If squares are shown instead of text, try removing {{ic|$HOME/Steam/SteamApps/common/Unity of Command/bin/libpangoft2-1.0.so.0}}.<br />
<br />
====World of Goo====<br />
=====Changing Resolution=====<br />
* To change the game resolution edit the section "Graphics display" in the configuration file {{ic|$HOME/Steam/SteamApps/common/World of Goo/properties/config.txt}}. For example, see below:<br />
<!-- Graphics display --><br />
<param name="screen_width" value="1680" /><br />
<param name="screen_height" value="1050" /><br />
<param name="color_depth" value="0" /><br />
<param name="fullscreen" value="true" /><br />
<param name="ui_inset" value="10" /><br />
<br />
===Skins for Steam===<br />
<br />
The Steam interface can be fully customized by copying its various interface files in its skins directory and modifying them.<br />
<br />
====Steam Skin Manager====<br />
<br />
The process of applying a skin to Steam can be greatly simplified using {{aur|steam-skin-manager}} from the AUR. The package also comes with a hacked version of the Steam launcher which allows the window manager to draw its borders on the Steam window.<br />
<br />
As a result, skins for Steam will come in two flavors, one with and one without window buttons. The skin manager will prompt you whether you use the hacked version or not, and will automatically apply the theme corresponding to your GTK theme if it is found. You can of course still apply another skin if you want.<br />
<br />
The package ships with two themes for the default Ubuntu themes, Ambiance and Radiance. A Faience theme is under development and already has its own package on the AUR {{aur|steam-skin-faience-git}}.<br />
<br />
== Steam on Wine ==<br />
<br />
Install {{Pkg|wine}} from the official repositories and follow the instructions provided in the [[Wine|article]].<br />
<br />
Install the required Microsoft fonts {{AUR|ttf-microsoft-tahoma}} and {{AUR|ttf-ms-fonts}} from the [[AUR]] or through {{AUR|winetricks-svn}}.<br />
{{Note|If you have access to Windows discs, you may want to install {{AUR|ttf-win7-fonts}} instead.}}<br />
<br />
If you have an old Wine prefix ({{ic|~/.wine}}), you should remove it and let Wine create a new one to avoid problems (you can transfer over anything you want to keep to the new Wine prefix).<br />
<br />
===Installation===<br />
<br />
Download and run the Steam installer from [http://store.steampowered.com/about/ steampowered.com]. It is no longer an {{ic|.exe}} file so you have to start it with {{ic|msiexec}}: <br />
$ msiexec /i SteamInstall.msi<br />
<br />
===Starting Steam===<br />
<br />
On x86:<br />
$ wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe<br />
<br />
On x86_64 (with steam installed to a clean wine prefix):<br />
$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
$ wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should consider making an alias to easily start steam (and put it in your shell's rc file), example:<br />
alias steam='wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'<br />
<br />
{{Note|If you are using an nvidia card through bumblebee, you should prefix those commands with {{ic|optirun}}.}}<br />
<br />
===Tips===<br />
<br />
====Performance====<br />
<br />
Consider disabling wine debugging output by adding this to your shell rc file:<br />
export WINEDEBUG=-all<br />
or, just add it to your steam alias to only disable it for steam:<br />
alias steam='WINEDEBUG=-all wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'<br />
Additionally, Source games rely on a paged pool memory size specification for audio, and WINE by default does not have this set. To set it:<br />
wine reg add "HKLM\\System\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\" /v PagedPoolSize /t REG_DWORD /d 402653184 /f<br />
<br />
==== Application Launch Options ====<br />
Go to "Properties" -> "Set Launch Options", e.g.:<br />
{{bc|-console -dxlevel 90 -width 1280 -height 1024<br />
}}<br />
* {{ic|console}}<br />
Activate the console in the application to change detailed applications settings.<br />
* {{ic|dxlevel}}<br />
Set the application's DirectX level, e.g. 90 for DirectX Version 9.0. It is recommended to use the video card's DirectX version to prevent crashes. See the official Valve Software Wiki http://developer.valvesoftware.com/wiki/DirectX_Versions for details.<br />
* {{ic|width}} and {{ic|height}}<br />
Set the screen resolution. In some cases the graphic settings are not saved in the application and the applications always starts in the default resolution.<br />
Please refer to http://developer.valvesoftware.com/wiki/Launch_options for a complete list of launch options.<br />
<br />
==== Using a Pre-Existing Steam Install ====<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to {{ic|~/.wine/drive_c/Program Files/Steam/}} . However, be sure to do '''all''' the previous steps in this wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
{{Note|If you have trouble starting Steam after symlinking the entire Steam folder, try linking only the {{ic|steamapps}} subdirectory in your existing wine steam folder instead.}}<br />
<br />
{{Note|If you still have trouble starting games, use {{ic|sudo mount --bind /path/to/SteamApps ~/.local/share/Steam/SteamApps -ouser&#61;your-user-name }}, this is the only thing that worked for me with {{ic|TF2}}}}<br />
<br />
====Running Steam in a second X Server====<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called {{ic|x.steam.sh}}. You should run this when you want to start Steam in a new X server, and {{ic|steam.sh}} if you want Steam to start in the current X server. <br />
<br />
If due to misconfiguration a black screen is shown, you could always close down the second X server by pressing {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|Backspace}}.<br />
<br />
{{bc|1=<br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
}}<br />
<br />
Now you can use {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|F7}} to get to your first X server with your normal desktop, and {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|F8}} to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or {{Keypress|Alt}}-{{Keypress|Tab}} out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|Backspace}} on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X''': You will need to adjust your X permissions.<br />
<br />
'''If you lose the ability to use the keyboard while using Steam''': This is an odd bug that does not happen with other games. A solution is to use a WM in the second X as well. Thankfully, you do not need to run a large WM. Openbox and icewm have been confirmed to fix this bug (evilwm, pekwm, lwm ''do not'' work), but the icewm taskbar shows up on the bottom of the game, thus it's recommended to use [[Openbox]]. Install {{Pkg|openbox}} from the [[official repositories]], then add {{Ic|openbox &}} to the top of your {{ic|steam.sh}} file. Note you can run other programs (ex. Teamspeak &) or set X settings (ex. xset, xmodmap) before the WINE call as well.<br />
<br />
====Steam Links in Firefox, Chrome, Etc====<br />
To make steam:// urls in your browser connect with steam in wine, there are several things you can do. One involves making steam url-handler keys in gconf, another involves making protocol files for kde, others involve tinkering with desktop files or the Local State file for chromium. These seem to only work in firefox or under certain desktop configurations. One way to do it that works more globally is using mimeo, a tool made by Xyne (an Arch TU) which follows. For another working and less invasive (but firefox-only) way, see the first post [http://ubuntuforums.org/showthread.php?t=433548 here] .<br />
<br />
* Make {{ic| /usr/bin/steam}} with your favorite editor and paste:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
#<br />
# Steam wrapper script<br />
#<br />
exec wine "c:\\program files\\steam\\steam.exe" "$@"<br />
}}<br />
<br />
* Make it executable.<br />
<br />
# chmod +x /usr/bin/steam<br />
<br />
* Install {{AUR|mimeo}} and {{AUR|xdg-utils-mimeo}} from AUR. You will need to replace the existing {{pkg|xdg-utils}} if installed. In XFCE, you will also need {{pkg|xorg-utils}}.<br />
<br />
* Create {{ic|~/.config/mimeo.conf}} with your favorite editor and paste:<br />
<br />
{{bc|<br />
/usr/bin/steam %u<br />
^steam://<br />
}}<br />
<br />
* Lastly, open {{ic|/usr/bin/xdg-open}} in your favorite editor. Go to the {{ic|detectDE()}} section and change it to look as follows:<br />
<br />
{{bc|<nowiki><br />
detectDE()<br />
{<br />
#if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;<br />
#elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;<br />
#elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;<br />
#elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;<br />
#elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;<br />
#else DE=""<br />
#fi<br />
DE=""<br />
}<br />
</nowiki>}}<br />
<br />
* Restart the browser and you should be good to go. In chromium, you cannot enter a {{ic|steam://}} link in the url box like you can with firefox. The forum link above has a {{ic|steam://open/friends}} link to try if needed.<br />
<br />
{{Note|If you have any problems with file associations after doing this, simply revert to regular xdg-utils and undo your changes to {{ic|/usr/bin/xdg-open}}.}}<br />
{{Note|Those on other distributions that stumble upon this page, see the link above for firefox specific instructions. No easy way to get it working on Chromium on other distros exists.}}<br />
<br />
====No text rendered problem====<br />
If there is no text/font rendered when starting steam you should try to start steam with the parameter {{ic|-no-dwrite}}. Read more in [https://bbs.archlinux.org/viewtopic.php?id=146223 the forum thread about it.]<br />
{{bc|wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite}}<br />
<br />
== See Also ==<br />
* https://wiki.gentoo.org/wiki/Steam</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=251924Advanced Linux Sound Architecture2013-03-25T17:12:13Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Sound]]<br />
[[Category:Audio/Video]]<br />
[[cs:Advanced Linux Sound Architecture]]<br />
[[de:Alsa]]<br />
[[es:Advanced Linux Sound Architecture]]<br />
[[fa:ALSA]]<br />
[[fr:Alsa]]<br />
[[he:Advanced Linux Sound Architecture]]<br />
[[it:Advanced Linux Sound Architecture]]<br />
[[ja:Advanced Linux Sound Architecture]]<br />
[[nl:Advanced Linux Sound Architecture]]<br />
[[pt:Advanced Linux Sound Architecture]]<br />
[[ru:Advanced Linux Sound Architecture]]<br />
[[sk:Advanced Linux Sound Architecture]]<br />
[[th:Advanced Linux Sound Architecture]]<br />
[[tr:Gelişmiş_ses_mimarisi_(ALSA)]]<br />
[[zh-CN:Advanced Linux Sound Architecture]]<br />
The [[Wikipedia:Advanced Linux Sound Architecture|Advanced Linux Sound Architecture]] ('''ALSA''') is a Linux kernel component which replaced the original Open Sound System (OSSv3) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.<br />
<br />
{{Note|For an alternative sound environment, see the [[Open Sound System]] page.}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Using, configuring and troubleshooting ALSA.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Sound system}}<br />
{{Article summary wiki|Disable PC Speaker Beep}}<br />
{{Article summary end}}<br />
<br />
==Installation==<br />
ALSA is included in the default Arch kernel as a set of modules, so installing it is not necessary.<br />
<br />
[[udev]] will automatically probe your hardware at boot, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but upstream sources mute all channels by default.<br />
<br />
Users with a local login (at a virtual terminal or a display manager) have permission to play audio and change mixer levels. To allow this for a remote login, the user has to be [[Users and Groups#Group management|added]] to the {{ic|audio}} group. Membership in the {{ic|audio}} group also allows direct access to devices, which can lead to applications grabbing exclusive output (breaking software mixing) and breaks fast-user-switching, and multiseat. Therefore, adding a user to the {{ic|audio}} group is '''not''' recommended, unless you specifically need to[https://wiki.ubuntu.com/Audio/TheAudioGroup].<br />
<br />
===User-space utilities===<br />
From [[Official Repositories|official repositories]]:<br />
* [[pacman|Install]] the {{Pkg|alsa-utils}} package which contains the {{ic|alsamixer}} user-space tool, which allows for configuration of the sound device from the console or terminal.<br />
* Install the {{Pkg|alsa-oss}} package if you want OSS applications to work with dmix (software mixing).<br />
{{Note|1=Since [[udev]] >= 171, the OSS emulation modules ({{ic|snd_seq_oss}}, {{ic|snd_pcm_oss}}, {{ic|snd_mixer_oss}}) are not automatically loaded by default.}}<br />
*Install the {{Pkg|alsa-plugins}} package if you want [[#High quality resampling|high quality resampling]], [[#Upmixing/Downmixing|upmixing/downmixing]] and other advanced features.<br />
<br />
==Unmuting the channels==<br />
The current version of ALSA installs with all channels '''muted by default'''. You will need to unmute the channels manually.<br />
<br />
It is easiest to use {{ic|alsamixer}} ncurses UI to accomplish this:<br />
<br />
$ alsamixer<br />
<br />
Alternatively, use {{ic|amixer}} from the command-line:<br />
<br />
$ amixer sset Master unmute<br />
<br />
The label {{ic|MM}} below a channel indicates that the channel is muted, and {{ic|00}} indicates that it is open.<br />
<br />
Scroll to the {{ic|Master}} and {{ic|PCM}} channels with the {{keypress|←}} and {{keypress|→}} keys and unmute them by pressing the {{keypress|m}} key. Use the {{keypress|↑}} key to increase the volume and obtain a value of {{ic|0}} dB gain. The gain can be found in the upper left next to the {{ic|Item:}} field. Higher values of gain will produce distorted sound.<br />
<br />
To get full 5.1 or 7.1 surround sound you likely need to unmute other channels such as Front, Surround, Center, LFE (subwoofer) and Side (these are the names of the channels with Intel HD Audio, they may vary with different hardware). Please take note that this will not automatically upmix stereo sources (like most music). In order to accomplish that, see [[#Upmixing/Downmixing]].<br />
<br />
Leave alsamixer by pressing {{Keypress|Esc}}.<br />
<br />
{{Note|<br />
* Some cards need to have digital output muted/turned off in order to hear analog sound. For the Soundblaster Audigy LS mute the IEC958 channel.<br />
* Some machines, (like the Thinkpad T61), have a Speaker channel which must be unmuted and adjusted as well.<br />
* Some machines, (like Dell E6400) may also require the {{ic|Front}} and {{ic|Headphone}} channels to be unmuted and adjusted.}}<br />
<br />
Next, test to see if sound works:<br />
<br />
$ speaker-test -c 2<br />
<br />
Change -c to fit your speaker setup. Use -c 8 for 7.1, for instance:<br />
<br />
$ speaker-test -c 8<br />
<br />
If it does not work, proceed to [[#Configuration]] and then [[#Troubleshooting]] to solve your problems.<br />
<br />
The {{pkg|alsa-utils}} package includes {{ic|alsa-restore.service}} and {{ic|alsa-store.service}}, which are preconfigured to run at boot and shutdown respectively.<br />
<br />
==Configuration==<br />
===No sound in virtualbox===<br />
If you experience problems with virtualbox, the following command might be helpful:<br />
<br />
{{hc|$ alsactl init|2=<nowiki><br />
<br />
Found hardware: "ICH" "SigmaTel STAC9700,83,84" "AC97a:83847600" "0x8086" "0x0000"<br />
Hardware is initialized using a generic method<br />
</nowiki><br />
}}<br />
<br />
You might need to activate the ALSA output in your audio software as well.<br />
<br />
===Set the default sound card===<br />
<br />
If your sound card order changes on boot, you can specify their order in any file ending with {{ic|.conf}} in {{ic|/etc/modprobe.d}} ({{ic|/etc/modprobe.d/alsa-base.conf}} is suggested).<br />
For example, if you want your mia sound card to be #0:<br />
<br />
{{hc|/etc/modprobe.d/alsa-base.conf|2=<nowiki><br />
options snd slots=snd_mia,snd_hda_intel<br />
options snd_mia index=0<br />
options snd_hda_intel index=1<br />
</nowiki>}}<br />
<br />
snd_mia and snd_hda_intel are the modules used by the respective cards. This configuration assumes you have one mia sound card and one card using snd_hda_intel (e.g. onboard).<br />
<br />
You can also provide an index of -2 to instruct ALSA to never use a card as the primary one. Distributions such as Linux Mint and Ubuntu use the following settings to avoid USB and other "abnormal" drivers from getting index 0:<br />
<br />
{{hc|/etc/modprobe.d/alsa-base.conf|2=<nowiki><br />
options bt87x index=-2<br />
options cx88_alsa index=-2<br />
options saa7134-alsa index=-2<br />
options snd-atiixp-modem index=-2<br />
options snd-intel8x0m index=-2<br />
options snd-via82xx-modem index=-2<br />
options snd-usb-audio index=-2<br />
options snd-usb-caiaq index=-2<br />
options snd-usb-ua101 index=-2<br />
options snd-usb-us122l index=-2<br />
options snd-usb-usx2y index=-2<br />
# Keep snd-pcsp from being loaded as first soundcard<br />
options snd-pcsp index=-2<br />
# Keep snd-usb-audio from beeing loaded as first soundcard<br />
options snd-usb-audio index=-2<br />
</nowiki>}}<br />
<br />
These changes require a system reboot.<br />
<br />
{{Out of date|{{ic|/etc/asound.conf}} does not exist on a default setup, and these instructions may not work.}}<br />
<br />
First you will have to find out the card and device id that you want to set as the default by running {{ic|aplay -l}}:<br />
<br />
{{hc|$ aplay -l|2=<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: JamLab [JamLab], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 2: Audio [Altec Lansing XT1 - USB Audio], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
</nowiki>}}<br />
<br />
For example, the last entry in this list has the card ID 2 and the device ID 0. To set this card as the default, you can either use the system-wide file {{ic|/etc/asound.conf}} or the user-specific file {{ic|~/.asoundrc}}. You may have to create the file if it does not exist. Then insert the following options with the corresponding card and device id.<br />
{{hc|~/.asoundrc|2=<nowiki><br />
defaults.pcm.card 2<br />
defaults.pcm.device 0<br />
defaults.ctl.card 2<br />
</nowiki>}}<br />
The 'pcm' options affect which card and device will be used for audio playback while the 'ctl' option affects which card is used by control utilities like alsamixer .<br />
<br />
The changes should take effect as soon as you (re-)start an application (mplayer etc.).<br />
<br />
===Making sure the sound modules are loaded===<br />
You can assume that udev will autodetect your sound properly. You can check this with the command<br />
<br />
{{hc|<nowiki>$ lsmod | grep '^snd' | column -t</nowiki>|<nowiki><br />
snd_hda_codec_hdmi 22378 4<br />
snd_hda_codec_realtek 294191 1<br />
snd_hda_intel 21738 1<br />
snd_hda_codec 73739 3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel<br />
snd_hwdep 6134 1 snd_hda_codec<br />
snd_pcm 71032 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec<br />
snd_timer 18992 1 snd_pcm<br />
snd 55132 9 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer<br />
snd_page_alloc 7017 2 snd_hda_intel,snd_pcm<br />
</nowiki>}}<br />
<br />
If the output looks similar, your sound drivers have been successfully autodetected.<br />
{{Note|Since {{ic|udev>&#61;171}}, the OSS emulation modules ({{ic|snd_seq_oss, snd_pcm_oss, snd_mixer_oss}}) are not loaded by default: [[kernel modules#Loading|Load them manually]] if they are needed.}}<br />
<br />
You might also want to check the directory {{ic|/dev/snd/}} for the right device files:<br />
<br />
{{hc|$ ls -l /dev/snd|2=<nowiki><br />
total 0<br />
crw-rw---- 1 root audio 116, 0 Apr 8 14:17 controlC0<br />
crw-rw---- 1 root audio 116, 32 Apr 8 14:17 controlC1<br />
crw-rw---- 1 root audio 116, 24 Apr 8 14:17 pcmC0D0c<br />
crw-rw---- 1 root audio 116, 16 Apr 8 14:17 pcmC0D0p<br />
crw-rw---- 1 root audio 116, 25 Apr 8 14:17 pcmC0D1c<br />
crw-rw---- 1 root audio 116, 56 Apr 8 14:17 pcmC1D0c<br />
crw-rw---- 1 root audio 116, 48 Apr 8 14:17 pcmC1D0p<br />
crw-rw---- 1 root audio 116, 1 Apr 8 14:17 seq<br />
crw-rw---- 1 root audio 116, 33 Apr 8 14:17 timer<br />
</nowiki>}}<br />
<br />
{{Note|If requesting help on IRC or the forums, please post the output of the above commands.}}<br />
<br />
If you have at least the devices '''controlC0''' and '''pcmC0D0p''' or similar, then your sound modules have been detected and loaded properly.<br />
<br />
If this is not the case, your sound modules have not been detected properly. To solve this, you can try loading the modules manually:<br />
<br />
* Locate the module for your sound card: [http://www.alsa-project.org/main/index.php/Matrix:Main ALSA Soundcard Matrix] The module will be prefixed with 'snd-' (for example: {{ic|snd-via82xx}}).<br />
* [[Kernel modules#Loading|Load the module]].<br />
* Check for the device files in {{ic|/dev/snd}} (see above) and/or try if {{ic|alsamixer}} or {{ic|amixer}} have reasonable output.<br />
* Configure {{ic|snd-NAME-OF-MODULE}} and {{ic|snd-pcm-oss}} to [[Kernel modules#Loading|load at boot]].<br />
<br />
===Getting SPDIF Output===<br />
(from gralves from the Gentoo forums)<br />
* In GNOME Volume Control, under the Options tab, change the IEC958 to PCM. This option can be enabled in the preferences.<br />
* If you do not have GNOME Volume Control installed,<br />
** Edit {{ic|/var/lib/alsa/asound.state}}. This file is where alsasound stores your mixer settings.<br />
** Find a line that says: 'IEC958 Playback Switch'. Near it you will find a line saying {{ic|value:false}}. Change it to {{ic|value:true}}.<br />
** Now find this line: 'IEC958 Playback AC97-SPSA'. Change its value to 0.<br />
** Restart ALSA.<br />
<br />
Alternative way to enable SPDIF output automatically on login (tested on SoundBlaster Audigy):<br />
<br />
* add following lines to {{ic|/etc/rc.local}}:<br />
# Use COAX-digital output<br />
amixer set 'IEC958 Optical' 100 unmute<br />
amixer set 'Audigy Analog/Digital Output Jack' on<br />
<br />
You can see the name of your card's digital output with:<br />
$ amixer scontrols<br />
<br />
===System-Wide Equalizer===<br />
====Using AlsaEqual (provides UI)====<br />
Install {{AUR|alsaequal}} from the [[AUR]].<br />
<br />
{{Note | If you have a x86_64-system and are using a 32bit-flashplugin the sound in flash will not work. Either you have to disable alsaequal or build alsaequal for 32bit.}}<br />
<br />
After installing the package, insert the following into your ALSA configuration file ({{ic|~/.asoundrc}} or {{ic|/etc/asound.conf}}):<br />
<br />
ctl.equal {<br />
type equal;<br />
}<br />
<br />
pcm.plugequal {<br />
type equal;<br />
# Modify the line below if you do not<br />
# want to use sound card 0.<br />
#slave.pcm "plughw:0,0";<br />
#by default we want to play from more sources at time:<br />
slave.pcm "plug:dmix";<br />
}<br />
#pcm.equal {<br />
# If you do not want the equalizer to be your<br />
# default soundcard comment the following<br />
# line and uncomment the above line. (You can<br />
# choose it as the output device by addressing<br />
# it with specific apps,eg mpg123 -a equal 06.Back_In_Black.mp3)<br />
pcm.!default {<br />
type plug;<br />
slave.pcm plugequal;<br />
}<br />
<br />
And you are ready to change your equalizer using command<br />
$ alsamixer -D equal<br />
<br />
Note that configuration file is different for each user (until not specified else) it is saved in {{ic|~/.alsaequal.bin}}.<br />
so if you want to use AlsaEqual with [[mpd]] or another software running under different user, you can configure it using<br />
# su mpd -c 'alsamixer -D equal'<br />
or for example, you can make a symlink to your {{ic|.alsaequal.bin}} in his home...<br />
<br />
=====Managing AlsaEqual States=====<br />
Install [http://xyne.archlinux.ca/projects/alsaequal-mgr/ alsaequal-mgr] from [http://xyne.archlinux.ca/repos/ Xyne's repos] or the [https://aur.archlinux.org/packages.php?ID=62420 AUR].<br />
<br />
Configure the equalizer as usual with <br />
$alsamixer -D equal<br />
<br />
When you are satisfied with the state, you may give it a name ("foo" in this example) and save it:<br />
$alsaequal-mgr save foo<br />
<br />
The state "foo" can then be restored at a later time with<br />
$alsaequal-mgr load foo<br />
<br />
You can thus create different equalizer states for games, movies, music genres, VoIP apps, etc. and reload them as necessary.<br />
<br />
See the [http://xyne.archlinux.ca/projects/alsaequal-mgr/ project page] and the help message for more options.<br />
<br />
====Using mbeq====<br />
{{Note | This method requires the use of a ladspa plugin which might use quite a bit of CPU when sound plays. In addition, this was made with stereophonic sound (e.g. headphones) in mind.}}<br />
<br />
Install the {{Pkg|alsa-plugins}}, {{Pkg|ladspa}} and {{Pkg|swh-plugins}} packages if you do not already have them.<br />
<br />
* If you have not already created either an {{ic|~/.asoundrc}} or a {{ic|/etc/asound.conf}} file, then create either one and insert the following:<br />
<br />
{{hc|/etc/asound.conf|2=<nowiki>pcm.eq {<br />
type ladspa<br />
<br />
# The output from the EQ can either go direct to a hardware device<br />
# (if you have a hardware mixer, e.g. SBLive/Audigy) or it can go<br />
# to the software mixer shown here.<br />
#slave.pcm "plughw:0,0"<br />
slave.pcm "plug:dmix"<br />
<br />
# Sometimes you may need to specify the path to the plugins,<br />
# especially if you have just installed them. Once you have logged<br />
# out/restarted this should not be necessary, but if you get errors<br />
# about being unable to find plugins, try uncommenting this.<br />
#path "/usr/lib/ladspa"<br />
<br />
plugins [<br />
{<br />
label mbeq<br />
id 1197<br />
input {<br />
#this setting is here by example, edit to your own taste<br />
#bands: 50hz, 100hz, 156hz, 220hz, 311hz, 440hz, 622hz, 880hz, 1250hz, 1750hz, 25000hz,<br />
#50000hz, 10000hz, 20000hz<br />
controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]<br />
}<br />
}<br />
]<br />
}<br />
<br />
# Redirect the default device to go via the EQ - you may want to do<br />
# this last, once you are sure everything is working. Otherwise all<br />
# your audio programs will break/crash if something has gone wrong.<br />
<br />
pcm.!default {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
<br />
# Redirect the OSS emulation through the EQ too (when programs are running through "aoss")<br />
<br />
pcm.dsp0 {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
</nowiki>}}<br />
<br />
* You should be good to go (if not, ask in the forum).<br />
<br />
==High quality resampling==<br />
When software mixing is enabled, ALSA is forced to resample everything to the same frequency (48000 by default when supported). dmix uses a poor resampling algorithm which produces noticeable sound quality loss.<br />
<br />
Install {{pkg|alsa-plugins}} and {{pkg|libsamplerate}}.<br />
<br />
Change the default rate converter to libsamplerate:<br />
<br />
{{hc|/etc/asound.conf|defaults.pcm.rate_converter "samplerate_best"}}<br />
<br />
or<br />
<br />
{{hc|~/.asoundrc|defaults.pcm.rate_converter "samplerate_best"}}<br />
<br />
'''samplerate_best''' offers the best sound quality, but you need a decent CPU to be able to use it as it requires a lot of CPU cycles for real-time resampling. There are other algorithms available ('''samplerate''', etc.) but they may not provide much of an improvement over the default resampler.<br />
<br />
{{Warning|On some systems, enabling samplerate_best may cause a problem where you get no sound from flashplayer.}}<br />
<br />
==Upmixing/Downmixing==<br />
===Upmixing===<br />
In order for stereo sources like music to be able to saturate a 5.1 or 7.1 sound system, you need to use upmixing. In darker days this used to be tricky and error prone but nowadays plugins exist to easily take care of this task. Thus, install {{Pkg|alsa-plugins}}.<br />
<br />
Then add the following to your ALSA configuration file of choice (either {{ic|/etc/asound.conf}} or {{ic|~/.asoundrc}}):<br />
pcm.upmix71 {<br />
type upmix<br />
slave.pcm "surround71"<br />
delay 15<br />
channels 8<br />
}<br />
<br />
You can easily change this example for 7.1 upmixing to 5.1 or 4.0.<br />
<br />
This adds a new pcm that you can use for upmixing. If you want all sound sources to go through this pcm, add it as a default below the previous definition like so:<br />
<br />
pcm.!default "plug:upmix71"<br />
<br />
The plugin automatically allows multiple sources to play through it without problems so setting is as a default is actually a safe choice. <br />
If this is not working, you have to setup your own dmixer for the upmixing PCM like this: <br />
pcm.dmix6 {<br />
type asym<br />
playback.pcm {<br />
type dmix<br />
ipc_key 567829<br />
slave {<br />
pcm "hw:0,0"<br />
channels 6<br />
}<br />
}<br />
}<br />
<br />
and use "dmix6" instead of "surround71". <br />
If you experience skipping or distorted sound, consider increasing the buffer_size (to 32768, for example) or use a [[#High quality resampling|high quality resampler]].<br />
<br />
===Downmixing===<br />
If you want to downmix sources to stereo because you, for instance, want to watch a movie with 5.1 sound on a stereo system, you need to use the vdownmix plugin that alsa provides in the same package.<br />
<br />
Again, in your configuration file, add this:<br />
<br />
pcm.!surround51 {<br />
type vdownmix<br />
slave.pcm "default"<br />
}<br />
pcm.!surround40 {<br />
type vdownmix<br />
slave.pcm "default"<br />
}<br />
<br />
==Mixing==<br />
===Software mixing (dmix)===<br />
<br />
{{Note|For ALSA 1.0.9rc2 and higher on analog sound outputs you do not need to setup dmix. Dmix is enabled as default for soundcards which do not support hardware mixing.}}<br />
<br />
If that does not work however, it is a matter of simply creating a .asoundrc file in your home folder with the following contents.<br />
<br />
pcm.dsp {<br />
type plug<br />
slave.pcm "dmix"<br />
}<br />
<br />
This should enable software mixing and allows more than one application to make use of the soundcard. <br />
<br />
For a digital sound output such as S/PDIF, the ALSA package still does not enable dmix by default. Thus, the dmix configuration above can be used to enable dmix for S/PDIF devices.<br />
<br />
See [[#Troubleshooting]] for common problems and solutions.<br />
<br />
===Hardware mixing===<br />
====Support====<br />
If you have an audio chipset that supports mixing in hardware, then no configuration is necessary. Almost every onboard audio chipset does not support hardware mixing, and requires mixing to be done in software (see above). Many sound cards do support hardware mixing, and the ones best supported on Linux are listed below:<br />
<br />
* Creative SoundBlaster Live! (5.1 model)<br />
* Creative SoundBlaster Audigy (some models)<br />
* Creative SoundBlaster Audidy 2 (ZS models)<br />
* Creative SoundBlaster Audigy 4 (Pro models)<br />
<br />
{{Note|The low end variants of above cards, (Audigy SE, Audigy 2 NX, SoundBlaster Live! 24bit and SoundBlaster Live! 7.1) '''do not''' support hardware mixing as they use other chips.}}<br />
<br />
{{Note|The onboard VIA8237 chip supports 4-stream hardware mixing, however, it does only 3 for some motherboards (the 4th makes no sound) or is just broken. Even if it works, the quality is not good compared to other solutions.}}<br />
<br />
====Fixes====<br />
If you are using 64-bit Arch and the Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02), you can get sound working for Enemy Territory with the following:<br />
echo "et.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss<br />
echo "et.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss<br />
<br />
==Troubleshooting==<br />
===Sound Skipping While Using Dynamic Frequency Scaling===<br />
Some combinations of ALSA drivers and chipsets may cause audio from all sources to skip when used in combination with a dynamic frequency scaling governor such as {{ic|ondemand}} or {{ic|conservative}}. Currently, the solution is to switch back to the {{ic|performance}} governor.<br />
<br />
Refer to the [[CPU Frequency Scaling]] for more information.<br />
<br />
===Problems with Availability to Only One User at a Time===<br />
You might find that only one user can use the dmixer at a time. This is probably ok for most, but for those who run [[mpd]] as a separate user this poses a problem. When mpd is playing a normal user cannot play sounds though the dmixer. While it's quite possible to just run mpd under a user's login account, another solution has been found. Adding the line {{ic|ipc_key_add_uid 0}} to the {{ic|pcm.dmixer}} block disables this locking. The following is a snippet of the {{ic|asound.conf}}, the rest is the same as above.<br />
...<br />
pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid 0<br />
ipc_perm 0660<br />
slave {<br />
...<br />
<br />
===Simultaneous Playback Problems===<br />
<br />
If you are having problems with simultaneous playback, and if [[PulseAudio]] is installed (i.e. by [[GNOME]]), its default configuration is set to "hijack" the soundcard. Some users of ALSA may not want to use [[PulseAudio]] and are quite content with their current ALSA settings. One fix is to edit {{ic|/etc/asound.conf}} and comment out the following lines:<br />
# Use PulseAudio by default<br />
#pcm.!default {<br />
# type pulse<br />
# fallback "sysdefault"<br />
# hint {<br />
# show on<br />
# description "Default ALSA Output (currently PulseAudio Sound Server)"<br />
# }<br />
#}<br />
<br />
Commenting the following out also may help:<br />
#ctl.!default {<br />
# type pulse<br />
# fallback "sysdefault"<br />
#}<br />
<br />
This may be a much simpler solution than completely uninstalling [[PulseAudio]].<br />
<br />
Effectively, here is an example of a working {{ic|/etc/asound.conf}}:<br />
{{bc|<nowiki>pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid 0<br />
ipc_perm 0660<br />
}<br />
pcm.dsp {<br />
type plug<br />
slave.pcm "dmix"<br />
}</nowiki><br />
}}<br />
<br />
{{note|This {{ic|/etc/asound.conf}} file was intended for and used successfully with a global [[MPD]] configuration. See [[Alsa#Problems_with_Availability_to_Only_One_User_at_a_Time|this section]] on multiple users}}<br />
<br />
===Random Lack of Sound on Startup===<br />
If you randomly have no sound on startup, it may be because your system has multiple sound cards, and their order may sometimes change on startup. If this is the case, try [[#Set the default sound card|setting the default sound card]].<br />
<br />
If you use mpd and the configuration tips above do not work for you, try [http://mpd.wikia.com/wiki/Configuration#ALSA_MPD_software_volume_control reading this] instead.<br />
<br />
===Specific Program Problems===<br />
For other programs who insist on their own audio setup, eg, XMMS or Mplayer, you would need to set their specific options.<br />
<br />
For mplayer, open up {{ic|~/.mplayer/config}} (or {{ic|/etc/mplayer/mplayer.conf}} for global setting) and add the following line:<br />
ao=alsa<br />
<br />
For XMMS/Beep Media Player, go into their options and make sure the sound driver is set to Alsa, not oss.<br />
<br />
To do this in XMMS:<br />
* Open XMMS<br />
** Options -> preferences.<br />
** Choose the Alsa output plugin.<br />
<br />
For applications which do not provide a ALSA output, you can use aoss from the alsa-oss package. To use aoss, when you run the program, prefix it with {{ic|aoss}}, eg:<br />
aoss realplay<br />
<br />
pcm.!default{ ... } doesnt work for me anymore. but this does:<br />
pcm.default pcm.dmixer<br />
<br />
===Model Settings===<br />
Although Alsa detects your soundcard through the BIOS at times Alsa may not be able to recognize your [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt model type]. The soundcard chip can be found in {{ic|alsamixer}} (e.g. ALC662) and the model can be set in {{ic|/etc/modprobe.d/modprobe.conf}} or {{ic|/etc/modprobe.d/sound.conf}}. For example:<br />
<br />
options snd-hda-intel model=MODEL<br />
<br />
There are other model settings too. For most cases Alsa defaults will do. If you want to look at more specific settings for your soundcard take a look at the [http://bugtrack.alsa-project.org/main/index.php/Matrix:Main Alsa Soundcard List] find your model, then Details, then look at the "Setting up modprobe..." section. Enter these values in {{ic|/etc/modprobe.d/modprobe.conf}}. For example, for an Intel AC97 audio:<br />
<br />
{{bc|# ALSA portion<br />
alias char-major-116 snd<br />
alias snd-card-0 snd-intel8x0<br />
# module options should go here<br />
<br />
# OSS/Free portion<br />
alias char-major-14 soundcore<br />
alias sound-slot-0 snd-card-0<br />
<br />
# card #1<br />
alias sound-service-0-0 snd-mixer-oss<br />
alias sound-service-0-1 snd-seq-oss<br />
alias sound-service-0-3 snd-pcm-oss<br />
alias sound-service-0-8 snd-seq-oss<br />
alias sound-service-0-12 snd-pcm-oss}}<br />
<br />
===Conflicting PC Speaker===<br />
If you are sure nothing is muted, that your drivers are installed correctly, and that your volume is right, but you still do not hear anything, then try adding the following line to {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
<br />
options snd-NAME-OF-MODULE ac97_quirk=0<br />
<br />
The above fix has been observed to work with {{ic|via82xx}}<br />
options snd-NAME-OF-MODULE ac97_quirk=1<br />
The above fix has been reported to work with {{ic|snd_intel8x0}}<br />
<br />
===No Microphone Input===<br />
In alsamixer, make sure that all the volume levels are up under recording, and that CAPTURE is toggled active on the microphone (e.g. Mic, Internal Mic) and/or on Capture (in alsamixer, select these items and press space). Try making positive Mic Boost and raising Capture and Digital levels higher; this make make static or distortion, but then you can adjust them back down once you are hearing ''something'' when you record<br />
<br />
As the pulseaudio wrapper is shown as "default" in alsamixer, you may have to press F6 to select your actual soundcard first. You may also need to enable and increase the volume of Line-in in the Playback section.<br />
<br />
To test the microphone, run these commands (see arecord's man page for further information):<br />
arecord -d 5 test-mic.wav<br />
aplay test-mic.wav<br />
<br />
If all fails, you may want to eliminate hardware failure by testing the microphone with a different device.<br />
<br />
For at least some computers, muting a microphone (MM) simply means its input does not go immediately to the speakers. It still receives input.<br />
<br />
Many Dell laptops need "-dmic" to be appended to the model name in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-hda-intel model=dell-m6-dmic<br />
<br />
Some programs use try to use OSS as the main input software. Add the following lines to {{ic|/etc/modprobe.d/modprobe.conf}} to prevent OSS modules from being loaded:<br />
<br />
{{Note|The OSS modules are no longer autoloaded anyway.}}<br />
<br />
blacklist snd_pcm_oss<br />
blacklist snd_mixer_oss<br />
blacklist snd_seq_oss<br />
<br />
See also:<br />
* http://www.alsa-project.org/main/index.php/SoundcardTesting<br />
* http://alsa.opensrc.org/Record_from_mic<br />
<br />
===Setting the default Microphone/Capture Device===<br />
Some applications (Pidgin, Adobe Flash) do not provide an option to change the capture device. It becomes a problem if your microphone is on a separate device (e.g. USB webcam or microphone) than your internal sound card. To change only the default capture device, leaving the default playback device as is, you can modify your {{ic|~/.asoundrc}} file to include the following:<br />
<br />
pcm.usb<br />
{<br />
type hw<br />
card U0x46d0x81d<br />
}<br />
<br />
pcm.!default<br />
{<br />
type asym<br />
playback.pcm<br />
{<br />
type plug<br />
slave.pcm "dmix"<br />
}<br />
capture.pcm<br />
{<br />
type plug<br />
slave.pcm "usb"<br />
}<br />
}<br />
<br />
Replace "U0x46d0x81d" with your capture device's card name in ALSA. You can use {{ic|arecord -L}} to list all the capture devices detected by ALSA.<br />
<br />
===Internal Microphone not working===<br />
First make sure all the volume levels are up under recording in alsamixer. In my case adding the following option to /etc/sound.conf and reloading the snd-* module produced a new volume setting called Capture which was capturing for the internal mic. For eg, for snd-hda-intel add<br />
<br />
options snd-hda-intel enable_msi=1<br />
<br />
Then reload the module (as below), up the recording volume of Capture and then test.<br />
<br />
{{bc|# rmmod snd-hda-intel && modprobe snd-hda-intel}}<br />
<br />
===No Sound with Onboard Intel Sound Card===<br />
There may be a problem with two conflicting modules loaded, namely {{ic|snd_intel8x0}} and {{ic|snd_intel8x0m}}. In this case, blacklist snd_intel8x0m:<br />
<br />
{{hc|/etc/modprobe.d/modprobe.conf|blacklist snd_intel8x0m}}<br />
<br />
''Muting'' the "External Amplifier" in {{ic|alsamixer}} or {{ic|amixer}} may also help. See [http://alsa.opensrc.org/Intel8x0#Dell_Inspiron_8600_.28and_probably_others.29 the ALSA wiki].<br />
<br />
Unmuting the "Mix" setting in the mixer might help, also.<br />
<br />
===No Headphone Sound with Onboard Intel Sound Card===<br />
With '''Intel Corporation 82801 I (ICH9 Family) HD Audio Controller''' on laptop, you may need to add this line to modprobe or sound.conf:<br />
<br />
options snd-hda-intel model=$model<br />
<br />
Where $model is any one of the following (in order of possibility to work, but not merit):<br />
<br />
* dell-vostro<br />
* olpc-xo-1_5<br />
* laptop<br />
* dell-m6<br />
* laptop-hpsense<br />
<br />
Note: It may be necessary to put this "options" line below (after) any "alias" lines about your card.<br />
<br />
You can see all the available models in the kernel documentation. For example [http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.35.y.git;a=blob;f=Documentation/sound/alsa/HD-Audio-Models.txt;h=dc25bb84b83b49665a7ed850e7bf5423d50cd3ba;hb=HEAD here], but check that it is the correct version of that document for your kernel version.<br />
<br />
A list of available models is also available [http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt here]. To know your chip name type the following command (with * being corrected to match your files). Note that some chips could have been renamed and do not directly match the available ones in the file.<br />
<br />
cat /proc/asound/card*/codec* | grep Codec<br />
<br />
Note that there is a high chance none of the input devices (all internal and external mics) will work if you choose to do this, so it is either your headphones or your mic. Please report to ALSA if you are affected by this bug.<br />
<br />
And also, if you have problems getting beeps to work (pcspkr):<br />
<br />
options snd-hda-intel model=$model enable=1 index=0<br />
<br />
===No sound when S/PDIF video card is installed===<br />
Discover available modules and their order:<br />
$ cat /proc/asound/modules<br />
0 snd_hda_intel<br />
1 snd_ca0106<br />
<br />
Disable the undesired video card audio codec in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
# /etc/modprobe.d/modprobe.conf<br />
#<br />
install snd_hda_intel /bin/false<br />
<br />
If both devices use the same module, it might be possible to disable one of them in the BIOS.<br />
<br />
===Poor sound quality or clipping===<br />
If you experience poor sound quality, try setting the PCM volume (in alsamixer) to a level such that gain is 0.<br />
<br />
If snd-usb-audio driver has been loaded, you could try to enable {{ic|softvol}} in '''/etc/asound.conf''' file. Example configuration for the first audio device:<br />
pcm.!default {<br />
type plug<br />
slave.pcm "softvol"<br />
}<br />
pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
pcm "hw:0"<br />
period_time 0<br />
period_size 4096<br />
buffer_size 131072<br />
rate 50000<br />
}<br />
bindings {<br />
0 0<br />
1 1<br />
}<br />
}<br />
pcm.dsnooper {<br />
type dsnoop<br />
ipc_key 1024<br />
slave {<br />
pcm "hw:0"<br />
channels 2<br />
period_time 0<br />
period_size 4096<br />
buffer_size 131072<br />
rate 50000<br />
}<br />
bindings {<br />
0 0<br />
1 1<br />
}<br />
}<br />
pcm.softvol {<br />
type softvol<br />
slave { pcm "dmixer" }<br />
control {<br />
name "Master"<br />
card 0<br />
}<br />
}<br />
ctl.!default {<br />
type hw<br />
card 0<br />
}<br />
ctl.softvol {<br />
type hw<br />
card 0<br />
}<br />
ctl.dmixer {<br />
type hw<br />
card 0<br />
}<br />
<br />
===Pops When Starting and Stopping Playback===<br />
Some modules (e.g. snd_ac97_codec and snd_hda_intel) can power off your sound card when not in use. This can make an audible noise (like a crack/pop/scratch) when turning on/off your sound card. Sometimes even when move the slider volume, or open and close windows (KDE4). If you find this annoying try {{ic|modinfo snd_MY_MODULE}}, and look for a module option that adjusts or disables this feature.<br />
<br />
Example: to disable the power saving mode and solve cracking sound trough speakers problem, using snd_hda_intel add in {{ic|/etc/modprobe.d/modprobe.conf}}<br />
options snd_hda_intel power_save=0<br />
or<br />
options snd_hda_intel power_save=0 power_save_controller=N<br />
<br />
You can also try it with {{ic|1=modprobe snd_hda_intel power_save=0}} before.<br />
<br />
You may also have to unmute the 'Line' ALSA channel for this to work. Any value will do (other than '0' or something too high).<br />
<br />
''Example:'' on an onboard VIA VT1708S (using the snd_hda_intel module) these cracks occured even though 'power_save' was set to 0. Unmuting the 'Line' channel and setting a value of '1' solved the problem.<br />
<br />
Source: https://www.kernel.org/doc/Documentation/sound/alsa/powersave.txt<br />
<br />
If you use a laptop, pm-utils will change {{ic|power_save}} back to 1 when you go onto battery power even if you disable power saving in {{ic|/etc/modprobe.d}}. Disable this for pm-utils by disabling the script that makes the change (see [https://wiki.archlinux.org/index.php/Pm-utils#Disabling_a_hook Disabling a hook] for more information):<br />
# touch /etc/pm/power.d/intel-audio-powersave<br />
<br />
===S/PDIF Output Does Not Work===<br />
<br />
If the optical/coaxial digital output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try running<br />
# iecset audio on<br />
<br />
as root.<br />
<br />
You can also put this command in {{Ic|rc.local}} as it sometimes it may stop working after a reboot.<br />
<br />
===HDMI Output Does Not Work===<br />
If the HDMI output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try the following.<br />
<br />
Query for Playback Devices:<br />
<br />
$ aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
<br />
Now that we have the info for the HDMI device, try a test, In the example below, 0 is the card number and 3 is the device number.<br />
<br />
$ aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
If aplay does not output any errors, but still no sound is heared, "reboot" the receiver, monitor or tv set. Since the HDMI interface executes a handshake on connection, it might have noticed before that there was no audio stream embedded, and disabled audio decoding. In particular, if you are using a standalone window manager (don’t know about Gnome or KDE), you may need to have some sound playing ''while'' plugging in the HDMI cable.<br />
<br />
{{Note|If you are using an ATI card and linux 3.0, check your kernel/grub settings, you most likely need to use the ''''radeon.audio'''<nowiki>=</nowiki>'''1'''' boot parameter, or alternatively set up the option in your modprobe configuration files.}}<br />
<br />
If the test is successful, create or edit your ~/.asoundrc file to set HDMI as the default audio device.<br />
<br />
{{hc|~/.asoundrc|<br />
pcm.!default {<br />
type hw<br />
card 0<br />
device 3<br />
}<br />
}}<br />
<br />
Or you above config does not work try:<br />
{{hc|~/.asoundrc|<br />
defaults.pcm.card 0<br />
defaults.pcm.device 3<br />
defaults.ctl.card 0<br />
}}<br />
<br />
===HDMI Multi-channel PCM output does not work (Intel) ===<br />
As of Linux 3.1 multi-channel PCM output through HDMI with a Intel card (Intel Eaglelake, IbexPeak/Ironlake,SandyBridge/CougarPoint and IvyBridge/PantherPoint) is not yet supported. Support for it has been recently added and expected to be available in Linux 3.2. To make it work in Linux 3.1 you need to apply the following patches:<br />
<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=76adaa34db407f174dd06370cb60f6029c33b465 drm: support routines for HDMI/DP ELD]<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=e0dac65ed45e72fe34cc7ccc76de0ba220bd38bb drm/i915: pass ELD to HDMI/DP audio driver]<br />
<br />
===HP TX2500===<br />
Add these 2 lines into {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-cmipci mpu_port=0x330 fm_port=0x388<br />
options snd-hda-intel index=0 model=toshiba position_fix=1<br />
<br />
options snd-hda-intel model=hp (works for tx2000cto)<br />
<br />
===Skipping Sound When Playing MP3===<br />
If you have sound skipping when playing MP3 files and you have more then 2 speakers attached to your computer (i.e. > 2 speaker system), run alsamixer and disable the channels for the speakers that you '''DO NOT''' have (i.e. do not enable the sound for the center speaker if you do not have a center speaker.<br />
<br />
===Using a USB Headset and External USB Sound Cards===<br />
If you are using a USB headset with ALSA you can try using {{AUR|asoundconf}} (currently only available from the [[AUR]]) to set the headset as the primary sound output. Before running make sure you have usb audio module enabled ({{ic|modprobe snd-usb-audio}}).<br />
<br />
# asoundconf is-active<br />
# asoundconf list<br />
# asoundconf set-default-card <chosen soundcard><br />
<br />
==== Crackling sound with USB devices ====<br />
If you experience crackling sound on USB devices, you can try tuning the snd-usb-audio for minimal latency.<br />
<br />
Add this to your {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
<br />
options snd-usb-audio nrpacks=1<br />
<br />
source: http://alsa.opensrc.org/Usb-audio#Tuning_USB_devices_for_minimal_latencies<br />
<br />
==== Hot-plugging a USB Sound Card ====<br />
In order to automatically make a USB Sound Card the primary output device, when the card is plugged in, you can use the following udev rules (e.g. add the following two lines to {{ic|/etc/udev/rules.d/00-local.rules}} and reboot).<br />
<br />
{{bc|1=KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"<br />
KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"}}<br />
<br />
===Error 'Unknown hardware' Appears After a Kernel Update===<br />
The following messages may be displayed during the start-up ALSA after the kernel update:<br />
Unknown hardware "foo" "bar" ...<br />
Hardware is initialized using a guess method<br />
/usr/sbin/alsactl: set_control:nnnn:failed to obtain info for control #mm (No such file or directory)<br />
<br />
or<br />
Found hardware: "HDA-Intel" "VIA VT1705" "HDA:11064397,18490397,00100000" "0x1849" "0x0397"<br />
Hardware is initialized using a generic method<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #1 (No such file or directory)<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #2 (No such file or directory)<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #25 (No such file or directory)<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #26 (No such file or directory)<br />
<br />
Simply store ALSA mixer settings again (as root):<br />
# alsactl -f /var/lib/alsa/asound.state store<br />
<br />
It may be necessary configure ALSA again with alsamixer<br />
<br />
===HDA Analyzer===<br />
If the mappings to your audio pins(plugs) do not correspond but ALSA works fine, you could try HDA Analyzer -- a pyGTK2 GUI for HD-audio control can be found [http://www.alsa-project.org/main/index.php/HDA_Analyzer at the ALSA wiki].<br />
Try tweaking the Widget Control section of the PIN nodes, to make microphones IN and headphone jacks OUT. Referring to the Config Defaults heading is a good idea.<br />
<br />
NOTE: the script is done by such way that it is incompatible with python3 (which is now shipped with ArchLinux) but tries to use it.<br />
The workaround is: open "run.py", find all occurences of "python" (2 occurences - one on the first line, and the second on the last line) and replace them all by "python2".<br />
<br />
NOTE2: the script requires root acces, but running it via su/sudo is bogus. Run it via {{ic|kdesu}} or {{ic|gksu}}.<br />
<br />
===ALSA with SDL===<br />
If you get no sound via SDL and ALSA cannot be chosen from the application. Try setting the environmental variable SDL_AUDIODRIVER to alsa.<br />
# export SDL_AUDIODRIVER=alsa<br />
<br />
===Low Sound Workaround===<br />
<br />
If you are facing low sound even after maxing out your speakers/headphones, you can give the softvol plugin a try. Add the following to {{ic|/etc/asound.conf}}.<br />
{{bc|<nowiki><br />
pcm.!default {<br />
type plug<br />
slave.pcm "softvol"<br />
}<br />
<br />
pcm.softvol {<br />
type softvol<br />
slave {<br />
pcm "dmix"<br />
}<br />
control {<br />
name "Pre-Amp"<br />
card 0<br />
}<br />
min_dB -5.0<br />
max_dB 20.0<br />
resolution 6<br />
}<br />
</nowiki>}}<br />
{{note| You will probably have to restart the computer, as restarting the alsa daemon did not load the new configuration for me. Also, if the configuration does not work even after restarting, try changing {{ic|plug}} with {{ic|hw}} in the above configuration.}}<br />
<br />
After the changes are loaded successfully, you will see a {{ic|Pre-Amp}} section in alsamixer. You can adjust the levels there.<br />
{{note|Setting a high value for {{ic|Pre-Amp}} can cause sound distortion, so adjust it according to the level that suits you.}}<br />
<br />
===Popping sound after resuming from suspension===<br />
You might hear a popping sound after resuming the computer from suspension. This can be fixed by editing {{ic|/etc/pm/sleep.d/90alsa}} and removing the line that says {{ic|aplay -d 1 /dev/zero}}<br />
<br />
==Example configurations==<br />
See [[Advanced Linux Sound Architecture/Example Configurations]].<br />
<br />
==See also==<br />
* [http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt Advanced ALSA module configuration]<br />
* [http://alsa.opensrc.org/Main_Page Unofficial ALSA Wiki]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=36815 HOWTO: Compile driver from svn]</div>Notasynonymhttps://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=250172Advanced Linux Sound Architecture2013-03-11T02:47:22Z<p>Notasynonym: </p>
<hr />
<div>[[Category:Sound]]<br />
[[Category:Audio/Video]]<br />
[[cs:Advanced Linux Sound Architecture]]<br />
[[de:Alsa]]<br />
[[es:Advanced Linux Sound Architecture]]<br />
[[fa:ALSA]]<br />
[[fr:Alsa]]<br />
[[he:Advanced Linux Sound Architecture]]<br />
[[it:Advanced Linux Sound Architecture]]<br />
[[ja:Advanced Linux Sound Architecture]]<br />
[[nl:Advanced Linux Sound Architecture]]<br />
[[pt:Advanced Linux Sound Architecture]]<br />
[[ru:Advanced Linux Sound Architecture]]<br />
[[sk:Advanced Linux Sound Architecture]]<br />
[[th:Advanced Linux Sound Architecture]]<br />
[[tr:Gelişmiş_ses_mimarisi_(ALSA)]]<br />
[[zh-CN:Advanced Linux Sound Architecture]]<br />
The [[Wikipedia:Advanced Linux Sound Architecture|Advanced Linux Sound Architecture]] ('''ALSA''') is a Linux kernel component which replaced the original Open Sound System (OSSv3) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.<br />
<br />
{{Note|For an alternative sound environment, see the [[Open Sound System]] page.}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Using, configuring and troubleshooting ALSA.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Sound}}<br />
{{Article summary wiki|Disable PC Speaker Beep}}<br />
{{Article summary end}}<br />
<br />
==Installation==<br />
ALSA is included in the default Arch kernel as a set of modules, so installing it is not necessary.<br />
<br />
[[udev]] will automatically probe your hardware at boot, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but upstream sources mute all channels by default.<br />
<br />
Users with a local login (at a virtual terminal or a display manager) have permission to play audio and change mixer levels. To allow this for a remote login, the user has to be [[Users and Groups#Group management|added]] to the {{ic|audio}} group. Membership in the {{ic|audio}} group also allows direct access to devices, which can lead to applications grabbing exclusive output (breaking software mixing) and breaks fast-user-switching, and multiseat. Therefore, adding a user to the {{ic|audio}} group is '''not''' recommended, unless you specifically need to[https://wiki.ubuntu.com/Audio/TheAudioGroup].<br />
<br />
===User-space utilities===<br />
From [[Official Repositories|official repositories]]:<br />
* [[pacman|Install]] the {{Pkg|alsa-utils}} package which contains the {{ic|alsamixer}} user-space tool, which allows for configuration of the sound device from the console or terminal.<br />
* Install the {{Pkg|alsa-oss}} package if you want OSS applications to work with dmix (software mixing).<br />
{{Note|1=Since [[udev]] >= 171, the OSS emulation modules ({{ic|snd_seq_oss}}, {{ic|snd_pcm_oss}}, {{ic|snd_mixer_oss}}) are not automatically loaded by default.}}<br />
*Install the {{Pkg|alsa-plugins}} package if you want [[#High quality resampling|high quality resampling]], [[#Upmixing/Downmixing|upmixing/downmixing]] and other advanced features.<br />
<br />
==Unmuting the channels==<br />
The current version of ALSA installs with all channels '''muted by default'''. You will need to unmute the channels manually.<br />
<br />
It is easiest to use {{ic|alsamixer}} ncurses UI to accomplish this:<br />
<br />
$ alsamixer<br />
<br />
Alternatively, use {{ic|amixer}} from the command-line:<br />
<br />
$ amixer sset Master unmute<br />
<br />
The label {{ic|MM}} below a channel indicates that the channel is muted, and {{ic|00}} indicates that it is open.<br />
<br />
Scroll to the {{ic|Master}} and {{ic|PCM}} channels with the {{keypress|←}} and {{keypress|→}} keys and unmute them by pressing the {{keypress|m}} key. Use the {{keypress|↑}} key to increase the volume and obtain a value of {{ic|0}} dB gain. The gain can be found in the upper left next to the {{ic|Item:}} field. Higher values of gain will produce distorted sound.<br />
<br />
To get full 5.1 or 7.1 surround sound you likely need to unmute other channels such as Front, Surround, Center, LFE (subwoofer) and Side (these are the names of the channels with Intel HD Audio, they may vary with different hardware). Please take note that this will not automatically upmix stereo sources (like most music). In order to accomplish that, see [[#Upmixing/Downmixing]].<br />
<br />
Leave alsamixer by pressing {{Keypress|Esc}}.<br />
<br />
{{Note|<br />
* Some cards need to have digital output muted/turned off in order to hear analog sound. For the Soundblaster Audigy LS mute the IEC958 channel.<br />
* Some machines, (like the Thinkpad T61), have a Speaker channel which must be unmuted and adjusted as well.<br />
* Some machines, (like Dell E6400) may also require the {{ic|Front}} and {{ic|Headphone}} channels to be unmuted and adjusted.}}<br />
<br />
Next, test to see if sound works:<br />
<br />
$ speaker-test -c 2<br />
<br />
Change -c to fit your speaker setup. Use -c 8 for 7.1, for instance:<br />
<br />
$ speaker-test -c 8<br />
<br />
If it does not work, proceed to [[#Configuration]] and then [[#Troubleshooting]] to solve your problems.<br />
<br />
The {{pkg|alsa-utils}} package includes {{ic|alsa-restore.service}} and {{ic|alsa-store.service}}, which are preconfigured to run at boot and shutdown respectively.<br />
<br />
==Configuration==<br />
===No sound in virtualbox===<br />
If you experience problems with virtualbox, the following command might be helpful:<br />
<br />
{{hc|$ alsactl init|2=<nowiki><br />
<br />
Found hardware: "ICH" "SigmaTel STAC9700,83,84" "AC97a:83847600" "0x8086" "0x0000"<br />
Hardware is initialized using a generic method<br />
</nowiki><br />
}}<br />
<br />
You might need to activate the ALSA output in your audio software as well.<br />
<br />
===Set the default sound card===<br />
<br />
If your sound card order changes on boot, you can specify their order in any file ending with {{ic|.conf}} in {{ic|/etc/modprobe.d}} ({{ic|/etc/modprobe.d/alsa-base.conf}} is suggested).<br />
For example, if you want your mia sound card to be #0:<br />
<br />
{{hc|/etc/modprobe.d/alsa-base.conf|2=<nowiki><br />
options snd slots=snd_mia,snd_hda_intel<br />
options snd_mia index=0<br />
options snd_hda_intel index=1<br />
</nowiki>}}<br />
<br />
snd_mia and snd_hda_intel are the modules used by the respective cards. This configuration assumes you have one mia sound card and one card using snd_hda_intel (e.g. onboard).<br />
<br />
You can also provide an index of -2 to instruct ALSA to never use a card as the primary one. Distributions such as Linux Mint and Ubuntu use the following settings to avoid USB and other "abnormal" drivers from getting index 0:<br />
<br />
{{hc|/etc/modprobe.d/alsa-base.conf|2=<nowiki><br />
options bt87x index=-2<br />
options cx88_alsa index=-2<br />
options saa7134-alsa index=-2<br />
options snd-atiixp-modem index=-2<br />
options snd-intel8x0m index=-2<br />
options snd-via82xx-modem index=-2<br />
options snd-usb-audio index=-2<br />
options snd-usb-caiaq index=-2<br />
options snd-usb-ua101 index=-2<br />
options snd-usb-us122l index=-2<br />
options snd-usb-usx2y index=-2<br />
# Keep snd-pcsp from being loaded as first soundcard<br />
options snd-pcsp index=-2<br />
# Keep snd-usb-audio from beeing loaded as first soundcard<br />
options snd-usb-audio index=-2<br />
</nowiki>}}<br />
<br />
These changes require a system reboot.<br />
<br />
{{Out of date|{{ic|/etc/asound.conf}} does not exist on a default setup, and these instructions may not work.}}<br />
<br />
First you will have to find out the card and device id that you want to set as the default by running {{ic|aplay -l}}:<br />
<br />
{{hc|$ aplay -l|2=<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: JamLab [JamLab], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 2: Audio [Altec Lansing XT1 - USB Audio], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
</nowiki>}}<br />
<br />
For example, the last entry in this list has the card ID 2 and the device ID 0. To set this card as the default, you can either use the system-wide file {{ic|/etc/asound.conf}} or the user-specific file {{ic|~/.asoundrc}}. You may have to create the file if it does not exist. Then insert the following options with the corresponding card and device id.<br />
{{hc|~/.asoundrc|2=<nowiki><br />
defaults.pcm.card 2<br />
defaults.pcm.device 0<br />
defaults.ctl.card 2<br />
</nowiki>}}<br />
The 'pcm' options affect which card and device will be used for audio playback while the 'ctl' option affects which card is used by control utilities like alsamixer .<br />
<br />
The changes should take effect as soon as you (re-)start an application (mplayer etc.).<br />
<br />
===Making sure the sound modules are loaded===<br />
You can assume that udev will autodetect your sound properly. You can check this with the command<br />
<br />
{{hc|<nowiki>$ lsmod | grep '^snd' | column -t</nowiki>|<nowiki><br />
snd_hda_codec_hdmi 22378 4<br />
snd_hda_codec_realtek 294191 1<br />
snd_hda_intel 21738 1<br />
snd_hda_codec 73739 3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel<br />
snd_hwdep 6134 1 snd_hda_codec<br />
snd_pcm 71032 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec<br />
snd_timer 18992 1 snd_pcm<br />
snd 55132 9 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer<br />
snd_page_alloc 7017 2 snd_hda_intel,snd_pcm<br />
</nowiki>}}<br />
<br />
If the output looks similar, your sound drivers have been successfully autodetected.<br />
{{Note|Since {{ic|udev>&#61;171}}, the OSS emulation modules ({{ic|snd_seq_oss, snd_pcm_oss, snd_mixer_oss}}) are not loaded by default: [[kernel modules#Loading|Load them manually]] if they are needed.}}<br />
<br />
You might also want to check the directory {{ic|/dev/snd/}} for the right device files:<br />
<br />
{{hc|$ ls -l /dev/snd|2=<nowiki><br />
total 0<br />
crw-rw---- 1 root audio 116, 0 Apr 8 14:17 controlC0<br />
crw-rw---- 1 root audio 116, 32 Apr 8 14:17 controlC1<br />
crw-rw---- 1 root audio 116, 24 Apr 8 14:17 pcmC0D0c<br />
crw-rw---- 1 root audio 116, 16 Apr 8 14:17 pcmC0D0p<br />
crw-rw---- 1 root audio 116, 25 Apr 8 14:17 pcmC0D1c<br />
crw-rw---- 1 root audio 116, 56 Apr 8 14:17 pcmC1D0c<br />
crw-rw---- 1 root audio 116, 48 Apr 8 14:17 pcmC1D0p<br />
crw-rw---- 1 root audio 116, 1 Apr 8 14:17 seq<br />
crw-rw---- 1 root audio 116, 33 Apr 8 14:17 timer<br />
</nowiki>}}<br />
<br />
{{Note|If requesting help on IRC or the forums, please post the output of the above commands.}}<br />
<br />
If you have at least the devices '''controlC0''' and '''pcmC0D0p''' or similar, then your sound modules have been detected and loaded properly.<br />
<br />
If this is not the case, your sound modules have not been detected properly. To solve this, you can try loading the modules manually:<br />
<br />
* Locate the module for your sound card: [http://www.alsa-project.org/main/index.php/Matrix:Main ALSA Soundcard Matrix] The module will be prefixed with 'snd-' (for example: {{ic|snd-via82xx}}).<br />
* [[Kernel modules#Loading|Load the module]].<br />
* Check for the device files in {{ic|/dev/snd}} (see above) and/or try if {{ic|alsamixer}} or {{ic|amixer}} have reasonable output.<br />
* Configure {{ic|snd-NAME-OF-MODULE}} and {{ic|snd-pcm-oss}} to [[Kernel modules#Loading|load at boot]].<br />
<br />
===Getting SPDIF Output===<br />
(from gralves from the Gentoo forums)<br />
* In GNOME Volume Control, under the Options tab, change the IEC958 to PCM. This option can be enabled in the preferences.<br />
* If you do not have GNOME Volume Control installed,<br />
** Edit {{ic|/var/lib/alsa/asound.state}}. This file is where alsasound stores your mixer settings.<br />
** Find a line that says: 'IEC958 Playback Switch'. Near it you will find a line saying {{ic|value:false}}. Change it to {{ic|value:true}}.<br />
** Now find this line: 'IEC958 Playback AC97-SPSA'. Change its value to 0.<br />
** Restart ALSA.<br />
<br />
Alternative way to enable SPDIF output automatically on login (tested on SoundBlaster Audigy):<br />
<br />
* add following lines to {{ic|/etc/rc.local}}:<br />
# Use COAX-digital output<br />
amixer set 'IEC958 Optical' 100 unmute<br />
amixer set 'Audigy Analog/Digital Output Jack' on<br />
<br />
You can see the name of your card's digital output with:<br />
$ amixer scontrols<br />
<br />
===System-Wide Equalizer===<br />
====Using AlsaEqual (provides UI)====<br />
Install {{AUR|alsaequal}} from the [[AUR]].<br />
<br />
{{Note | If you have a x86_64-system and are using a 32bit-flashplugin the sound in flash will not work. Either you have to disable alsaequal or build alsaequal for 32bit.}}<br />
<br />
After installing the package, insert the following into your ALSA configuration file ({{ic|~/.asoundrc}} or {{ic|/etc/asound.conf}}):<br />
<br />
ctl.equal {<br />
type equal;<br />
}<br />
<br />
pcm.plugequal {<br />
type equal;<br />
# Modify the line below if you do not<br />
# want to use sound card 0.<br />
#slave.pcm "plughw:0,0";<br />
#by default we want to play from more sources at time:<br />
slave.pcm "plug:dmix";<br />
}<br />
#pcm.equal {<br />
# If you do not want the equalizer to be your<br />
# default soundcard comment the following<br />
# line and uncomment the above line. (You can<br />
# choose it as the output device by addressing<br />
# it with specific apps,eg mpg123 -a equal 06.Back_In_Black.mp3)<br />
pcm.!default {<br />
type plug;<br />
slave.pcm plugequal;<br />
}<br />
<br />
And you are ready to change your equalizer using command<br />
$ alsamixer -D equal<br />
<br />
Note that configuration file is different for each user (until not specified else) it is saved in {{ic|~/.alsaequal.bin}}.<br />
so if you want to use AlsaEqual with [[mpd]] or another software running under different user, you can configure it using<br />
# su mpd -c 'alsamixer -D equal'<br />
or for example, you can make a symlink to your {{ic|.alsaequal.bin}} in his home...<br />
<br />
=====Managing AlsaEqual States=====<br />
Install [http://xyne.archlinux.ca/projects/alsaequal-mgr/ alsaequal-mgr] from [http://xyne.archlinux.ca/repos/ Xyne's repos] or the [https://aur.archlinux.org/packages.php?ID=62420 AUR].<br />
<br />
Configure the equalizer as usual with <br />
$alsamixer -D equal<br />
<br />
When you are satisfied with the state, you may give it a name ("foo" in this example) and save it:<br />
$alsaequal-mgr save foo<br />
<br />
The state "foo" can then be restored at a later time with<br />
$alsaequal-mgr load foo<br />
<br />
You can thus create different equalizer states for games, movies, music genres, VoIP apps, etc. and reload them as necessary.<br />
<br />
See the [http://xyne.archlinux.ca/projects/alsaequal-mgr/ project page] and the help message for more options.<br />
<br />
====Using mbeq====<br />
{{Note | This method requires the use of a ladspa plugin which might use quite a bit of CPU when sound plays. In addition, this was made with stereophonic sound (e.g. headphones) in mind.}}<br />
<br />
Install the {{Pkg|alsa-plugins}}, {{Pkg|ladspa}} and {{Pkg|swh-plugins}} packages if you do not already have them.<br />
<br />
* If you have not already created either an {{ic|~/.asoundrc}} or a {{ic|/etc/asound.conf}} file, then create either one and insert the following:<br />
<br />
{{hc|/etc/asound.conf|2=<nowiki>pcm.eq {<br />
type ladspa<br />
<br />
# The output from the EQ can either go direct to a hardware device<br />
# (if you have a hardware mixer, e.g. SBLive/Audigy) or it can go<br />
# to the software mixer shown here.<br />
#slave.pcm "plughw:0,0"<br />
slave.pcm "plug:dmix"<br />
<br />
# Sometimes you may need to specify the path to the plugins,<br />
# especially if you have just installed them. Once you have logged<br />
# out/restarted this should not be necessary, but if you get errors<br />
# about being unable to find plugins, try uncommenting this.<br />
#path "/usr/lib/ladspa"<br />
<br />
plugins [<br />
{<br />
label mbeq<br />
id 1197<br />
input {<br />
#this setting is here by example, edit to your own taste<br />
#bands: 50hz, 100hz, 156hz, 220hz, 311hz, 440hz, 622hz, 880hz, 1250hz, 1750hz, 25000hz,<br />
#50000hz, 10000hz, 20000hz<br />
controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]<br />
}<br />
}<br />
]<br />
}<br />
<br />
# Redirect the default device to go via the EQ - you may want to do<br />
# this last, once you are sure everything is working. Otherwise all<br />
# your audio programs will break/crash if something has gone wrong.<br />
<br />
pcm.!default {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
<br />
# Redirect the OSS emulation through the EQ too (when programs are running through "aoss")<br />
<br />
pcm.dsp0 {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
</nowiki>}}<br />
<br />
* You should be good to go (if not, ask in the forum).<br />
<br />
==High quality resampling==<br />
When software mixing is enabled, ALSA is forced to resample everything to the same frequency (48000 by default when supported). dmix uses a poor resampling algorithm which produces noticeable sound quality loss.<br />
<br />
Install {{pkg|alsa-plugins}} and {{pkg|libsamplerate}}.<br />
<br />
Change the default rate converter to libsamplerate:<br />
<br />
{{hc|/etc/asound.conf|defaults.pcm.rate_converter "samplerate_best"}}<br />
<br />
or<br />
<br />
{{hc|~/.asoundrc|defaults.pcm.rate_converter "samplerate_best"}}<br />
<br />
'''samplerate_best''' offers the best sound quality, but you need a decent CPU to be able to use it as it requires a lot of CPU cycles for real-time resampling. There are other algorithms available ('''samplerate''', etc.) but they may not provide much of an improvement over the default resampler.<br />
<br />
{{Warning|On some systems, enabling samplerate_best may cause a problem where you get no sound from flashplayer.}}<br />
<br />
==Upmixing/Downmixing==<br />
===Upmixing===<br />
In order for stereo sources like music to be able to saturate a 5.1 or 7.1 sound system, you need to use upmixing. In darker days this used to be tricky and error prone but nowadays plugins exist to easily take care of this task. Thus, install {{Pkg|alsa-plugins}}.<br />
<br />
Then add the following to your ALSA configuration file of choice (either {{ic|/etc/asound.conf}} or {{ic|~/.asoundrc}}):<br />
pcm.upmix71 {<br />
type upmix<br />
slave.pcm "surround71"<br />
delay 15<br />
channels 8<br />
}<br />
<br />
You can easily change this example for 7.1 upmixing to 5.1 or 4.0.<br />
<br />
This adds a new pcm that you can use for upmixing. If you want all sound sources to go through this pcm, add it as a default below the previous definition like so:<br />
<br />
pcm.!default "plug:upmix71"<br />
<br />
The plugin automatically allows multiple sources to play through it without problems so setting is as a default is actually a safe choice. <br />
If this is not working, you have to setup your own dmixer for the upmixing PCM like this: <br />
pcm.dmix6 {<br />
type asym<br />
playback.pcm {<br />
type dmix<br />
ipc_key 567829<br />
slave {<br />
pcm "hw:0,0"<br />
channels 6<br />
}<br />
}<br />
}<br />
<br />
and use "dmix6" instead of "surround71". <br />
If you experience skipping or distorted sound, consider increasing the buffer_size (to 32768, for example) or use a [[#High quality resampling|high quality resampler]].<br />
<br />
===Downmixing===<br />
If you want to downmix sources to stereo because you, for instance, want to watch a movie with 5.1 sound on a stereo system, you need to use the vdownmix plugin that alsa provides in the same package.<br />
<br />
Again, in your configuration file, add this:<br />
<br />
pcm.!surround51 {<br />
type vdownmix<br />
slave.pcm "default"<br />
}<br />
pcm.!surround40 {<br />
type vdownmix<br />
slave.pcm "default"<br />
}<br />
<br />
==Mixing==<br />
===Software mixing (dmix)===<br />
<br />
{{Note|For ALSA 1.0.9rc2 and higher on analog sound outputs you do not need to setup dmix. Dmix is enabled as default for soundcards which do not support hardware mixing.}}<br />
<br />
If that does not work however, it is a matter of simply creating a .asoundrc file in your home folder with the following contents.<br />
<br />
pcm.dsp {<br />
type plug<br />
slave.pcm "dmix"<br />
}<br />
<br />
This should enable software mixing and allows more than one application to make use of the soundcard. <br />
<br />
For a digital sound output such as S/PDIF, the ALSA package still does not enable dmix by default. Thus, the dmix configuration above can be used to enable dmix for S/PDIF devices.<br />
<br />
See [[#Troubleshooting]] for common problems and solutions.<br />
<br />
===Hardware mixing===<br />
====Support====<br />
If you have an audio chipset that supports mixing in hardware, then no configuration is necessary. Almost every onboard audio chipset does not support hardware mixing, and requires mixing to be done in software (see above). Many sound cards do support hardware mixing, and the ones best supported on Linux are listed below:<br />
<br />
* Creative SoundBlaster Live! (5.1 model)<br />
* Creative SoundBlaster Audigy (some models)<br />
* Creative SoundBlaster Audidy 2 (ZS models)<br />
* Creative SoundBlaster Audigy 4 (Pro models)<br />
<br />
{{Note|The low end variants of above cards, (Audigy SE, Audigy 2 NX, SoundBlaster Live! 24bit and SoundBlaster Live! 7.1) '''do not''' support hardware mixing as they use other chips.}}<br />
<br />
{{Note|The onboard VIA8237 chip supports 4-stream hardware mixing, however, it does only 3 for some motherboards (the 4th makes no sound) or is just broken. Even if it works, the quality is not good compared to other solutions.}}<br />
<br />
====Fixes====<br />
If you are using 64-bit Arch and the Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02), you can get sound working for Enemy Territory with the following:<br />
echo "et.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss<br />
echo "et.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss<br />
<br />
==Troubleshooting==<br />
===Sound Skipping While Using Dynamic Frequency Scaling===<br />
Some combinations of ALSA drivers and chipsets may cause audio from all sources to skip when used in combination with a dynamic frequency scaling governor such as {{ic|ondemand}} or {{ic|conservative}}. Currently, the solution is to switch back to the {{ic|performance}} governor.<br />
<br />
Refer to the [[CPU Frequency Scaling]] for more information.<br />
<br />
===Problems with Availability to Only One User at a Time===<br />
You might find that only one user can use the dmixer at a time. This is probably ok for most, but for those who run [[mpd]] as a separate user this poses a problem. When mpd is playing a normal user cannot play sounds though the dmixer. While it's quite possible to just run mpd under a user's login account, another solution has been found. Adding the line {{ic|ipc_key_add_uid 0}} to the {{ic|pcm.dmixer}} block disables this locking. The following is a snippet of the {{ic|asound.conf}}, the rest is the same as above.<br />
...<br />
pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid 0<br />
ipc_perm 0660<br />
slave {<br />
...<br />
<br />
===Simultaneous Playback Issues===<br />
<br />
If you are having simultaneous playback issues, and if [[PulseAudio]] is installed (i.e. by [[GNOME]]), its default configuration is set to "hijack" the soundcard. Some users of ALSA may not want to use [[PulseAudio]] and are quite content with their current ALSA settings. One fix is to edit {{ic|/etc/asound.conf}} and comment out the following lines:<br />
# Use PulseAudio by default<br />
#pcm.!default {<br />
# type pulse<br />
# fallback "sysdefault"<br />
# hint {<br />
# show on<br />
# description "Default ALSA Output (currently PulseAudio Sound Server)"<br />
# }<br />
#}<br />
<br />
Commenting the following out also may help:<br />
#ctl.!default {<br />
# type pulse<br />
# fallback "sysdefault"<br />
#}<br />
<br />
This may be a much simpler solution than completely uninstalling [[PulseAudio]].<br />
<br />
Effectively, here is an example of a working {{ic|/etc/asound.conf}}:<br />
{{bc|<nowiki>pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid 0<br />
ipc_perm 0660<br />
}<br />
pcm.dsp {<br />
type plug<br />
slave.pcm "dmix"<br />
}</nowiki><br />
}}<br />
<br />
{{note|This {{ic|/etc/asound.conf}} file was intended for and used successfully with a global [[MPD]] configuration. See [[Alsa#Problems_with_Availability_to_Only_One_User_at_a_Time|this section]] on multiple users}}<br />
<br />
===Random Lack of Sound on Startup===<br />
If you randomly have no sound on startup, it may be because your system has multiple sound cards, and their order may sometimes change on startup. If this is the case, try [[#Set the default sound card|setting the default sound card]].<br />
<br />
If you use mpd and the configuration tips above do not work for you, try [http://mpd.wikia.com/wiki/Configuration#ALSA_MPD_software_volume_control reading this] instead.<br />
<br />
===Specific Program Problems===<br />
For other programs who insist on their own audio setup, eg, XMMS or Mplayer, you would need to set their specific options.<br />
<br />
For mplayer, open up {{ic|~/.mplayer/config}} (or {{ic|/etc/mplayer/mplayer.conf}} for global setting) and add the following line:<br />
ao=alsa<br />
<br />
For XMMS/Beep Media Player, go into their options and make sure the sound driver is set to Alsa, not oss.<br />
<br />
To do this in XMMS:<br />
* Open XMMS<br />
** Options -> preferences.<br />
** Choose the Alsa output plugin.<br />
<br />
For applications which do not provide a ALSA output, you can use aoss from the alsa-oss package. To use aoss, when you run the program, prefix it with {{ic|aoss}}, eg:<br />
aoss realplay<br />
<br />
pcm.!default{ ... } doesnt work for me anymore. but this does:<br />
pcm.default pcm.dmixer<br />
<br />
===Model Settings===<br />
Although Alsa detects your soundcard through the BIOS at times Alsa may not be able to recognize your [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt model type]. The soundcard chip can be found in {{ic|alsamixer}} (e.g. ALC662) and the model can be set in {{ic|/etc/modprobe.d/modprobe.conf}} or {{ic|/etc/modprobe.d/sound.conf}}. For example:<br />
<br />
options snd-hda-intel model=MODEL<br />
<br />
There are other model settings too. For most cases Alsa defaults will do. If you want to look at more specific settings for your soundcard take a look at the [http://bugtrack.alsa-project.org/main/index.php/Matrix:Main Alsa Soundcard List] find your model, then Details, then look at the "Setting up modprobe..." section. Enter these values in {{ic|/etc/modprobe.d/modprobe.conf}}. For example, for an Intel AC97 audio:<br />
<br />
{{bc|# ALSA portion<br />
alias char-major-116 snd<br />
alias snd-card-0 snd-intel8x0<br />
# module options should go here<br />
<br />
# OSS/Free portion<br />
alias char-major-14 soundcore<br />
alias sound-slot-0 snd-card-0<br />
<br />
# card #1<br />
alias sound-service-0-0 snd-mixer-oss<br />
alias sound-service-0-1 snd-seq-oss<br />
alias sound-service-0-3 snd-pcm-oss<br />
alias sound-service-0-8 snd-seq-oss<br />
alias sound-service-0-12 snd-pcm-oss}}<br />
<br />
===Conflicting PC Speaker===<br />
If you are sure nothing is muted, that your drivers are installed correctly, and that your volume is right, but you still do not hear anything, then try adding the following line to {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
<br />
options snd-NAME-OF-MODULE ac97_quirk=0<br />
<br />
The above fix has been observed to work with {{ic|via82xx}}<br />
options snd-NAME-OF-MODULE ac97_quirk=1<br />
The above fix has been reported to work with {{ic|snd_intel8x0}}<br />
<br />
===No Microphone Input===<br />
In alsamixer, make sure that all the volume levels are up under recording, and that CAPTURE is toggled active on the microphone (e.g. Mic, Internal Mic) and/or on Capture (in alsamixer, select these items and press space). Try making positive Mic Boost and raising Capture and Digital levels higher; this make make static or distortion, but then you can adjust them back down once you are hearing ''something'' when you record<br />
<br />
As the pulseaudio wrapper is shown as "default" in alsamixer, you may have to press F6 to select your actual soundcard first. You may also need to enable and increase the volume of Line-in in the Playback section.<br />
<br />
To test the microphone, run these commands (see arecord's man page for further information):<br />
arecord -d 5 test-mic.wav<br />
aplay test-mic.wav<br />
<br />
If all fails, you may want to eliminate hardware failure by testing the microphone with a different device.<br />
<br />
For at least some computers, muting a microphone (MM) simply means its input does not go immediately to the speakers. It still receives input.<br />
<br />
Many Dell laptops need "-dmic" to be appended to the model name in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-hda-intel model=dell-m6-dmic<br />
<br />
Some programs use try to use OSS as the main input software. Add the following lines to {{ic|/etc/modprobe.d/modprobe.conf}} to prevent OSS modules from being loaded:<br />
<br />
{{Note|The OSS modules are no longer autoloaded anyway.}}<br />
<br />
blacklist snd_pcm_oss<br />
blacklist snd_mixer_oss<br />
blacklist snd_seq_oss<br />
<br />
See also:<br />
* http://www.alsa-project.org/main/index.php/SoundcardTesting<br />
* http://alsa.opensrc.org/Record_from_mic<br />
<br />
===Setting the default Microphone/Capture Device===<br />
Some applications (Pidgin, Adobe Flash) do not provide an option to change the capture device. It becomes an issue if your microphone is on a separate device (e.g. USB webcam or microphone) than your internal sound card. To change only the default capture device, leaving the default playback device as is, you can modify your {{ic|~/.asoundrc}} file to include the following:<br />
<br />
pcm.usb<br />
{<br />
type hw<br />
card U0x46d0x81d<br />
}<br />
<br />
pcm.!default<br />
{<br />
type asym<br />
playback.pcm<br />
{<br />
type plug<br />
slave.pcm "dmix"<br />
}<br />
capture.pcm<br />
{<br />
type plug<br />
slave.pcm "usb"<br />
}<br />
}<br />
<br />
Replace "U0x46d0x81d" with your capture device's card name in ALSA. You can use {{ic|arecord -L}} to list all the capture devices detected by ALSA.<br />
<br />
===Internal Microphone not working===<br />
First make sure all the volume levels are up under recording in alsamixer. In my case adding the following option to /etc/sound.conf and reloading the snd-* module produced a new volume setting called Capture which was capturing for the internal mic. For eg, for snd-hda-intel add<br />
<br />
options snd-hda-intel enable_msi=1<br />
<br />
Then reload the module (as below), up the recording volume of Capture and then test.<br />
<br />
{{bc|# rmmod snd-hda-intel && modprobe snd-hda-intel}}<br />
<br />
===No Sound with Onboard Intel Sound Card===<br />
There may be an issue with two conflicting modules loaded, namely {{ic|snd_intel8x0}} and {{ic|snd_intel8x0m}}. In this case, blacklist snd_intel8x0m:<br />
<br />
{{hc|/etc/modprobe.d/modprobe.conf|blacklist snd_intel8x0m}}<br />
<br />
''Muting'' the "External Amplifier" in {{ic|alsamixer}} or {{ic|amixer}} may also help. See [http://alsa.opensrc.org/Intel8x0#Dell_Inspiron_8600_.28and_probably_others.29 the ALSA wiki].<br />
<br />
Unmuting the "Mix" setting in the mixer might help, also.<br />
<br />
===No Headphone Sound with Onboard Intel Sound Card===<br />
With '''Intel Corporation 82801 I (ICH9 Family) HD Audio Controller''' on laptop, you may need to add this line to modprobe or sound.conf:<br />
<br />
options snd-hda-intel model=$model<br />
<br />
Where $model is any one of the following (in order of possibility to work, but not merit):<br />
<br />
* dell-vostro<br />
* olpc-xo-1_5<br />
* laptop<br />
* dell-m6<br />
* laptop-hpsense<br />
<br />
Note: It may be necessary to put this "options" line below (after) any "alias" lines about your card.<br />
<br />
You can see all the available models in the kernel documentation. For example [http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.35.y.git;a=blob;f=Documentation/sound/alsa/HD-Audio-Models.txt;h=dc25bb84b83b49665a7ed850e7bf5423d50cd3ba;hb=HEAD here], but check that it is the correct version of that document for your kernel version.<br />
<br />
A list of available models is also available [http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt here]. To know your chip name type the following command (with * being corrected to match your files). Note that some chips could have been renamed and do not directly match the available ones in the file.<br />
<br />
cat /proc/asound/card*/codec* | grep Codec<br />
<br />
Note that there is a high chance none of the input devices (all internal and external mics) will work if you choose to do this, so it is either your headphones or your mic. Please report to ALSA if you are affected by this bug.<br />
<br />
And also, if you have problems getting beeps to work (pcspkr):<br />
<br />
options snd-hda-intel model=$model enable=1 index=0<br />
<br />
===No sound when S/PDIF video card is installed===<br />
Discover available modules and their order:<br />
$ cat /proc/asound/modules<br />
0 snd_hda_intel<br />
1 snd_ca0106<br />
<br />
Disable the undesired video card audio codec in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
# /etc/modprobe.d/modprobe.conf<br />
#<br />
install snd_hda_intel /bin/false<br />
<br />
If both devices use the same module, it might be possible to disable one of them in the BIOS.<br />
<br />
===Poor sound quality or clipping===<br />
If you experience poor sound quality, try setting the PCM volume (in alsamixer) to a level such that gain is 0.<br />
<br />
If snd-usb-audio driver has been loaded, you could try to enable {{ic|softvol}} in '''/etc/asound.conf''' file. Example configuration for the first audio device:<br />
pcm.!default {<br />
type plug<br />
slave.pcm "softvol"<br />
}<br />
pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
pcm "hw:0"<br />
period_time 0<br />
period_size 4096<br />
buffer_size 131072<br />
rate 50000<br />
}<br />
bindings {<br />
0 0<br />
1 1<br />
}<br />
}<br />
pcm.dsnooper {<br />
type dsnoop<br />
ipc_key 1024<br />
slave {<br />
pcm "hw:0"<br />
channels 2<br />
period_time 0<br />
period_size 4096<br />
buffer_size 131072<br />
rate 50000<br />
}<br />
bindings {<br />
0 0<br />
1 1<br />
}<br />
}<br />
pcm.softvol {<br />
type softvol<br />
slave { pcm "dmixer" }<br />
control {<br />
name "Master"<br />
card 0<br />
}<br />
}<br />
ctl.!default {<br />
type hw<br />
card 0<br />
}<br />
ctl.softvol {<br />
type hw<br />
card 0<br />
}<br />
ctl.dmixer {<br />
type hw<br />
card 0<br />
}<br />
<br />
===Pops When Starting and Stopping Playback===<br />
Some modules (e.g. snd_ac97_codec and snd_hda_intel) can power off your sound card when not in use. This can make an audible noise (like a crack/pop/scratch) when turning on/off your sound card. Sometimes even when move the slider volume, or open and close windows (KDE4). If you find this annoying try {{ic|modinfo snd_MY_MODULE}}, and look for a module option that adjusts or disables this feature.<br />
<br />
Example: to disable the power saving mode and solve cracking sound trough speakers problem, using snd_hda_intel add in {{ic|/etc/modprobe.d/modprobe.conf}}<br />
options snd_hda_intel power_save=0<br />
or<br />
options snd_hda_intel power_save=0 power_save_controller=N<br />
<br />
You can also try it with {{ic|1=modprobe snd_hda_intel power_save=0}} before.<br />
<br />
You may also have to unmute the 'Line' ALSA channel for this to work. Any value will do (other than '0' or something too high).<br />
<br />
''Example:'' on an onboard VIA VT1708S (using the snd_hda_intel module) these cracks occured even though 'power_save' was set to 0. Unmuting the 'Line' channel and setting a value of '1' solved the problem.<br />
<br />
Source: https://www.kernel.org/doc/Documentation/sound/alsa/powersave.txt<br />
<br />
If you use a laptop, pm-utils will change {{ic|power_save}} back to 1 when you go onto battery power even if you disable power saving in {{ic|/etc/modprobe.d}}. Disable this for pm-utils by disabling the script that makes the change (see [https://wiki.archlinux.org/index.php/Pm-utils#Disabling_a_hook Disabling a hook] for more information):<br />
# touch /etc/pm/power.d/intel-audio-powersave<br />
<br />
===S/PDIF Output Does Not Work===<br />
<br />
If the optical/coaxial digital output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try running<br />
# iecset audio on<br />
<br />
as root.<br />
<br />
You can also put this command in {{Ic|rc.local}} as it sometimes it may stop working after a reboot.<br />
<br />
===HDMI Output Does Not Work===<br />
If the HDMI output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try the following.<br />
<br />
Query for Playback Devices:<br />
<br />
$ aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
<br />
Now that we have the info for the HDMI device, try a test, In the example below, 0 is the card number and 3 is the device number.<br />
<br />
$ aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
If aplay does not output any errors, but still no sound is heared, "reboot" the receiver, monitor or tv set. Since the HDMI interface executes a handshake on connection, it might have noticed before that there was no audio stream embedded, and disabled audio decoding. In particular, if you are using a standalone window manager (don’t know about Gnome or KDE), you may need to have some sound playing ''while'' plugging in the HDMI cable.<br />
<br />
{{Note|If you are using an ATI card and linux 3.0, check your kernel/grub settings, you most likely need to use the ''''radeon.audio'''<nowiki>=</nowiki>'''1'''' boot parameter, or alternatively set up the option in your modprobe configuration files.}}<br />
<br />
If the test is successful, create or edit your ~/.asoundrc file to set HDMI as the default audio device.<br />
<br />
{{hc|~/.asoundrc|<br />
pcm.!default {<br />
type hw<br />
card 0<br />
device 3<br />
}<br />
}}<br />
<br />
Or you above config does not work try:<br />
{{hc|~/.asoundrc|<br />
defaults.pcm.card 0<br />
defaults.pcm.device 3<br />
defaults.ctl.card 0<br />
}}<br />
<br />
===HDMI Multi-channel PCM output does not work (Intel) ===<br />
As of Linux 3.1 multi-channel PCM output through HDMI with a Intel card (Intel Eaglelake, IbexPeak/Ironlake,SandyBridge/CougarPoint and IvyBridge/PantherPoint) is not yet supported. Support for it has been recently added and expected to be available in Linux 3.2. To make it work in Linux 3.1 you need to apply the following patches:<br />
<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=76adaa34db407f174dd06370cb60f6029c33b465 drm: support routines for HDMI/DP ELD]<br />
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=e0dac65ed45e72fe34cc7ccc76de0ba220bd38bb drm/i915: pass ELD to HDMI/DP audio driver]<br />
<br />
===HP TX2500===<br />
Add these 2 lines into {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-cmipci mpu_port=0x330 fm_port=0x388<br />
options snd-hda-intel index=0 model=toshiba position_fix=1<br />
<br />
options snd-hda-intel model=hp (works for tx2000cto)<br />
<br />
===Skipping Sound When Playing MP3===<br />
If you have sound skipping when playing MP3 files and you have more then 2 speakers attached to your computer (i.e. > 2 speaker system), run alsamixer and disable the channels for the speakers that you '''DO NOT''' have (i.e. do not enable the sound for the center speaker if you do not have a center speaker.<br />
<br />
===Using a USB Headset and External USB Sound Cards===<br />
If you are using a USB headset with ALSA you can try using {{AUR|asoundconf}} (currently only available from the [[AUR]]) to set the headset as the primary sound output. Before running make sure you have usb audio module enabled ({{ic|modprobe snd-usb-audio}}).<br />
<br />
# asoundconf is-active<br />
# asoundconf list<br />
# asoundconf set-default-card <chosen soundcard><br />
<br />
==== Crackling sound with USB devices ====<br />
If you experience crackling sound on USB devices, you can try tuning the snd-usb-audio for minimal latency.<br />
<br />
Add this to your {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
<br />
options snd-usb-audio nrpacks=1<br />
<br />
source: http://alsa.opensrc.org/Usb-audio#Tuning_USB_devices_for_minimal_latencies<br />
<br />
==== Hot-plugging a USB Sound Card ====<br />
In order to automatically make a USB Sound Card the primary output device, when the card is plugged in, you can use the following udev rules (e.g. add the following two lines to {{ic|/etc/udev/rules.d/00-local.rules}} and reboot).<br />
<br />
{{bc|1=KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"<br />
KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"}}<br />
<br />
===Error 'Unknown hardware' Appears After a Kernel Update===<br />
The following messages may be displayed during the start-up ALSA after the kernel update:<br />
Unknown hardware "foo" "bar" ...<br />
Hardware is initialized using a guess method<br />
/usr/sbin/alsactl: set_control:nnnn:failed to obtain info for control #mm (No such file or directory)<br />
<br />
or<br />
Found hardware: "HDA-Intel" "VIA VT1705" "HDA:11064397,18490397,00100000" "0x1849" "0x0397"<br />
Hardware is initialized using a generic method<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #1 (No such file or directory)<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #2 (No such file or directory)<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #25 (No such file or directory)<br />
/usr/sbin/alsactl: set_control:1328: failed to obtain info for control #26 (No such file or directory)<br />
<br />
Simply store ALSA mixer settings again (as root):<br />
# alsactl -f /var/lib/alsa/asound.state store<br />
<br />
It may be necessary configure ALSA again with alsamixer<br />
<br />
===HDA Analyzer===<br />
If the mappings to your audio pins(plugs) do not correspond but ALSA works fine, you could try HDA Analyzer -- a pyGTK2 GUI for HD-audio control can be found [http://www.alsa-project.org/main/index.php/HDA_Analyzer at the ALSA wiki].<br />
Try tweaking the Widget Control section of the PIN nodes, to make microphones IN and headphone jacks OUT. Referring to the Config Defaults heading is a good idea.<br />
<br />
NOTE: the script is done by such way that it is incompatible with python3 (which is now shipped with ArchLinux) but tries to use it.<br />
The workaround is: open "run.py", find all occurences of "python" (2 occurences - one on the first line, and the second on the last line) and replace them all by "python2".<br />
<br />
NOTE2: the script requires root acces, but running it via su/sudo is bogus. Run it via {{ic|kdesu}} or {{ic|gksu}}.<br />
<br />
===ALSA with SDL===<br />
If you get no sound via SDL and ALSA cannot be chosen from the application. Try setting the environmental variable SDL_AUDIODRIVER to alsa.<br />
# export SDL_AUDIODRIVER=alsa<br />
<br />
===Low Sound Workaround===<br />
<br />
If you are facing low sound even after maxing out your speakers/headphones, you can give the softvol plugin a try. Add the following to {{ic|/etc/asound.conf}}.<br />
{{bc|<nowiki><br />
pcm.!default {<br />
type plug<br />
slave.pcm "softvol"<br />
}<br />
<br />
pcm.softvol {<br />
type softvol<br />
slave {<br />
pcm "dmix"<br />
}<br />
control {<br />
name "Pre-Amp"<br />
card 0<br />
}<br />
min_dB -5.0<br />
max_dB 20.0<br />
resolution 6<br />
}<br />
</nowiki>}}<br />
{{note| You will probably have to restart the computer, as restarting the alsa daemon did not load the new configuration for me. Also, if the configuration does not work even after restarting, try changing {{ic|plug}} with {{ic|hw}} in the above configuration.}}<br />
<br />
After the changes are loaded successfully, you will see a {{ic|Pre-Amp}} section in alsamixer. You can adjust the levels there.<br />
{{note|Setting a high value for {{ic|Pre-Amp}} can cause sound distortion, so adjust it according to the level that suits you.}}<br />
<br />
===Popping sound after resuming from suspension===<br />
You might hear a popping sound after resuming the computer from suspension. This can be fixed by editing {{ic|/etc/pm/sleep.d/90alsa}} and removing the line that says {{ic|aplay -d 1 /dev/zero}}<br />
<br />
==Example configurations==<br />
See [[Advanced Linux Sound Architecture/Example Configurations]].<br />
<br />
==See also==<br />
* [http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt Advanced ALSA module configuration]<br />
* [http://alsa.opensrc.org/Main_Page Unofficial ALSA Wiki]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=36815 HOWTO: Compile driver from svn]</div>Notasynonym