https://wiki.archlinux.org/api.php?action=feedcontributions&user=Dcelasun&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:50:57ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:Dcelasun&diff=768086User:Dcelasun2023-02-19T20:24:30Z<p>Dcelasun: Cleanup</p>
<hr />
<div>Hi! See [https://aur.archlinux.org/packages?SeB=m&K=dcelasun&O=0&PP=50&SB=v&SO=d my AUR packages] for contact info.</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Kodi&diff=768085Kodi2023-02-19T20:18:25Z<p>Dcelasun: /* Troubleshooting */ Add audio workarounds for Kodi 20+</p>
<hr />
<div>[[Category:Home theater]]<br />
[[ja:Kodi]]<br />
[[zh-hans:Kodi]]<br />
[https://kodi.tv/ Kodi] (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS and Android, featuring a 10-foot user interface for use with televisions and remote controls. These can all be played directly from a CD/DVD, or from the hard-drive. Kodi can also play multimedia from a computer over a local network (LAN), or play media streams directly from the Internet. It can also be used to play and record live TV using a tuner, a backend server and a PVR plugin; more information about this can be found on the [https://kodi.wiki/view/PVR Kodi wiki].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|kodi}} package. Be sure to review/install optional dependencies listed by pacman to enable additional functionality.<br />
<br />
The {{pkg|kodi}} package supports for several composers, including [[Xorg]], [[Wikipedia:Mesa (computer graphics)#Generic Buffer Management|GBM]], and [[Wayland]]. In terms of functionality, GBM is currently the most feature rich. It is the only one of the three options able to display HDR content. X11 and Wayland are both a close second and should be considered on-par with GBM, however, a known limitation of Wayland is having the resolution and frame rate set in the compositor rather than in Kodi's GUI. As well, Wayland currently does not support VT switching. GBM has some known features it lacks compared to both X11 and Wayland. A complete list can be found in [https://github.com/xbmc/xbmc/issues/14876 Kodi issue 14876]. GBM may be a good choice for standalone operations since it runs directly on the GPU without the need for the added X11 layer.<br />
<br />
All of the official addons in the {{Grp|kodi-addons}} group are disabled by default and need to be enabled in Kodi's addon menu after installation.<br />
<br />
== Running ==<br />
<br />
There are two general use cases:<br />
<br />
# {{ic|/usr/bin/kodi}} is meant to be run by any user on an on-demand basis. Use it like any other program on the system.<br />
# {{ic|/usr/bin/kodi-standalone}} is meant to be run as the only graphical application, for example on a [[wikipedia:Home theater PC|HTPC]]. See [[#Running standalone]] for more information.<br />
<br />
== Running standalone ==<br />
<br />
Using standalone mode is advantageous for several reasons:<br />
<br />
# One can define an unprivileged user to run kodi and have no access to a shell.<br />
# When paired with a systemd unit (or equivalent, see below), this setup makes the box on which kodi is running more like an appliance.<br />
<br />
{{Warning|Select '''only one''' of the methods listed below.}}<br />
<br />
=== kodi-standalone service ===<br />
<br />
{{AUR|kodi-standalone-service}} provides three services and automatically creates and provisions the unprivileged user to run Kodi in standalone mode.<br />
* {{ic|kodi-x11.service}} (for X11)<br />
* {{ic|kodi-gbm.service}} (for GBM)<br />
* {{ic|kodi-wayland.service}} (for Wayland)<br />
<br />
{{Note|<br />
* The correct video driver and optionally [[hardware video acceleration]] is an assumed dependency.<br />
* The home/userdata directory for the created {{ic|kodi}} user is {{ic|/var/lib/kodi/}}.<br />
* If {{ic|kodi-x11.service}} fails to start, see [[Xorg#Rootless Xorg]] for possible workarounds.<br />
* Certain use cases require environment variables to be passed to the service. Define these variables in {{ic|/etc/conf.d/kodi-standalone}} and they will be passed along to the service.<br />
}}<br />
<br />
==== Recommended methods to reboot/shutdown using kodi-standalone service ====<br />
<br />
Be aware that these services run Kodi in systemd's ''system.slice'', not ''user.slice''. In order to have Kodi exit gracefully, initiate system reboot/shutdown with the respective Kodi actions '''instead of''' using {{ic|systemctl}}. Failure to do so will result in an ungraceful exit of Kodi and the loss of GUI settings, Kodi uptime etc. In principal this is no different than data loss occurring from a user doing work when a sysadmin issues a reboot command without prior warning. While it is possible to run Kodi in systemd's ''user.slice'' instead, doing so makes it difficult to use USB mounts within Kodi and to use pulseaudio for Kodi sessions.<br />
<br />
* '''Kodi GUI''': Selecting the corresponding option under power menu in the Kodi GUI.<br />
* '''Mobile device''': The official Android/iOS apps can also perform these actions (assuming the corresponding options are enabled in Kodi).<br />
* '''CLI''': Use {{ic|kodi-send}} provided by {{pkg|kodi-eventclients}} to send the {{ic|ShutDown()}} or the {{ic|Reboot}} command. The syntax is:<br />
$ kodi-send -a "Reboot"<br />
$ kodi-send -a "ShutDown()"<br />
<br />
=== Xsession with LightDM ===<br />
<br />
{{Note|<br />
* This assumes that a kodi user named {{ic|kodi}} is on the system and that the following file is present as described.<br />
* {{pkg|lightdm}} does not pull in an X server as a required dependency, it is optional. The X server listed as an optional dependency ({{Pkg|xorg-server-xephyr}}) does not work when run as root by {{ic|lightdm.service}} ({{Bug|52067}}, [https://bugs.launchpad.net/lightdm/+bug/852577 LightDM Bug 852577]). [[Xorg#Installation|Install xorg-server]].<br />
}}<br />
<br />
To use LightDM with automatic login, see [[LightDM#Enabling autologin]] and [[LightDM#Enabling interactive passwordless login]]. ''Kodi'' includes {{ic|kodi.desktop}} as [[xsession]].<br />
<br />
{{hc|/etc/lightdm/lightdm.conf|2=<br />
[Seat:seat0]<br />
pam-service=lightdm-autologin<br />
autologin-user=kodi<br />
autologin-user-timeout=0<br />
user-session=kodi<br />
}}<br />
<br />
=== Xsession with NoDM ===<br />
<br />
[[Nodm]] is an automatic display manager which automatically starts an X session at system boot.<br />
<br />
By creating a [[user]] for kodi (e.g. {{ic|useradd -mU kodi}}) and [[install]]ing {{Pkg|nodm}} we simply have to specify the kodi user inside:<br />
<br />
{{hc|/etc/nodm.conf|2=<br />
NODM_USER=kodi<br />
NODM_XSESSION=/home/kodi/.xinitrc<br />
}}<br />
<br />
Make sure to execute {{ic|kodi}} inside the [[xinitrc]] file.<br />
<br />
{{Note|The {{ic|.xinitrc}} file must be executable, so the {{ic|kodi}} user's home must not be mounted with the {{ic|noexec}} option.}}<br />
<br />
=== Socket activation ===<br />
<br />
Socket activation can be used to start Kodi when the user issues a Wakeup command from a remote control app like Kore, or makes a connection to Kodi's html control port. Start listening by [[starting]] {{ic|kodi@''user''.socket}} (replace ''user'' with the user running Kodi to be started as).<br />
<br />
There are no packaged {{ic|kodi@.service}} and {{ic|kodi@.socket}} files, one must create them manually. Depending on the setup, one can optionally change the ports in {{ic|kodi@.socket}}.<br />
<br />
{{hc|/etc/systemd/system/kodi@.service|<nowiki><br />
# This fails if the user does not have an X session.<br />
[Unit]<br />
Description=Launch Kodi on main display<br />
Conflicts=kodi.socket<br />
<br />
[Service]<br />
Type=simple<br />
Environment=DISPLAY=:0.0<br />
Nice=-1<br />
ExecStart=/usr/bin/su %i /usr/bin/kodi<br />
ExecStopPost=/usr/bin/systemctl --no-block start kodi@%i.socket<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/kodi@.socket|<nowiki><br />
[Unit]<br />
Conflicts=kodi@%i.service<br />
<br />
[Socket]<br />
# Unset <br />
ListenStream=<br />
# Start when receiving a TCP request on the http control port<br />
ListenStream=8080<br />
# start when receiving an UDP datagram (Wakeup/WOL)<br />
ListenDatagram=9<br />
<br />
[Install]<br />
WantedBy=sockets.target<br />
</nowiki>}}<br />
<br />
=== Start from remote control with LIRC / irexec ===<br />
<br />
Kodi can be configured to start via a key press. Users will need {{AUR|kodi-standalone-service}} and {{Pkg|lirc}}. This can be useful on setups running 24/7 and having kodi up on demand.<br />
<br />
See the corresponding [[LIRC]] article and create a functional setup with a remote. Also, the package {{AUR|kodi-standalone-service}} has to be installed.<br />
<br />
Generate the file {{ic|/var/lib/kodi/.lircrc}} with the following content:<br />
<br />
{{hc|/var/lib/kodi/.lircrc|<nowiki><br />
begin<br />
prog = irexec<br />
remote = devinput<br />
button = KEY_MEDIA<br />
config = pgrep kodi-standalone || /usr/bin/kodi-standalone -l /run/lirc/lircd<br />
repeat = 0<br />
end<br />
</nowiki>}}<br />
<br />
Adopt {{ic|button}} to whatever button on the remote is to start Kodi. One can use ''irw'' (see [[LIRC#Testing]]) to find out the correct values for {{ic|remote}} and {{ic|button}}.<br />
<br />
Create a [[Systemd#Drop-in files|drop-in]] for {{ic|kodi-xxx.service}}:<br />
<br />
{{hc|/etc/systemd/system/kodi-xxx.service.d/lirc.conf|2=<br />
[Service]<br />
ExecStart =<br />
ExecStart = /usr/bin/irexec<br />
}}<br />
<br />
[[Start]] {{ic|kodi-xxx.service}} and [[enable]] it to run at boot time.<br />
<br />
== Using a remote control ==<br />
<br />
As Kodi is geared toward being a remote-controlled media center via an official app, physical remote control, or USB/bluetooth keyboard/mouse.<br />
<br />
=== Using the Android or iOS app ===<br />
<br />
Both Android and iOS users can use the official app (currently free of charge) to control kodi once it is correctly setup to do so. Steps to configure both Kodi and the app are detailed on the [https://kodi.wiki/view/Official_Kodi_Remote Official Kodi Remote] and [https://kodi.wiki/view/Kore_Manual Kore Manual] page.<br />
<br />
{{Tip|Kore provides [[power management]] actions to perform remotely [[suspend]]/[[hibernation]] and [[Wake-on-LAN]] (WoL).}}<br />
<br />
=== Using a physical remote control ===<br />
<br />
Any PC with a supported IR receiver/remote, can use [[LIRC]] or even kernel supported modules to drive it. Configuring specific remotes with lirc is covered on the [[LIRC]] article.<br />
<br />
To work properly with Kodi, a file that maps the lirc events to Kodi keypresses is needed. Create an [[Wikipedia:XML|XML]] file at {{ic|~/.kodi/userdata/Lircmap.xml}} (note the capital 'L'). <br />
<br />
{{Note|Users running Kodi started with {{AUR|kodi-standalone-service}} will find the {{ic|kodi}} user's home ({{ic|~}}) under {{ic|/var/lib/kodi/}} and should substitute this in for the shortcut above. Also make sure that if creating this file as the root user, it gets proper [[ownership]] as {{ic|kodi:kodi}} when finished.}}<br />
<br />
{{ic|Lircmap.xml}} format is as follows: <br />
<br />
{{bc|1=<br />
<lircmap><br />
<remote device="devicename"><br />
<XBMC_button>LIRC_button</XBMC_button><br />
...<br />
</remote><br />
</lircmap><br />
}}<br />
<br />
* '''Device Name''' is whatever LIRC calls the remote. This is set using the '''Name''' directive in lircd.conf and can be viewed by running {{ic|irw}} and pressing a few buttons on the remote. IRW will report the name of the button pressed and the name of the remote will appear on the end of the line.<br />
* '''XBMC_button''' is the name of the button as defined in [https://kodi.wiki/view/Keymap keymap.xml].<br />
* '''LIRC_button''' is the name as defined in {{ic|lircd.conf}}. If {{ic|lircd.conf}} was autogenerated using {{ic|irrecord}}, these are the names selected for the buttons. Refer back to [[LIRC]] for more information.<br />
* A very thorough [https://kodi.wiki/view/LIRC LIRC] page hosted on the Kodi Wiki should be consulted for more help and information on this subject as this is out of scope of this article.<br />
<br />
=== HDMI-CEC ===<br />
<br />
With a supported [https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter USB-CEC adapter], Kodi can be used to automatically turn on and off the TV and other home theater equipment. Volume control from Kodi can be sent to a supported amplifier, one can manage DVD or Blu-Ray players from inside Kodi, and redirect the active source on the TV to whichever equipment needs it, all from one remote control. For more information see the [https://kodi.wiki/view/CEC official Kodi wiki page on CEC] and [http://libcec.pulse-eight.com/faq libCEC FAQ].<br />
<br />
Install {{Pkg|libcec}}.<br />
<br />
{{Expansion|Add reference for the need to add users to these groups.}}<br />
<br />
When connected, the USB-CEC's {{ic|/dev}} entry (usually {{ic|/dev/ttyACM*}}) will default to being owned by the {{ic|uucp}} group, so in order to use the device the user running Kodi needs to belong to that group. The user also needs to belong to the {{ic|lock}} group, otherwise Kodi will be unable to connect to the device. See [[Users and groups#Group management]] for instructions on how to add users to groups.<br />
<br />
* Add all users that will use Kodi to the {{ic|uucp}} and {{ic|lock}} [[user group]]s.<br />
* Users of {{AUR|kodi-standalone-service}} do not need to take any action as group membership is handled automatically upon installation.<br />
<br />
{{Note|Trying to use the USB-CEC without belonging to above groups may lead to problems, including Kodi crashes, so make sure the correct user belongs to both groups.}}<br />
<br />
== Sharing media and a centralized database across multiple nodes ==<br />
<br />
If multiple PCs on the same network are running Kodi, they can be configured to share a single media library (video and music). The advantage of this is media and key metadata are stored in one place, and are shared/updated by all nodes on the network. For example, users of this setup can:<br />
<br />
* Stop watching a movie or show in one room then finish watching it in another room automatically.<br />
* Share watched and unwatched status for media on all nodes.<br />
* Simplify the setup with only a single library to maintain.<br />
<br />
As well, the media itself can be located in one space thus allowing a lighter footprint of client systems (ie no need for large HDD space).<br />
<br />
Several things are needed for this to work:<br />
<br />
* Network exposed media (via protocols that Kodi can read, e.g. NFS or Samba).<br />
* A [[MariaDB]] server.<br />
<br />
{{Warning|When sharing a database, ALL clients need to be on the same major version of Kodi due to versioned requirements of the database schema. Refer to [https://kodi.wiki/view/Databases#Database_Versions database version table] for a list of database versions.}}<br />
<br />
{{Note|The following guide is only an example of one configuration and is not meant to be limiting but illustrative. Key steps are shown but a detailed discussion is not offered.}}<br />
<br />
These assumptions are used for the guide, substitute as needed:<br />
<br />
* The media is located under following mount points: {{ic|/mnt/shows}} {{ic|/mnt/movies}} {{ic|/mnt/music}}.<br />
* The network addresses of all nodes are within the 192.168.0.* subnet range.<br />
* The IP address of the machine running both the NFS exports and the MariaDB database is 192.168.0.105.<br />
* Each Kodi box is referred to as a node.<br />
* The Linux user running Kodi is 'kodi' on all nodes.<br />
<br />
For additional info, refer to the [https://kodi.wiki/view/MySQL/Setting_up_MySQL#Arch_Linux official Kodi wiki].<br />
<br />
=== NFS server export example ===<br />
<br />
This section provides an example using exports, see [[NFS]] for install and usage. Nexus v20.0 of Kodi contains initial support for NFSv4 exports. A limitation is that users of NFSv4 exports will have to manually add the exports/browsing the NFS network is not currently supported. Users will also need to restart Kodi after the sources have been added. Using a NFSv3 export does not have these caveats.<br />
<br />
Users wanting a pure NFSv4 setup should see [[NFS#Starting_the_server]] in order to keep things clean. Of course, this only applies to the box running the NFSv4 exports.<br />
<br />
{{Note|Users only need one box on the LAN to serve the content, therefore, do not repeat this for each node. The following example assumes the user is running Arch Linux, but any NFS server will work, be it Linux or BSD, etc.}}<br />
<br />
Create an empty directory in NFS root for each media directory to be shared. E.g.:<br />
<br />
# mkdir -p /srv/nfs/{shows,movies,music}<br />
<br />
[[NFS#Server|Bind mount]] the media directories to the empty directories in {{ic|/srv/nfs/}}.<br />
<br />
The following example is for a NFSv3 [[NFS#Server|exports]]:<br />
<br />
{{hc|/etc/exports.d/kodi.exports|2=<br />
/srv/nfs 192.168.0.0/24(ro,fsid=0,no_subtree_check)<br />
/srv/nfs/shows 192.168.0.0/24(ro,no_subtree_check,insecure)<br />
/srv/nfs/movies 192.168.0.0/24(ro,no_subtree_check,insecure)<br />
/srv/nfs/music 192.168.0.0/24(ro,no_subtree_check,insecure)<br />
}}<br />
<br />
The following example is for a NFSv4 [[NFS#Server|exports]]:<br />
<br />
{{hc|/etc/exports.d/kodi.exports|2=<br />
/srv/nfs 192.168.0.0/24(ro,fsid=0,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)<br />
/srv/nfs/shows 192.168.0.0/24(ro,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)<br />
/srv/nfs/movies 192.168.0.0/24(ro,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)<br />
/srv/nfs/music 192.168.0.0/24(ro,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)<br />
}}<br />
<br />
=== Install and set up the MariaDB server ===<br />
<br />
See [[MariaDB]] for installation and configuration instructions.<br />
<br />
To create a database for Kodi, use the following commands:<br />
<br />
$ mysql -u root -p<br />
<<enter the mariadb root password assigned in the first step>><br />
MariaDB [(none)]> CREATE USER 'kodi' IDENTIFIED BY 'kodi';<br />
MariaDB [(none)]> GRANT ALL ON *.* TO 'kodi';<br />
MariaDB [(none)]> flush privileges;<br />
MariaDB [(none)]> \q<br />
<br />
=== Set up Kodi to use the MariaDB library and the NFS exports ===<br />
<br />
==== Set up Kodi to use the common SQL database ====<br />
<br />
To tell Kodi to use the common database, insure that Kodi is not running, then create the following file:<br />
<br />
{{hc|~/.kodi/userdata/advancedsettings.xml|<br />
<advancedsettings><br />
<videodatabase><br />
<type>mysql</type><br />
<host>192.168.0.105</host><br />
<port>3306</port><br />
<user>kodi</user><br />
<pass>kodi</pass><br />
</videodatabase><br />
<br />
<musicdatabase><br />
<type>mysql</type><br />
<host>192.168.0.105</host><br />
<port>3306</port><br />
<user>kodi</user><br />
<pass>kodi</pass><br />
</musicdatabase><br />
<br />
<videolibrary><br />
<importwatchedstate>true</importwatchedstate><br />
<importresumepoint>true</importresumepoint><br />
</videolibrary><br />
</advancedsettings><br />
}}<br />
<br />
{{Tip|If using {{AUR|kodi-standalone-service}}, the default for the profile is {{ic|/var/lib/kodi/.kodi}} and be sure to chown the newly created file to the kodi user and group, i.e. {{ic|chown -R kodi:kodi /var/lib/kodi}}}}<br />
<br />
==== Set up network shares ====<br />
For NFSv3 shares, load Kodi and define the network shares that correspond to the exports by browsing to the following within the interface ''Video > Files > Add Videos > Browse > Network Filesystem(NFS)''.<br />
<br />
After a few seconds, the IP address corresponding to the NFS server should appear.<br />
<br />
Select {{ic|/srv/nfs/shows}} from the list of share and then ''OK'' from the menu on the right. Assign this share the category of ''TV Shows'' to setup the appropriate scraper and to populate the SQL database with the correct metadata.<br />
<br />
Repeat this browsing process for the "movies" and "music" and then exit Kodi once properly configured. At this point, the SQL tables should have been created.<br />
<br />
For NFSv4 shares, user cannot browse the network but will have to manually define them under ''Video > Files > Add Videos > Browse > Add network location...'' For there, change the Protocol to "Network File System (NFS)" and then define the server address (numerical IP or hostname) and then define the share under the Remote path section. Repeat for each export.<br />
<br />
{{Note|Even if Kodi is running on the same box that is also running the NFS exports and SQL server, one '''must''' setup the media using the nfs shares only.}}<br />
<br />
=== Cloning the configuration to other nodes on the network ===<br />
<br />
To set up another Kodi node on the network to use this library, simply copy {{ic|~/.kodi/userdata/advancedsettings.xml}} to that box and restart Kodi. There is NO need to copy any other files or to do any other setup steps on the new kodi node. The nfs exports, the metadata for the programming, any stop/start times, view status, etc. are all stored in the SQL tables.<br />
<br />
{{Note|One can optionally define other media sources that are not managed by kodi database, but they will be specific to that particular node.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Keep a log of what is watched ===<br />
<br />
Keep track of every video watched on kodi with {{AUR|kodi-logger}}.<br />
<br />
=== Speedup video playback (synchronized audio and video) up to 1.5x ===<br />
<br />
To enable speed-up and slow-down with audio/video sync (0.8x - 1.5x) do the following:<br />
* Create the following file that will map the {{ic|[}} and {{ic|]}} keys to the {{ic|tempo down}} and {{ic|tempo up}} actions, respectively:<br />
<br />
{{hc|~/.kodi/userdata/keymaps/custom.xml|2=<br />
<keymap><br />
<FullscreenVideo><br />
<keyboard><br />
<opensquarebracket>PlayerControl(tempodown)</opensquarebracket><br />
<closesquarebracket>PlayerControl(tempoup)</closesquarebracket><br />
</keyboard><br />
</FullscreenVideo><br />
<VideoMenu><br />
<keyboard><br />
<opensquarebracket>PlayerControl(tempodown)</opensquarebracket><br />
<closesquarebracket>PlayerControl(tempoup)</closesquarebracket><br />
</keyboard><br />
</VideoMenu><br />
</keymap><br />
}}<br />
<br />
* Restart kodi which will read in these changes.<br />
* Navigate to ''System > Player > Videos > Playback'' and enable "Sync playback to display" option.<br />
<br />
{{Note|On low powered devices, enabling this is known to sporadic cause A/V sync errors accompanied by entries in the {{ic|kodi.log}} such as: {{ic|WARNING <general>: ActiveAE - large audio sync error: -89449.339487}}}}<br />
<br />
=== Modify default values for watch and resume points ===<br />
<br />
Some users may wish to make the thresholds Kodi uses to create a resume point/consider a video "watched" entirely. Do so by editing {{ic|~/.kodi/userdata/advancedsettings.xml}} inserting the following three xml fields:<br />
<br />
* '''ignoresecondsatstart''': the number of seconds to wait before keeping track of the start point. If users watch a value below the one defined, no start point is recorded. Default is 180.<br />
* '''playcountminimumpercent''': the percentage of total play time to consider something watched. If users watch more of the video that this number but not the entire video, it is considered watched and any previously recorded resume point is deleted upon stopping and finally, the video is flagged as watched. Default is 90.<br />
* '''ignorepercentatend''': the percentage of total play time at the end of a video to ignore making a resume point. This is related to the previous setting except it considers the last x percent of the video. If users watch enough content to enter this space of the file, no resume point is saved and the video is flagged as watched. Default is 8.<br />
<br />
{{hc|~/.kodi/userdata/advancedsettings.xml|2=<br />
<advancedsettings><br />
<video><br />
<!-- see https://kodi.wiki/view/HOW-TO:Modify_automatic_watch_and_resume_points --><br />
<ignoresecondsatstart>10</ignoresecondsatstart><br />
<playcountminimumpercent>90</playcountminimumpercent><br />
<ignorepercentatend>8</ignorepercentatend><br />
</video><br />
</advancedsettings><br />
}}<br />
<br />
=== CLI for kodi ===<br />
<br />
* {{pkg|kodi-eventclients}} package provides {{ic|kodi-send}} which can send valid [https://kodi.wiki/view/Action_IDs kodi action] or [https://kodi.wiki/view/List_of_built-in_functions#List_of_functions kodi function] to kodi from the shell.<br />
<br />
* {{AUR|texturecache}} can handle many aspects of library management, from clean-up of unused images, to searching, to querying what is currently playing.<br />
<br />
=== Hardware video acceleration ===<br />
<br />
Enable and configure [[hardware video acceleration]] to speed up playback performance.<br />
<br />
Restart Kodi and enable the hardware backend(s) in Playback under Settings.<br />
<br />
=== Use Kodi to view security camera streams (rtsp or rtmp) ===<br />
<br />
Since Kodi uses ffmpeg for video playback, it is able to play streams such as rtsp and rtmp can be viewed. To do so, simply create a txt file in the filesystem exposed to the kodi user containing the stream. For example:<br />
$ cat front-door.strm<br />
rtsp://username:password@10.1.10.101<br />
<br />
Optionally meta-data, such as cover art and summaries can also be associated to the .strm file just like normal entries in a library by using an NFO file.<br />
<br />
=== UPnP and DLNA ===<br />
<br />
Go to ''Settings > Services > UPnP/DLNA'' and toggle ''Enable UPnP support''.<br />
<br />
=== Adjusting CD/DVD drive speed ===<br />
<br />
The ''eject'' program from the {{Pkg|util-linux}} package does a nice job for this, but its setting is cleared as soon as the media is changed.<br />
<br />
This udev-rule reduces the speed permanently:<br />
<br />
{{hc|/etc/udev/rules.d/dvd-speed.rules|2=<br />
KERNEL=="sr0", ACTION=="change", ENV{DISK_MEDIA_CHANGE}=="1", RUN+="/usr/bin/eject -x 2 /dev/sr0"<br />
}}<br />
<br />
Replace {{ic|sr0}} with the device name of the optical drive. Replace {{ic|-x 2}} with {{ic|-x 4}} if the preference is 4x-speed instead of 2x-speed.<br />
<br />
After creating the file, reload the udev rules with<br />
<br />
# udevadm control --reload<br />
<br />
=== Use port 80 for webserver ===<br />
<br />
Kodi has a webservice that allows interaction through a web-interface. By default, it uses port {{ic|8080}} as {{ic|80}} requires root privileges. Use the following to permit it to use low port numbers:<br />
<br />
# setcap 'cap_net_bind_service=+ep' /usr/lib/kodi/kodi.bin<br />
<br />
Restart Kodi and set port {{ic|80}} in the configuration menu (''Services > Webserver > Port'').<br />
<br />
=== Audio passthrough outputs ===<br />
<br />
{{Merge|#Audio passthrough output device list in Kodi 20+|This looks like it's about the same topic?}}<br />
<br />
With the update to Kodi 20 Nexus, users may encounter audio issues with the new required, default, [[PipeWire]] audio backend. <br />
<br />
An easy way to regain a list of all audio output devices seems to be similar to the case for [[#Using ALSA]]—starting Kodi with the {{ic|1=KODI_AE_SINK=ALSA}} [[environment variable]] which will allow restore the expected behavior.<br />
<br />
=== Using ALSA ===<br />
<br />
If [[PulseAudio]] does not work properly, try using [[ALSA]] directly by starting Kodi with the {{ic|1=KODI_AE_SINK=ALSA}} [[environment variable]]. The Kodi wiki for NUC devices provides [https://kodi.wiki/view/Archive:Install_Kodi_on_an_Intel_NUC#disable_PulseAudio instructions]<br />
<br />
If using {{ic|kodi-standalone}}, change the {{ic|APP}} variable in {{ic|/usr/bin/kodi-standalone}} to<br />
<br />
APP="${bindir}/pasuspender -- env KODI_AE_SINK=ALSA ${bindir}/${bin_name} --standalone $@"<br />
<br />
If the above fix still does not work with kodi-standalone try editing the following<br />
<br />
{{hc|/usr/bin/kodi-standalone|<nowiki><br />
systemctl --user mask pulseaudio.socket<br />
systemctl --user stop pulseaudio<br />
<br />
APP=Kodi<br />
prefix="/usr"<br />
exec_prefix="/usr"<br />
bindir="/usr/bin"<br />
bin_name=kodi<br />
APP="${bindir}/${bin_name} --standalone $@"<br />
<br />
#PULSE_START="$(command -v start-pulseaudio-x11)"<br />
#if [ -n "$PULSE_START" ]; then<br />
# $PULSE_START<br />
#else<br />
# PULSE_SESSION="$(command -v pulse-session)"<br />
# if [ -n "$PULSE_SESSION" ]; then<br />
# XBMC="$PULSE_SESSION $XBMC"<br />
# fi<br />
#fi<br />
<br />
</nowiki>}}<br />
<br />
=== Audio passthrough output device list in Kodi 20+ ===<br />
<br />
One can allow an external receiver or sound bar to decode audio by enabling passthrough. This is useful for files encoded in TrueHD or Atmos. If using PulseAudio, follow the instructions at https://kodi.wiki/view/PulseAudio to first enable passthrough in PulseAudio. Once complete, the corresponding passthrough options should appear in Kodi. If using ALSA, the passthrough options will appear in Kodi without modifications provided that the {{ic|1=AE_SINK=ALSA}} environment variable is defined prior to starting kodi.<br />
<br />
{{Note|<br />
* PulseAudio requires the output in Kodi to be set to 2 channel. Audio encoded in formats not passed through will only be sent as stereo audio. Use ALSA to support passthrough and passing decoded surround audio signals<br />
* PulseAudio does not support TrueHD, DTS-MA, or Atmos passthrough. Use ALSA to pass these to through the receiver.<br />
}}<br />
<br />
Another way of getting TrueHD and DTS-MA passthrough without disabling Pulseaudio or Pipewire-Pulse is to use an external player like MPV, first create the file {{ic|~/.kodi/userdata/playercorefactory.xml}} then paste the following into it:<br />
<br />
<playercorefactory><br />
<players><br />
<player name="MPV" type="ExternalPlayer" audio="false" video="true"><br />
<filename>/usr/bin/mpv</filename><br />
<args>--fs=yes "{1}"</args><br />
<hidexbmc>true</hidexbmc><br />
</player><br />
</players><br />
<rules action="prepend"><br />
<rule video="true" player="MPV"/><br />
</rules><br />
</playercorefactory><br />
<br />
{{Merge|mpv|Appears to partially duplicate [[mpv#Specify an audio output]] and [[mpv#HD Audio passthrough]].}}<br />
<br />
MPV should now be the default media player for Kodi. To set the correct audio output device for MPV, use the following command to show a list of available audio devices:<br />
<br />
$ mpv --audio-device=help<br />
<br />
For example:<br />
<br />
alsa/hdmi:CARD=NVidia,DEV=1<br />
<br />
Now edit {{ic|~/.config/mpv/mpv.conf}} and add the following lines:<br />
<br />
audio-spdif=ac3,eac3,dts-hd,truehd<br />
audio-device=alsa/hdmi:CARD=NVidia,DEV=1<br />
<br />
To have auto switching of refresh rates create the following folder {{ic|~/.config/mpv/scripts}} then download and place [https://github.com/lvml/mpv-plugin-xrandr/blob/master/xrandr.lua mpv-plugin-xrandr/xrandr.lua] into that folder.<br />
<br />
=== Kodi JSON-RPC API to alter settings from external tools ===<br />
<br />
Users can interact directly with Kodi on the CLI or from a python script etc. by making use of the [https://kodi.wiki/view/JSON-RPC_API/v12 JSON-RPC API].<br />
<br />
For example, using {{pkg|curl}}:<br />
$ curl -v -H "Content-type: application/json" -d \<br />
'{"jsonrpc":"2.0","id":1,"method":"Settings.GetSettingValue","params":{"setting":"audiooutput.audiodevice"}}' \<br />
http://localhost:8080/jsonrpc -u xbmc:xbmc<br />
<br />
Another example is [https://github.com/graysky2/streamzap/blob/master/kodi/audio_switch/audio_switch.py this python script] which simply toggles between two groups of settings, in this case, toggling the audio source back-and-forth between HDMI and optical out.<br />
<br />
=== Fix for delayed startup on wifi ===<br />
<br />
If running with WiFi only (wired network unplugged) while [[#Sharing media and a centralized database across multiple nodes]], kodi will likely start before the wireless network is up, which will result in failure to connect to the shares and to the SQL server. Assuming the network is managed by the default [[systemd-networkd]], this can be fixed by using a [[drop-in file]] for {{ic|systemd-networkd-wait-online.service}}:<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore eth0<br />
<br />
=== Run kodi in a window manager ===<br />
<br />
Users running kodi in a [[Window manager]] may see a black screen at exit. To fix this, try switching to another tty. A possible solution is to run kodi with this script (running as the root user):<br />
<br />
{{hc|kodi.sh|<br />
#!/bin/sh<br />
kodi-standalone<br />
sudo chvt 2 <br />
sleep 1<br />
sudo chvt 1<br />
}}<br />
<br />
To make sure that [[sudo]] does not ask for password for {{ic|chvt}} add this line to {{ic|sudoers}} file:<br />
<br />
{{hc|/etc/sudoers|2=<br />
''UserNameHere'' ALL=NOPASSWD: /usr/bin/chvt<br />
}}<br />
<br />
=== USB DAC not working ===<br />
<br />
Users of USB DAC/sound cards may experience distorted sound/clicks/pops or no sound at all when selecting it from Audio settings. A possible fix: <br />
<br />
Open {{ic|guisettings.xml}} (it should be under {{ic|/var/lib/kodi/.kodi/userdata/}} if using the supplied {{ic|kodi-xxx.service}}) and change<br />
<br />
<processquality default="'''true'''">'''101'''</processquality><br />
<br />
to<br />
<br />
<processquality default="'''false'''">'''100'''</processquality><br />
<br />
=== Virtual file system support ===<br />
<br />
Kodi provides addons for accessing various virtual file systems from within Kodi. RAR archives can be accessed using {{AUR|kodi-addon-vfs-rar}}. SFTP shares can be accessed using {{AUR|kodi-addon-vfs-sftp}}. Super Audio CD ISO files can be access using {{AUR|kodi-addon-vfs-sacd}}. Each of these addons must be enabled within Kodi's addon manager in order to be utilized.<br />
<br />
=== Inhibit KDE automatic sleep during playback ===<br />
<br />
Using the add-on [https://sourceforge.net/projects/osscreensavermanager/ ossscreensavermanager] in combination with commands using kwriteconfig5 it is possible to inhibit KDE's power saving functions during playback. Install the add-on, then under its advanced settings write under "Command to suspend screen saver":<br />
<br />
kwriteconfig5 --file powermanagementprofilesrc --group AC --group SuspendSession --key idleTime 1800000<br />
<br />
Under "Command to resume screen saver", write:<br />
<br />
kwriteconfig5 --file powermanagementprofilesrc --group AC --group SuspendSession --key idleTime 86400000<br />
<br />
In this example, the system suspends after 360 minutes during playback, and after 30 minutes without playback.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Accessing Kodi logs ===<br />
<br />
In case of an error the first point to start investigation can be {{ic|~/.kodi/temp/kodi.log}}.<br />
<br />
=== Fullscreen mode stretches Kodi across multiple displays ===<br />
<br />
For a multi-monitor setup, Kodi may default to stretching across all screens. One can restrict the fullscreen mode to one display by setting the [[environment variable]] {{ic|SDL_VIDEO_FULLSCREEN_HEAD}} to the number of the desired target display. For example, having Kodi show up on display 0, add the following line to the Kodi user's {{ic|~/.bashrc}} configuration:<br />
<br />
SDL_VIDEO_FULLSCREEN_HEAD=0<br />
<br />
{{Note|Mouse cursor will be held inside screen with Kodi.}}<br />
<br />
=== H.264 playback is using only a single core ===<br />
<br />
{{Tip|By default, press {{ic|O}} during playback to show codec information and CPU usage. More information about this overlay can be found at https://kodi.wiki/view/Codecinfo.}}<br />
<br />
If the hardware does not or cannot make use of acceleration, disable it and explicitly set video decoding to software.<br />
This is because [https://forum.kodi.tv/showthread.php?tid=170084&pid=1789661#pid1789661 H.264 decoding is only multithreaded when video decoding is set to software].<br />
<br />
To achieve this, go to ''System Settings > Video''. Set the {{ic|settings level}} to {{ic|Advanced}} or {{ic|Expert}}. Then go to ''Acceleration'' and set {{ic|Decoding method}} to {{ic|software}}.<br />
<br />
=== Kodi hangs on exit, fully occupying one CPU core, UI unresponsive ===<br />
<br />
This problem can arise with third-party plugins installed, there is some issue with their termination[https://www.linuxquestions.org/questions/linux-software-2/kodi-freezes-on-exit-kodi-bin-won't-die-4175588180/],[https://www.reddit.com/r/archlinux/comments/5029oo/kodi_freezes_on_exit_kodibin_wont_die/].<br />
<br />
Workaround: find proper UI description file ({{ic|DialogButtonMenu.xml}}) and tweak exit button type from internal Kodi's {{ic|Quit()}} function call to sending signal from outside system to Kodi. Here is one-liner that makes modifications to any skin from the default Kodi package:<br />
<br />
# find /usr/share/kodi/addons/skin.* -name DialogButtonMenu.xml -exec sed -i 's%<onclick>Quit()</onclick>%<onclick>System.Exec ("killall --signal SIGHUP kodi.bin")</onclick>%' {} \;<br />
<br />
=== kodi-standalone will not play DVDs ===<br />
<br />
If kodi-standalone will not play DVDs, it may help to install [[udisks]].<br />
<br />
=== Kodi launched from the tty does not receive keyboard input ===<br />
<br />
{{Accuracy|Adding write access to {{ic|tty[0-9]*}} to all users is not safe. Furthermore, there should be a bug report.}}<br />
<br />
First create udev rules so that Kodi can access the input devices. Create these two files:<br />
<br />
{{hc|/etc/udev/rules.d/10-permissions.rules|<br />
# input<br />
KERNEL{{=}}{{=}}"mouse*{{!}}mice{{!}}event*", MODE{{=}}"0660", GROUP{{=}}"input"<br />
KERNEL{{=}}{{=}}"ts[0-9]*{{!}}uinput", MODE{{=}}"0660", GROUP{{=}}"input"<br />
KERNEL{{=}}{{=}}js[0-9]*, MODE{{=}}0660, GROUP{{=}}input<br />
# tty<br />
KERNEL{{=}}{{=}}tty[0-9]*, MODE{{=}}0666<br />
# vchiq<br />
SUBSYSTEM{{=}}{{=}}vchiq, GROUP{{=}}video, MODE{{=}}0660<br />
}}<br />
<br />
{{hc|/etc/udev/rules.d/99-input.rules|<br />
SUBSYSTEM{{=}}{{=}}input, GROUP{{=}}input, MODE{{=}}0660<br />
KERNEL{{=}}{{=}}tty[0-9]*, GROUP{{=}}tty, MODE{{=}}0660<br />
}}<br />
<br />
Then [[Users_and_groups#Group_management|add your user to the group]] {{ic|input}} and reboot.<br />
<br />
=== Low volume or no sound output with Kodi 20 ===<br />
<br />
With version 20, Kodi uses [[PipeWire]] by default. This can cause [https://github.com/xbmc/xbmc/issues/22747 low volume] or [https://old.reddit.com/r/kodi/comments/10rxr1l/no_audio_after_upgrading_to_kodi_20_defaults_to/ missing audio] on some systems.<br />
<br />
As a workaround, you can disable the PipeWire socket with {{ic|systemctl --global disable pipewire.socket}} and let Kodi's heuristics pick a fallback, or you can force the use of [[ALSA]] or [[PulseAudio]] by adding {{ic|KODI_AE_SINK{{=}}ALSA}} or {{ic|KODI_AE_SINK{{=}}PULSE}} respectively to {{ic|/etc/conf.d/kodi-standalone}}.<br />
<br />
== See also ==<br />
<br />
* [https://kodi.wiki/view/Main_Page Kodi Wiki] - Excellent resource with much information about Arch Linux specifically<br />
* [[Wikipedia:Kodi (software)]]<br />
* http://www.hdpfans.com/thread-329076-1-1.html - Kodi/xbmc Chinese plug-in library installation method<br />
* https://github.com/taxigps/xbmc-addons-chinese - xbmc-addons-chinese: Addon scripts, plugins, and skins for XBMC Media Center. Special for chinese laguage.</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Talk:Visual_Studio_Code&diff=590342Talk:Visual Studio Code2019-11-27T08:16:32Z<p>Dcelasun: /* snap installation */ clarify insiders AUR package</p>
<hr />
<div><br />
== <s>C# debugging extra package</s> ==<br />
<br />
The page currently says "If you want to debug C# code install icu55AUR otherwise you will end up with a 'Debug adapter process has terminated unexpectedly' error". I installed VS Code for the first time about a few weeks ago and I didn't even read this part of the wiki page because I just installed the "visual-studio-code" package from the AUR and it worked fine. The first project I tried to create was a C# one (ASP.NET Core). Debugging worked fine.<br />
<br />
Could this be outdated information?<br />
<br />
--[[User:Welkie|Welkie]] ([[User talk:Welkie|talk]]) 19:00, 14 October 2017 (UTC)<br />
<br />
:Seems to be fixed since [https://wiki.archlinux.org/index.php?title=Visual_Studio_Code&diff=522827&oldid=509306]. -- [[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 11:59, 28 January 2019 (UTC)<br />
<br />
== vsdbg ==<br />
<br />
Has anyone gotten debugging working with {{Pkg|code}} (open-source release)?<br />
<br />
The official (AFAIK) debugger {{ic|vsdbg}} is not included in the open-source release: https://aka.ms/VSCode-DotNet-DbgLicense<br />
<br />
Is it not possible to download {{ic|vsdbg}} manually? Eg. https://aka.ms/getvsdbgsh<br />
<br />
[[User:Aude|Aude]] ([[User talk:Aude|talk]]) 08:27, 8 May 2019 (UTC)<br />
<br />
:I managed to do it using {{Aur|netcoredbg}}, though it's not very well documented.<br />
:The way I did was by adding this to the default launch configuration for .NET Core:<br />
{{hc|./.vscode/launch.json|<br />
...<br />
"pipeTransport": {<br />
"pipeCwd": "${workspaceFolder}",<br />
"pipeProgram": "/usr/bin/bash",<br />
"pipeArgs": ["-c"],<br />
"debuggerPath": "/usr/bin/netcoredbg"<br />
}<br />
...<br />
}}<br />
:This will trick Code into running {{ic|netcoredbg}} instead of {{ic|vsdbg}}. From what I understand {{ic|pipeTransport}} is used for SSH configurations, but you can use a shell just the same to take advantage of {{ic|debuggerPath}}.<br />
:[[User:Luluco250|Luluco250]] ([[User talk:Luluco250|talk]]) 16:11, 7 September 2019 (UTC)<br />
<br />
== snap installation ==<br />
<br />
snap is becoming the preferred method for the installation of VSCode, <br />
the AUR for [https://aur.archlinux.org/packages/visual-studio-code-insiders/ Visual Studio Code Insiders] is flagged out of date, and snap just makes it easy to install and update.<br />
<br />
There are two versions of Visual Studio Code: open-source OSS and Microsoft vscode, this only applies to vscode. <br />
<br />
snap is currently only in AUR, to install from AUR you need a utility like yay, to install it:<br />
<br />
$ sudo pacman --noconfirm --needed -S yay<br />
<br />
snap has a stable release<br />
<br />
$ yay --noconfirm --needed -S snapd<br />
<br />
or the git release that may be newer<br />
<br />
$ yay --noconfirm --needed -S snapd-git<br />
<br />
To get it to run using AppArmor<br />
<br />
$ sudo systemctl enable --now apparmor.service<br />
<br />
To get it to automatically update snap packages<br />
<br />
$ sudo systemctl enable --now snapd.apparmor.service<br />
<br />
$ sudo snap find vscode<br />
Name Version Publisher Notes Summary<br />
code 8795a988 vscode✓ classic Code editing. Redefined.<br />
code-insiders a747d264 vscode✓ classic Code editing. Redefined.<br />
<br />
To install Visual Studio Code<br />
<br />
$ sudo snap install code --classic<br />
<br />
or to install Visual Studio Code Insiders<br />
<br />
$ sudo snap install code-insiders --classic<br />
<br />
[[User:Flesh|Flesh]] ([[User talk:Flesh|talk]]) 05:46, 27 November 2019 (UTC)<br />
<br />
<br />
: > the AUR for Visual Studio Code Insiders is flagged out of date<br />
<br />
: I'm the maintainer of that package. The flag is wrong as mentioned in the sticky, because the package is self updating. <br />
<br />
: [[User:Dcelasun|Dcelasun]] ([[User talk:Dcelasun|talk]])</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Visual_Studio_Code&diff=584729Visual Studio Code2019-10-08T08:25:07Z<p>Dcelasun: /* Unable to move items to trash */ Default trash is now "gio"</p>
<hr />
<div>[[Category:Text editors]]<br />
[[ja:Visual Studio Code]]<br />
[[zh-hans:Visual Studio Code]]<br />
[https://code.visualstudio.com/ Visual Studio Code] is a cross-platform, free and open-source (licensed under the MIT License) text editor developed by Microsoft and written in JavaScript and TypeScript. It is built on the Electron framework and is extensible using extensions, which can be browsed [https://marketplace.visualstudio.com/VSCode on the web] or from within the text editor itself. While the project is open-source, a proprietary build (licensed under an End-User License Agreement) is also provided by Microsoft. For an explanation of the mixed licensing, see [https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005 this GitHub comment].<br />
<br />
== Installation ==<br />
The following packages provide VSCode:<br />
<br />
* {{Pkg|code}} (open-source release)<br />
* {{AUR|visual-studio-code-bin}} (Microsoft-branded release)<br />
* {{AUR|visual-studio-code-insiders}} (Microsoft-branded release, updated daily)<br />
* {{AUR|code-git}} (in-development open-source version)<br />
* {{AUR|vscodium-bin}} (another open-source version with a community-driven default configuration)<br />
<br />
The Microsoft [https://github.com/microsoft/ptvsd ptvsd] (Python Tools for Visual Studio Debug) server/module is available at {{AUR|python-ptvsd}}.<br />
<br />
== Usage ==<br />
<br />
Run {{ic|code}} to start the application (or {{ic|code-git}} when using {{AUR|code-git}}).<br />
<br />
If for any reason you wish to launch multiple instances of Visual Studio Code, the {{ic|-n}} flag can be used.<br />
<br />
==Configuration==<br />
<br />
{{Pkg|code}} stores settings in {{ic|~/.config/Code - OSS/User/settings.json}}.<br />
<br />
{{AUR|visual-studio-code-bin}} stores settings in {{ic|~/.config/Code/User/settings.json}}.<br />
<br />
===Integrated Terminal===<br />
<br />
''View > Integrated Terminal'' or {{ic|Ctrl + `}} opens up an integrated terminal.<br />
By default, [[Bash]] is used with no additional arguments, although this can be changed.<br />
{{ic|terminal.integrated.shell.linux}} sets the default shell to be used and<br />
{{ic|terminal.integrated.shellArgs.linux}} sets the arguments to be passed to the shell.<br />
<br />
Example:<br />
<br />
{{hc|~/.config/Code/User/settings.json|<br />
"terminal.integrated.shell.linux": "/usr/bin/fish",<br />
"terminal.integrated.shellArgs.linux": ["-l","-d 3"]<br />
}}<br />
<br />
===External Terminal===<br />
<br />
If you are using '''Terminator''' as default terminal for Arch and you have an error on Visual Studio Code: {{ic|Unable to launch debugger worker process (vsdbg) through the terminal. spawn truecolor ENOENT}}, you can change the terminal that will be used by Visual Studio to another terminal (eg gnome-terminal).<br />
<br />
{{ic|"terminal.external.linuxExec": "Yours alternative terminal"}} sets the default terminal to be used for exec debug.<br />
<br />
Example:<br />
<br />
{{hc|~/.config/Code/User/settings.json|<br />
"terminal.external.linuxExec": "gnome-terminal"<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Global menu not working in KDE/Plasma ===<br />
<br />
Visual Studio Code uses DBus to pass the menu to Plasma, try installing {{Pkg|libdbusmenu-glib}}<br />
<br />
=== Unable to move items to trash ===<br />
<br />
By default, [https://electron.atom.io/ Electron] apps use {{ic|gio}} to delete files. Different trash implementations can be used by setting the {{ic|ELECTRON_TRASH}} [[environment variable]].<br />
<br />
For example, for deleting files under [[Plasma]]:<br />
$ ELECTRON_TRASH=kioclient5 code<br />
<br />
At the time of writing, Electron supports {{ic|kioclient5}}, {{ic|kioclient}}, {{ic|trash-cli}}, {{ic|gio}} (default) and {{ic|gvfs-trash}} (deprecated). More info is available at this [https://github.com/electron/electron/blob/master/docs/api/environment-variables.md#electron_trash-linux documentation page].<br />
<br />
=== Unable to debug C# ===<br />
<br />
If you want to debug C#[[.NET_Core|.NET]] (using the [http://www.omnisharp.net OmniSharp extension]) then you need to install the Microsoft branded release (from the AUR). This is apparently because the .NET Core debugger is only licensed to be used with official Microsoft products - see https://github.com/OmniSharp/omnisharp-vscode/issues/1431#issuecomment-297578930<br />
<br />
Using the the open-source package, debugging fails fairly quietly. The debug console will just show the initial message and nothing more: <br />
{{bc|You may only use the Microsoft .NET Core Debugger (vsdbg) with<br />
Visual Studio Code, Visual Studio or Visual Studio for Mac software<br />
to help you develop and test your applications.}}<br />
<br />
But in another way, you can use [https://github.com/Samsung/netcoredbg netcoredbg],{{AUR|netcoredbg}}<br />
<br />
=== Unable to open .csproj with OmniSharp server, invalid Microsoft.Common.props location ===<br />
<br />
You have to switch from mono to proper SDK version props.<br />
<br />
{{hc|/opt/dotnet/sdk/{VERSION}/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props|<br />
$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props<br />
}}<br />
<br />
Modify import to look like this:<br />
<br />
{{hc|/opt/dotnet/sdk/{VERSION}/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props|<br />
/opt/dotnet/sdk/{VERSION}/Current/Microsoft.Common.props<br />
}}<br />
<br />
=== Error from OmniSharp that MSBuild cannot be located ===<br />
<br />
It's noted in the [https://github.com/OmniSharp/omnisharp-roslyn#introduction OmniSharp introduction] that Arch Linux users should install the {{AUR|msbuild-stable}} package. Without it, you might get an error like:<br />
<br />
{{hc|1=OmniSharp Log|2=<br />
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator<br />
Registered MSBuild instance: StandAlone 15.0 - "~/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin"<br />
MSBuildExtensionsPath = /usr/lib/mono/xbuild<br />
BypassFrameworkInstallChecks = true<br />
CscToolPath = ~/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin/Roslyn<br />
CscToolExe = csc.exe<br />
MSBuildToolsPath = ~/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin<br />
TargetFrameworkRootPath = /usr/lib/mono/xbuild-frameworks<br />
System.TypeLoadException: Could not load type of field 'OmniSharp.MSBuild.ProjectManager:_queue' (13) due to: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.<br />
...}}<br />
<br />
You might be able to build anyway (possibly depending whether you have {{Pkg|mono}} installed too)<br />
<br />
=== Saving with "Retry as Sudo" does not work ===<br />
<br />
This feature does not work in the {{Pkg|code}} package, because Microsoft does not support the way the Arch package is packaged (native instead of bundled Electron). See {{Bug|61516}} and the [https://github.com/Microsoft/vscode/issues/70403 upstream bug report] for more information.<br />
<br />
The binary release {{AUR|visual-studio-code-bin}} does not have this issue, and the feature works there.</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Visual_Studio_Code&diff=584726Visual Studio Code2019-10-08T08:19:58Z<p>Dcelasun: Add visual-studio-code-insiders</p>
<hr />
<div>[[Category:Text editors]]<br />
[[ja:Visual Studio Code]]<br />
[[zh-hans:Visual Studio Code]]<br />
[https://code.visualstudio.com/ Visual Studio Code] is a cross-platform, free and open-source (licensed under the MIT License) text editor developed by Microsoft and written in JavaScript and TypeScript. It is built on the Electron framework and is extensible using extensions, which can be browsed [https://marketplace.visualstudio.com/VSCode on the web] or from within the text editor itself. While the project is open-source, a proprietary build (licensed under an End-User License Agreement) is also provided by Microsoft. For an explanation of the mixed licensing, see [https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005 this GitHub comment].<br />
<br />
== Installation ==<br />
The following packages provide VSCode:<br />
<br />
* {{Pkg|code}} (open-source release)<br />
* {{AUR|visual-studio-code-bin}} (Microsoft-branded release)<br />
* {{AUR|visual-studio-code-insiders}} (Microsoft-branded release, updated daily)<br />
* {{AUR|code-git}} (in-development open-source version)<br />
* {{AUR|vscodium-bin}} (another open-source version with a community-driven default configuration)<br />
<br />
The Microsoft [https://github.com/microsoft/ptvsd ptvsd] (Python Tools for Visual Studio Debug) server/module is available at {{AUR|python-ptvsd}}.<br />
<br />
== Usage ==<br />
<br />
Run {{ic|code}} to start the application (or {{ic|code-git}} when using {{AUR|code-git}}).<br />
<br />
If for any reason you wish to launch multiple instances of Visual Studio Code, the {{ic|-n}} flag can be used.<br />
<br />
==Configuration==<br />
<br />
{{Pkg|code}} stores settings in {{ic|~/.config/Code - OSS/User/settings.json}}.<br />
<br />
{{AUR|visual-studio-code-bin}} stores settings in {{ic|~/.config/Code/User/settings.json}}.<br />
<br />
===Integrated Terminal===<br />
<br />
''View > Integrated Terminal'' or {{ic|Ctrl + `}} opens up an integrated terminal.<br />
By default, [[Bash]] is used with no additional arguments, although this can be changed.<br />
{{ic|terminal.integrated.shell.linux}} sets the default shell to be used and<br />
{{ic|terminal.integrated.shellArgs.linux}} sets the arguments to be passed to the shell.<br />
<br />
Example:<br />
<br />
{{hc|~/.config/Code/User/settings.json|<br />
"terminal.integrated.shell.linux": "/usr/bin/fish",<br />
"terminal.integrated.shellArgs.linux": ["-l","-d 3"]<br />
}}<br />
<br />
===External Terminal===<br />
<br />
If you are using '''Terminator''' as default terminal for Arch and you have an error on Visual Studio Code: {{ic|Unable to launch debugger worker process (vsdbg) through the terminal. spawn truecolor ENOENT}}, you can change the terminal that will be used by Visual Studio to another terminal (eg gnome-terminal).<br />
<br />
{{ic|"terminal.external.linuxExec": "Yours alternative terminal"}} sets the default terminal to be used for exec debug.<br />
<br />
Example:<br />
<br />
{{hc|~/.config/Code/User/settings.json|<br />
"terminal.external.linuxExec": "gnome-terminal"<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Global menu not working in KDE/Plasma ===<br />
<br />
Visual Studio Code uses DBus to pass the menu to Plasma, try installing {{Pkg|libdbusmenu-glib}}<br />
<br />
=== Unable to move items to trash ===<br />
<br />
By default, [https://electron.atom.io/ Electron] apps use {{ic|gvfs-trash}} to delete files. This command is [https://github.com/electron/electron/issues/15011 deprecated and no longer exists], so the {{ic|ELECTRON_TRASH}} [[environment variable]] must be used instead to specify which trash utility should be used.<br />
<br />
For example, for deleting files under [[Plasma]]:<br />
$ ELECTRON_TRASH=kioclient5 code<br />
<br />
At the time of writing, Electron supports {{ic|kioclient5}}, {{ic|kioclient}}, {{ic|trash-cli}}, {{ic|gio}} and {{ic|gvfs-trash}} (default). More info is available at this [https://github.com/electron/electron/pull/7178 Github pull request page].<br />
<br />
=== Unable to debug C# ===<br />
<br />
If you want to debug C#[[.NET_Core|.NET]] (using the [http://www.omnisharp.net OmniSharp extension]) then you need to install the Microsoft branded release (from the AUR). This is apparently because the .NET Core debugger is only licensed to be used with official Microsoft products - see https://github.com/OmniSharp/omnisharp-vscode/issues/1431#issuecomment-297578930<br />
<br />
Using the the open-source package, debugging fails fairly quietly. The debug console will just show the initial message and nothing more: <br />
{{bc|You may only use the Microsoft .NET Core Debugger (vsdbg) with<br />
Visual Studio Code, Visual Studio or Visual Studio for Mac software<br />
to help you develop and test your applications.}}<br />
<br />
But in another way, you can use [https://github.com/Samsung/netcoredbg netcoredbg],{{AUR|netcoredbg}}<br />
<br />
=== Unable to open .csproj with OmniSharp server, invalid Microsoft.Common.props location ===<br />
<br />
You have to switch from mono to proper SDK version props.<br />
<br />
{{hc|/opt/dotnet/sdk/{VERSION}/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props|<br />
$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props<br />
}}<br />
<br />
Modify import to look like this:<br />
<br />
{{hc|/opt/dotnet/sdk/{VERSION}/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props|<br />
/opt/dotnet/sdk/{VERSION}/Current/Microsoft.Common.props<br />
}}<br />
<br />
=== Error from OmniSharp that MSBuild cannot be located ===<br />
<br />
It's noted in the [https://github.com/OmniSharp/omnisharp-roslyn#introduction OmniSharp introduction] that Arch Linux users should install the {{AUR|msbuild-stable}} package. Without it, you might get an error like:<br />
<br />
{{hc|1=OmniSharp Log|2=<br />
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator<br />
Registered MSBuild instance: StandAlone 15.0 - "~/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin"<br />
MSBuildExtensionsPath = /usr/lib/mono/xbuild<br />
BypassFrameworkInstallChecks = true<br />
CscToolPath = ~/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin/Roslyn<br />
CscToolExe = csc.exe<br />
MSBuildToolsPath = ~/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin<br />
TargetFrameworkRootPath = /usr/lib/mono/xbuild-frameworks<br />
System.TypeLoadException: Could not load type of field 'OmniSharp.MSBuild.ProjectManager:_queue' (13) due to: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.<br />
...}}<br />
<br />
You might be able to build anyway (possibly depending whether you have {{Pkg|mono}} installed too)<br />
<br />
=== Saving with "Retry as Sudo" does not work ===<br />
<br />
This feature does not work in the {{Pkg|code}} package, because Microsoft does not support the way the Arch package is packaged (native instead of bundled Electron). See {{Bug|61516}} and the [https://github.com/Microsoft/vscode/issues/70403 upstream bug report] for more information.<br />
<br />
The binary release {{AUR|visual-studio-code-bin}} does not have this issue, and the feature works there.</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Xorg_multiseat&diff=579591Xorg multiseat2019-08-12T08:29:12Z<p>Dcelasun: grammar</p>
<hr />
<div>[[Category:X server]]<br />
[[ja:Xorg マルチシート]]<br />
{{Expansion|Show how PulseAudio can be configured for multiple users without running PulseAudio system-wide. Explain how Multiseat be done using only one video card (and/or X Server) and without Xephyr.}}<br />
{{Style|Written in first person, more like a blog post.}}<br />
<br />
Multiseat is a certain setup where N users work simultaneously on one computer. This is achieved by having N monitors, N keyboards and N mice. The advantages are quite obvious:<br />
* Less power consumption (only one computer)<br />
* Fewer hardware to purchase<br />
<br />
==Requirements==<br />
<br />
===Keyboards and mice===<br />
<br />
Any standard PS/2 or USB keyboards will suffice. Same thing for mice.<br />
<br />
===Graphics hardware===<br />
<br />
For the best possible result you'll need two graphics cards. I used an nVidia FX5500 AGP and an nVidia 6200 PCI. If you look around a bit you can certainly find new and decent PCI graphics card for a soft price.<br />
<br />
It is possible to use only one videocard which has dual heads (like most nvidia cards will have), but this has some limitations: you have to use Xephyr on the second monitor which seems quite a messy solution from what I've read, and for optimal usage both screens need the same resolution.<br />
<br />
If you have two pci-express slots, take advantage of them! That way you'll even be able to play two games at the same time. (PCI is too slow to play comfortably)<br />
<br />
===Processors and memory===<br />
<br />
If you really are working with two users on the same computer, I'd at least recommend a dual-core processor and plenty of RAM. A fast hard drive (10.000 RPM or higher) is also recommended for comfortable use.<br />
<br />
===Software===<br />
<br />
You'll need Xorg with the drivers for your graphics card (according to some sources, the closed source nvidia driver works better than the open source nvidia driver for this, I haven't tested this myself) and the evdev (xf86-input-evdev) driver. That's all. All this can be found in the Arch Linux core and extra repositories.<br />
<br />
===Some X knowledge===<br />
<br />
If you know how X works this will be a lot easier. Before you start, I recommend generating a clean configuration with xorgconfig that works with a single screen. Read through this xorg configuration and make yourself familiar. And as usual the manpages will provide you with most of the answers. You may reference some man pages: xorg, xserver, startx, xdm, xinit.<br />
'''sudo X -configure''', '''X -showopts''' may give you some hint.<br />
<br />
==Definitions==<br />
<br />
For this article to be clear, I'll be using the following definitions:<br />
* screen: A screen is something Xorg can display its stuff on. A screen has a monitor and a graphics card assigned to it.<br />
* monitor: A physical monitor like the one you're now sitting in front of.<br />
* server layout: a definition of which screen, keyboard and mouse to use.<br />
* seat: A workplace with a physical monitor, physical keyboard and physical mouse.<br />
<br />
==Tips and tricks==<br />
<br />
* Set up ssh on your computer, so you can ssh to the machine from another computer (such as a laptop). This is very useful because you'll probably run into X not responding anymore or not giving you picture at all.<br />
* Finding out which keyboard and mouse is which: open a terminal and use cat to find out. For example, {{ic|cat /dev/input/mouse1}}. If you then move your mouse and you see all weird things happening than that is the mouse you're moving. Same goes for keyboards, which are called eventN.<br />
* Try a basic configuration first. Don't start with the fancy stuff yet, get a very basic Xorg working first.<br />
* Create a backup of all relevant configuration files. What do you mean you'll skip this one?<br />
<br />
==About evdev==<br />
<br />
evdev is an Xorg driver which can make use of the kernel event devices, which you can find in {{ic|/dev/input}}.<br />
<br />
==Attaching devices to a seat==<br />
Systemd's loginctl lets you assign devices to seats by creating udev rules.<br />
<br />
===Identify devices===<br />
Look at the default seat (seat0) status, here is an example:<br />
<br />
{{hc|# loginctl seat-status seat0|<nowiki><br />
seat0<br />
Sessions: *11<br />
Devices:<br />
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0<br />
│ (drm:card0)<br />
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/graphics/fb0<br />
│ (graphics:fb0) "radeondrmfb"<br />
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/sound/card1<br />
│ (sound:card1) "Generic"<br />
│ └ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/sound/card1/input15<br />
│ (input:input15) "HD-Audio Generic HDMI/DP,pcm=3"<br />
├ /sys/devices/pci0000:00/0000:00:12.0/usb3<br />
│ (usb:usb3)<br />
│ ├ /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0006/input/input5<br />
│ │ (input:input5) "Logitech Unifying Device. Wireless PID:101b"<br />
│ └ /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0006/input/input6<br />
│ (input:input6) "Logitech Unifying Device. Wireless PID:200a"<br />
├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0<br />
│ (sound:card0) "SB"<br />
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input7<br />
│ │ (input:input7) "HDA ATI SB Line"<br />
│ └ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input9<br />
│ (input:input9) "HDA ATI SB Rear Mic"<br />
├ </nowiki>'''/sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/drm/card1'''<nowiki><br />
│ (drm:card1)<br />
├ </nowiki>'''/sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/graphics/fb1'''<nowiki><br />
│ (graphics:fb1) "radeondrmfb"<br />
├ </nowiki>'''/sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2'''<nowiki><br />
│ (sound:card2) "HDMI"<br />
│ └ </nowiki>'''/sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2/input16'''<nowiki><br />
│ (input:input16) "HDA ATI HDMI HDMI/DP,pcm=3"<br />
├ </nowiki>'''/sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/input/input2'''<nowiki><br />
│ (input:input2) "CHESEN PS2 to USB Converter"<br />
├ </nowiki>'''/sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.1/input/input3'''<nowiki><br />
│ (input:input3) "CHESEN PS2 to USB Converter"<br />
└ </nowiki>'''/sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/input/input4'''<nowiki><br />
(input:input4) "Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)"<br />
</nowiki>}}<br />
If you are unsure, try comparing with {{ic|lspci}}or {{ic|lsusb}} to identify devices.<br />
<br />
===Assign devices===<br />
Seats are created based on graphics cards. Hence we will start by assigning a graphics card:<br />
{{bc|# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/drm/card1<br />
# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/graphics/fb1}}<br />
Then add input devices:<br />
{{bc|# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/input/input2<br />
# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.1/input/input3<br />
# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/input/input4}}<br />
With multiple sound cards you can assign one per seat that will run out of the box with per user session pulseaudio:<br />
{{bc|# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2/input16<br />
# loginctl attach seat-1 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2}}<br />
You should be able to see that the hardware has been partitioned into two seats:<br />
{{bc|# loginctl seat-status seat0<br />
# loginctl seat-status seat-1}}<br />
<br />
==Setting up Xorg==<br />
<br />
Since you can attach devices to seats with {{ic|loginctl}} there is no need to have an specific [[Xorg|Xorg configuration]]. Anyway you can create parts of or the entire configuration set for two server layouts, each assigned with their own keyboard, mouse, video card and monitor. <br />
<br />
{{hc|xorg.conf.d tree example:|<nowiki><br />
├── 00-keyboard.conf #created by localectl<br />
├── 31-monitor-seat0.conf<br />
├── 32-monitor-seat1.conf<br />
├── 40-serverflags.conf<br />
├── 41-graphic-seat0.conf<br />
├── 42-graphic-seat1.conf<br />
├── 51-screen-seat0.conf<br />
├── 52-screen-seat1.conf<br />
├── 61-layout-seat0.conf<br />
└── 62-layout-seat1.conf<br />
</nowiki>}}<br />
<br />
===Defining available input devices===<br />
<br />
This part of the configuration tells Xorg which input devices it has available. Input devices are keyboards and mice, but can also be, for example, touchscreens and pens.<br />
<br />
Configure your devices as read in [[Xorg#Input devices]]. The "Identifier" will let you assign to a ServerLayout and "Device" defines which physical device are you configuring.<br />
<br />
{{hc|01-keyboard-seat0.conf|<br />
Section "InputDevice"<br />
Identifier "keyboard0"<br />
Option "Device" "/dev/input/event1"<br />
#Option "Device" "/dev/input/by-path/pci-0000:00:1a.0-usb-0:1.6:1.0-event-kbd" # or by path<br />
Option "GrabDevice" "on" # prevent send event to other X-servers<br />
EndSection<br />
}}<br />
<br />
Same for other [[Xorg#Input_devices|input devices]].<br />
<br />
===Monitors=== <br />
Configure your monitors as seen on [[Xorg#Monitor settings]]. Pay close attention to the identifier.<br />
<br />
{{hc|31-monitor-seat0.conf|<br />
Section "Monitor"<br />
Identifier "monitor0"<br />
EndSection<br />
}}<br />
<br />
===ServerFlags===<br />
<br />
{{hc|40-serverflags.conf|<br />
Section "ServerFlags"<br />
Option "AutoAddGPU" "off"<br />
EndSection<br />
}}<br />
<br />
===Graphics card===<br />
<br />
Take a close look at the BusID. This option specifies which hardware card to use. You can find out the BusId's with {{ic|lspci}}. However, you'll soon find out this doesn't always match. That's because lspci displays the device address in hexadecimal form. Xorg however uses decimal form. So you'll need to convert your address from hexadecimal form to decimal. Thus a device address of 0:0a:0 in lspci would become 0:10:0 in {{ic|xorg.conf}}.<br />
<br />
{{hc|42-graphic-seat1.conf|<br />
Section "Device"<br />
Identifier "graphic0"<br />
Driver "nvidia"<br />
Option "NoLogo" "1" # Remove nvidia branding at startup<br />
BusId "PCI:1:0:0"<br />
MatchSeat "seat-1" # Needed when only configuring part of Xorg for non-seat0.<br />
Option "Monitor-DVI-1" "monitor1" #assigns monitor configuration to graphic output port<br />
EndSection<br />
}}<br />
<br />
===Screens===<br />
Pay close attention to the "monitor" option.<br />
<br />
{{hc|51-screen-seat0.conf|<br />
Section "Screen"<br />
Identifier "screen0"<br />
Device "graphic0"<br />
Monitor "monitor0"<br />
DefaultDepth 24<br />
Subsection "Display"<br />
Depth 24<br />
Modes "1280x1024" "1024x768"<br />
EndSubsection<br />
EndSection<br />
}}<br />
<br />
===ServerLayout===<br />
<br />
Create a section for every seat (pay attention to Identifier) you have with their respective keyboards, mice and screens.<br />
<br />
{{hc|62-layout-seat1.conf|<br />
Section "ServerLayout"<br />
Identifier "seat-1"<br />
Screen "screen1" 0 0<br />
InputDevice "mouse1" "CorePointer"<br />
InputDevice "keyboard1" "CoreKeyboard"<br />
Option "Seat" "seat-1"<br />
Option "SingleCard" "on" # use this to simplfied isolatedevice option<br />
EndSection<br />
}}<br />
<br />
Additional Tips:<br />
<br />
* Make sure to delete the {{ic|~/.Xauthority}} file in respective user directories before the initial reboot.<br />
<br />
* To avoid tearing this seems to help on nearly all configurations - add this to /etc/environment:<br />
{{bc|1=<br />
CLUTTER_PAINT=disable-clipped-redraws:disable-culling<br />
CLUTTER_VBLANK=True<br />
}}<br />
<br />
==Testing==<br />
Before we start modifying our login manager, we'll first start with testing out the individual seats. If these are working, then we're good to go.<br />
<br />
I've used twm (tiny window manager) to test out if my seats work, but there's no reason you can't use KDE, gnome, or any other desktop environment or window manager. I've used this in my {{ic|~/.xinitrc}}:<br />
exec twm<br />
<br />
Use the following command to test out an individual seat:<br />
startx -- -layout seat0 -config xorg.conf.multiseat<br />
<br />
Do this for every seat you have. If they are all working correctly and the keyboard/mouse combination matches, then congratulations! You are almost finished! In case you are wondering why I didn't you use the full path to my new configuration file, that's because X doesn't allow that when running as non-root. It will search for xorg.conf.multiseat relative to {{ic|/etc/X11}}.<br />
<br />
==Setting up the loginmanager==<br />
<br />
=== KDM ===<br />
<br />
Open {{ic|/usr/share/config/kdm/kdmrc}} and set the following variables:<br />
<br />
{{bc|1=<br />
StaticServers=:0,:1 #In the case of two seats. If you have three this would become :0,:1,:2 and so forth.<br />
ReserveServers=:2,:3 #You can define here as many as you want, but these should always start at the highest seat + 1.<br />
}}<br />
Next you'll need to add an [X-:n-Core] for each seat (where n = the seat)<br />
{{bc|1=<br />
[X-:0-Core]<br />
ServerArgsLocal=-nolisten tcp -layout seat0 -seat seat0<br />
<br />
[X-:1-Core]<br />
ServerArgsLocal=-nolisten tcp -layout seat-1 -seat seat-1 -novtswitch<br />
}}<br />
<br />
Add section like this for every seat you have, and do not forget to change the :0 and the -layout seat0. Note that the "-novtswitch" options should be added for all seats ''except'' the first one. Otherwise, you can end with rectangles of virtual terminals "showing through" on your primary screen.<br />
<br />
===For XDM ===<br />
Open {{ic|/etc/X11/xdm/Xservers}} and set the following variables (This sample demos two seats):<br />
<br />
{{bc|<br />
# NOTE: don't add -sharevts on seat0, otherwise it may reset in about 10~20 minutes automatically.<br />
:0 local /usr/bin/X :0 vt07 -nolisten tcp -novtswitch -layout seat0 -seat seat0<br />
:1 local /usr/bin/X :1 vt08 -nolisten tcp -novtswitch -layout seat-1 -seat seat-1<br />
}}<br />
<br />
{{Note|If seat numbers are not correctly assigned to sessions ({{ic|loginctl}} will show a session without seat) by XDM, then your attached devices could have strange behavoir like lack of permissions, sound card undetected by pulseaudio... LightDM should be fine.}}<br />
<br />
Also if you use the Archlinux theme edit {{ic|/etc/X11/xdm/xdm-config}} for every screen:<br />
<br />
{{bc|<br />
DisplayManager._0.setup: /etc/X11/xdm/arch-xdm/Xsetup<br />
DisplayManager._0.startup: /etc/X11/xdm/arch-xdm/Xstartup<br />
DisplayManager._0.reset: /etc/X11/xdm/arch-xdm/Xreset<br />
DisplayManager._1.setup: /etc/X11/xdm/arch-xdm/Xsetup<br />
DisplayManager._1.startup: /etc/X11/xdm/arch-xdm/Xstartup<br />
DisplayManager._1.reset: /etc/X11/xdm/arch-xdm/Xreset<br />
}}<br />
<br />
===For LightDM ===<br />
<br />
[[LightDM]] has automatic multiseat detection (pulling from the seat list provided by {{ic|loginctl list-seats}}), but if you need you can configure it on {{ic|/etc/lightdm/lightdm.conf}}<br />
<br />
{{bc|1=<br />
[LightDM]<br />
run-directory=/run/lightdm<br />
<br />
[Seat:*]<br />
greeter-session=lightdm-gtk-greeter<br />
greeter-hide-users=false # Bug: lightdm-gtk-greeter doesn't load user saved session when greeter-hide-users=true[https://bugs.launchpad.net/lightdm-gtk-greeter/+bug/837002]<br />
session-wrapper=/etc/lightdm/Xsession<br />
<br />
[Seat:seat0]<br />
xserver-command=/usr/bin/X :0<br />
xserver-layout=seat0<br />
<br />
[Seat:seat-1]<br />
xserver-command=/usr/bin/X :1<br />
xserver-layout=seat-1<br />
}}<br />
<br />
{{note|Since version 1.16 Xorg server no longer handles VTs if it was started as a non-seat0. So there's no need to pass option -sharevts [http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/22346].}}<br />
<br />
===For Auto Login multiseat (without Display Manager)===<br />
<br />
edit a script /boot/twin.sh<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
cmd1="/bin/bash --login -c \"/usr/bin/xinit --"<br />
cmd2="-nolisten tcp -keeptty -novtswitch -config xorg.multiseat.conf"<br />
usr=(user1 user2) # FIXME: assume user1, user2 is valid user id<br />
declare -a pid<br />
while true ; do<br />
for ((i=0; i<${#usr[*]}; i++)) ; do<br />
echo "usr[$i]=${usr[$i]} pid=${pid[$i]}"<br />
if [ -z "${pid[$i]}" ] || [ ! -d "/proc/${pid[$i]}" ] ; then<br />
# echo "pid ${pid[$i]} killed, execute again" <br />
cmd3="-layout seat$i vt0"$((7+i))"\""<br />
if [ $i -gt 0 ] ; then<br />
cmd3="-sharevts $cmd3"<br />
fi<br />
#echo "cmd3=$cmd3"<br />
/bin/su ${usr[$i]} -l -c "$cmd1 :$i $cmd2 $cmd3" &<br />
pid[$i]=$!<br />
#echo "new pid=${pid[$i]}"<br />
fi<br />
done<br />
sleep 5 # check process exist per 5 second<br />
done<br />
</nowiki>}}<br />
<br />
Open {{ic|/etc/inittab}} and setup as follows:<br />
<br />
{{bc|<br />
#id:3:initdefault:<br />
id:5:initdefault:<br />
...<br />
x2:5:once:/root/twin.sh > /root/twin.log 2>&1<br />
}}<br />
<br />
==Sound==<br />
<br />
===One sound card for each seat===<br />
As soon as you [[#Attaching devices to a seat|attach]] the sound card to the seat, Pulseaudio will detect and use it.<br />
<br />
===Multiple users on single sound card: PulseAudio===<br />
If two users want to use the sound card simultaneously, it is necessary to use a sound server, [[PulseAudio]] being most prevalent. Usually, the PulseAudio server runs only for active user and does not allow for multiple user instances. Solution to this problem is using the system-wide PulseAudio server. Although this approach is discouraged by its authors, it is probably most applicable setup.<br />
<br />
;Configuring for multiple users, without system-mode daemon<br />
This results in all the mixing transferred to a single server.<br />
<br />
Copy the default configuration to the main user's home directory:<br />
<br />
$ cp /etc/pulse/default.pa ~/.pulse/<br />
<br />
or:<br />
<br />
$ cp /etc/pulse/default.pa ~/.config/pulse/<br />
<br />
Edit the file, adding at the end:<br />
<br />
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1<br />
<br />
Restart pulseaudio, if already running:<br />
<br />
$ pulseaudio -k<br />
$ pulseaudio --daemonize=no<br />
<br />
Repeat this procedure for each secondary user, as the user:<br />
<br />
$ echo "default-server = 127.0.0.1" > ~/.pulse/client.conf<br />
<br />
;Configuring for system-wide PulseAudio<br />
* Create user pulse and put him into group audio (PulseAudio drops root privileges and changes to user pulse. Group membership allows for device access.)<br />
* Create group pulse-access and put users, who will play sound locally into it (Group membership is used for access control for local access to PA daemon.)<br />
* In /etc/pulse/default.pa state explicitly the access rights<br />
<br />
load-module module-native-protocol-unix auth-group=pulse-access <br />
auth-group-enable=1<br />
<br />
Create /etc/dbus-1/system.d/pulseaudio.conf with this content <br />
[https://bbs.archlinux.org/viewtopic.php?pid=563481#p563481 /etc/dbus-1/system.d/pulseaudio.conf]:<br />
{{bc|1=<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<busconfig><br />
<policy user="pulse"><br />
<allow own="org.pulseaudio.Server"/><br />
<allow send_destination="org.pulseaudio.Server"/><br />
<allow receive_sender="org.pulseaudio.Server"/><br />
</policy><br />
</busconfig><br />
}}<br />
<br />
Start PA as system-wide, under root: <br />
# pulseaudio --system<br />
<br />
In {{ic|/var/run/pulse}} should appear files for communication with <br />
daemon, namely pid and native. <br />
<br />
;User access<br />
You can check communication with system daemon as non-root by e.g. {{ic|pactl -s "unix:/var/run/pulse/native" list}}.<br />
<br />
It is possible to enable automatic network connection to local daemon in {{ic|/etc/pulse/client.conf}}:<br />
<br />
auto-connect-localhost = yes<br />
<br />
The users should be able to connect to PA server. All the cons for system-wide daemon become essentially pros, e.g. ability to control volume of other users streams in pavucontrol.<br />
<br />
;Troubleshooting<br />
It is possible to enable the http interface to PA for debugging in /etc/pulse/default.pa {{ic|load-module module-http-protocol-tcp}} and then connect to it at http://localhost:4714/<br />
<br />
===Multiple users on single sound card: ALSA===<br />
Setup with PulseAudio removed, shared audio through an alsamixer equalizer and software mixing. The relevant hardware used is an ATI Radeon HD 5850 and an Intel Sandy Bridge (onboard) HD 3000. Configuration steps may vary.<br />
<br />
Specific hardware could be addressed in {{ic|/etc/asound.conf}} to allocate audio to both users simultaneously if required. Another option enables two different users to both access audio with their own equalizer (described further down). The sound card will be shared equally among the seats using ALSA with PulseAudio removed - libpulse itself should be kept for various software dependencies however.<br />
<br />
Next, remove respective {{ic|~/.asoundrc}} files (as well as related PulseAudio config files if you removed that) and follow this template with {{ic|/etc/asound.conf}} for sound:<br />
<br />
{{bc|<br />
defaults.pcm.rate_converter "samplerate_best"<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 />
<br />
Only the last user to login will have audio control and access but if <br />
you wish to share audio equally among different users, add each user to <br />
the audio group:<br />
<br />
Example:<br />
{{bc|<br />
usermod -a -G ftp joeblow<br />
usermod -a -G ftp jillschmill<br />
}}<br />
<br />
Then put this in each user's respective ~/.asoundrc rather than using /etc/asound.conf (this option also contains various tweaks to improve audio quality):<br />
{{bc|1=<br />
defaults.pcm.rate_converter "samplerate_best"<br />
<br />
ctl.equal {<br />
type equal;<br />
}<br />
<br />
pcm.ossmix {<br />
type dmix<br />
ipc_key 1024 # must be unique!<br />
ipc_key_add_uid false # let multiple users share<br />
ipc_perm 0666 # IPC permissions for multi-user sharing (octal, default 0600)<br />
slave {<br />
pcm "hw:0,0" # you cannot use a "plug" device here, darn.<br />
period_time 0<br />
period_size 1024 # must be power of 2.<br />
buffer_size 8192 # ditto.<br />
rate 44100<br />
#format "S32_LE"<br />
#periods 128 # dito.<br />
#rate 8000 # with rate 8000 you *will* hear,<br />
# if ossmix is used :)<br />
}<br />
# bindings are cool. This says, that only the first<br />
# two channels are to be used by dmix, which is<br />
# enough for (most) oss apps and also lets <br />
# multichannel chips work much faster:<br />
bindings {<br />
0 0 # from 0 => to 0<br />
1 1 # from 1 => to 1<br />
}<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:ossmix";<br />
}<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 />
<br />
Accessing the equalizer can be done with:<br />
<br />
{{bc|<br />
alsaequal -D equal<br />
}}<br />
<br />
Each user has an equalizer they can configure separately.<br />
<br />
Make sure to turn down and mute the audio channels that you do not use, turn off auto-mute microphone, and make sure no channel has a gain higher than 0 to avoid ALSA audio bugs. This can be done via alsamixer.<br />
<br />
==Troubleshooting==<br />
<br />
===My Windows key doesn't work anymore===<br />
<br />
Put this in [[Execute commands after X start|a startup file]]:<br />
xmodmap -e "add Mod4 = Super_L Super_R"<br />
<br />
===Unreliable behaviour (black picture without cursor)===<br />
<br />
If everything seems to be set up correctly, but for some reason you always get a black picture without a cursor, try setting the first initialized card in the BIOS to be the PCI card one.<br />
<br />
===Little black boxes/dots on the desktop===<br />
<br />
This is actually portions of the virtual terminals being painted on top of X. It seems to be caused by the Linux kernel framebuffer. This can be fixed by disabling the framebuffer, or by removing the "-sharevts" option from the primary seat's X args.<br />
<br />
===Multimedia keys not working===<br />
<br />
If your keyboard(s) has extra "multimedia" keys, you may find that they stopped working in your multiseat setup. This is because such keyboards are often represented as more then one "event" device. As you did above, cat each /dev/input/event* device, this time pressing multimedia keys. Once you've found the right event device, add a separate keyboard InputDevice section for it, then add that InputDevice section to the corresponding ServerLayout section with the "SendCoreEvents" option, which indicates that input from this device should be handled, despite not being the core keyboard. In the end you should have sections something like the following:<br />
<br />
{{bc|<br />
Section "InputDevice"<br />
Identifier "Keyboard0"<br />
Driver "evdev"<br />
Option "Device" "/dev/input/event6"<br />
Option "XkbModel" "evdev"<br />
EndSection<br />
<br />
Section "InputDevice"<br />
Identifier "Keyboard0Multimedia"<br />
Driver "evdev"<br />
Option "Device" "/dev/input/event7"<br />
Option "XkbModel" "evdev"<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Layout0"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
InputDevice "Keyboard0Multimedia" "SendCoreEvents"<br />
InputDevice "Mouse0" "CorePointer"<br />
Option "AutoAddDevices" "no"<br />
EndSection<br />
}}<br />
<br />
===The Ctrl-Alt-Fx, Alt-Fx keys mess up with virtual terminals===<br />
<br />
(Oct 2010) I follows this guide and everything works, except for Atl-F1, Atl-F2,... mess things up. Then I follow this guide https://help.ubuntu.com/community/MultiseatX (read the part for Ubuntu 10.04):<br />
<br />
{{bc|<br />
# cd /usr/bin<br />
# ln -s X X0<br />
# ln -s X X1<br />
}}<br />
<br />
Then fix in the '''/usr/share/config/kdm/kdmrc''' as follow<br />
<br />
{{bc|1=<br />
[General]<br />
ConsoleTTYs=tty1,tty2,tty3,tty4,tty5,tty6<br />
ServerVTs=7,8<br />
StaticServers=:0,:1<br />
ReserveServers=:2,:3<br />
...<br />
<br />
[X-:0-Core]<br />
ServerVT=8<br />
ServerCmd=/usr/bin/X1<br />
ServerArgsLocal=-nolisten tcp -sharevts -novtswitch -keeptty -layout Seat1 -isolateDevice PCI:1:0:0<br />
<br />
[X-:1-Core]<br />
ServerVT=7<br />
ServerCmd=/usr/bin/X0<br />
ServerArgsLocal=-nolisten tcp -novtswitch -keeptty -layout Seat0 -isolateDevice PCI:0:2:0<br />
...<br />
}}<br />
<br />
It works for my computer: one on-board Intel card (xf86-video-intel driver), and one Nvidia card (xf86-video-nouveau driver). You can check if the parameters are passed correctly by:<br />
<br />
{{bc|<nowiki><br />
$ pgrep -af PCI<br />
root 16993 1.6 1.3 32900 26772 ? S 08:09 0:19 /usr/bin/X0 :1 vt7 -nolisten tcp -novtswitch -keeptty -layout Seat0 -isolateDevice PCI:0:2:0 -auth /var/run/xauth/A:1-ES6CCb<br />
root 17124 5.9 0.5 18996 11980 ? S 08:09 1:09 /usr/bin/X1 :0 vt8 -nolisten tcp -sharevts -novtswitch -keeptty -layout Seat1 -isolateDevice PCI:1:0:0 -auth /var/run/xauth/A:0-Wgiyza<br />
<br />
</nowiki>}}<br />
<br />
The '''ServerVT=7''', '''ServerVT=8''' would be pass to as '''vt7''', '''vt8'''<br />
<br />
==See also==<br />
*[[Multi-pointer X]] explains how to setup two separate pair of devices on the same session.<br />
<br />
*[https://bbs.archlinux.org/viewtopic.php?id=105450 The original Arch Forums thread].<br />
<br />
*[http://code.lexarcana.com/posts/simple-multiseat-setup-on-fedora-17.html Multiseat using loginctl].<br />
<br />
*[http://code.lexarcana.com/posts/using-udev-to-configure-fedora-multi-seat-automatically.html Using udev to configure multi-seat automatically].</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Cron&diff=568546Cron2019-03-13T08:57:17Z<p>Dcelasun: /* Example with ssmtp */ SSMTP is now on AUR</p>
<hr />
<div>[[Category:Daemons]]<br />
[[de:Cron]]<br />
[[fr:Cron]]<br />
[[ja:Cron]]<br />
[[ko:Cron]]<br />
[[ru:Cron]]<br />
[[sk:Cron]]<br />
[[zh-hans:Cron]]<br />
{{Related articles start}}<br />
{{Related|systemd/Timers}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Cron|Wikipedia]]:<br />
<br />
:''cron'' is the time-based job scheduler in Unix-like computer operating systems. cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times, dates or intervals. It is commonly used to automate system maintenance or administration.<br />
<br />
== Installation ==<br />
<br />
There are many cron implementations, but none of them are installed by default as the base system uses [[systemd/Timers]] instead. See the Gentoo's [http://www.gentoo.org/doc/en/cron-guide.xml cron guide], which offers comparisons.<br />
<br />
Packages available:<br />
<br />
* {{Pkg|cronie}}<br />
* {{Pkg|fcron}}<br />
* {{AUR|dcron}}<br />
* {{AUR|vixie-cron}}<br />
* {{AUR|scron-git}}<br />
<br />
== Configuration ==<br />
<br />
=== Activation and autostart ===<br />
<br />
After installation, the daemon will not be enabled by default. The installed package likely provides a service, which can be controlled by [[systemd#Using units|systemctl]]. For example, ''cronie'' uses {{ic|cronie.service}}.<br />
<br />
Check {{ic|/etc/cron.daily/}} and similar directories to see which jobs are present. Activating cron service will trigger all of them.<br />
<br />
{{Note|''cronie'' provides the {{ic|0anacron}} ''hourly'' job, which allows for [[#Asynchronous job processing|delayed runs of other jobs]] e.g. if the computer was switched off at the moment of standard execution.}}<br />
<br />
=== Handling errors of jobs ===<br />
<br />
cron registers the output from ''stdout'' and ''stderr'' and attempts to send it as email to the user's spools via the {{ic|sendmail}} command. Cronie disables mail output if {{ic|/usr/bin/sendmail}} is not found. In order for mail to be written to a user's spool, there must be an smtp daemon running on the system, e.g. {{Pkg|opensmtpd}}. Otherwise, you can install a package that provides the sendmail command, and configure it to send mail to a remote mail exchanger. You can also log the messages by using the {{ic|-m}} option and writing a custom script.<br />
<br />
{{Tip|One can send the output to local system users using [[Postfix#Local mail]].}}<br />
<br />
# [[Edit]] the {{ic|cronie.service}} unit.<br />
# Install {{Pkg|esmtp}}, [[msmtp]], {{Pkg|opensmtpd}}, [[SSMTP|ssmtp]], or write a custom script.<br />
<br />
==== Example with ssmtp ====<br />
<br />
ssmtp is a send-only sendmail emulator which delivers email from a local computer to an smtp server. While there are currently no active maintainers, it is still by far the simplest way to transfer mail to a configured mailhub. There are no daemons to run, and configuration can be as simple as editing 3 lines in a single configuration file (if your host is trusted to relay unauthenticated email through your mailhub). ssmtp does not receive mail, expand aliases, or manage a queue. <br />
<br />
Install {{AUR|ssmtp}}, which creates a symbolic link from {{ic|/usr/bin/sendmail}} to {{ic|/usr/bin/ssmtp}}. You must then edit {{ic|/etc/ssmtp/ssmtp.conf}}. See [[SSMTP|ssmtp]] for details. Creating a symbolic link to {{ic|/usr/bin/sendmail}} insures that programs like [[S-nail]] (or any package which provides {{ic|/usr/bin/mail}} will just work without modification.<br />
<br />
Restart {{ic|cronie}} to insure that it detects that you now have a {{ic|/usr/bin/sendmail}} installed.<br />
<br />
==== Example with msmtp ====<br />
<br />
Install {{Pkg|msmtp-mta}}, which creates a symbolic link from {{ic|/usr/bin/sendmail}} to {{ic|/usr/bin/msmtp}}. Restart {{ic|cronie}} to make sure it detects the new {{ic|sendmail}} command. You must then provide a way for {{ic|msmtp}} to convert your username into an email address.<br />
<br />
Then either add {{ic|MAILTO}} line to your crontab, like so:<br />
<br />
<nowiki>MAILTO=your@email.com</nowiki><br />
<br />
'''or''' create {{ic|/etc/msmtprc}} and append this line:<br />
<br />
aliases /etc/aliases<br />
<br />
and create {{ic|/etc/aliases}}: <br />
<br />
your_username: your@email.com<br />
# Optional:<br />
default: your@email.com<br />
<br />
Then [[Systemd#Editing provided units|modify the configuration]] of ''cronie'' daemon by replacing the {{ic|ExecStart}} command with:<br />
<br />
ExecStart=/usr/bin/crond -n -m '/usr/bin/msmtp -t'<br />
<br />
==== Example with esmtp ====<br />
<br />
Install {{Pkg|esmtp}} and {{Pkg|procmail}}.<br />
<br />
After installation configure the routing:<br />
{{hc|/etc/esmtprc|<br />
identity ''myself''@myisp.com<br />
hostname mail.myisp.com:25<br />
username ''"myself"''<br />
password ''"secret"''<br />
starttls enabled<br />
default<br />
mda "/usr/bin/procmail -d %T"<br />
}}<br />
<br />
Procmail needs root privileges to work in delivery mode but it is not an issue if you are running the cronjobs as root anyway.<br />
<br />
To test that everything works correctly, create a file {{ic|message.txt}} with {{ic|"test message"}} in it. <br />
<br />
From the same directory run:<br />
<br />
$ sendmail ''user_name'' < message.txt <br />
<br />
then:<br />
<br />
$ cat /var/spool/mail/''user_name''<br />
<br />
You should now see the test message and the time and date it was sent.<br />
<br />
The error output of all jobs will now be redirected to {{ic|/var/spool/mail/''user_name''}}.<br />
<br />
Due to the privileged issue, it is hard to create and send emails to root (e.g. {{ic|su -c ""}}). You can ask {{ic|esmtp}} to forward all root's email to an ordinary user with:<br />
{{hc|/etc/esmtprc|<br />
2=force_mda="''user-name''"<br />
}}<br />
<br />
{{Note|If the above test didn't work, you may try creating a local configuration in {{ic|~/.esmtprc}} with the same content.<br />
<br />
Run the following command to make sure it has the correct permission: <br />
<br />
$ chmod 710 ~/.esmtprc<br />
<br />
Then repeat the test with {{ic|message.txt}} exactly as before.}}<br />
<br />
==== Example with opensmtpd ====<br />
<br />
Install {{Pkg|opensmtpd}}.<br />
<br />
Edit {{ic|/etc/smtpd/smtpd.conf}}. The following configuration allows for local delivery:<br />
<br />
listen on localhost<br />
accept for local deliver to mbox<br />
<br />
You can proceed to test it. First [[start]] {{ic|smtpd.service}}. Then do:<br />
$ echo test | sendmail user<br />
<br />
''user'' can check his/her mail in with any [[:Category:Email clients|reader]] able to handle mbox format, or just have a look at the file {{ic|/var/spool/mail/''user''}}. If everything goes as expected, you can [[enable]] opensmtpd for future boots.<br />
<br />
This approach has the advantage of not sending local cron notifications to a remote server. On the downside, you need a new daemon running.<br />
<br />
{{Note|<br />
* At the moment of writing the Arch opensmtpd package does not create all needed directories under {{ic|/var/spool/smtpd}}, but the daemon will warn about that specifying the required ownerships and permissions. Just create them as suggested.<br />
* Even though the suggested configuration does not accept remote connections, it's a healthy precaution to add an additional layer of security blocking port 25 with [[iptables]] or similar.<br />
}}<br />
<br />
==== Long cron job ====<br />
<br />
Suppose this program is invoked by cron :<br />
<br />
#!/bin/sh<br />
echo "I had a recoverable error!"<br />
sleep 1h<br />
<br />
What happens is this:<br />
# cron runs the script<br />
# as soon as cron sees some output, it runs your MTA, and provides it with the headers. It leaves the pipe open, because the job hasn't finished and there might be more output.<br />
# the MTA opens the connection to postfix and leaves that connection open while it waits for the rest of the body.<br />
# postfix closes the idle connection after less than an hour and you get an error like this :<br />
smtpmsg='421 … Error: timeout exceeded' errormsg='the server did not accept the mail'<br />
<br />
To solve this problem you can use the command chronic or sponge from {{Pkg|moreutils}}.<br />
From their respective man page:<br />
; chronic: chronic runs a command, and arranges for its standard out and standard error to only be displayed if the command fails (exits nonzero or crashes). If the command succeeds, any extraneous output will be hidden.<br />
; sponge: sponge reads standard input and writes it out to the specified file. Unlike a shell redirect, sponge soaks up all its input before opening the output file… If no output file is specified, sponge outputs to stdout.<br />
<br />
Chronic too buffers the command output before opening its standard output.<br />
<br />
== Crontab format ==<br />
<br />
The basic format for a crontab is:<br />
<br />
''minute'' ''hour'' ''day_of_month'' ''month'' ''day_of_week'' ''command''<br />
<br />
* ''minute'' values can be from 0 to 59.<br />
* ''hour'' values can be from 0 to 23.<br />
* ''day_of_month'' values can be from 1 to 31.<br />
* ''month'' values can be from 1 to 12.<br />
* ''day_of_week'' values can be from 0 to 6, with 0 denoting Sunday.<br />
<br />
Spaces are used to separate fields. To fine-tune your schedule you may also use one of the following symbols:<br />
<br />
{| class="wikitable" style="text-align: center"<br />
!Symbol!!Description<br />
|-<br />
| '''*''' || Wildcard, specifies every possible time interval<br />
|-<br />
| ''',''' || List multiple values separated by a comma.<br />
|-<br />
| '''-''' || Specify a range between two numbers, separated by a hyphen<br />
|-<br />
| '''/''' || Specify a periodicity/frequency using a slash<br />
|-<br />
|}<br />
<br />
For example, the line:<br />
<br />
*/5 9-16 * 1-5,9-12 1-5 ~/bin/i_love_cron.sh<br />
<br />
Will execute the script {{ic|i_love_cron.sh}} at five minute intervals from 9 AM to 4:55 PM on weekdays except during the summer months (June, July, and August). More examples and advanced configuration techniques can be found below.<br />
<br />
Besides, crontab has some special keywords:<br />
<br />
@reboot at startup <br />
@yearly once a year<br />
@annually ( == @yearly)<br />
@monthly once a month<br />
@weekly once a week<br />
@daily once a day<br />
@midnight ( == @daily)<br />
@hourly once an hour<br />
<br />
For example:<br />
<br />
@reboot ~/bin/i_love_cron.sh<br />
<br />
Will execute the script {{ic|i_love_cron.sh}} at startup.<br />
<br />
See more at: http://www.adminschoice.com/crontab-quick-reference<br />
<br />
== Basic commands ==<br />
<br />
Crontabs should never be edited directly; instead, users should use the {{ic|crontab}} program to work with their crontabs. To be granted access to this command, user must be a member of the users group (see the {{ic|gpasswd}} command).<br />
<br />
To view their crontabs, users should issue the command:<br />
<br />
$ crontab -l<br />
<br />
To edit their crontabs, they may use:<br />
<br />
$ crontab -e<br />
<br />
{{Note|By default the {{ic|crontab}} command uses the {{ic|vi}} editor. To change it, [[export]] {{ic|EDITOR}} or {{ic|VISUAL}}, or specify the editor directly: {{ic|1=EDITOR=vim crontab -e}}.}}<br />
<br />
To remove their crontabs, they should use:<br />
<br />
$ crontab -r<br />
<br />
If a user has a saved crontab and would like to completely overwrite their old crontab, they should use:<br />
<br />
$ crontab ''saved_crontab_filename''<br />
<br />
To overwrite a crontab from the command line ([[Wikipedia:stdin]]), use<br />
<br />
$ crontab - <br />
<br />
To edit somebody else's crontab, issue the following command as root:<br />
<br />
# crontab -u ''username'' -e<br />
<br />
This same format (appending {{ic|-u ''username''}} to a command) works for listing and deleting crontabs as well.<br />
<br />
== Examples ==<br />
<br />
The entry:<br />
<br />
01 * * * * /bin/echo Hello, world!<br />
<br />
runs the command {{ic|/bin/echo Hello, world!}} on the first minute of every hour of every day of every month (i.e. at 12:01, 1:01, 2:01, etc.).<br />
<br />
Similarly:<br />
<br />
*/5 * * jan mon-fri /bin/echo Hello, world!<br />
<br />
runs the same job every five minutes on weekdays during the month of January (i.e. at 12:00, 12:05, 12:10, etc.).<br />
<br />
The line (as noted in "man 5 crontab"):<br />
<br />
*0,*5 9-16 * 1-5,9-12 1-5 /home/user/bin/i_love_cron.sh<br />
<br />
will execute the script {{Ic|i_love_cron.sh}} at five minute intervals from 9 AM to 5 PM (excluding 5 PM itself) every weekday (Mon-Fri) of every month except during the summer (June, July, and August).<br />
<br />
Periodical settings can also be entered as in this crontab template:<br />
<br />
<pre># Chronological table of program loadings <br />
# Edit with "crontab" for proper functionality, "man 5 crontab" for formatting<br />
# User: johndoe<br />
<br />
# mm hh DD MM W /path/progam [--option]... ( W = weekday: 0-6 [Sun=0] )<br />
21 01 * * * /usr/bin/systemctl hibernate<br />
@weekly $HOME/.local/bin/trash-empty<br />
</pre><br />
<br />
Here are some self-explanatory crontab syntax examples:<br />
<br />
<pre><br />
30 4 echo "It is now 4:30 am."<br />
0 22 echo "It is now 10 pm."<br />
30 15 25 12 echo "It is 3:30pm on Christmas Day."<br />
30 3 * * * echo "Remind me that it's 3:30am every day."<br />
0 * * * * echo "It is the start of a new hour."<br />
0 6 1,15 * * echo "At 6am on the 1st and 15th of every month."<br />
0 6 * * 2,3,5 echo "At 6am on Tuesday, Wednesday and Thursdays."<br />
59 23 * * 1-5 echo "Just before midnight on weekdays."<br />
0 */2 * * * echo "Every two hours."<br />
0 20 * * 4 echo "8pm on a Thursday."<br />
0 20 * * Thu echo "8pm on a Thursday."<br />
*/15 9-17 * * 2-5 echo "Every 15 minutes from 9am-5pm on weekdays."<br />
@yearly echo "Happy New Year!"<br />
</pre><br />
<br />
== Default editor ==<br />
<br />
To use an alternate default editor, define the {{ic|EDITOR}} environment variable in a shell initialization script as described in [[Environment variables]].<br />
<br />
As a regular user, {{ic|su}} will need to be used instead of {{ic|sudo}} for the environment variable to be pulled correctly:<br />
<br />
$ su -c "crontab -e"<br />
<br />
To have an alias to this {{ic|printf}} is required to carry the arbitrary string because {{ic|su}} launches in a new shell:<br />
<br />
alias scron="su -c $(printf "%q " "crontab -e")"<br />
<br />
== Running X.org server-based applications ==<br />
<br />
Cron does not run under the X.org server therefore it cannot know the environmental variable necessary to be able to start an X.org server application so they will have to be defined. One can use a program like {{AUR|xuserrun-git}} to do it:<br />
<br />
17 02 * ... /usr/bin/xuserrun /usr/bin/xclock<br />
<br />
Or they can be defined manually ({{ic|echo $DISPLAY}} will give the current DISPLAY value):<br />
<br />
17 02 * ... env DISPLAY=:0 /usr/bin/xclock<br />
<br />
If running notify-send for desktop notifications in cron, notify-send is sending values to dbus. So it needs to tell dbus to connect to the right bus. <br />
The address can be found by examining DBUS_SESSION_BUS_ADDRESS environment variable and setting it to the same value. Therefore: <br />
<br />
17 02 * ... env DBUS_SESSION_BUS_ADDRESS=your-address notify-send 'Foo bar'<br />
<br />
If done through say SSH, permission will need be given:<br />
<br />
# xhost +si:localuser:$(whoami)<br />
<br />
== Asynchronous job processing ==<br />
<br />
If you regularly turn off your computer but do not want to miss jobs, there are some solutions available (easiest to hardest):<br />
<br />
=== Cronie ===<br />
{{Pkg|cronie}} comes with anacron included. The project homepage says:<br />
<br />
Cronie contains the standard UNIX daemon crond that runs specified programs at scheduled times and related tools.<br />
It is based on the original cron and has security and configuration enhancements like the ability to use pam and SELinux.<br />
<br />
=== Dcron ===<br />
<br />
Vanilla {{AUR|dcron}} supports asynchronous job processing. Just put it with @hourly, @daily, @weekly or @monthly with a jobname, like this:<br />
<br />
@hourly ID=greatest_ever_job echo This job is very useful.<br />
<br />
=== Cronwhip ===<br />
<br />
{{AUR|cronwhip}} is a script to automatically run missed cron jobs; it works with the former default cron implementation, ''dcron''.<br />
See also the [https://bbs.archlinux.org/viewtopic.php?id=57973 forum thread].<br />
<br />
=== Anacron ===<br />
Anacron is a full replacement for ''dcron'' which processes jobs asynchronously.<br />
<br />
It is provided by {{Pkg|cronie}}. The configuration file is {{ic|/etc/anacrontab}}. Information on the format can be found in the {{ic|anacrontab(5)}} [[man page]]. Running {{ic|anacron -T}} will test {{ic|/etc/anacrontab}} for validity.<br />
<br />
=== Fcron ===<br />
<br />
Like ''anacron'', {{Pkg|fcron}} assumes the computer is not always running and, unlike ''anacron'', it can schedule events at intervals shorter than a single day which may be useful for systems which suspend/hibernate regularly (such as a laptop). Like cronwhip, fcron can run jobs that should have been run during the computer's downtime.<br />
<br />
When replacing {{Pkg|cronie}} with fcron be aware the spool directory is {{ic|/var/spool/fcron}} and the {{ic|fcrontab}} command is used instead of ''crontab'' to edit the user crontabs. These crontabs are stored in a binary format with the text version next to them as ''foo''.orig in the spool directory. Any scripts which manually edit user crontabs may need to be adjusted due to this difference in behavior.<br />
<br />
A quick scriptlet which may aide in converting traditional user crontabs to fcron format:<br />
<br />
{{bc|<br />
cd /var/spool/cron && (<br />
for ctab in *; do<br />
fcrontab ${ctab} -u ${ctab}<br />
done<br />
)<br />
}}<br />
<br />
See also the [https://bbs.archlinux.org/viewtopic.php?id=140497 forum thread].<br />
<br />
== Ensuring exclusivity ==<br />
<br />
If you run potentially long-running jobs (e.g., a backup might all of a sudden run for a long time, because of many changes or a particular slow network connection), then {{ic|flock}} ({{Pkg|util-linux}}) can ensure that the cron job won't start a second time.<br />
<br />
5,35 * * * * /usr/bin/flock -n /tmp/lock.backup /root/make-backup.sh<br />
<br />
== Cronie ==<br />
<br />
The relevant file hierarchy for cronie is the following:<br />
<br />
/etc/<br />
|----- cron.d/<br />
| ----- 0hourly<br />
|----- cron.minutely/<br />
|----- cron.hourly/<br />
| ----- 0anacron<br />
|----- anacrontab<br />
|----- cron.daily/<br />
|----- cron.monthly/<br />
|----- cron.weekly/<br />
|----- crontab<br />
|----- cron.deny<br />
<br />
Cronie provides both ''cron'' and ''anacron'' functionalities: ''cron'' runs jobs at regular time intervals (down to a granularity of one minute) as long as the system is available at the specified time, while ''anacron'' executes commands at<br />
intervals specified in days. Unlike cron, it does not assume that the system is running continuously. Whenever the system is up, ''anacron'' checks if there are any jobs that should have been run and handles them accordingly. <br />
<br />
A ''cron'' job can be defined in a crontab-like file in the {{ic|/etc/cron.d}} directory or added within the {{ic|/etc/crontab}} file. Note the latter is not present by default but is used if it exists. As instructed by {{ic|/etc/cron.d/0hourly}}, any executable file in {{ic|/etc/cron.hourly}} will be run every hour (by default at minute 1 of the hour). Files in {{ic|/etc/cron.minutely}} are executed every minute if instructed accordingly in {{ic|/etc/cron.d/0hourly}}. The executables are typically shell scripts, symlinks to executable files can also be used. <br />
The {{ic|/etc/cron.deny}} file includes the list of users not allowed to use crontab, without this file, only users listed in {{ic|/etc/cron.allow}} can use it. <br />
<br />
''Anacron'' works similarly, by executing the files in the {{ic|/etc/cron.daily}}, {{ic|/etc/cron.weekly}} and {{ic|/etc/cron.monthly}} directories, placed there depending on the desired job frequency. The cron job {{ic|/etc/cron.hourly/0anacron}} makes sure that ''anacron'' is run once daily to perform its pending tasks.<br />
<br />
{{Note|<br />
* Cronie uses {{ic|run-parts}} to carry out scripts in the different directories. The filenames should not include any dot (.) since {{ic|run-parts}} in its default mode will silently ignore them (see {{man|8|run-parts}}). The names must consist only of upper and lower-case letters, digits, underscores and minus-hyphens.<br />
* The output of {{ic|systemctl status cronie}} might show a message such as {{ic|CAN'T OPEN (/etc/crontab): No such file or directory}}. However, this can be ignored since cronie does not require one.<br />
* Cronie is particular about the permissions for {{ic|/etc/cron.d/0hourly}}. None of the tasks in {{ic|/etc/cron.d/{hourly,weekly,daily} ... etc}} will be run (including the anacron launcher) if {{ic|/etc/cron.d/0hourly}} is damaged or has improper permissions. {{ic|pacman -Qkk cronie}} can show if you have any such issues.<br />
}}<br />
<br />
{{Tip|To prevent the sending of output and stop email alert, add {{ic|>/dev/null 2>&1}} at the end of the line for each cron job to redirect output to /dev/null. <br />
<br />
0 1 5 10 * /path/to/script.sh >/dev/null 2>&1<br />
<br />
You can also set {{ic|1=MAILTO=””}} variable in your crontab file to disable email alerts.}}<br />
<br />
== Dcron ==<br />
<br />
The cron daemon parses a configuration file known as {{ic|crontab}}. Each user on the system can maintain a separate crontab file to schedule commands individually. The root user's crontab is used to schedule system-wide tasks (though users may opt to use {{ic|/etc/crontab}} or the {{ic|/etc/cron.d}} directory, depending on which cron implementation they choose).<br />
<br />
{{hc|/var/spool/cron/root|<nowiki><br />
# Run command at a scheduled time<br />
# Edit this 'crontab -e' for error checking, man 1 crontab for acceptable format<br />
<br />
# <@freq> <tags and command><br />
@hourly ID=sys-hourly /usr/sbin/run-cron /etc/cron.hourly<br />
@daily ID=sys-daily /usr/sbin/run-cron /etc/cron.daily<br />
@weekly ID=sys-weekly /usr/sbin/run-cron /etc/cron.weekly<br />
@monthly ID=sys-monthly /usr/sbin/run-cron /etc/cron.monthly<br />
<br />
# mm hh DD MM W /path/command (or tags) # W = week: 0-6, Sun=0<br />
21 01 * * * /usr/bin/systemctl suspend<br />
</nowiki>}}<br />
<br />
These lines exemplify one of the formats that crontab entries can have, namely whitespace-separated fields specifying:<br />
<br />
# @period<br />
# ID=jobname (this tag is specific to dcron)<br />
# command<br />
<br />
The other standard format for crontab entries is:<br />
<br />
# minute<br />
# hour<br />
# day<br />
# month<br />
# day of week<br />
# command<br />
<br />
The crontab files themselves are usually stored as {{ic|/var/spool/cron/username}}. For example, root's crontab is found at {{ic|/var/spool/cron/root}}<br />
<br />
See the crontab [[man page]] for further information and configuration examples.<br />
<br />
== See also ==<br />
<br />
* [http://www.gentoo.org/doc/en/cron-guide.xml Gentoo Linux Cron Guide]<br />
* [https://crontab.guru/ crontab.guru] - online editor for cronjob expressions</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=SSMTP&diff=568545SSMTP2019-03-13T08:56:32Z<p>Dcelasun: SSMTP is now on AUR</p>
<hr />
<div>[[Category:Mail server]]<br />
[[ja:SSMTP]]<br />
{{Related articles start}}<br />
{{Related|OpenSMTPD}}<br />
{{Related|msmtp}}<br />
{{Related|S-nail}}<br />
{{Related articles end}}<br />
<br />
SSMTP is a program which delivers email from a local computer to a configured mailhost (mailhub). It is not a mail server (like feature-rich mail server [[sendmail]]) and does not receive mail, expand aliases or manage a queue. One of its primary uses is for forwarding automated email (like system alerts) off your machine and to an external email address.<br />
<br />
{{Note|ssmtp is unmaintained. Consider using something like [[msmtp]] or [[OpenSMTPD]] instead.}}<br />
<br />
==Installation==<br />
[[Install]] the package {{AUR|ssmtp}}.<br />
<br />
==Forward to a Gmail mail server==<br />
To configure SSMTP, you will have to edit its configuration file ({{ic|/etc/ssmtp/ssmtp.conf}}) and enter your account settings. <br />
<br />
* If your Gmail account is secured with two-factor authentication, you need to generate a unique [https://support.google.com/mail/answer/185833 App Password] to use in {{ic|ssmtp.conf}}. You can do so on your [https://myaccount.google.com/apppasswords App Passwords] page. Use you Gmail username (not the App Name) in the {{ic|AuthUser}} line and use the generated 16-character password in the {{ic|AuthPass}} line, spaces in the password can be omitted.<br />
* If you do ''not'' use two-factor authentication, you need to [https://support.google.com/accounts/answer/6010255 allow access to unsecure apps]. You can do so on your [https://myaccount.google.com/lesssecureapps Less Secure Apps] page.<br />
<br />
{{hc|/etc/ssmtp/ssmtp.conf|<br />
<nowiki><br />
# The user that gets all the mails (UID < 1000, usually the admin)<br />
root=username@gmail.com<br />
<br />
# The mail server (where the mail is sent to), both port 465 or 587 should be acceptable<br />
# See also https://support.google.com/mail/answer/78799<br />
mailhub=smtp.gmail.com:587<br />
<br />
# The address where the mail appears to come from for user authentication.<br />
rewriteDomain=gmail.com<br />
<br />
# The full hostname. Must be correctly formed, fully qualified domain name or GMail will reject connection.<br />
hostname=yourlocalhost.yourlocaldomain.tld<br />
<br />
# Use SSL/TLS before starting negotiation<br />
UseTLS=Yes<br />
UseSTARTTLS=Yes<br />
<br />
# Username/Password<br />
AuthUser=username<br />
AuthPass=password<br />
AuthMethod=LOGIN<br />
<br />
# Email 'From header's can override the default domain?<br />
FromLineOverride=yes<br />
</nowiki>}}<br />
<br />
{{note|Take note, that the shown configuration is an example for Gmail, You may have to use other settings. If it is not working as expected read the man page {{man|8|ssmtp|url=https://manpages.debian.org/stretch/ssmtp/ssmtp.8.en.html}}, please.}}<br />
<br />
Create aliases for local usernames (optional)<br />
{{hc|/etc/ssmtp/revaliases|root:username@gmail.com:smtp.gmail.com:587<br />
mainuser:username@gmail.com:smtp.gmail.com:587}}<br />
<br />
To test whether the Gmail server will properly forward your email:<br />
{{bc|<nowiki>$ echo -n 'Subject: test\n\nTesting ssmtp' | sendmail -v tousername@example.com</nowiki>}}<br />
<br />
Change the 'From' text by editing {{ic|/etc/passwd}} to receive mail from 'root at myhost' instead of just 'root'.<br />
{{bc|# chfn -f 'root at myhost' root<br />
# chfn -f 'mainuser at myhost' mainuser}}<br />
Which changes {{ic|/etc/passwd}} to:<br />
{{hc|$ grep myhost /etc/passwd|root:x:0:0:root at myhost,,,:/root:/bin/bash<br />
mainuser:x:1000:1000:mainuser at myhost,,,:/home/mainuser:/bin/bash}}<br />
<br />
==Security==<br />
Because your email password is stored as cleartext in {{ic|/etc/ssmtp/ssmtp.conf}}, it is important that this file is secure. By default, the entire {{ic|/etc/ssmtp}} directory is accessible only by root and the mail group. The {{ic|/usr/bin/ssmtp}} binary runs as the mail group and can read this file. There is no reason to add yourself or other users to the mail group.<br />
<br />
==Sending email==<br />
To send email from the terminal, do:<br />
<br />
$ echo -e "Subject: this is the subject\n\nthis is the body" | mail user@example.com<br />
or interactively as:<br />
$ sendmail username@example.com<br />
Subject: this is my subject<br />
CC: optional@example.com<br />
<br />
Now I can type the body here<br />
<br />
{{Note|When using mail interactively, after typing the ''Subject: subject'' and other headers, hit enter twice, and then type the body.<br />
Hit {{ic|Ctrl}}+{{ic|d}} on a blank line to end your message and automatically send it out.}}<br />
<br />
An alternate method for sending emails is to create a text file and send it with ''ssmtp'' or ''mail''<br />
{{hc|test-mail.txt|To:username@example.com<br />
From:youraccount@gmail.com<br />
Subject: Test<br />
<br />
This is a test mail.}}<br />
<br />
Send the {{ic|test-mail.txt}} file<br />
$ sendmail -t < test-mail.txt<br />
<br />
Some users might prefer the syntax of ''mail'' from {{pkg|s-nail}}, {{pkg|mailutils}}, or other ''mailx'' providers instead. For example, ''mail'' has options to provide the subject as an argument. ''mail'' requires ''sendmail'' and can use {{pkg|ssmtp}}{{Broken package link|package not found}} as ''sendmail''.<br />
<br />
===Attachments===<br />
If you need to be able to add attachments, install and configure [[Mutt]] and [[Msmtp]] and then go see the tip at [http://www.cyberciti.biz/tips/sending-mail-with-attachment.html nixcraft].<br />
<br />
Alternatively, you can attach using ''uuencode'' from {{pkg|sharutils}}. To attach 'file.txt' as 'myfile.txt':<br />
$ uuencode file.txt myfile.txt | sendmail user@example.com<br />
<br />
===Mail to Local Users===<br />
Messages sent to local users (or any other address not ending in ''@fqdn'' are treated in one of two ways<br />
<br />
* destination user has UID < 1000 - The address is replaced by the address defined by {{ic|code=root=user@fqdn}} in {{ic|/etc/ssmtp/ssmtp.conf}}<br />
* destination user has UID ≥ 1000 or the user is unknown - The the value from {{ic|code=rewriteDomain=}} in {{ic|/etc/ssmtp/ssmtp.conf}} is appended to the end of the user id.<br />
<br />
This can lead to problems if local users on your system aren't also valid users at your {{ic|rewriteDomain}}, but are receiving mail from system services, esp if your rewrite domain is a public service like {{ic|gmail.com}}.<br />
<br />
To work around this, you can use ''mail'' from {{pkg|s-nail}}. The ''mail'' command can read aliases defined in {{ic|/etc/mail.rc}}. Example:<br />
{{hc|$ grep alias /etc/mail.rc|<br />
alias git git<username@example.com><br />
alias archuser 'My Name'<someone@example.com>}}<br />
<br />
You can then pipe messages into ''mail'' instead of into ''sendmail''. <br />
$ echo -e "Hey archuser." | mail archuser<br />
<br />
{{Note|You might be tempted to symlink ''sendmail'' to {{ic|/bin/mail}}. Don't do this. ''sendmail'' and ''mail'' have different syntax for both arguments and standard input. It is better to find the processes that are using sendmail directly and configure them to use mail instead.}}<br />
<br />
==References==<br />
*[https://bbs.archlinux.org/viewtopic.php?pid=446831 SSMTP and Gmail on the Arch forums]<br />
*[http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/ Sending Email From Your System with sSMTP]<br />
*[http://www.scottro.net/qnd/qnd-ssmtp.html The Qnd Guide to ssmtp]<br />
*[https://support.google.com/mail/answer/78799 &#71;Mail Support - Configuring other mail clients]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=RAID&diff=562917RAID2019-01-12T11:11:39Z<p>Dcelasun: /* Nested RAID levels */ Add "mdadm --grow" warning for farX layouts</p>
<hr />
<div>[[Category:Storage virtualization]]<br />
[[es:RAID]]<br />
[[it:RAID]]<br />
[[ja:RAID]]<br />
[[ru:RAID]]<br />
[[zh-hans:RAID]]<br />
{{Related articles start}}<br />
{{Related|Software RAID and LVM}}<br />
{{Related|LVM#RAID}}<br />
{{Related|Installing with Fake RAID}}<br />
{{Related|Convert a single drive system to RAID}}<br />
{{Related|ZFS}}<br />
{{Related|ZFS/Virtual disks}}<br />
{{Related|Swap#Striping}}<br />
{{Related|Btrfs#RAID}}<br />
{{Related articles end}}<br />
{{Style|Non-standard headers, other [[Help:Style]] issues}}<br />
<br />
Redundant Array of Independent Disks ([[Wikipedia:RAID|RAID]]) is a storage technology that combines multiple disk drive components (typically disk drives or partitions thereof) into a logical unit. Depending on the RAID implementation, this logical unit can be a file system or an additional transparent layer that can hold several partitions. Data is distributed across the drives in one of several ways called [[#RAID levels]], depending on the level of redundancy and performance required. The RAID level chosen can thus prevent data loss in the event of a hard disk failure, increase performance or be a combination of both.<br />
<br />
This article explains how to create/manage a software RAID array using mdadm.<br />
<br />
{{Warning|Be sure [[Backup programs|to back up]] all data before proceeding.}}<br />
<br />
== RAID levels ==<br />
<br />
Despite redundancy implied by most RAID levels, RAID does not guarantee that data is safe. A RAID will not protect data if there is a fire, the computer is stolen or multiple hard drives fail at once. Furthermore, installing a system with RAID is a complex process that may destroy data.<br />
<br />
=== Standard RAID levels ===<br />
<br />
There are many different [[Wikipedia:Standard RAID levels|levels of RAID]], please find hereafter the most commonly used ones.<br />
<br />
; [[Wikipedia:Standard RAID levels#RAID 0|RAID 0]]<br />
: Uses striping to combine disks. Even though it ''does not provide redundancy'', it is still considered RAID. It does, however, ''provide a big speed benefit''. If the speed increase is worth the possibility of data loss (for [[swap]] partition for example), choose this RAID level. On a server, RAID 1 and RAID 5 arrays are more appropriate. The size of a RAID 0 array block device is the size of the smallest component partition times the number of component partitions.<br />
<br />
; [[Wikipedia:Standard RAID levels#RAID 1|RAID 1]]<br />
: The most straightforward RAID level: straight mirroring. As with other RAID levels, it only makes sense if the partitions are on different physical disk drives. If one of those drives fails, the block device provided by the RAID array will continue to function as normal. The example will be using RAID 1 for everything except [[swap]] and temporary data. Please note that with a software implementation, the RAID 1 level is the only option for the boot partition, because bootloaders reading the boot partition do not understand RAID, but a RAID 1 component partition can be read as a normal partition. The size of a RAID 1 array block device is the size of the smallest component partition.<br />
<br />
; [[Wikipedia:Standard RAID levels#RAID 5|RAID 5]]<br />
: Requires 3 or more physical drives, and provides the redundancy of RAID 1 combined with the speed and size benefits of RAID 0. RAID 5 uses striping, like RAID 0, but also stores parity blocks ''distributed across each member disk''. In the event of a failed disk, these parity blocks are used to reconstruct the data on a replacement disk. RAID 5 can withstand the loss of one member disk.<br />
: {{Note|RAID 5 is a common choice due to its combination of speed and data redundancy. The caveat is that if one drive were to fail and another drive failed before that drive was replaced, all data will be lost. Furthermore, with modern disk sizes and expected unrecoverable read error (URE) rates on consumer disks, the rebuild of a 4TiB array is '''expected''' (i.e. higher than 50% chance) to have at least one URE. Because of this, RAID 5 is no longer advised by the storage industry.}}<br />
<br />
; [[Wikipedia:Standard RAID levels#RAID 6|RAID 6]]<br />
: Requires 4 or more physical drives, and provides the benefits of RAID 5 but with security against two drive failures. RAID 6 also uses striping, like RAID 5, but stores two distinct parity blocks ''distributed across each member disk''. In the event of a failed disk, these parity blocks are used to reconstruct the data on a replacement disk. RAID 6 can withstand the loss of two member disks. The robustness against unrecoverable read errors is somewhat better, because the array still has parity blocks when rebuilding from a single failed drive. However, given the overhead, RAID 6 is costly and in most settings RAID 10 in far2 layout (see below) provides better speed benefits and robustness, and is therefore preferred.<br />
<br />
=== Nested RAID levels ===<br />
<br />
; [[Wikipedia:Nested RAID levels#RAID 10 (RAID 1+0)|RAID 1+0]]<br />
: RAID1+0 is a nested RAID that combines two of the standard levels of RAID to gain performance and additional redundancy. It is commonly referred to as ''RAID10'', however, Linux MD RAID10 is slightly different from simple RAID layering, see below.<br />
<br />
; [[Wikipedia:Non-standard RAID levels#Linux MD RAID 10|RAID 10]]<br />
: RAID10 under Linux is built on the concepts of RAID1+0, however, it implements this as a single layer, with multiple possible layouts.<br />
: The ''near X'' layout on Y disks repeats each chunk X times on Y/2 stripes, but does not need X to divide Y evenly. The chunks are placed on almost the same location on each disk they are mirrored on, hence the name. It can work with any number of disks, starting at 2. Near 2 on 2 disks is equivalent to RAID1, near 2 on 4 disks to RAID1+0.<br />
: The ''far X'' layout on Y disks is designed to offer striped read performance on a mirrored array. It accomplishes this by dividing each disk in two sections, say front and back, and what is written to disk 1 front is mirrored in disk 2 back, and vice versa. This has the effect of being able to stripe sequential reads, which is where RAID0 and RAID5 get their performance from. The drawback is that sequential writing has a very slight performance penalty because of the distance the disk needs to seek to the other section of the disk to store the mirror. RAID10 in far 2 layout is, however, preferable to layered RAID1+0 '''and''' RAID5 whenever read speeds are of concern and availability / redundancy is crucial. However, it is still not a substitute for backups. See the wikipedia page for more information.<br />
<br />
{{Warning| mdadm cannot reshape arrays in ''far X'' layouts which means once the array is created, you won't be able to {{ic|mdadm --grow}} it. For example, if you have a 4x1TB RAID10 array and you want to switch to 2TB disks, your usable capacity will remain 2TB. For such use cases, stick to ''near X'' layouts.}}<br />
<br />
=== RAID level comparison ===<br />
<br />
{| class="wikitable"<br />
! RAID level!!Data redundancy!!Physical drive utilization!!Read performance!!Write performance!!Min drives<br />
|-<br />
| '''0'''||{{No}}||100%||nX<br />
<br />
'''Best'''<br />
||nX<br />
<br />
'''Best'''<br />
||2<br />
|-<br />
| '''1'''||{{Yes}}||50%||Up to nX if multiple processes are reading, otherwise 1X<br />
||1X||2<br />
|-<br />
| '''5'''||{{Yes}}||67% - 94%||(n−1)X<br />
<br />
'''Superior'''<br />
||(n−1)X<br />
<br />
'''Superior'''<br />
||3<br />
|-<br />
| '''6'''||{{Yes}}||50% - 88%||(n−2)X||(n−2)X||4<br />
|-<br />
| '''10,far2'''||{{Yes}}||50%||nX<br />
'''Best;''' on par with RAID0 but redundant<br />
||(n/2)X||2<br />
|-<br />
| '''10,near2'''||{{Yes}}||50%||Up to nX if multiple processes are reading, otherwise 1X||(n/2)X||2<br />
|}<br />
<br />
<nowiki>*</nowiki> Where ''n'' is standing for the number of dedicated disks.<br />
<br />
== Implementation ==<br />
<br />
The RAID devices can be managed in different ways:<br />
<br />
; Software RAID<br />
: This is the easiest implementation as it does not rely on obscure proprietary firmware and software to be used. The array is managed by the operating system either by:<br />
:* by an abstraction layer (e.g. [[#Installation|mdadm]]); {{Note|This is the method we will use later in this guide.}}<br />
:* by a logical volume manager (e.g. [[LVM#RAID|LVM]]);<br />
:* by a component of a file system (e.g. [[ZFS]], [[Btrfs#RAID|Btrfs]]).<br />
<br />
; Hardware RAID<br />
: The array is directly managed by a dedicated hardware card installed in the PC to which the disks are directly connected. The RAID logic runs on an on-board processor independently of [[Wikipedia:Central processing unit|the host processor (CPU)]]. Although this solution is independent of any operating system, the latter requires a driver in order to function properly with the hardware RAID controller. The RAID array can either be configured via an option rom interface or, depending on the manufacturer, with a dedicated application when the OS has been installed. The configuration is transparent for the Linux kernel: it does not see the disks separately.<br />
<br />
; [[Fakeraid|FakeRAID]]<br />
: This type of RAID is properly called BIOS or Onboard RAID, but is falsely advertised as hardware RAID. The array is managed by pseudo-RAID controllers where the RAID logic is implemented in an option rom or in the firmware itself [http://www.win-raid.com/t19f13-Intel-EFI-RAID-quot-SataDriver-quot-BIOS-Modules.html with a EFI SataDriver] (in case of [[UEFI]]), but are not full hardware RAID controllers with ''all'' RAID features implemented. Therefore, this type of RAID is sometimes called FakeRAID. {{Pkg|dmraid}} from the [[official repositories]], will be used to deal with these controllers. Here are some examples of FakeRAID controllers: [[Wikipedia:Intel Rapid Storage Technology|Intel Rapid Storage]], JMicron JMB36x RAID ROM, AMD RAID, ASMedia 106x, and NVIDIA MediaShield.<br />
<br />
=== Which type of RAID do I have? ===<br />
<br />
Since software RAID is implemented by the user, the type of RAID is easily known to the user.<br />
<br />
However, discerning between FakeRAID and true hardware RAID can be more difficult. As stated, manufacturers often incorrectly distinguish these two types of RAID and false advertising is always possible. The best solution in this instance is to run the {{ic|lspci}} command and looking through the output to find the RAID controller. Then do a search to see what information can be located about the RAID controller. Hardware RAID controllers appear in this list, but FakeRAID implementations do not. Also, true hardware RAID controller are often rather expensive, so if someone customized the system, then it is very likely that choosing a hardware RAID setup made a very noticeable change in the computer's price.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|mdadm}}. ''mdadm'' is used for administering pure software RAID using plain block devices: the underlying hardware does not provide any RAID logic, just a supply of disks. ''mdadm'' will work with any collection of block devices. Even if unusual. For example, one can thus make a RAID array from a collection of thumb drives.<br />
<br />
=== Prepare the devices ===<br />
<br />
{{Warning|These steps erase everything on a device, so type carefully!}}<br />
<br />
If the device is being reused or re-purposed from an existing array, erase any old RAID configuration information:<br />
<br />
# mdadm --misc --zero-superblock /dev/<drive><br />
<br />
or if a particular partition on a drive is to be deleted:<br />
<br />
# mdadm --misc --zero-superblock /dev/<partition><br />
<br />
{{Note|<br />
* Zapping a partition's superblock should not affect the other partitions on the disk.<br />
* Due to the nature of RAID functionality it is very difficult to [[securely wipe disk]]s fully on a running array. Consider whether it is useful to do so before creating it.<br />
}}<br />
<br />
=== Partition the devices ===<br />
<br />
It is highly recommended to partition the disks to be used in the array. Since most RAID users are selecting disk drives larger than 2 TiB, GPT is required and recommended. See [[Partitioning]] for the more information on partitioning and the available [[partitioning tools]].<br />
<br />
{{Note|It is also possible to create a RAID directly on the raw disks (without partitions), but not recommended because it can cause problems when swapping a failed disk.}}<br />
<br />
{{Tip|When replacing a failed disk of a RAID, the new disk has to be exactly the same size as the failed disk or bigger — otherwise the array recreation process will not work. Even hard drives of the same manufacturer and model can have small size differences. By leaving a little space at the end of the disk unallocated one can compensate for the size differences between drives, which makes choosing a replacement drive model easier. Therefore, it is good practice to leave about 100 MiB of unallocated space at the end of the disk.}}<br />
<br />
==== GUID Partition Table ====<br />
<br />
* After creating the partitions, their [[Wikipedia:GUID Partition Table#Partition type GUIDs|partition type GUIDs]] should be {{ic|A19D880F-05FC-4D3B-A006-743F0F84911E}} (it can be assigned by selecting partition type {{ic|Linux RAID}} in ''fdisk'' or {{ic|FD00}} in ''gdisk'').<br />
* If a larger disk array is employed, consider assigning [[Persistent block device naming#by-label|filesystem labels]] or [[Persistent block device naming#by-partlabel|partition labels]] to make it easier to identify an individual disk later.<br />
* Creating partitions that are of the same size on each of the devices is recommended.<br />
<br />
==== Master Boot Record ====<br />
<br />
For those creating partitions on HDDs with a MBR partition table, the [[Wikipedia:Partition type|partition types IDs]] available for use are:<br />
<br />
* {{ic|0xFD}} for raid autodetect arrays ({{ic|Linux raid autodetect}} in ''fdisk'')<br />
* {{ic|0xDA}} for non-fs data ({{ic|Non-FS data}} in ''fdisk'')<br />
<br />
See [https://raid.wiki.kernel.org/index.php/Partition_Types Linux Raid Wiki:Partition Types] for more information.<br />
<br />
=== Build the array ===<br />
<br />
Use {{ic|mdadm}} to build the array. See {{man|8|mdadm}} for supported options. Several examples are given below.<br />
<br />
{{Warning|Do not simply copy/paste the examples below; make sure you use substitute the correct options and drive letters.}}<br />
<br />
{{Note|<br />
* If this is a RAID1 array which is intended to boot from [[Syslinux]] a limitation in syslinux v4.07 requires the metadata value to be 1.0 rather than the default of 1.2.<br />
* When creating an array from [[Archiso|Arch installation medium]] use the option {{ic|1=--homehost=''myhostname''}} (or {{ic|1=--homehost=any}} to always have the same name regardless of the host) to set the [[hostname]], otherwise the hostname {{ic|archiso}} will be written in the array metadata.<br />
}}<br />
<br />
{{Tip|You can specify a custom raid device name using the option {{ic|1=--name=''MyRAIDName''}} or by setting the raid device path to {{ic|/dev/md/''MyRAIDName''}}. Udev will create symlinks to the raid arrays in {{ic|/dev/md/}} using that name. If {{ic|homehost}} matches the current [[hostname]] (or if homehost is set to {{ic|any}}) the link will be {{ic|/dev/md/''name''}}, if the hostname does not match the link be {{ic|/dev/md/''homehost'':''name''}}.}}<br />
<br />
The following example shows building a 2-device RAID1 array:<br />
<br />
# mdadm --create --verbose --level=1 --metadata=1.2 --raid-devices=2 /dev/md/MyRAID1Array /dev/sdb1 /dev/sdc1<br />
<br />
The following example shows building a RAID5 array with 4 active devices and 1 spare device:<br />
<br />
# mdadm --create --verbose --level=5 --metadata=1.2 --chunk=256 --raid-devices=4 /dev/md/MyRAID5Array /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 --spare-devices=1 /dev/sdf1<br />
<br />
{{Tip|{{ic|--chunk}} is used to change the chunk size from the default value. See [http://www.zdnet.com/article/chunks-the-hidden-key-to-raid-performance/ Chunks: the hidden key to RAID performance] for more on chunk size optimisation.}}<br />
<br />
The following example shows building a RAID10,far2 array with 2 devices:<br />
<br />
# mdadm --create --verbose --level=10 --metadata=1.2 --chunk=512 --raid-devices=2 --layout=f2 /dev/md/MyRAID10Array /dev/sdb1 /dev/sdc1<br />
<br />
The array is created under the virtual device {{ic|/dev/mdX}}, assembled and ready to use (in degraded mode). One can directly start using it while mdadm resyncs the array in the background. It can take a long time to restore parity. Check the progress with:<br />
<br />
$ cat /proc/mdstat<br />
<br />
=== Update configuration file ===<br />
<br />
By default, most of {{ic|mdadm.conf}} is commented out, and it contains just the following:<br />
<br />
{{hc|/etc/mdadm.conf|<br />
...<br />
DEVICE partitions<br />
...<br />
}}<br />
<br />
This directive tells mdadm to examine the devices referenced by {{ic|/proc/partitions}} and assemble as many arrays as possible. This is fine if you really do want to start all available arrays and are confident that no unexpected superblocks will be found (such as after installing a new storage device). A more precise approach is to explicitly add the arrays to {{ic|/etc/mdadm.conf}}:<br />
<br />
# mdadm --detail --scan >> /etc/mdadm.conf<br />
<br />
This results in something like the following:<br />
<br />
{{hc|/etc/mdadm.conf|2=<br />
...<br />
DEVICE partitions<br />
...<br />
ARRAY /dev/md/MyRAID1Array metadata=1.2 name=pine:MyRAID1Array UUID=27664f0d:111e493d:4d810213:9f291abe<br />
}}<br />
<br />
This also causes mdadm to examine the devices referenced by {{ic|/proc/partitions}}. However, only devices that have superblocks with a UUID of {{ic|27664…}} are assembled in to active arrays.<br />
<br />
See {{man|5|mdadm.conf}} for more information.<br />
<br />
=== Assemble the array ===<br />
<br />
Once the configuration file has been updated the array can be assembled using mdadm:<br />
<br />
# mdadm --assemble --scan<br />
<br />
=== Format the RAID filesystem ===<br />
<br />
The array can now be formatted with a [[file system]] like any other partition, just keep in mind that:<br />
<br />
* Due to the large volume size not all filesystems are suited (see: [[Wikipedia:Comparison of file systems#Limits]]).<br />
* The filesystem should support growing and shrinking while online (see: [[Wikipedia:Comparison of file systems#Features]]).<br />
* One should calculate the correct stride and stripe-width for optimal performance.<br />
<br />
==== Calculating the stride and stripe width ====<br />
<br />
Two parameters are required to optimise the filesystem structure to fit optimally within the underlying RAID structure: the ''stride'' and ''stripe width''. These are derived from the RAID ''chunk size'', the filesystem ''block size'', and the ''number of "data disks"''.<br />
<br />
The chunk size is a property of the RAID array, decided at the time of its creation. {{ic|mdadm}}'s current default is 512 KiB. It can be found with {{ic|mdadm}}:<br />
<br />
# mdadm --detail /dev/mdX | grep 'Chunk Size'<br />
<br />
The block size is a property of the filesystem, decided at ''its'' creation. The default for many filesystems, including ext4, is 4 KiB. See {{ic|/etc/mke2fs.conf}} for details on ext4.<br />
<br />
The number of "data disks" is the minimum number of devices in the array required to completely rebuild it without data loss. For example, this is N for a raid0 array of N devices and N-1 for raid5.<br />
<br />
Once you have these three quantities, the stride and the stripe width can be calculated using the following formulas:<br />
<br />
stride = chunk size / block size<br />
stripe width = number of data disks * stride<br />
<br />
===== Example 1. RAID0 =====<br />
<br />
Example formatting to ext4 with the correct stripe width and stride:<br />
<br />
* Hypothetical RAID0 array is composed of 2 physical disks.<br />
* Chunk size is 64 KiB.<br />
* Block size is 4 KiB.<br />
<br />
stride = chunk size / block size. In this example, the math is 64/4 so the stride = 16.<br />
<br />
stripe width = # of physical '''data''' disks * stride. In this example, the math is 2*16 so the stripe width = 32.<br />
<br />
# mkfs.ext4 -v -L myarray -m 0.5 -b 4096 -E stride=16,stripe-width=32 /dev/md0<br />
<br />
===== Example 2. RAID5 =====<br />
<br />
Example formatting to ext4 with the correct stripe width and stride:<br />
<br />
* Hypothetical RAID5 array is composed of 4 physical disks; 3 data discs and 1 parity disc.<br />
* Chunk size is 512 KiB.<br />
* Block size is 4 KiB.<br />
<br />
stride = chunk size / block size. In this example, the math is 512/4 so the stride = 128.<br />
<br />
stripe width = # of physical '''data''' disks * stride. In this example, the math is 3*128 so the stripe width = 384.<br />
<br />
# mkfs.ext4 -v -L myarray -m 0.01 -b 4096 -E stride=128,stripe-width=384 /dev/md0<br />
<br />
For more on stride and stripe width, see: [http://wiki.centos.org/HowTos/Disk_Optimization RAID Math].<br />
<br />
===== Example 3. RAID10,far2 =====<br />
<br />
Example formatting to ext4 with the correct stripe width and stride:<br />
<br />
* Hypothetical RAID10 array is composed of 2 physical disks. Because of the properties of RAID10 in far2 layout, both count as data disks.<br />
* Chunk size is 512 KiB.<br />
<br />
{{hc|# mdadm --detail /dev/md0 {{!}} grep 'Chunk Size'|<br />
Chunk Size : 512K<br />
}}<br />
<br />
* Block size is 4 KiB.<br />
<br />
stride = chunk size / block size.<br />
In this example, the math is 512/4 so the stride = 128.<br />
<br />
stripe width = # of physical '''data''' disks * stride.<br />
In this example, the math is 2*128 so the stripe width = 256.<br />
<br />
# mkfs.ext4 -v -L myarray -m 0.01 -b 4096 -E stride=128,stripe-width=256 /dev/md0<br />
<br />
== Mounting from a Live CD ==<br />
<br />
Users wanting to mount the RAID partition from a Live CD, use:<br />
<br />
# mdadm --assemble /dev/<disk1> /dev/<disk2> /dev/<disk3> /dev/<disk4><br />
<br />
If your RAID 1 that is missing a disk array was wrongly auto-detected as RAID 1 (as per {{ic|mdadm --detail /dev/md<number>}}) and reported as inactive (as per {{ic|cat /proc/mdstat}}), stop the array first:<br />
<br />
# mdadm --stop /dev/md<number><br />
<br />
== Installing Arch Linux on RAID ==<br />
<br />
{{Note|The following section is applicable only if the root filesystem resides on the array. Users may skip this section if the array holds a data partition(s).}}<br />
<br />
You should create the RAID array between the [[Partitioning]] and [[File systems#Create a file system|formatting]] steps of the Installation Procedure. Instead of directly formatting a partition to be your root file system, it will be created on a RAID array.<br />
Follow the section [[#Installation]] to create the RAID array. Then continue with the installation procedure until the pacstrap step is completed.<br />
When using [[Unified Extensible Firmware Interface|UEFI boot]], also read [[EFI system partition#ESP on RAID]].<br />
<br />
=== Update configuration file ===<br />
<br />
{{Note|This should be done outside of the chroot, hence the prefix {{ic|/mnt}} to the filepath.}}<br />
<br />
After the base system is installed the default configuration file, {{ic|mdadm.conf}}, must be updated like so:<br />
<br />
# mdadm --detail --scan >> /mnt/etc/mdadm.conf<br />
<br />
Always check the {{ic|mdadm.conf}} configuration file using a text editor after running this command to ensure that its contents look reasonable.<br />
<br />
{{Note|To prevent failure of {{ic|mdmonitor.service}} at boot (enabled by default), you will need to uncomment {{ic|MAILADDR}} and provide an e-mail address and/or application to handle notification of problems with your array at the bottom of {{ic|mdadm.conf}}. See [[#Mailing on events]].}}<br />
<br />
Continue with the installation procedure until you reach the step [[Installation guide#Initramfs]], then follow the next section.<br />
<br />
=== Configure mkinitcpio ===<br />
<br />
{{Note|This should be done whilst chrooted.}}<br />
<br />
Add {{ic|mdadm_udev}} to the [[mkinitcpio#HOOKS|HOOKS]] section of the {{ic|mkinitcpio.conf}} to add support for mdadm into the initramfs image:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
...<br />
HOOKS=(base udev autodetect keyboard modconf block '''mdadm_udev''' filesystems fsck)<br />
...<br />
}}<br />
<br />
If you use the {{ic|mdadm_udev}} hook with a FakeRAID array, it is recommended to include ''mdmon'' in the [[mkinitcpio#BINARIES and FILES|BINARIES]] array:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
...<br />
BINARIES=('''mdmon''')<br />
...<br />
}}<br />
<br />
Then [[Regenerate the initramfs]].<br />
<br />
See also [[mkinitcpio#Using RAID]].<br />
<br />
=== Configure the boot loader ===<br />
<br />
Point the {{ic|root}} parameter to the mapped device. E.g.:<br />
<br />
root=/dev/md/''MyRAIDArray''<br />
<br />
If booting from a software raid partition fails using the kernel device node method above, an alternative way is to use one of the methods from [[Persistent block device naming]], for example:<br />
<br />
root=LABEL=Root_Label<br />
<br />
See also [[GRUB#RAID]].<br />
<br />
== RAID Maintenance ==<br />
<br />
=== Scrubbing ===<br />
<br />
It is good practice to regularly run data [[wikipedia:Data_scrubbing|scrubbing]] to check for and fix errors. Depending on the size/configuration of the array, a scrub may take multiple hours to complete.<br />
<br />
To initiate a data scrub:<br />
<br />
# echo check > /sys/block/md0/md/sync_action<br />
<br />
The check operation scans the drives for bad sectors and automatically repairs them. If it finds good sectors that contain bad data (the data in a sector does not agree with what the data from another disk indicates that it should be, for example the parity block + the other data blocks would cause us to think that this data block is incorrect), then no action is taken, but the event is logged (see below). This "do nothing" allows admins to inspect the data in the sector and the data that would be produced by rebuilding the sectors from redundant information and pick the correct data to keep.<br />
<br />
As with many tasks/items relating to mdadm, the status of the scrub can be queried by reading {{ic|/proc/mdstat}}.<br />
<br />
Example:<br />
<br />
{{hc|$ cat /proc/mdstat|<nowiki><br />
Personalities : [raid6] [raid5] [raid4] [raid1]<br />
md0 : active raid1 sdb1[0] sdc1[1]<br />
3906778112 blocks super 1.2 [2/2] [UU]<br />
[>....................] check = 4.0% (158288320/3906778112) finish=386.5min speed=161604K/sec<br />
bitmap: 0/30 pages [0KB], 65536KB chunk<br />
</nowiki>}}<br />
<br />
To stop a currently running data scrub safely:<br />
<br />
# echo idle > /sys/block/md0/md/sync_action<br />
<br />
{{Note|If the system is rebooted after a partial scrub has been suspended, the scrub will start over.}}<br />
<br />
When the scrub is complete, admins may check how many blocks (if any) have been flagged as bad:<br />
<br />
# cat /sys/block/md0/md/mismatch_cnt<br />
<br />
==== General notes on scrubbing ====<br />
<br />
{{Note|Users may alternatively echo '''repair''' to {{ic|/sys/block/md0/md/sync_action}} but this is ill-advised since if a mismatch in the data is encountered, it would be automatically updated to be consistent. The danger is that we really do not know whether it is the parity or the data block that is correct (or which data block in case of RAID1). It is luck-of-the-draw whether or not the operation gets the right data instead of the bad data.}}<br />
<br />
It is a good idea to set up a cron job as root to schedule a periodic scrub. See {{AUR|raid-check}} which can assist with this. To perform a periodic scrub using systemd timers instead of cron, See {{AUR|raid-check-systemd}} which contains the same script along with associated systemd timer unit files.<br />
<br />
{{Note|For typical platter drives, scrubbing can take approximately '''six seconds per gigabyte''' (that is one hour forty-five minutes per terabyte) so plan the start of your cron job or timer appropriately.}}<br />
<br />
==== RAID1 and RAID10 notes on scrubbing ====<br />
<br />
Due to the fact that RAID1 and RAID10 writes in the kernel are unbuffered, an array can have non-0 mismatch counts even when the array is healthy. These non-0 counts will only exist in transient data areas where they do not pose a problem. However, we cannot tell the difference between a non-0 count that is just in transient data or a non-0 count that signifies a real problem. This fact is a source of false positives for RAID1 and RAID10 arrays. It is however still recommended to scrub regularly in order to catch and correct any bad sectors that might be present in the devices.<br />
<br />
=== Removing devices from an array ===<br />
<br />
One can remove a device from the array after marking it as faulty:<br />
<br />
# mdadm --fail /dev/md0 /dev/sdxx<br />
<br />
Now remove it from the array:<br />
<br />
# mdadm --remove /dev/md0 /dev/sdxx<br />
<br />
Remove device permanently (for example, to use it individually from now on):<br />
Issue the two commands described above then:<br />
<br />
# mdadm --zero-superblock /dev/sdxx<br />
<br />
{{Warning|<br />
* Do not issue this command on linear or RAID0 arrays or data loss will occur!<br />
* Reusing the removed disk without zeroing the superblock will cause loss of all data on the next boot. (After mdadm will try to use it as the part of the raid array).<br />
}}<br />
<br />
Stop using an array:<br />
<br />
# Umount target array<br />
# Stop the array with: {{ic|mdadm --stop /dev/md0}}<br />
# Repeat the three command described in the beginning of this section on each device.<br />
# Remove the corresponding line from {{ic|/etc/mdadm.conf}}.<br />
<br />
=== Adding a new device to an array ===<br />
<br />
Adding new devices with mdadm can be done on a running system with the devices mounted.<br />
Partition the new device using the same layout as one of those already in the arrays as discussed above.<br />
<br />
Assemble the RAID array if it is not already assembled:<br />
<br />
# mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1<br />
<br />
Add the new device the array:<br />
<br />
# mdadm --add /dev/md0 /dev/sdc1<br />
<br />
This should not take long for mdadm to do. <br />
<br />
Depending on the type of RAID (for example, with RAID1), mdadm may add the device as a spare without syncing data to it. You can increase the number of disks the RAID uses by using {{ic|--grow}} with the {{ic|--raid-devices}} option. For example, to increase an array to four disks:<br />
<br />
# mdadm --grow /dev/md0 --raid-devices=4<br />
<br />
You can check the progress with:<br />
<br />
# cat /proc/mdstat<br />
<br />
Check that the device has been added with the command:<br />
<br />
# mdadm --misc --detail /dev/md0<br />
<br />
{{Note|For RAID0 arrays you may get the following error message:<br />
<br />
mdadm: add new device failed for /dev/sdc1 as 2: Invalid argument<br />
<br />
This is because the above commands will add the new disk as a "spare" but RAID0 does not have spares. If you want to add a device to a RAID0 array, you need to "grow" and "add" in the same command, as demonstrated below:<br />
<br />
# mdadm --grow /dev/md0 --raid-devices<nowiki>=</nowiki>3 --add /dev/sdc1<br />
<br />
}}<br />
<br />
=== Increasing size of a RAID volume ===<br />
<br />
If larger disks are installed in a RAID array or partition size has been increased, it may be desirable to increase the size of the RAID volume to fill the larger available space. This process may be begun by first following the above sections pertaining to replacing disks. Once the RAID volume has been rebuilt onto the larger disks it must be "grown" to fill the space.<br />
<br />
# mdadm --grow /dev/md0 --size=max<br />
<br />
Next, partitions present on the RAID volume {{ic|/dev/md0}} may need to be resized. See [[Partitioning]] for details. Finally, the filesystem on the above mentioned partition will need to be resized. If partitioning was performed with {{ic|gparted}} this will be done automatically. If other tools were used, unmount and then resize the filesystem manually.<br />
<br />
# umount /storage<br />
# fsck.ext4 -f /dev/md0p1<br />
# resize2fs /dev/md0p1<br />
<br />
=== Change sync speed limits ===<br />
<br />
Syncing can take a while. If the machine is not needed for other tasks the speed limit can be increased.<br />
<br />
{{hc|# cat /proc/mdstat|<nowiki><br />
Personalities : [raid1]<br />
md0 : active raid1 sda3[2] sdb3[1]<br />
155042219 blocks super 1.2 [2/1] [_U]<br />
[>....................] recovery = 0.0% (77696/155042219) finish=265.8min speed=9712K/sec<br />
<br />
unused devices: <none><br />
</nowiki>}}<br />
<br />
Check the current speed limit.<br />
<br />
{{hc|# cat /proc/sys/dev/raid/speed_limit_min|<br />
1000<br />
}}<br />
<br />
{{hc|# cat /proc/sys/dev/raid/speed_limit_max|<br />
200000<br />
}}<br />
<br />
Increase the limits.<br />
<br />
# echo 400000 >/proc/sys/dev/raid/speed_limit_min<br />
# echo 400000 >/proc/sys/dev/raid/speed_limit_max<br />
<br />
Then check out the syncing speed and estimated finish time.<br />
<br />
{{hc|# cat /proc/mdstat|<nowiki><br />
Personalities : [raid1]<br />
md0 : active raid1 sda3[2] sdb3[1]<br />
155042219 blocks super 1.2 [2/1] [_U]<br />
[>....................] recovery = 1.3% (2136640/155042219) finish=158.2min speed=16102K/sec<br />
<br />
unused devices: <none><br />
</nowiki>}}<br />
<br />
See also [[sysctl#MDADM]].<br />
<br />
== Monitoring ==<br />
<br />
A simple one-liner that prints out the status of the RAID devices:<br />
<br />
{{hc|# awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' </proc/mdstat<br />
|md1: [UU]<br />
md0: [UU]<br />
}}<br />
<br />
=== Watch mdstat ===<br />
<br />
# watch -t 'cat /proc/mdstat'<br />
<br />
Or preferably using {{pkg|tmux}}<br />
<br />
# tmux split-window -l 12 "watch -t 'cat /proc/mdstat'"<br />
<br />
=== Track IO with iotop ===<br />
<br />
The {{pkg|iotop}} package displays the input/output stats for processes. Use this command to view the IO for raid threads.<br />
<br />
# iotop -a -p $(sed 's, , -p ,g' <<<`pgrep "_raid|_resync|jbd2"`)<br />
<br />
=== Track IO with iostat ===<br />
<br />
The ''iostat'' utility from {{Pkg|sysstat}} package displays the input/output statistics for devices and partitions.<br />
<br />
# iostat -dmy 1 /dev/md0<br />
# iostat -dmy 1 # all<br />
<br />
=== Mailing on events ===<br />
<br />
A smtp mail server (sendmail) or at least an email forwarder (ssmtp/msmtp) is required to accomplish this. Perhaps the most simplistic solution is to use {{AUR|dma}} which is very tiny (installs to 0.08 MiB) and requires no setup.<br />
<br />
Edit {{ic|/etc/mdadm.conf}} defining the email address to which notifications will be received.<br />
<br />
{{Note|If using dma as mentioned above, users may simply mail directly to the username on the localhost rather than to an external email address.}}<br />
<br />
To test the configuration:<br />
<br />
# mdadm --monitor --scan --oneshot --test<br />
<br />
mdadm includes {{ic|mdmonitor.service}} to perform the monitoring task, so at this point, you have nothing left to do. If you do not set a mail address in {{ic|/etc/mdadm.conf}}, that service will fail. If you do not want to receive mail on mdadm events, the failure can be ignored; if you do not want notifications and are sensitive about failure messages, you can [[mask]] the unit.<br />
<br />
==== Alternative method ====<br />
<br />
To avoid the installation of a smtp mail server or an email forwarder you can use the [[S-nail]] tool (do not forget to setup) already on your system.<br />
<br />
Create a file named {{ic|/etc/mdadm_warning.sh}}:<br />
<br />
{{hc|/etc/mdadm_warning.sh|<nowiki><br />
#!/bin/bash<br />
event=$1<br />
device=$2<br />
<br />
echo " " | /usr/bin/mailx -s "$event on $device" '''destination@email.com'''<br />
</nowiki>}}<br />
<br />
And give it execution permissions {{ic|chmod +x /etc/mdadm_warning.sh}}<br />
<br />
Then add this to the mdadm.conf<br />
<br />
PROGRAM /etc/mdadm_warning.sh<br />
<br />
To test and enable use the same as in the previous method.<br />
<br />
== Troubleshooting ==<br />
<br />
If you are getting error when you reboot about "invalid raid superblock magic" and you have additional hard drives other than the ones you installed to, check that your hard drive order is correct. During installation, your RAID devices may be hdd, hde and hdf, but during boot they may be hda, hdb and hdc. Adjust your kernel line accordingly. This is what happened to me anyway.<br />
<br />
=== Error: "kernel: ataX.00: revalidation failed" ===<br />
<br />
If you suddenly (after reboot, changed BIOS settings) experience Error messages like:<br />
<br />
Feb 9 08:15:46 hostserver kernel: ata8.00: revalidation failed (errno=-5)<br />
<br />
Is does not necessarily mean that a drive is broken. You often find panic links on the web which go for the worst. In a word, No Panic. Maybe you just changed APIC or ACPI settings within your BIOS or Kernel parameters somehow. Change them back and you should be fine. Ordinarily, turning ACPI and/orACPI off should help.<br />
<br />
=== Start arrays read-only ===<br />
<br />
When an md array is started, the superblock will be written, and resync may begin. To start read-only set the kernel module {{ic|md_mod}} parameter {{ic|start_ro}}. When this is set, new arrays get an 'auto-ro' mode, which disables all internal io (superblock updates, resync, recovery) and is automatically switched to 'rw' when the first write request arrives.<br />
<br />
{{Note|The array can be set to true 'ro' mode using {{ic|mdadm --readonly}} before the first write request, or resync can be started without a write using {{ic|mdadm --readwrite}}.}}<br />
<br />
To set the parameter at boot, add {{ic|1=md_mod.start_ro=1}} to your kernel line.<br />
<br />
Or set it at module load time from {{ic|/etc/modprobe.d/}} file or from directly from {{ic|/sys/}}:<br />
<br />
# echo 1 > /sys/module/md_mod/parameters/start_ro<br />
<br />
=== Recovering from a broken or missing drive in the raid ===<br />
<br />
You might get the above mentioned error also when one of the drives breaks for whatever reason. In that case you will have to force the raid to still turn on even with one disk short. Type this (change where needed):<br />
<br />
# mdadm --manage /dev/md0 --run<br />
<br />
Now you should be able to mount it again with something like this (if you had it in fstab):<br />
<br />
# mount /dev/md0<br />
<br />
Now the raid should be working again and available to use, however with one disk short! So, to add that one disc partition it the way like described above in [[#Prepare the devices]]. Once that is done you can add the new disk to the raid by doing:<br />
<br />
# mdadm --manage --add /dev/md0 /dev/sdd1<br />
<br />
If you type:<br />
<br />
# cat /proc/mdstat<br />
<br />
you probably see that the raid is now active and rebuilding.<br />
<br />
You also might want to update your configuration (see: [[#Update configuration file]]).<br />
<br />
== Benchmarking ==<br />
<br />
There are several tools for benchmarking a RAID. The most notable improvement is the speed increase when multiple threads are reading from the same RAID volume.<br />
<br />
{{AUR|tiobench}}{{Broken package link|package not found}} specifically benchmarks these performance improvements by measuring fully-threaded I/O on the disk.<br />
<br />
{{Pkg|bonnie++}} tests database type access to one or more files, and creation, reading, and deleting of small files which can simulate the usage of programs such as Squid, INN, or Maildir format e-mail. The enclosed [http://www.coker.com.au/bonnie++/zcav/ ZCAV] program tests the performance of different zones of a hard drive without writing any data to the disk.<br />
<br />
{{ic|hdparm}} should '''NOT''' be used to benchmark a RAID, because it provides very inconsistent results.<br />
<br />
== See also ==<br />
<br />
{{Out of date|A lot of old and dead links.}}<br />
<br />
* [https://www.thomas-krenn.com/en/wiki/Linux_Software_RAID Linux Software RAID] (thomas-krenn.com)<br />
* [http://raid.wiki.kernel.org/index.php/Linux_Raid Linux RAID wiki entry] on The Linux Kernel Archives<br />
* [https://raid.wiki.kernel.org/index.php/Write-intent_bitmap How Bitmaps Work]<br />
* [http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-raid.html Chapter 15: Redundant Array of Independent Disks (RAID)] of Red Hat Enterprise Linux 6 Documentation<br />
* [http://tldp.org/FAQ/Linux-RAID-FAQ/x37.html Linux-RAID FAQ] on the Linux Documentation Project<br />
* [http://support.dell.com/support/topics/global.aspx/support/entvideos/raid?c=us&l=en&s=gen Dell.com Raid Tutorial]{{Dead link|2018|03|10}} - Interactive Walkthrough of Raid<br />
* [http://www.miracleas.com/BAARF/ BAARF]{{Dead link|2018|03|10}} including ''[http://www.miracleas.com/BAARF/RAID5_versus_RAID10.txt Why should I not use RAID 5?]''{{Dead link|2018|03|10}} by Art S. Kagel<br />
* [http://www.linux-mag.com/id/7924/ Introduction to RAID], [http://www.linux-mag.com/id/7931/ Nested-RAID: RAID-5 and RAID-6 Based Configurations], [http://www.linux-mag.com/id/7928/ Intro to Nested-RAID: RAID-01 and RAID-10], and [http://www.linux-mag.com/id/7932/ Nested-RAID: The Triple Lindy] in Linux Magazine<br />
* [http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html HowTo: Speed Up Linux Software Raid Building And Re-syncing]<br />
* [http://fomori.org/blog/?p=94 RAID5-Server to hold all your data]<br />
* [[Wikipedia:Non-RAID drive architectures]]<br />
<br />
'''mdadm'''<br />
* [http://anonscm.debian.org/gitweb/?p=pkg-mdadm/mdadm.git;a=blob_plain;f=debian/FAQ;hb=HEAD Debian mdadm FAQ]{{Dead link|2018|09|01}}<br />
* [http://www.kernel.org/pub/linux/utils/raid/mdadm/ mdadm source code]<br />
* [http://www.linux-mag.com/id/7939/ Software RAID on Linux with mdadm] in Linux Magazine<br />
* [[Wikipedia:mdadm|Wikipedia - mdadm]]<br />
<br />
'''Forum threads'''<br />
* [http://forums.overclockers.com.au/showthread.php?t=865333 Raid Performance Improvements with bitmaps]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=125445 GRUB and GRUB2]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=123698 Can't install grub2 on software RAID]<br />
* [http://forums.gentoo.org/viewtopic-t-888624-start-0.html Use RAID metadata 1.2 in boot and root partition]<br />
<br />
'''RAID with encryption'''<br />
* [http://www.shimari.com/dm-crypt-on-raid/ Linux/Fedora: Encrypt /home and swap over RAID with dm-crypt] by Justin Wells</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=User:Dcelasun&diff=470418User:Dcelasun2017-03-11T11:24:31Z<p>Dcelasun: </p>
<hr />
<div>Hello!<br />
<br />
I'm dcc24 from the forums. You can see my contributions [[Special:Contributions/Dcelasun|here]] (or see below) and contact me on AUR.<br />
<br />
= My contributions =<br />
<br />
==Written==<br />
*[[Asus EEE PC 1215n]]<br />
*[[Dell Inspiron 1564]]<br />
*[[Gmrun]]<br />
<br />
==Translated==<br />
*[[LVM_(Türkçe)]] (''finished'')<br />
<br />
==Contributed to==<br />
*[[VDR]]<br />
*[[ATI]]<br />
*[[Openbox]]<br />
*[[Matlab]]<br />
*[[Pidgin]]<br />
*[[Arch Compared to Other Distributions]]<br />
*[[Lenovo ThinkPad SL510]]<br />
*[[Arch Build System]]<br />
*[[Xfce]]<br />
*[[Hwdetect]]<br />
*[[Music Player Daemon]]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Linux-ck&diff=470417Linux-ck2017-03-11T11:23:45Z<p>Dcelasun: /* General package details */ Minor grammar fix.</p>
<hr />
<div>[[Category:Kernel]]<br />
[[ja:Linux-ck]]<br />
[[ru:Linux-ck]]<br />
[[zh-hans:Linux-ck]]<br />
{{Related articles start}}<br />
{{Related|Linux-ck/Changelog}}<br />
{{Related|Repo-ck}}<br />
{{Related|Modprobed-db}}<br />
{{Related articles end}}<br />
<br />
== General package details ==<br />
<br />
{{AUR|Linux-ck}} is a package available both in [[AUR]] and in the [[#Use pre-compiled packages|unofficial repo-ck repository]] that allows users to run a kernel and headers setup patched with Con Kolivas' ck patchset[http://users.tpg.com.au/ckolivas/kernel/], including MuQSS (Multiple Queue Skiplist Scheduler, pronounced ''mux'') which replaces Brain Fuck Scheduler (BFS), his previous work. Many Arch Linux users choose this kernel for its excellent desktop interactivity and responsiveness under any load situation.<br />
<br />
Ck patchset is designed for desktop/laptop use but not for servers. It provides low latency environment and works well for 16 CPUs or fewer.<br />
<br />
=== Release cycle ===<br />
<br />
Linux-ck roughly follows the release cycle of the official ARCH kernel but not only. The following are requirements for a new package release:<br />
<br />
* CK patchset compatible with the current kernel version<br />
* corresponding ARCH kernel must be in existence otherwise it will break other packages i.e. nvidia. See [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux git.archlinux.org] for the official {{Pkg|linux}} package<br />
<br />
=== Package defaults ===<br />
<br />
There are '''three''' modifications to the config files:<br />
# The options that the CK patchset enable/disable.<br />
# The tickrate is set to 100 Hz (CK's recommendation).<br />
# The extra CPU types optionally available to compilation thanks to the [https://github.com/graysky2/kernel_gcc_patch GCC patch].<br />
<br />
'''All other options are set to the ARCH defaults outlined in the main kernel's config files.''' Of course users are free to edit them.<br />
<br />
The {{AUR|linux-ck}} package contains an option to switch on the '''nconfig''' config editor (see the section [[Linux-ck#Compile the package from source|below]]).<br />
<br />
=== Long-Term Support (LTS) CK releases ===<br />
<br />
In addition to the {{AUR|linux-ck}} package, there are LTS kernel releases patched with the above patchsets as well and with the previously mentioned modifications:<br />
<br />
* {{AUR|linux-lts-ck}} - The current Arch Linux LTS kernel patched with the CK patchset<br />
<br />
{{Note|This package is maintained by vishwin, thus pre-compiled versions will not be present in the unofficial ck repo.}}<br />
<br />
== Installation options ==<br />
<br />
{{Note|As with ''any'' additional kernel, users need to manually update their [[boot loader]]'s configuration file in order to make it aware of the new kernel image.}}<br />
<br />
Users have two options to get these kernel packages.<br />
<br />
=== Compile the package from source ===<br />
<br />
The [[AUR]] contains entries for both packages mentioned above.<br />
<br />
Users can further customize the linux-ck package via tweaks contained in the PKGBUILD:<br />
<br />
* Optional '''nconfig''' for user specific tweaking.<br />
* Option to compile a minimal set of modules via a make '''localmodconfig'''.<br />
* Option to bypass the standard ARCH config options and simply use the '''current kernel configuration''' file.<br />
* Optionally set the [http://algo.ing.unimo.it/people/paolo/disk_sched/ '''BFQ I/O scheduler'''] as default.<br />
<br />
More details about these options are provided in the PKGBUILD itself. Be sure to read them carefully if compiling from AUR!<br />
<br />
{{Note|There are the related PKGBUILDs in AUR for other common kernel modules. For example {{AUR|nvidia-ck}}, {{AUR|nvidia-304xx-ck}}, {{AUR|nvidia-340xx-ck}}, and {{AUR|broadcom-wl-ck}} to name a few. Alternatively, use the corresponding DKMS package, for instance install {{pkg|nvidia-dkms}} as described in [[NVIDIA#Custom_kernel]].}}<br />
<br />
=== Use pre-compiled packages ===<br />
<br />
If user prefers to spend no time to compile on their own, the unofficial repo maintained by [[User:Graysky|graysky]] is available to the community. For details, see: [[Repo-ck]].<br />
<br />
== How to enable the BFQ I/O Scheduler ==<br />
<br />
{{Note|Do not confuse MuQSS (Multiple Queue Skiplist Scheduler) with BFQ (Budget Fair Queueing). MuQSS is a CPU scheduler and is enabled by default whereas BFQ is an I/O scheduler and must explicitly be enabled in order to use it.}}<br />
<br />
Budget Fair Queueing is a disk scheduler which allows each process/thread to be assigned a portion of the disk throughput. Its creator shares the results of many benchmarks ([http://algo.ing.unimo.it/people/paolo/disk_sched/results.php results] and [http://www.youtube.com/watch?v=KhZl9LjCKuU video]) which show the latency performance improvement.<br />
<br />
Due to CK's patchset defaults, BFQ is built into [[AUR|linux-ck]] but the above-mentioned scheduler must be enabled manually. User has several options to do that.<br />
<br />
=== Enable BFQ for all devices ===<br />
<br />
If compiling from the AUR, simply set the BFQ flag to "y" in the PKGBUILD prior to building<br />
_BFQ_enable_="y"<br />
<br />
Users of [[repo-ck]] or those who have not modified the PKGBUILD prior to compile the package can append {{ic|1=elevator=bfq}} to the [[kernel parameters]].<br />
<br />
=== Enable BFQ only for specific devices ===<br />
<br />
An alternative method is to instruct the kernel at runtime to use BFQ on a device-by-device basis. For configuration examples see the [[Improving performance#Tuning IO schedulers]] section.<br />
<br />
== More about MuQSS ==<br />
<br />
See the [https://lkml.org/lkml/2016/10/29/4 LKML announcement] posted by CK.<br />
<br />
=== Check if MuQSS is enabled ===<br />
<br />
This start-up message should appear in the kernel ring buffer when MuQSS in enabled:<br />
$ dmesg | grep -i muqss<br />
...<br />
MuQSS CPU scheduler v0.120 by Con Kolivas.<br />
<br />
=== MuQSS patched kernels and systemd ===<br />
<br />
It is a common mistake to think that MuQSS does not support ''cgroups''. It does but not all the cgroup features (e.g. CPU limiting will not work).<br />
<br />
== Troubleshooting ==<br />
<br />
=== Running VirtualBox with Linux-ck ===<br />
<br />
VirtualBox works just fine with custom kernels such as Linux-ck ''without'' the need to keep any of the official ARCH kernel headers package on the system.<br />
<br />
Do not forget to add users to the ''vboxusers '' group:<br />
# gpasswd -a USERNAME vboxusers<br />
<br />
==== Use the unofficial repo (recommended if Linux-ck is installed from Repo-ck) ====<br />
<br />
{{Note|As of 17-Oct-2012, Repo-ck users can enjoy these modules as pre-compiled packages in the repo itself. If you build Linux-ck from AUR you '''can not use the repo''' as all packages in the repo are matched groups.}}<br />
<br />
See the [[Repo-ck]] section to set up it correctly.<br />
<br />
==== The virtualbox-ck-host-modules package (recommended if Linux-ck is built from AUR) ====<br />
<br />
Install the {{AUR|virtualbox-ck-host-modules}} package and then install the '''virtualbox''' package.<br />
<br />
==== Use DKMS (more complicated, recommended for LTS versions) ====<br />
<br />
Install '''virtualbox''' with the '''virtualbox-host-dkms''' package. Then setup DKMS as follows:<br />
# pacman -S virtualbox virtualbox-host-dkms<br />
# dkms install vboxhost/4.3.12<br />
<br />
{{Note|Make sure to substitute the correct version number of virtualbox in the second command. At the time of writing, 4.3.12 is current.}}<br />
<br />
=== Downgrading ===<br />
<br />
Users wishing to downgrade to a previous version of Linux-ck, have several options:<br />
* Source archives are [http://repo-ck.com/bench.htm available] dating back to linux-ck-3.3.7-1. <br />
* [http://pkgbuild.com/git/aur-mirror.git/log/linux-ck AUR.git] holds AUR git commits for Linux-ck, dating back to linux-ck-2.6.39.3-1.<br />
<br />
=== Forum support ===<br />
<br />
Always feel free to open a thread in the forums for support purpose. Be sure to give the thread a descriptive title to draw attention to the fact that the post relates to the Linux-ck package.<br />
<br />
== See also ==<br />
<br />
* [http://users.tpg.com.au/ckolivas/kernel/ Kernel patch homepage of Con Kolivas]<br />
* [http://ck-hack.blogspot.it/ Con Kolivas' Blog]<br />
* [http://lkml.org/lkml/2009/9/6/136 Con Kolivas' desktop-centric kernel patchset]<br />
* [https://en.wikipedia.org/wiki/Con_Kolivas Wikipedia's Con Kovalis page]<br />
* [https://en.wikipedia.org/wiki/Brain_Fuck_Scheduler Wikipedia's BFS article]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Xfce&diff=139683Xfce2011-05-04T14:43:12Z<p>Dcelasun: /* Removable Devices */ Automounting fix as described in https://bbs.archlinux.org/viewtopic.php?pid=889018#p889018</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Xfce}}<br />
[[pl:XFCE]]<br />
[[de:Xfce]]<br />
<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 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 />
== What is Xfce? ==<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. Unlike GNOME or KDE, Xfce is lightweight and designed more around [http://www.opengroup.org/cde/ CDE] than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.<br />
<br />
== Why use Xfce? ==<br />
Here is a (subjective) list of reasons to use Xfce:<br />
* It's fast; faster than the other major DEs.<br />
* It's stable. In the long time Xfce-4 has been out, only a relatively small handful of bugs has been discovered, despite it having a rather large following.<br />
* It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.<br />
* It works great with multiple monitors. Xfce's [[Wikipedia:Xinerama|Xinerama]] support is arguably the best out of any WM/DE.<br />
* It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."<br />
* It comes with a built-in compositor which allows for true transparency, among other cool things.<br />
<br />
== Why not use Xfce? ==<br />
Here is a (subjective) list of reasons not to use Xfce:<br />
* Doesn't contain all the features and integration of the major DEs.<br />
* Slower development cycle.<br />
* Because it's based on the CDE design, the layout may not be as familiar.<br />
<br />
== How to Install Xfce ==<br />
Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them. Because of this, Xfce has some separate Arch packages.<br />
<br />
=====Installing Xfce=====<br />
To install the base Xfce system, run:<br />
<br />
# pacman -S xfce4<br />
<br />
Pacman will ask you to select the packages to install, you probably want to get them all by simply pressing enter.<br />
<br />
{{Note |Or you can install only a few needed '''core packages''':<br />
<br />
# pacman -S xfwm4 xfce4-panel xfdesktop thunar xfce4-session xfce4-settings xfce4-appfinder xfce-utils xfconf<br />
<br />
}}<br />
<br />
If you want extras, like panel plugins, run this:<br />
<br />
# pacman -S xfce4-goodies<br />
<br />
Like before, pacman will ask you which packages you want to install.<br />
<br />
{{Note |'''xfce4-xfapplet-plugin''' (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the '''xfce4-goodies''' group and depends on '''gnome-panel''', which in turn depends on '''gnome-desktop'''. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies.}}<br />
<br />
If you don't want xfce4-xfapplet-plugin, you can install xfce4-goodies this way:<br />
<br />
# pacman -S xfce4-goodies --ignore xfce4-xfapplet-plugin<br />
<br />
If you wish to admire 'Tips and Tricks' on login, install the fortune-mod package:<br />
<br />
# pacman -S fortune-mod<br />
<br />
In order to get the xfce4-mixer to work with alsa, you need to install gstreamer0.10-base-plugins. (See below for help with OSS.)<br />
<br />
# pacman -S gstreamer0.10-base-plugins<br />
<br />
=====Installing and configuring the Daemons=====<br />
Install dbus:<br />
# pacman -S dbus<br />
<br />
To start automatically on boot, you should add <tt>dbus</tt> to your DAEMONS array in {{filename|/etc/rc.conf}}:<br />
<br />
DAEMONS=(syslog-ng '''dbus''' network crond)<br />
<br />
If you need to start dbus without rebooting, run<br />
# /etc/rc.d/dbus start<br />
<br />
Install gamin (the successor of fam). It is configured to automatically run in the background by default, do not add it to rc.conf.<br />
<br />
# pacman -S gamin<br />
<br />
== Running Xfce ==<br />
<br />
=====Automatically at boot time=====<br />
See [[Display Manager]] to install and configure a Display Manager. Be sure to configure it properly for [[PolicyKit]].<br />
<br />
=====Manually=====<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 ~/.xinitrc yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec ck-launch-session dbus-launch --exit-with-session startxfce4<br />
<br />
Example:<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
<br />
# exec gnome-session<br />
# exec startkde<br />
# exec startxfce4<br />
# ...or the Window Manager of your choice<br />
exec ck-launch-session dbus-launch --exit-with-session startxfce4<br />
<br />
{{{Note|<code>dbus-launch</code> starts a dbus-daemon instance to provide communication with PolicyKit. <code>ck-launch-session</code> starts a clean consolekit session needed by Xfce for power management, automounting, shutting down/rebooting etc. ConsoleKit/PolicyKit capable display managers such as gdm do this for you automatically. Notice dbus-launch must be placed after ck-launch-session, or there will be problems when mounting disks.}}}<br />
<br />
=====Shutting down, rebooting, and automounting from withing Xfce=====<br />
* Make sure that '''dbus''' is enabled in the DAEMONS array in /etc/rc.conf.<br />
* Make sure you are a member of the ''power'' group for shutting down and rebooting.<br />
* Make sure you are a member of the ''storage'' group for automounting.<br />
* Make sure that you are using <code>exec ck-launch-session dbus-launch --exit-with-session startxfce4</code> in ~/.xinitrc '''or''' a ConsoleKit/PolicyKit capable display manager, such as [[GDM]] or [[Slim|SLiM]]. (see above)<br />
<br />
== Tips ==<br />
=== Panel ===<br />
==== How to customize xfce panel background ====<br />
Edit ~/.gtkrc-2.0. <br />
Note that you must place the image in the same directory as the configuration, which is ~/. You can not specify the path to the image, or it won't 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 />
==== Replacements for the default 'menu' panel applet ====<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 [http://aur.archlinux.org/packages.php?ID=10259 the AUR]<br />
<br />
==== How to remove menu 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 /usr/share/applications folder: <pre>$ cd /usr/share/applications</pre><br />
# This folder should be full of .desktop files. To see a list type: <pre>$ ls</pre><br />
# Add ''NoDisplay=true'' to the .desktop file. For example, if you want to hide Firefox, type in the terminal:<pre>$ sudo echo "NoDisplay=true" >> firefox.desktop</pre> This command appends the text ''NoDisplay=true'' to the end of the .desktop file and saves the 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 /usr/share/applications/.<br />
# In a terminal, copy everything from /usr/share/applications to ~/.local/share/applications/: <pre>$ cp /usr/share/applications/* ~/.local/share/applications/</pre><br />
# For any entry you wish to hide from the menu, add the NoDisplay=true option: <pre>$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop</pre><br />
<br />
You can also edit the application's category by editing the .desktop file with a text editor and modifying the Categories= line.<br />
<br />
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)? ==== <br />
I've found some shortcuts that show in the category “Other” in this directory:<br />
~/.local/share/applications/wine/.<br />
<br />
=== Desktop ===<br />
==== Why doesn't my desktop refresh? ====<br />
Xfce 4.6 uses [[FAM]] (File Alteration Monitor) or [[gamin]] (FAM's successor) to get notification when a file or directory changes.<br />
If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf.<br />
This step is not necessary for gamin.<br />
<br />
NOTE: After recent updates, FAM may have issues opening some mounts, such as sshfs. Use gamin if this is the case.<br />
<br />
==== Use a transparent background for desktop icon titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the .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 on the desktop ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{filename|/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.<br />
<br />
==== Switch to old desktop right click menu without Thunar things ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
=== App suggestions ===<br />
==== A drop down console like in quake ====<br />
<br />
# pacman -S tilda<br />
<br />
will install tilda, a drop down console, similar to yakuake. A more lightweight alternative would be '''stjerm''' which can be found in the AUR.<br />
<br />
To configure tilda, type<br />
<br />
# tilda -C<br />
<br />
which opens a configuration window in X.<br />
<br />
====Guake====<br />
Another functional alternative is guake, which is available in the community repo:<br />
<br />
# pacman -S guake<br />
<br />
=== XFWM4 ===<br />
==== How to enable the compositor in Xfce 4.6 ====<br />
Xfce 4.6 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 /etc/xorg.conf. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Persistent window placement per-app ====<br />
<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at .desktop files ''/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 />
xfce-setting-show backdrop<br />
xfce-setting-show display<br />
xfce-setting-show keyboard<br />
xfce4-menueditor<br />
xfce-setting-show sound<br />
xfce-setting-show mouse<br />
xfce-setting-show session<br />
xfce-setting-show<br />
xfce-setting-show splash<br />
xfce-setting-show ui<br />
xfce-setting-show xfwm4<br />
xfce-setting-show wmtweaks<br />
xfce-setting-show workspaces<br />
xfce-setting-show printing_system<br />
xfce4-appfinder<br />
xfce4-autostart-editor<br />
xfce4-panel -c<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep xfce-setting-show /usr/share/applications/xfce*settings*<br />
<br />
=== Session ===<br />
==== Customizing Startup Applications ====<br />
<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file /etc/xdg/xfce4/xinitrc to ~/.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 />
<br />
It is possible to switch between X sessions thanks to [http://goodies.xfce.org/projects/panel-plugins/xfswitch-plugin xfswitch-plugin ]. It adds an icon to the Xfce panel, and requires gdm to work at the moment.<br />
<br />
xfswitch-plugin is available through [http://aur.archlinux.org/packages.php?ID=40677 AUR ]<br />
<br />
==== Modify XML settings files directly ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the ~/.config/xfce4/xfconf/ folder. For application keyboard shortcuts for example, the file is ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml. It's faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
<br />
=== How to add themes to XFCE === <br />
<br />
1. Go to [http://xfce-look.org 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 /usr/share/themes (for all users) or ~/.themes (for just you). Inside /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 />
<br />
By default, X uses a plain black cursor. If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
To install new cursor themes, install {{Package Official|xcursor-themes}} or another {{Package Official|xcursor}} package, or see [[X11 Cursors]].<br />
<br />
=== Fonts ===<br />
<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 />
==== How do I get xfce4-mixer and OSS4 to work together? ====<br />
<br />
Xfce 4.6 uses gstreamer as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer.<br />
<br />
pacman -S xfce4-mixer gstreamer0.10-base-plugins<br />
<br />
(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins<br />
<br />
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins<br />
<br />
login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can <br />
<br />
Download the PKGBUILD and other files needed from ABS or [http://repos.archlinux.org/viewvc.cgi/gstreamer0.10-good-plugins/repos/extra-i686/ here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var '''--enable-oss'''\<br />
--disable-static --enable-experimental \<br />
--enable-ladspa \<br />
--with-package-name="GStreamer Good Plugins (Arch Linux)" \<br />
--with-package-origin="http://www.archlinux.org/" || return 1<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try tis package in AUR [http://aur.archlinux.org/packages.php?ID=17024 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 />
==== Change volume with 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%+"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%-"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{codeline|amixer set Master toggle}} does not work, try the PCM channel ({{codeline|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 {{codeline|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:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
]<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 />
<br />
=== Screenshots ===<br />
<br />
==== Using print-screen key ====<br />
<br />
A simple way is to use a command-line screenshot utility:<br />
<br />
# pacman -S scrot<br />
<br />
Then<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "scrot" command to use the "PrintScreen" key.<br />
<br />
All screenshots will be placed in your home folder with unique names like<br />
<br />
"2009-02-19-063052_1280x1024_scrot.png".<br />
<br />
====Screenshooter====<br />
<br />
There is also an a screenshot plugin for the Xfce panel, which can be used instead of scrot, that is available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
You can add a keyboard binding for it using the command<br />
<br />
xfce4-screenshooter -f<br />
<br />
instead of "scrot". You'll get a dialog window after pressing "Print" where you can copy the image to the clipboard or save it.<br />
<br />
=== Change mount options ===<br />
<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 changing the default iocharset to utf8, which is easily done adding a line to '''/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 />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
It is also recommendable to mount vfat devices with the '''flush''' option, so that when copying to usb sticks data flushes more often, thus making thunar's progress bar to stays up until things are on the disk.<br />
<br />
[vfat]<br />
flush=true<br />
<br />
====Removable Devices====<br />
<br />
If you want a icon appearing on your desktop and in thunar when you plug in external devices, make sure gvfs and gvfs-afc are installed<br />
<br />
# pacman -S gvfs gvfs-afc<br />
<br />
It is also a good idea to install thunar-volman<br />
<br />
# pacman -S thunar-volman<br />
<br />
== Troubleshooting ==<br />
=== Keyboard shortcuts aren't working ===<br />
Under Xfce 4.6 there is a problem where the user's [http://bugzilla.xfce.org/show_bug.cgi?id=5639 keyboard shortcuts will intermittently not work]. This is usually the case when the settings helper is either not running or has been started improperly due to a conflict. This bug has been fixed in Xfce 4.8, which replaced 4.6 in the main repositories.<br />
<br />
A workaround is to disable ''xfce4-settings-helper-autostart'' from autostarting in a user's session. The settings helper daemon will start upon loading an Xfce session, anyways. The following two steps seem to have resolved this issue.<br />
<br />
Remove or rename the global autostart .desktop file:<br />
mv /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop.disabled<br />
<br />
Remove or rename the local autostart .desktop file:<br />
mv ~/.config/autostart/xfce4-settings-helper-autostart.desktop ~/.config/autostart/xfce4-settings-helper-autostart.desktop.disabled<br />
<br />
After logging out and logging back in, your shortcut keys should be working fine now.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming ~/.config/xfce4-session/ and ~/.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.<br />
<br />
== Related Articles ==<br />
* [[Thunar]]<br />
* [[Build order for XFCE]]<br />
* [[Improve GTK Application Looks]]<br />
* [[Autostart applications#Graphical]]<br />
<br />
== External Resources ==<br />
* [http://www.us.xfce.org/documentation/ 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]<br />
* [https://xubuntu.wordpress.com/2006/08/04/howto-remove-menu-entries-from-the-system-menu/ Howto: Remove menu entries from the System menu]<br />
* [http://www.linuxquestions.org/questions/linux-general-1/how-to-use-xfce-themes-658354/ XFCE themes at linuxquestions.org]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=131767Dell Inspiron 15642011-02-22T15:38:21Z<p>Dcelasun: HW upgrade</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M (2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> <strike>'''Upgraded with Seagate Momentus 7200.4 500GB'''</strike> ''' Upgraded with WD Scorpio Black 750GB 7200RPM Adv. Format'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel Wireless WiFi Link 5100 agn'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Microphone (out-of-the-box)<br />
* Webcam<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_with_Fake_RAID&diff=131642Install Arch Linux with Fake RAID2011-02-20T20:16:42Z<p>Dcelasun: /* Preparation */ Make it more eco-friendly :)</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides detailed instructions for installing Arch Linux on "fake RAID" volumes. This guide is intended to supplement the [[Official Arch Linux Install Guide]] or the [[Beginners' Guide]].}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Installing with Software RAID or LVM}}<br />
{{Article summary wiki|Convert a single drive system to RAID}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|RAID/Onboard @ Gentoo Linux Wiki|http://en.gentoo-wiki.com/wiki/RAID/Onboard}}<br />
{{Article summary link|Related forum thread|2=http://bbs.archlinux.org/viewtopic.php?id=22038}}<br />
{{Article summary end}}<br />
<br />
The purpose of this guide is to enable use of a RAID set created by the on-board BIOS RAID controller and thereby allow dual-booting of Linux and Windows from partitions '''inside''' the RAID set using GRUB. When using so-called "fake RAID" or "host RAID", the disc sets are reached from {{Filename|/dev/mapper/chipsetName_randomName}} and not {{Filename|/dev/sdX}}.<br />
<br />
== What is "fake RAID" ==<br />
<br />
From Wikipedia:<br />
<br />
:''Operating system-based RAID doesn't always protect the boot process and is generally impractical on desktop versions of Windows. Hardware RAID controllers are expensive and proprietary. To fill this gap, cheap "RAID controllers" were introduced that do not contain a RAID controller chip, but simply a standard disk controller chip with special firmware and drivers. During early stage boot-up, the RAID is implemented by the firmware. When a protected-mode operating system kernel such as Linux or a modern version of Microsoft Windows is loaded, the drivers take over.''<br />
<br />
:''These controllers are described by their manufacturers as RAID controllers, and it is rarely made clear to purchasers that the burden of RAID processing is borne by the host computer's central processing unit -- not the RAID controller itself -- thus introducing the aforementioned CPU overhead which hardware controllers don't suffer from. Firmware controllers often can only use certain types of hard drives in their RAID arrays (e.g. SATA for Intel Matrix RAID, as there is neither SCSI nor PATA support in modern Intel ICH southbridges; however, motherboard makers implement RAID controllers outside of the southbridge on some motherboards). Before their introduction, a "RAID controller" implied that the controller did the processing, and the new type has become known in technically knowledgeable circles as "fake RAID" even though the RAID itself is implemented correctly. Adaptec calls them "host RAID".''[http://en.wikipedia.org/wiki/RAID]<br />
<br />
See [[Wikipedia:RAID]] or [https://help.ubuntu.com/community/FakeRaidHowto FakeRaidHowto @ Community Ubuntu Documentation] for more information.<br />
<br />
Despite the terminology, "fake RAID" via {{Package Official|dmraid}} is a robust software RAID implementation that offers a solid system to mirror or stripe data across multiple disks with negligible overhead for any modern system. dmraid is comparable to mdraid (pure Linux software RAID) with the added benefit of being able to completely rebuild a drive after a failure '''before''' the system is ever booted.<br />
<br />
== History ==<br />
<br />
In Linux 2.4, the ATARAID kernel framework provided support for fake RAID (software RAID assisted by the BIOS). For Linux 2.6 the device-mapper framework can, among other nice things like [[LVM]] and EVMS, do the same kind of work as ATARAID in 2.4. Whilst the new code handling the RAID I/O still runs in the kernel, device-mapper is generally configured by a userspace application. It was clear that when using the device-mapper for RAID, detection would go to userspace.<br />
<br />
Heinz Maulshagen created the dmraid tool to detect RAID sets and create mappings for them. The controllers supported are (mostly cheap) fake RAID IDE/SATA controllers which contain BIOS functions. Common examples include: Promise FastTrak controllers; HighPoint HPT37x; Intel Matrix RAID; Silicon Image Medley; and NVIDIA nForce.<br />
<br />
== Supported hardware ==<br />
<br />
* Tested with ICH10R on ''2009.08'' (x86_64) -- [[User:Pointone|pointone]] 23:10, 29 November 2009 (EST)<br />
* Tested with Sil3124 on ''2009.02'' (i686) -- [[User:Loosec|loosec]]<br />
* Tested with nForce4 on ''Core Dump'' (i686 and x86_64) -- [[User:Loosec|loosec]]<br />
* Tested with Sil3512 on ''Overlord'' (x86_64) -- [[User:Loosec|loosec]]<br />
<br />
For more information on supported hardware, see [http://en.gentoo-wiki.com/wiki/RAID/Onboard RAID/Onboard @ Gentoo Linux Wiki]<br />
<br />
== Backup ==<br />
<br />
{{Warning|Backup all data before playing with RAID. What you do with your hardware is only your own fault. Data on RAID stripes is highly vulnerable to disc failures. Create regular backups or consider using mirror sets. '''Consider yourself warned!'''}}<br />
<br />
== Outline ==<br />
<br />
* Preparation<br />
* Boot the installer<br />
* Load dmraid<br />
* Perform traditional installation<br />
* Install GRUB<br />
<br />
== Preparation ==<br />
<br />
*Open up any needed guides (e.g. [[Beginners' Guide]], [[Official Arch Linux Install Guide]]) on another machine. If you don't have access to another machine, print it out.<br />
*Download the latest Arch Linux install image.<br />
*Backup all important files since everything on the target partitions will be destroyed.<br />
<br />
=== Configure RAID sets ===<br />
<br />
{{Warning|If your drives are not already configured as RAID and Windows is already installed, switching to "RAID" may cause Windows to BSOD during boot.[http://support.microsoft.com/kb/316401/]}}<br />
<br />
*Enter your BIOS setup and enable the RAID controller.<br />
**The BIOS may contain an option to configure SATA drives as "IDE", "AHCI", or "RAID"; ensure "RAID" is selected.<br />
*Save and exit the BIOS setup. During boot, enter the RAID setup utility.<br />
** The RAID utility is usually either accessible via the boot menu (often F8, F10 or CTRL+I) or whilst the RAID controller is initializing.<br />
*Use the RAID setup utility to create preferred stripe/mirror sets.<br />
<br />
{{Tip|See your motherboard documentation for details. The exact procedure may vary.}}<br />
<br />
== Boot the installer ==<br />
<br />
See [[Official Arch Linux Install Guide#Pre-Installation]] for details.<br />
<br />
{{Tip|If your screen can handle it, consider adding {{Codeline|1=vga=795}} as a boot option for a higher framebuffer resolution; there are some long lines involved here.}}<br />
<br />
== Load dmraid ==<br />
<br />
Load device-mapper and find RAID sets:<br />
<br />
# modprobe dm_mod<br />
# dmraid -ay<br />
# ls -la /dev/mapper/<br />
<br />
Example output:<br />
<br />
/dev/mapper/control <- Created by device-mapper; if present, device-mapper is likely functioning<br />
/dev/mapper/sil_aiageicechah <- A RAID set on a Silicon Image SATA RAID controller<br />
/dev/mapper/sil_aiageicechah1 <- First partition on this RAID Set<br />
<br />
If there is only one file ({{Filename|/dev/mapper/control}}), check if your controller chipset module is loaded with {{Codeline|lsmod}}. If it is, then dmraid does not support this controller or there are no RAID sets on the system (check RAID BIOS setup again). If correct, then you may be forced to use [[Installing with Software RAID or LVM|software RAID]] (this means no dual-booted RAID system on this controller).<br />
<br />
If your chipset module is NOT loaded, load it now. For example:<br />
<br />
# modprobe sata_sil<br />
<br />
See {{Filename|/lib/modules/`uname -r`/kernel/drivers/ata/}} for available drivers.<br />
<br />
To test the RAID sets:<br />
<br />
# dmraid -tay<br />
<br />
== Perform traditional installation ==<br />
<br />
Switch to '''tty2''' and start the installer:<br />
<br />
# /arch/setup<br />
<br />
=== Partition the RAID set ===<br />
<br />
*Under '''Prepare Hard Drive''' choose '''Manually partition hard drives''' since the '''Auto-prepare''' option will '''not''' find your RAID sets.<br />
*Choose OTHER and type in your RAID set's full path (e.g. {{Filename|/dev/mapper/sil_aiageicechah}}). Switch back to '''tty1''' to check your spelling.<br />
*Create the proper partitions the normal way.<br />
<br />
{{Tip|This would be a good time to install the "other" OS if planning to dual-boot. If installing Windows XP to "C:" then all partitions before the Windows partition should be changed to type [1B] (hidden FAT32) to hide them during the Windows installation. When this is done, change them back to type [83] (Linux). Of course, a reboot unfortunately requires some of the above steps to be repeated.}}<br />
<br />
=== Mounting the filesystem ===<br />
<br />
If -- and this is probably the case -- you do not find your newly created partitions under '''Manually configure block devices, filesystems and mountpoints''':<br />
<br />
*Switch back to '''tty1'''.<br />
<br />
*Deactivate all device-mapper nodes:<br />
# dmsetup remove_all<br />
<br />
*Reactivate the newly-created RAID nodes:<br />
# dmraid -ay<br />
# ls -la /dev/mapper<br />
<br />
*Switch to '''tty2''', re-enter the '''Manually configure block devices, filesystems and mountpoints''' menu and the partitions should be available.<br />
<br />
=== Install and configure Arch ===<br />
<br />
{{Tip|Utilize three consoles: the setup GUI to configure the system, a chroot to install GRUB, and finally a cfdisk reference since RAID sets have weird names.<br />
<br />
* '''tty1:''' chroot and grub-install<br />
* '''tty2:''' /arch/setup<br />
* '''tty3:''' cfdisk for a reference in spelling, partition table and geometry of the RAID set<br />
<br />
Leave programs running and switch to when needed.}}<br />
<br />
Re-activate the installer ('''tty2''') and proceed as normal with the following exceptions:<br />
<br />
*Select Packages<br />
**Ensure '''dmraid''' is marked for installation<br />
<br />
*Configure System<br />
**Add '''dm_mod''' to the MODULES line in {{Filename|mkinitcpio.conf}}. If using a mirrored (RAID 1) array, additionally add '''dm_mirror'''<br />
**Add '''chipset_module_driver''' to the MODULES line if necessary<br />
**Add '''dmraid''' to the HOOKS line in {{Filename|mkinitcpio.conf}}; preferably after '''sata''' but before '''filesystems'''<br />
<br />
== Install GRUB ==<br />
<br />
{{Warning|You can normally specify '''default saved''' instead of a number in {{Filename|menu.lst}} so that the default entry is the entry saved with the command '''savedefault'''. If you are using dmraid do not use '''savedefault''' or your array will de-sync and will not let you boot your system.}}<br />
<br />
Please read [[GRUB]] for more information about configuring GRUB. Installation is begun by selecting '''Install Bootloader''' from the Arch installer.<br />
<br />
{{Note|For an unknown reason, the default {{Filename|menu.lst}} will likely be incorrectly populated when installing via fake RAID. Double-check the '''root''' lines (e.g. {{Codeline|root (hd0,0)}}).<br />
<br />
Additionally, if you did '''not''' create a separate {{Filename|/boot}} partition, ensure the kernel/initrd paths are correct (e.g. {{Filename|/boot/vmlinuz}} and {{Filename|/boot/kernel26.img}} instead of {{Filename|/vmlinuz}} and {{Filename|/kernel26.img}}.}}<br />
<br />
For example, if you created logical partitions (creating the equivalent of sda5, sda6, sda7, etc.) that were mapped as:<br />
<br />
<pre><br />
/dev/mapper | Linux GRUB Partition<br />
| Partition Number<br />
nvidia_fffadgic |<br />
nvidia_fffadgic5 | / 4<br />
nvidia_fffadgic6 | /boot 5<br />
nvidia_fffadgic7 | /home 6<br />
</pre><br />
<br />
The correct root designation would be '''(hd0,5)''' in this example.<br />
<br />
{{Note|If you use more than one set of dmraid arrays or multiple Linux distributions installed on different dmraid arrays (for example 2 disks in nvidia_fdaacfde and 2 disks in nvidia_fffadgic and you are installing to the second dmraid array (nvidia_fffadgic)), you will need designate the second array's {{Filename|/boot}} partition as the GRUB root. In the example above, if nvidia_fffadgic was the second dmraid array you were installing to, your root designation would be root '''(hd1,5)'''.}}<br />
<br />
After saving the configuration file, the GRUB installer will '''FAIL'''. However it will still copy files to {{Filename|/boot}}. '''DO NOT GIVE UP AND REBOOT''' -- just follow the directions below:<br />
<br />
*Switch to '''tty1''' and [[chroot]] into our installed system:<br />
<br />
# mount -o bind /dev /mnt/dev<br />
# mount -t proc none /mnt/proc<br />
# mount -t sysfs none /mnt/sys<br />
# chroot /mnt /bin/bash<br />
<br />
*Switch to '''tty3''' and look up the geometry of the RAID set. In order for cfdisk to find the array and provide the proper C H S information, you may need to start cfdisk providing your raid set as the first argument. (i.e. cfdisk /dev/mapper/nvidia_fffadgic):<br />
**The number of '''C'''ylinders, '''H'''eads and '''S'''ectors on the RAID set should be written at the top of the screen inside cfdisk. '''Note:''' cfdisk shows the information in '''H S C''' order, but grub requires you to enter the geometry information in '''C H S''' order.<br />
:Example: <code>18079 255 63</code> for a RAID stripe of two 74GB Raptor discs.<br />
:Example: <code>38914 255 63</code> for a RAID stripe of two 160GB laptop discs.<br />
*GRUB will fail to properly read the drives; the '''geometry''' command must be used to manually direct GRUB:<br />
**Switch to '''tty1''', the chrooted environment.<br />
**Install GRUB on {{Filename|/dev/mapper/raidSet}}:<br />
<br />
# dmsetup mknodes<br />
# grub --device-map=/dev/null<br />
<br />
grub> device (hd0) /dev/mapper/raidSet<br />
grub> geometry (hd0) C H S<br />
<br />
Exchange '''C H S''' above with the proper numbers (be aware: they are '''not''' entered in the same order as they are read from cfdisk).<br />
<br />
If geometry is entered properly, GRUB will list partitions found on this RAID set. You can confirm that grub is using the correct geometry and verify the proper grub root device to boot from by using the grub find command. If you have created a separate boot partition, then search for /grub/stage1 with find. If you have no separate boot partition, then search /boot/grub/stage1 with find. Examples:<br />
<br />
grub> find /grub/stage1 # use when you have a separate boot partition<br />
grub> find /boot/grub/stage1 # use when you have no separate boot partition<br />
<br />
Grub will report the proper device to designate as the grub root below (i.e. (hd0,0), (hd0,4), etc...) Then, continue to install the bootloader into the Master Boot Record, changing "hd0" to "hd1" if required.<br />
<br />
grub> root (hd0,0)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
{{Note|1=With dmraid >= 1.0.0.rc15-8, partitions are labeled "raidSet'''p1''', raidSet'''p2''', etc. instead of raidSet'''1''', raidSet'''2''', etc. If the setup command fails with "error 22: No such partition", temporary symlinks must be created.[http://bugs.gentoo.org/275566]<br />
<br />
The problem is that GRUB still uses an older detection algorithm, and is looking for {{Filename|/dev/mapper/raidSet1}} instead of {{Filename|/dev/mapper/raidSetp1}}.<br />
<br />
The solution is to create a symlink from {{Filename|/dev/mapper/raidSetp1}} to {{Filename|/dev/mapper/raidSet1}} (changing the partition number as needed). The simplest way to accomplish this is to:}}<br />
<br />
# cd /dev/mapper<br />
# for i in raidSetp*; do ln -s $i ${i/p/}; done<br />
<br />
Lastly, if you have multiple dmraid devices with multiple sets of arrays set up (say: nvidia_fdaacfde and nvidia_fffadgic), then create the {{Filename|/boot/grub/device.map}} file to help GRUB retain its sanity when working with the arrays. All the file does is map the dmraid device to a traditional hd#. Using these dmraid devices, your device.map file will look like this:<br />
<br />
(hd0) /dev/mapper/nvidia_fdaacfde<br />
(hd1) /dev/mapper/nvidia_fffadgic<br />
<br />
And now you are finished with the installation!<br />
<br />
# reboot<br />
<br />
== Troubleshooting == <br />
<br />
=== Booting with degraded array ===<br />
<br />
One drawback of the fake RAID approach on GNU/Linux is that dmraid is currently unable to handle degraded arrays, and will refuse to activate. In this scenario, one must resolve the problem from within another OS (e.g. Windows) or via the BIOS/chipset RAID utility. <br />
<br />
Alternatively, if using a mirrored (RAID 1) array, users may temporarily bypass dmraid during the boot process and boot from a single drive:<br />
<br />
# Edit the '''kernel''' line from the [[GRUB]] menu<br />
## Remove references to dmraid devices (e.g. change {{Filename|/dev/mapper/raidSet1}} to {{Filename|/dev/sda1}})<br />
## Append {{Codeline|<nowiki>disablehooks=dmraid</nowiki>}} to prevent a kernel panic when dmraid discovers the degraded array<br />
# Boot the system</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Unity&diff=131457Unity2011-02-19T08:19:08Z<p>Dcelasun: </p>
<hr />
<div>{{Expansion}}<br />
<br />
[[Category:Usability (English)]]<br />
{{i18n|Ayatana}} {{DISPLAYTITLE:Ayatana}}<br />
{{Article summary start|Summary}}<br />
{{Article summary text|This page describes the current status of Ubuntu's Ayatana project on Arch Linux}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|Ayatana on Ubuntu|https://wiki.ubuntu.com/Ayatana}}<br />
|-<br />
| style="text-align: left; padding: 3px" | [https://bbs.archlinux.org/viewtopic.php?id=99746 Ayatana thread on Arch Forums]<br />
{{Article summary end}}<br />
<br />
As its website states, "The Ayatana Project is the collective project that houses user interface, design and interaction projects started by Canonical."<br />
All the latest changes in Ubuntu's interface (e.g.: Indicator Applets, Unity and Notify-OSD) are grouped within this project. <br />
This page describes how to get Ayatana's software working on Arch through building some packages.<br />
<br />
== Before You Start ==<br />
<br />
Remember you're installing unofficial packages. There is a chance this will eat your cat and kill your hamster. You have been warned. <br />
<br />
== Notify OSD ==<br />
<br />
''TODO: Write this part of the page''<br />
<br />
== Indicator Applets ==<br />
<br />
Ayatana Indicators are an initiative by Canonical to provide crisp and clean system and application status indication. They take the form of an icon and associated menu, displayed (usually) in the desktop panel. You can read more about them in the Ubuntu Wiki [https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators here].<br />
<br />
Technically, Indicators are basically small programs (written in C, Python, etc.) that runs when an applet loads their basic infrastructure. Indicators are known to work in all the main desktop environments that can run the messaging indicator, including KDE.<br />
<br />
In Arch, indicators are working in GNOME, LXDE and XFCE. There is no support for KDE at the moment.<br />
<br />
=== Installation ===<br />
<br />
You can install the infrastructure by simply installing the '''ayatana-indicators-baselibs''' metapackage. Among the packages needed, '''gtk2-appmenu''' will be installed. This is basically gtk2 with some patches coming from Ubuntu and so it conflicts with the one in extra. You will have to replace it or the infrastructure will not compile properly.<br />
<br />
Some of the packages installed will be:<br />
<br />
; libdbusmenu : A small little library that was created by pulling out some common code out of indicator-applet. (Canonical Ayatana Project)<br />http://aur.archlinux.org/packages.php?ID=32050<br />
; libindicate : A small library for applications to raise "flags" on DBus for other components of the desktop to pick up and visualize. (Canonical Ayatana Project).<br />http://aur.archlinux.org/packages.php?ID=32049<br />
; libindicator : A set of symbols and convience functions that all indicators would like to use. (Canonical Ayatana Project) - Bzr version.<br />http://aur.archlinux.org/packages.php?ID=31343<br />
; ido : Widgets and other objects used for indicators.<br /> http://aur.archlinux.org/packages.php?ID=34437<br />
; gtk2-appmenu : gtk2 with ubuntu-patches.<br /> http://aur.archlinux.org/packages.php?ID=41736<br />
<br />
Once you're done, install the applet for your favourite DE. If you're using GNOME install '''indicator-applet''' and you're done. Then you can add the '''Indicator Applet Complete''' applet to your panel.<br />
<br />
Next up, install the actual indicators. Here's a list of the packages you can install:<br />
; indicator-applet : A small applet to display information from various applications consistently in the panel. (Canonical Ayatana Project)<br />http://aur.archlinux.org/packages.php?ID=31344<br />''' Dependencies ''' gnome-system-tools<br />
; indicator-application : http://aur.archlinux.org/packages.php?ID=34448<br />
; indicator-session : http://aur.archlinux.org/packages.php?ID=32051<br />''' Dependencies: ''' gnome-session-ubuntu (to get session control working properly)<br />
; indicator-messages : http://aur.archlinux.org/packages.php?ID=32052<br />
; indicator-me : http://aur.archlinux.org/packages.php?ID=34438<br />
; indicator-sound : http://aur.archlinux.org/packages.php?ID=42614<br />
; indicator-datetime : http://aur.archlinux.org/packages.php?ID=43436<br />
; indicator-weather-bzr : http://aur.archlinux.org/packages.php?ID=38468<br />
; indicator-network-bzr : http://aur.archlinux.org/packages.php?ID=38467<br />
; evolution-indicator : http://aur.archlinux.org/packages.php?ID=38334<br />
; indicator-sound : http://aur.archlinux.org/packages.php?ID=42614<br />
; indicator-pastie : clipboard manager http://aur.archlinux.org/packages.php?ID=43373<br />
; indicator-workspaces : http://aur.archlinux.org/packages.php?ID=43375<br />
; indicator-usb : http://aur.archlinux.org/packages.php?ID=43444<br />
; rhythmbox-indicator-plugin : http://aur.archlinux.org/packages.php?ID=43262<br />
<br />
More are available searching for ''indicator'' in the AUR website or in your favourite AUR wrapper.<br />
<br />
== Unity ==<br />
Unity depends on a patched Compiz version which uses the GLib main loop instead of the Compiz main loop. This means you need to compile compiz.<br />
<br />
Using your preffer pacman-wrapper install '''compiz-core''' from AUR:<br />
There are at the moment no suitable compiz-core pacakage. I will upload compiz-core-glib-loop shortly --[[User:Lafka|Lafka]] 09:01, 7 December 2010 (EST)<br />
<br />
Now we need the rest of the compiz tools<br />
<br />
libcompizconfig compizconfig-python ccsm plugins-main plugins-extra<br />
since pacman uses the 0.8.X version of compiz and the development core is 0.9.X<br />
<br />
'''If nux-bzr complains that glewmx is not found you need to use the following glewmx package instead: http://aur.archlinux.org/packages.php?ID=44175'''<br />
<br />
Last before we build Unity we need the OpenGL toolkit Nux. This can be aquired through AUR.<br />
http://aur.archlinux.org/packages.php?ID=44144 (nux-bzr)<br />
<br />
Now lets build Unity:<br />
<br />
# bzr branch lp:unity<br />
# cd unity<br />
# mkdir build; cd build<br />
# cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=package DCMAKE_INSTALL_PREFIX=/opt/unity<br />
# make<br />
# sudo make install<br />
#<br />
# unset PKG_CONFIG_PATH<br />
# unset LD_LIBRARY_PATH<br />
# unset LD_RUN_PATH<br />
<br />
=== Unity project ===<br />
; clutk-bzr : A general-purpose toolkit for Clutter used by UNR's netbook-launcher.<br /> http://aur.archlinux.org/packages.php?ID=38460<br />
; libunity-misc : Misc. differently licensed stuff for Unity (Canonical Ayatana Project)<br /> http://aur.archlinux.org/packages.php?ID=42313<br />
; dee : Libdee is a library that uses DBus to provide objects allowing you to create Model-View-Controller type programs across DBus.<br />http://aur.archlinux.org/packages.php?ID=41087<br />
<br />
== Further work ==<br />
=== Usability issues ===<br />
* indicator-datetime and indicator-appmenu doesn't work<br />
* evolution isnt showing in indicator-messages, when run from autostart. running manually works.<br />
* battery-status compiles properly but doesn't work<br />
* transmission-gtk-libappindicator-svn doesnt work on some installs and works on others<br />
* libindicate doesn't compile on some setups, even in a clean chroot</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Unity&diff=131456Unity2011-02-19T07:18:42Z<p>Dcelasun: Initial edit. Coming up next is the repository information</p>
<hr />
<div>{{Expansion}}<br />
<br />
[[Category:Usability (English)]]<br />
{{i18n|Ayatana}} {{DISPLAYTITLE:Ayatana}}<br />
{{Article summary start|Summary}}<br />
{{Article summary text|This page describes the current status of Ubuntu's Ayatana project on Arch Linux}}<br />
{{Article summary end}}<br />
<br />
As its website states, "The Ayatana Project is the collective project that houses user interface, design and interaction projects started by Canonical."<br />
All the latest changes in Ubuntu's interface (e.g.: Indicator Applets, Unity and Notify-OSD) are grouped within this project. <br />
This page describes how to get Ayatana's software working on Arch through building some packages.<br />
<br />
== Before You Start ==<br />
<br />
Remember you're installing unofficial packages. There is a chance this will eat your cat and kill your hamster. You have been warned. <br />
<br />
== Notify OSD ==<br />
<br />
''TODO: Write this part of the page''<br />
<br />
== Indicator Applets ==<br />
<br />
Ayatana Indicators are an initiative by Canonical to provide crisp and clean system and application status indication. They take the form of an icon and associated menu, displayed (usually) in the desktop panel. You can read more about them in the Ubuntu Wiki [https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators here].<br />
<br />
Technically, Indicators are basically small programs (written in C, Python, etc.) that runs when an applet loads their basic infrastructure. Indicators are known to work in all the main desktop environments that can run the messaging indicator, including KDE.<br />
<br />
In Arch, indicators are working in GNOME, LXDE and XFCE. There is no support for KDE at the moment.<br />
<br />
=== Installation ===<br />
<br />
You can install the infrastructure by simply installing the '''ayatana-indicators-baselibs''' metapackage. Among the packages needed, '''gtk2-appmenu''' will be installed. This is basically gtk2 with some patches coming from Ubuntu and so it conflicts with the one in extra. You will have to replace it or the infrastructure will not compile properly.<br />
<br />
Some of the packages installed will be:<br />
<br />
; libdbusmenu : A small little library that was created by pulling out some common code out of indicator-applet. (Canonical Ayatana Project)<br />http://aur.archlinux.org/packages.php?ID=32050<br />
; libindicate : A small library for applications to raise "flags" on DBus for other components of the desktop to pick up and visualize. (Canonical Ayatana Project).<br />http://aur.archlinux.org/packages.php?ID=32049<br />
; libindicator : A set of symbols and convience functions that all indicators would like to use. (Canonical Ayatana Project) - Bzr version.<br />http://aur.archlinux.org/packages.php?ID=31343<br />
; ido : Widgets and other objects used for indicators.<br /> http://aur.archlinux.org/packages.php?ID=34437<br />
; gtk2-appmenu : gtk2 with ubuntu-patches.<br /> http://aur.archlinux.org/packages.php?ID=41736<br />
<br />
Once you're done, install the applet for your favourite DE. If you're using GNOME install '''indicator-applet''' and you're done. Then you can add the '''Indicator Applet Complete''' applet to your panel.<br />
<br />
Next up, install the actual indicators. Here's a list of the packages you can install:<br />
; indicator-applet : A small applet to display information from various applications consistently in the panel. (Canonical Ayatana Project)<br />http://aur.archlinux.org/packages.php?ID=31344<br />''' Dependencies ''' gnome-system-tools<br />
; indicator-application : http://aur.archlinux.org/packages.php?ID=34448<br />
; indicator-session : http://aur.archlinux.org/packages.php?ID=32051<br />''' Dependencies: ''' gnome-session-ubuntu (to get session control working properly)<br />
; indicator-messages : http://aur.archlinux.org/packages.php?ID=32052<br />
; indicator-me : http://aur.archlinux.org/packages.php?ID=34438<br />
; indicator-sound : http://aur.archlinux.org/packages.php?ID=42614<br />
; indicator-datetime : http://aur.archlinux.org/packages.php?ID=43436<br />
; indicator-weather-bzr : http://aur.archlinux.org/packages.php?ID=38468<br />
; indicator-network-bzr : http://aur.archlinux.org/packages.php?ID=38467<br />
; evolution-indicator : http://aur.archlinux.org/packages.php?ID=38334<br />
; indicator-sound : http://aur.archlinux.org/packages.php?ID=42614<br />
; indicator-pastie : clipboard manager http://aur.archlinux.org/packages.php?ID=43373<br />
; indicator-workspaces : http://aur.archlinux.org/packages.php?ID=43375<br />
; indicator-usb : http://aur.archlinux.org/packages.php?ID=43444<br />
; rhythmbox-indicator-plugin : http://aur.archlinux.org/packages.php?ID=43262<br />
<br />
More are available searching for ''indicator'' in the AUR website or in your favourite AUR wrapper.<br />
<br />
== Unity ==<br />
Unity depends on a patched Compiz version which uses the GLib main loop instead of the Compiz main loop. This means you need to compile compiz.<br />
<br />
Using your preffer pacman-wrapper install '''compiz-core''' from AUR:<br />
There are at the moment no suitable compiz-core pacakage. I will upload compiz-core-glib-loop shortly --[[User:Lafka|Lafka]] 09:01, 7 December 2010 (EST)<br />
<br />
Now we need the rest of the compiz tools<br />
<br />
libcompizconfig compizconfig-python ccsm plugins-main plugins-extra<br />
since pacman uses the 0.8.X version of compiz and the development core is 0.9.X<br />
<br />
'''If nux-bzr complains that glewmx is not found you need to use the following glewmx package instead: http://aur.archlinux.org/packages.php?ID=44175'''<br />
<br />
Last before we build Unity we need the OpenGL toolkit Nux. This can be aquired through AUR.<br />
http://aur.archlinux.org/packages.php?ID=44144 (nux-bzr)<br />
<br />
Now lets build Unity:<br />
<br />
# bzr branch lp:unity<br />
# cd unity<br />
# mkdir build; cd build<br />
# cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=package DCMAKE_INSTALL_PREFIX=/opt/unity<br />
# make<br />
# sudo make install<br />
#<br />
# unset PKG_CONFIG_PATH<br />
# unset LD_LIBRARY_PATH<br />
# unset LD_RUN_PATH<br />
<br />
=== Unity project ===<br />
; clutk-bzr : A general-purpose toolkit for Clutter used by UNR's netbook-launcher.<br /> http://aur.archlinux.org/packages.php?ID=38460<br />
; libunity-misc : Misc. differently licensed stuff for Unity (Canonical Ayatana Project)<br /> http://aur.archlinux.org/packages.php?ID=42313<br />
; dee : Libdee is a library that uses DBus to provide objects allowing you to create Model-View-Controller type programs across DBus.<br />http://aur.archlinux.org/packages.php?ID=41087<br />
<br />
== Further work ==<br />
=== Usability issues ===<br />
* indicator-datetime and indicator-appmenu doesn't work<br />
* evolution isnt showing in indicator-messages, when run from autostart. running manually works.<br />
* battery-status compiles properly but doesn't work<br />
* transmission-gtk-libappindicator-svn doesnt work on some installs and works on others<br />
* libindicate doesn't compile on some setups, even in a clean chroot<br />
<br />
== References ==<br />
https://bbs.archlinux.org/viewtopic.php?id=99746</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Unity&diff=131452Unity2011-02-19T06:54:01Z<p>Dcelasun: This page requires a major cleanup. I'll be working on it, please don't edit without posting in the talk page.</p>
<hr />
<div>[[Category:Usability (English)]]<br />
{{i18n|Ayatana}} {{DISPLAYTITLE:Ayatana}}<br />
{{Article summary start|Summary}}<br />
{{Article summary text|This page describes the current status of Ubuntu's Ayatana project on Arch Linux}}<br />
{{Article summary end}}<br />
<br />
As its website states, "The Ayatana Project is the collective project that houses user interface, design and interaction projects started by Canonical."<br />
All the latest changes in Ubuntu's interface (e.g.: Indicator Applets, Unity and Notify-OSD) are grouped within this project. <br />
This page describes how to get Ayatana's software working on Arch through building some packages.<br />
<br />
'''ATTENTION: This wiki page is a draft and has to be considered a reference guide more than an installation guide'''<br />
<br />
== Before you start installing ==<br />
<br />
Remember you're installing unofficial packages, with all the risks this can involve!<br />
<br />
== Notify OSD ==<br />
<br />
''TODO: Write this part of the page''<br />
<br />
== Indicator Applets ==<br />
<br />
Ayatana Indicators are an initiative by Canonical to provide crisp and clean system and application status indication. They take the form of an icon and associated menu, displayed (usually) in the desktop panel. You can read more about them in this page: https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators<br />
<br />
Technically, Indicators are basically a bunch of tiny programs (written in C, Python, etc.) that runs when an applet loads their basic infrastructure.<br />
Indicators are known to work in all the main desktop environments, including KDE (that can run the messaging indicator).<br />
In Arch, indicators are working in GNOME, LXDE and XFCE. Support for LXDE and XFCE will come in a near future, while there's no support for KDE at the moment.<br />
<br />
=== Installation ===<br />
<br />
You can install the infrastructure simply installing the '''ayatana-indicators-baselibs''' metapackage. Among the packages needed, '''gtk2-appmenu''' will be installed. This is basically gtk2 with some patches coming from Ubuntu and so it conflicts with the one in extra. You will have to replace it or the infrastructure will not compile properly.<br />
<br />
Some of the packages installed will be:<br />
<br />
; libdbusmenu : A small little library that was created by pulling out some common code out of indicator-applet. (Canonical Ayatana Project)<br />http://aur.archlinux.org/packages.php?ID=32050<br />
; libindicate : A small library for applications to raise "flags" on DBus for other components of the desktop to pick up and visualize. (Canonical Ayatana Project).<br />http://aur.archlinux.org/packages.php?ID=32049<br />
; libindicator : A set of symbols and convience functions that all indicators would like to use. (Canonical Ayatana Project) - Bzr version.<br />http://aur.archlinux.org/packages.php?ID=31343<br />
; ido : Widgets and other objects used for indicators.<br /> http://aur.archlinux.org/packages.php?ID=34437<br />
; gtk2-appmenu : gtk2 with ubuntu-patches.<br /> http://aur.archlinux.org/packages.php?ID=41736<br />
<br />
Once you're done, install the applet for your favourite DE. If you're using GNOME install '''indicator-applet''' and you're done. Then you can add the '''Indicator Applet Complete''' applet to your panel.<br />
<br />
Next up, install the actual indicators. Here's a list of the packages you can install:<br />
; indicator-applet : A small applet to display information from various applications consistently in the panel. (Canonical Ayatana Project)<br />http://aur.archlinux.org/packages.php?ID=31344<br />''' Dependencies ''' gnome-system-tools<br />
; indicator-application : http://aur.archlinux.org/packages.php?ID=34448<br />
; indicator-session : http://aur.archlinux.org/packages.php?ID=32051<br />''' Dependencies: ''' gnome-session-ubuntu (to get session control working properly)<br />
; indicator-messages : http://aur.archlinux.org/packages.php?ID=32052<br />
; indicator-me : http://aur.archlinux.org/packages.php?ID=34438<br />
; indicator-sound : http://aur.archlinux.org/packages.php?ID=42614<br />
; indicator-datetime : http://aur.archlinux.org/packages.php?ID=43436<br />
; indicator-weather-bzr : http://aur.archlinux.org/packages.php?ID=38468<br />
; indicator-network-bzr : http://aur.archlinux.org/packages.php?ID=38467<br />
; evolution-indicator : http://aur.archlinux.org/packages.php?ID=38334<br />
; indicator-sound : http://aur.archlinux.org/packages.php?ID=42614<br />
; indicator-pastie : clipboard manager http://aur.archlinux.org/packages.php?ID=43373<br />
; indicator-workspaces : http://aur.archlinux.org/packages.php?ID=43375<br />
; indicator-usb : http://aur.archlinux.org/packages.php?ID=43444<br />
; rhythmbox-indicator-plugin : http://aur.archlinux.org/packages.php?ID=43262<br />
<br />
More are available searching for ''indicator'' in the AUR website or in your favourite AUR wrapper.<br />
<br />
== Unity ==<br />
Unity depends on a patched Compiz version which uses the GLib main loop instead of the Compiz main loop. This means you need to compile compiz.<br />
<br />
Using your preffer pacman-wrapper install '''compiz-core''' from AUR:<br />
There are at the moment no suitable compiz-core pacakage. I will upload compiz-core-glib-loop shortly --[[User:Lafka|Lafka]] 09:01, 7 December 2010 (EST)<br />
<br />
Now we need the rest of the compiz tools<br />
<br />
libcompizconfig compizconfig-python ccsm plugins-main plugins-extra<br />
since pacman uses the 0.8.X version of compiz and the development core is 0.9.X<br />
<br />
'''If nux-bzr complains that glewmx is not found you need to use the following glewmx package instead: http://aur.archlinux.org/packages.php?ID=44175'''<br />
<br />
Last before we build Unity we need the OpenGL toolkit Nux. This can be aquired through AUR.<br />
http://aur.archlinux.org/packages.php?ID=44144 (nux-bzr)<br />
<br />
Now lets build Unity:<br />
<br />
# bzr branch lp:unity<br />
# cd unity<br />
# mkdir build; cd build<br />
# cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=package DCMAKE_INSTALL_PREFIX=/opt/unity<br />
# make<br />
# sudo make install<br />
#<br />
# unset PKG_CONFIG_PATH<br />
# unset LD_LIBRARY_PATH<br />
# unset LD_RUN_PATH<br />
<br />
=== Unity project ===<br />
; clutk-bzr : A general-purpose toolkit for Clutter used by UNR's netbook-launcher.<br /> http://aur.archlinux.org/packages.php?ID=38460<br />
; libunity-misc : Misc. differently licensed stuff for Unity (Canonical Ayatana Project)<br /> http://aur.archlinux.org/packages.php?ID=42313<br />
; dee : Libdee is a library that uses DBus to provide objects allowing you to create Model-View-Controller type programs across DBus.<br />http://aur.archlinux.org/packages.php?ID=41087<br />
<br />
== Further work ==<br />
=== Usability issues ===<br />
* indicator-datetime and indicator-appmenu doesn't work<br />
* evolution isnt showing in indicator-messages, when run from autostart. running manually works.<br />
* battery-status compiles properly but doesn't work<br />
* transmission-gtk-libappindicator-svn doesnt work on some installs and works on others<br />
* libindicate doesn't compile on some setups, even in a clean chroot<br />
<br />
== References ==<br />
https://bbs.archlinux.org/viewtopic.php?id=99746</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Mono&diff=118728Mono2010-10-05T21:00:06Z<p>Dcelasun: Grammar corrections, better wording, style fixes etc.</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
Mono is an open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET.<br />
<br />
The Arch Linux packages of mono have activated the experimental .NET 4.0 features, but be aware that it may not be stable. Those features are only for developers, so if you just want to use Mono to run applications, then you won't be affected by this. <br />
==Installation==<br />
First install mono with pacman:<br />
<br />
# pacman -S mono<br />
<br />
If you need VisualBasic.Net support you have to install the VisualBasic.Net interpreter:<br />
<br />
# pacman -S mono-basic<br />
<br />
==Registering Mono Applications with the Kernel==<br />
<br />
You can execute binaries by calling '''mono''' manually<br />
<br />
mono programsname.exe<br />
<br />
It is also possible to tell the kernel to use '''mono''' as an interpreter for all Mono binaries. To this, just add mono to your DAEMONS array in /etc/rc.conf and it will automatically be setup for you.<br />
<br />
DAEMONS=( ..... mono .... )<br />
<br />
Now try this:<br />
<br />
chmod 755 exefile.exe<br />
./exefile.exe<br />
<br />
==Testing Mono==<br />
Make a new file; test.cs<br />
<pre><br />
using System;<br />
<br />
public class Test {<br />
public static void Main(string[] args) {<br />
Console.WriteLine("Hello World!");<br />
}<br />
}<br />
</pre><br />
Then run:<br />
<pre><br />
$ mcs test.cs<br />
$ mono test.exe<br />
Hello world!<br />
</pre><br />
<br />
==Development==<br />
Starting to develop in Mono/C# is very easy. Just install the [http://monodevelop.com/ MonoDevelop IDE] and debugger support with pacman:<br />
<br />
# pacman -S monodevelop monodevelop-debugger-gdb monodevelop-debugger-mdb<br />
<br />
If you want the API documentation browser and some testing and development tools you have to install mono-tools:<br />
<br />
# pacman -S mono-tools<br />
<br />
== Resources & Links ==<br />
*[http://www.mono-project.com Official Mono website]<br />
*[http://mono-project.com/Monkeyguide The Mono Handbook]<br />
*[http://go-mono.org/docs The API reference of Mono]<br />
*[http://www.ecma-international.org/publications/standards/ECMA-334.HTM ECMA-334: C# Language Specification]<br />
*[http://www.ecma-international.org/publications/standards/ECMA-335.HTM ECMA-335: Common Language Infrastructure (CLI)]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ATI&diff=118717ATI2010-10-05T18:11:23Z<p>Dcelasun: /* With KMS enabled */ Grammatical fixes. (Do not revert without taking a look at a thesarus)</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{i18n|ATI}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of open source ATI/AMD video card drivers.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI Catalyst}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary end}}<br />
<br />
Owners of '''ATI''' video cards have a choice between ATI's proprietary driver ({{Package AUR|catalyst}}) and open source alternatives ({{Package Official|xf86-video-ati}} or {{Package Official|xf86-video-radeonhd}}).<br />
<br />
Currently, the performance of the open source drivers are not ''on par'' with the proprietary driver in terms of 3D performance and lack certain features, such as reliable TV-out support. They do, however, offer better dual-head support (<tt>xf86-video-ati</tt>), excellent 2D acceleration, and provide sufficient 3D acceleration for OpenGL-accelerated [[window manager]]s, such as [[Compiz]] or KWin. Currently, [http://www.archlinux.org/news/439/ the ATI Catalyst package is available in the AUR].<br />
<br />
If unsure, try the open source drivers first; they will suit most needs and are generally less problematic. (See the [http://www.x.org/wiki/RadeonFeature feature matrix] for details.) For an overview of ATI's proprietary "Catalyst" video card driver, see [[ATI Catalyst]]; this article covers the open source drivers.<br />
<br />
==Naming conventions==<br />
ATI's [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Comparison of AMD graphics processing units]].<br />
<br />
== Differences between open source drivers ==<br />
<br />
<div style="width: 50%; float: left"><br />
===<tt>xf86-video-ati</tt> (radeon)===<br />
*Works with Radeon chipsets up to HD 4xxx (latest R700 chipsets) as well as HD 5xxx (latest R800 chipsets). <br />
*Radeons up to the X1xxx series are fully supported, stable, and full 2D and 3D acceleration are provided. <br />
*Radeons from HD 2xxx to X4xxx have full 2D acceleration and functional 3D acceleration, but are not supported by all the features that the proprietary driver provides (for example, powersaving is still in a testing phase). <br />
*Supports DRI1, RandR 1.2/1.3, EXA acceleration and [[KMS|kernel mode-setting]]/DRI2 (with the latest Linux kernel, libdrm and Mesa versions).<br />
*All cards from HD 5xxx (R800) and newer are supported, but for now, with 2D support only.<br />
*'''HDMI''' support will soon be implemented in '''xf86-video-ati''' over AtomBIOS. It is already working for some chipsets (RV620 at least are working fine).<br />
</div><br />
<br />
<div style="width: 50%; float: right"><br />
===<tt>xf86-video-radeonhd</tt> (radeonhd)===<br />
*Driver for ATI R500 chipsets (Radeon X1000 series) and '''newer'''. <br />
*Written by Novell with specifications provided to the public by AMD. <br />
*Supports RandR 1.2. It does also support HDMI with sound (if your hardware is so equipped, except RV730 based chip sets).<br />
*Is not actively developed, since September 2010. [http://www.x.org/wiki/radeonhd Xorg wiki] recommends to get xf86-video-ati as the main alternative now.<br />
</div><br />
<br />
<div style="clear: both"></div> <!-- prevent overlapping paragraphs --><br />
<br />
Generally, '''xf86-video-ati''' seems to offer more consistent performance as compared to '''xf86-video-radeonhd''' and is more actively developed, so it should be your first choice, no matter which ATI card you own. xf86-video-radeonhd should be used as a "fallback" driver in case you encounter errors with xf86-video-ati and it '''should not be used''' as a primary driver - radeonhd's development has been unofficially halted. In case you need to use a driver for newer ATI cards, you should prefer the proprietary '''catalyst''' driver.<br />
<br />
{{Note|xf86-video-ati is recognized as "'''radeon'''" by Xorg (in xorg.conf) and xf86-video-radeonhd as "'''radeonhd'''". }}<br />
<br />
== Installation and configuration ==<br />
<br />
=== Installation ===<br />
{{Note| If you have previously installed the proprietary driver, make sure to remove <code>catalyst</code> and '''reboot'''.}}<br />
<br />
To install <code>xf86-video-ati</code> :<br />
pacman -S xf86-video-ati<br />
<br />
To install <code>xf86-video-radeonhd</code> : <br />
pacman -S xf86-video-radeonhd libgl ati-dri<br />
<br />
{{Note|All cards from HD3xxx (R600) and newer need to install additional firmware files.}}<br />
To install <code>linux-firmware</code> :<br />
pacman -S linux-firmware <br />
{{Note|The GIT versions of these drivers can be found on [[AUR]].}}<br />
<br />
=== Configuration ===<br />
You now have the choice between creating an xorg.conf, or attempting to use the recently enabled '''Xorg''' autodetection. <br />
<br />
==== Running Xorg without xorg.conf ====<br />
In most cases, Xorg can '''autodetect''' your hardware settings. The Xorg.conf configuration file in /etc/X11 is optional since Xorg-server 1.5.x.<br />
<br />
Always make sure you have '''mesa''', the group '''xorg''' and the group '''xorg-input-drivers''' installed:<br />
pacman -S xorg-input-drivers mesa xorg<br />
<br />
{{Note| With KMS (Kernel Mode Setting) enabled, '''xorg.conf may not be needed at all.''' For more info on Radeon Kernel mode-setting, read [[#Kernel mode-setting (KMS)]].}}<br />
<br />
==== Running Xorg with expanded xorg.conf ====<br />
{{Note| '''/etc/X11/xorg.conf''' no longer requires sections for all input devices because Udev can configure some/all via hotplugging. (Ensure '''xorg-input-drivers''' are installed.)}}<br />
<br />
In case you want manual configuration, edit your [[xorg.conf]], and add or make sure you have the following in their given sections:<br />
Section "Module"<br />
Load "glx"<br />
Load "dri"<br />
Load "drm"<br />
EndSection<br />
<br />
Device section for <code>xf86-video-ati</code> :<br />
Section "Device"<br />
Identifier "name" # your alias<br />
Driver "radeon"<br />
EndSection<br />
<br />
Device section for <code>xf86-video-radeonhd</code> :<br />
Section "Device"<br />
Identifier "name" # your alias<br />
Driver "radeonhd"<br />
Option "AccelMethod" "exa" # to enable 2D and Xv acceleration on R6xx/R7xx - default AccelMethod shadowfb<br />
Option "DRI" "on" # to enable 2D and Xv acceleration on R6xx/R7xx - default DRI disabled<br />
EndSection<br />
<br />
{{Note|Try below for smooth performance,over Option "DRI", for RS780M/MN [Radeon HD 3200] using the radeonhd driver(as of 3rd May 2009)}}<br />
<br />
This section (DRI) is not needed (thus deprecated), but use it if you encounter DRI related problems.<br />
Section "DRI"<br />
Group "video"<br />
Mode 0666<br />
EndSection<br />
<br />
Adding '''only''' the '''Device''' Section in the xorg.conf should fit most cases. Using that Section, you can enable features and tweak the driver's performance or behaviour.<br />
<br />
When using the opensource drivers, ensure <code>catalyst</code> is ''not'' installed -- '''ati-dri''' is being used instead. Otherwise, the wrong <code>libGL.so</code> will be installed, which will cause direct rendering to fail.<br />
<br />
== Kernel mode-setting (KMS) ==<br />
<br />
[[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 />
KMS for ATI video cards requires the [[Xorg]] free video user space driver {{Package Official|xf86-video-ati}} version 6.12.4 or later. <br />
<br />
=== Enabling experimental KMS ===<br />
<br />
Since kernel26 v.2.6.33, KMS is '''enabled''' by default for ATI cards. <br />
<br />
==== Early KMS start ====<br />
<br />
''This method will start KMS as early as possible in the [[boot process]] (when the [[initramfs]] is loaded).''<br />
<br />
If you have a special kernel (e.g. kernel26-zen), remember to use appropriate mkinitcpio configuration file, e.g. {{Filename|/etc/mkinitcpio-zen.conf}}. These instructions are written for the default kernel (kernel26).<br />
<br />
# Remove all {{Codeline|<nowiki>vga=</nowiki>}} options from the ''kernel'' line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). Using other framebuffer drivers (such as <tt>[[uvesafb]]</tt> or <tt>radeonfb</tt>) will conflict with KMS. Remove any framebuffer related modules from {{Filename|/etc/mkinitcpio.conf}}. {{Codeline|<nowiki>video=</nowiki>}} can now be used in conjunction with KMS.<br />
# Add {{Codeline|radeon}} to MODULES array in {{Filename|/etc/mkinitcpio.conf}}. Depending on motherboard chipset, it may be necessary to add {{Codeline|intel_agp}} before the {{Codeline|radeon}} module. Previously, the {{Codeline|fbcon}} module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel.<br />
#* ''Following is probably not true since Linux 2.6.33, at least author didn't run into any problems:'' For newer ATI cards ('''R6xx''' and '''newer''') extra microcode is currently needed. Install <code>linux-firmware</code> and grab [http://aur.archlinux.org/packages.php?ID=31708 radeon-initrd] from AUR, '''build''' and '''install''' them and add {{Codeline|radeon}} to HOOKS array in {{Filename|/etc/mkinitcpio.conf}}.<br />
# Re-generate your initramfs: <pre># mkinitcpio -p kernel26</pre><br />
# Add {{Codeline|<nowiki>radeon.modeset=1</nowiki>}} to the kernel options in the bootloader configuration file to enable KMS.<br />
# '''Reboot''' the system.<br />
<br />
==== Late start ====<br />
<br />
''With this choice, KMS will be enabled when modules are loaded during the [[boot process]].''<br />
<br />
If you have a special kernel (e.g. kernel26-zen), remember to use appropriate mkinitcpio configuration file, e.g. {{Filename|/etc/mkinitcpio-zen.conf}}. These instructions are written for the default kernel (kernel26).<br />
<br />
# Remove all {{Codeline|<nowiki>vga=</nowiki>}} options from the ''kernel'' line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). Using other framebuffer drivers (such as <tt>[[uvesafb]]</tt> or <tt>radeonfb</tt>) will conflict with KMS. Remove any framebuffer related modules from {{Filename|/etc/mkinitcpio.conf}}. {{Codeline|<nowiki>video=</nowiki>}} can now be used in conjunction with KMS.<br />
# Add {{Codeline|radeon}} to MODULES array in {{Filename|/etc/rc.conf}}. Depending on motherboard chipset, it may be necessary to add {{Codeline|intel_agp}} before the {{Codeline|radeon}} module. Previously, the {{Codeline|fbcon}} module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel.<br />
# '''Reboot''' the system.<br />
<br />
{{Tip|Some users have reported faster [[udev]] module loading by adding {{Codeline|<nowiki>options radeon modeset=1</nowiki>}} to {{Filename|/etc/modprobe.d/modprobe.conf}}.}}<br />
<br />
=== Troubleshooting KMS ===<br />
<br />
=== Generic problem solution ===<br />
<br />
If your card often crashes when loading the '''radeon''' module, starting your login manager, entering desktop or crashes when you start 3D apps like glxgears you can try if the kernel boot option "pci=nomsi" solves your problems. See https://bugzilla.kernel.org/show_bug.cgi?id=15626 for X200m cards.<br />
<br />
{{Note|As of kernel 2.6.35 (and probably .34), "pci=nomsi" is most likely to be the default setting, enabled upstream.}}<br />
<br />
==== Disable KMS ====<br />
<br />
Users should consider disabling kernel mode-setting if encountering kernel panics, distorted framebuffer on boot, no GPU signal, [[Xorg]] refusing to start, Xorg falling back to Mesa software rasterizer (no 3D acceleration) or 'POWER OFF' problem (kernel 2.6.33-2)at shutdown.<br />
<br />
# Add {{Codeline|<nowiki>radeon.modeset=0</nowiki>}} (or {{Codeline|nomodeset}}, if this does not work) to the kernel options line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). That should work. If you want to remove KMS support from the initramfs, follow the next two steps.<br />
# If {{Codeline|radeon}} was added to the MODULES array in {{Filename|mkinitcpio.conf}} to enable ''early start'', remove it.<br />
# Rebuild the [[initramfs]] with <pre># mkinitcpio -p kernel26</pre><br />
<br />
{{Warning|Catalyst users will likely need to blacklist the {{Codeline|radeon}} module by adding {{Codeline|'''!'''radeon}} to the MODULES array in {{Filename|/etc/rc.conf}}.}}<br />
<br />
Alternatively, module options can be specified in a file within the {{Filename|/etc/modprobe.d}} directory. If using the '''radeon''' module ({{Codeline|<nowiki>lsmod | grep radeon</nowiki>}}) disable KMS by creating a file containing the above code:<br />
<br />
{{File|name=/etc/modprobe.d/radeon.conf|content=options radeon modeset=0}}<br />
<br />
==== Renaming {{Filename|xorg.conf}} ====<br />
<br />
Renaming {{Filename|/etc/X11/xorg.conf}}, which may include options that conflict with KMS, will force Xorg to autodetect hardware with sane defaults. After renaming, '''restart''' Xorg.<br />
<br />
== Performance tuning ==<br />
The following options apply to Section "'''Device'''" in /etc/X11/'''xorg.conf'''.<br />
<br />
=== Tuning performance with xf86-video-ati ===<br />
By design, xf86-video-ati runs at AGP 1x speed. It is generally safe to modify this. If you notice hangs, try reducing the value or removing the line entirely (you can use values 1, 2, 4, 8).<br />
Option "AGPMode" "4"<br />
<br />
'''ColorTiling''' is completely safe to enable and supposedly is enabled by default. People have noticed a performance increase when enabled via xorg.conf.<br />
Option "ColorTiling" "on"<br />
<br />
'''Acceleration architecture'''; this will work only on '''newer''' cards. If you enable this and then can't get back into X, remove it.<br />
Option "AccelMethod" "EXA"<br />
<br />
'''Page Flip''' is generally safe to enable. This would mostly be used on older cards, as enabling this would disable EXA. With recent drivers can be used together with EXA.<br />
Option "EnablePageFlip" "on" <br />
<br />
'''AGPFastWrite''' will enable fast writes for AGP cards. This one can be problematic, so be prepared to remove it if you can't get into X.<br />
Option "AGPFastWrite" "yes"<br />
<br />
'''EXAVSync ''' option attempts to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been know to cause instability on some chips.<br />
Really useful when enabling Xv overlay on videos on a 3D accelerated desktop. It is not necessary when KMS (thus DRI2 acceleration) is enabled.<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
See an example Device Section in xorg.conf:<br />
<pre><br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "DRI" "on" <br />
Option "DynamicPM" "on" # Dynamic powersaving.<br />
Option "ClockGating" "on" # Assisting option for powersaving.<br />
Option "AccelMethod" "EXA" # EXA should fit most cases.<br />
Option "EXAVSync" "on" # EXAVSync is explained above.<br />
Option "DMAForXv" "on" # Forced option in order to enable Xv overlay.<br />
Option "ScalerWidth" "2048" # That should fix some very rare bugs.<br />
Option "EnablePageFlip" "on" # It will not be enabled on R5xx cards.<br />
Option "RenderAccel" "on" # Optional. It should be enabled by default.<br />
Option "AccelDFS" "on" #Optional. See the man page.<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
</pre><br />
<br />
<br />
'''See the manpage for more configuration options.'''<br />
<code>man radeon</code><br />
<br />
A fine tool to try is [http://aur.archlinux.org/packages.php?do_Details=1&ID=2994 driconf]. It will allow you to modify several settings, like vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).<br />
<br />
== Powersaving ==<br />
<br />
The powersaving part is totally different with and without KMS.<br />
<br />
=== With KMS enabled ===<br />
<br />
With the radeon driver, power saving is disabled by default but the stock kernel (2.6.35 as of this writing) provides a "sysfs" utility to enable it.<br />
<br />
Power saving through KMS is still a work in progress for the most part. It should work, but some chips do have problems with it. A common issue for all is screen blinking when the kernel switches between power states, and in some configurations it even causes system freezes. But KMS is awesome, so it's your choice. The UMS method is generally more stable, however its power savings might not be as good as those provided by KMS options.<br />
<br />
There are two ways to enable power management:<br />
<br />
1. Try adding radeon.dynpm=1 to the kernel parameters (if using the stock kernel < 2.6.35). If you are using kernel26>=2.6.35 this option is no longer needed and the sysfs interface will be present by default. If this option is passed to a kernel >= 2.6.35, the driver will fail and fall back to software rendering.<br />
<br />
2. Use the (unsupported) [radeon] repo:<br />
<br />
This repository will grant you up-to-date packages of the radeon driver and it's dependencies, from (mostly) git snapshots.<br />
<br />
[radeon]<br />
Server = http://gtklocker.tiven.org/radeon-repo/$arch/<br />
<br />
You can select the methods via sysfs.<br />
<br />
With root access, you have two choices:<br />
<br />
1. '''Dynamic frequency switching (depending on GPU load)'''<br />
<br />
<code><br />
echo dynpm > /sys/class/drm/card0/device/power_method<br />
</code><br />
<br />
The "dynpm" method dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
{{Note|The "profile" method mentioned below is not as aggressive as "dynpm," but is currently much more stable and flicker free and works with multiple heads active.}}<br />
<br />
2. '''Profile-based frequency switching'''<br />
<br />
<code><br />
echo profile > /sys/class/drm/card0/device/power_method<br />
</code><br />
<br />
<br />
The "profile" mode will allow you to select one of the five profiles below.<br />
Different profiles, for the most part, end up changing the frequency/voltage of the card.<br />
<br />
* "default" uses the default clocks and does not change the power state. This is the default behavior.<br />
* "auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected when the monitors are in the dpms off state.<br />
* "low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto only uses "low" when displays are off.<br />
* "mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.<br />
* "high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state. <br />
<br />
So lets say we want the "low" option...for this, run the following command:<br />
<br />
<code><br />
echo low > /sys/class/drm/card-0/device/power_profile<br />
</code><br />
<br />
Replace "low" with any of the aforementioned profiles as necessary.<br />
<br />
{{Note|Echoing a profile value to this file is not permanent, so when you find something that fits your needs, you will need to add it to /etc/rc.local, so it's executed at system startup.}}<br />
<br />
Power management is supported on all asics (r1xx-evergreen) that include the appropriate power state tables in the vbios; not all boards do (especially older desktop cards).<br />
<br />
To view the voltage that the GPU is running at, perform the following command and you will get something like this output:<br />
<br />
<code><br />
~$ cat /sys/kernel/debug/dri/0/radeon_pm_info<br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</code><br />
<br />
If /sys/kernel/debug is empty...run this command(this was my case, don't know why):<br />
<code><br />
mount -t debugfs none /sys/kernel/debug<br />
</code<br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via lm_sensors tools or via sysfs in /sys/class/hwmon .<br />
<br />
=== Without KMS ===<br />
<br />
In your xorg.conf file, add 2 lines to "Device" Section:<br />
Option "DynamicPM" "on"<br />
Option "ClockGating" "on"<br />
<br />
If the two options are enabled successfully, you will see following lines in /var/log/Xorg.0.log:<br />
<br />
(**) RADEON(0): Option "ClockGating" "on"<br />
(**) RADEON(0): Option "DynamicPM" "on"<br />
<br />
Static power management enable success<br />
(II) RADEON(0): Dynamic Clock Gating Enabled<br />
(II) RADEON(0): Dynamic Power Management Enabled<br />
<br />
If you desire low power cost, you can add an extra line to "Device" Section of xorg.conf:<br />
Option "ForceLowPowerMode" "on"<br />
<br />
== TV out ==<br />
Since August 2007, there is TV-out support for all Radeons with integrated TV-out.<br />
<br />
It is somewhat limited for now, it doesn't always autodetect the output correctly and only NTSC mode works.<br />
<br />
First, check that you have an S-video output: <code>xrandr</code> should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set load_detection 1<br />
<br />
Setting tv standard to use:<br />
xrandr --output S-video --set tv_standard ntsc<br />
<br />
Adding a mode for it (currently it supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
I'll go for a clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
So far so good. Now let's try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
Also you may notice that the video is being played on monitor only and not on the TV. Where the Xv overlay is sent is controlled by XV_CRTC attribute.<br />
<br />
To send the output to the TV, I do<br />
xvattr -a XV_CRTC -v 1<br />
<br />
{{Note| you need to install '''xvattr''' from [[AUR]] to execute this command.}}<br />
<br />
To switch back to my monitor, I change this to <code>0</code>. <code>-1</code> is used for automatic switching in dualhead setups.<br />
<br />
Please see [http://www.x.org/wiki/radeonTV Enabling TV-Out Statically] for how to enable TV-out in your xorg config file.<br />
<br />
== HDMI with sound ==<br />
Given that your hardware supports it, and you have installed '''xf86-video-radeonhd''' (note: The driver '''xf86-video-ati''' will soon get HDMI support.) you can insert the following into xorg.conf to enable HDMI with sound:<br />
Section "Device"<br />
# ...<br />
Option "Audio" "on"<br />
Option "HDMI" "all"<br />
EndSection<br />
<br />
Restart X when you have done this, try to see if there is sound transmitted to TV via HDMI cable.<br />
# Connect your PC to the TV via HDMI cable (duh).<br />
# Use xrandr to get picture to the TV. Ex: <code>xrandr --output DVI-D_1 --mode 1280x768 --right-of PANEL</code>. Simply typing <code>xrandr</code> will give you a list of your valid outputs.<br />
# Run <code>aplay -l</code> to get the list of your sound devices. Find HDMI and note the card number and corresponding device number. Example of what you want to see: <code>card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]</code><br />
# Try sending sound to this device: <code>aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Center.wav</code>. Be sure to change plughw:z,y to match your hardware number found with last command. You should be able to hear the test sound from your TV.<br />
<br />
=== Using '''xf86-video-ati''' ===<br />
'''xf86-video-ati''' can enable HDMI output for some chipsets (RV620 for instance, and therefore probably R*600) . Using [[ATI#Kernel_mode-setting_.28KMS.29|KMS]], add radeon.audio=1 to your kernel line in /boot/grub/menu.lst. Then, use xrandr and aplay to get HDMI output, as explained above. <br />
<br />
=== Note on RV730 and RV710 ===<br />
<br />
'''xf86-video-radeonhd''' does not support yet audio through HDMI for these chipsets, but work is in progress.<br />
<br />
== Troubleshooting ==<br />
<br />
=== I encounter artifacts when logging into my DE or WM ===<br />
<br />
If you encounter artifacts, first try starting X without {{Filename|/etc/X11/xorg.conf}}. Recent versions of Xorg are capable of reliable auto-detection and auto-configuration for most use cases. Outdated or improperly configured {{Filename|xorg.conf}} files are known to cause trouble.<br />
<br />
In order to run without a configuration tile, it is recommended that the <tt>xorg-input-drivers</tt> package group be installed.<br />
<br />
Artifacts may also be related to [[kernel mode setting]]. Consider [[#Disable KMS|disabling KMS]].<br />
<br />
=== I have switched from catalyst to radeonhd or radeon and some things don't work ===<br />
<br />
First of all, don't panic. Uninstall catalyst, install xf86-video-radeonhd or xf86-video-ati and then '''''reboot'''''.<br />
<br />
Make sure you are not using the xorg.conf generated by catalyst. Your original should have been backed up and you can recall it:<br />
cp /etc/X11/xorg.conf.original-0 /etc/X11/xorg.conf<br />
<br />
Otherwise, stop your graphical server if running, and in a tty, type as root:<br />
Xorg -configure<br />
mv xorg.conf.new /etc/X11/xorg.conf<br />
and make sure you put the required options.<br />
<br />
If it still doesn't solve your problem, know that apparently catalyst has the bad idea to replace Xorg files with symbolic links pointing to its own files. The easiest at this point is to uninstall all catalyst stuff (just to be on the safe side) and then to reinstall xorg, libgl, ati-dri and xf86-video-radeonhd or xf86-video-ati.<br />
<br />
If it still doesn't work, then have a look into the forum, your problem might be a configuration issue.<br />
<br />
{{Note| When you switch to '''xf86-video-ati''' or '''xf86-video-radeonhd''', remember that you can login without xorg.conf as well (without problems in most cases), since Xorg can autodetect your settings. So '''xorg.conf''' is optional.}}<br />
<br />
=== I have installed a free driver and my card is painfully slow ===<br />
<br />
Some cards can be installed by default trying to use [[ATI#AMD/Ati cards and kernel mode-setting (KMS)|KMS]]. You can check whether this is your case running:<br />
dmesg | egrep "drm|radeon"<br />
<br />
This command might show something ''like'' this, meaning it is trying to default to KMS:<br />
[drm] radeon default to kernel modesetting.<br />
...<br />
[drm:radeon_driver_load_kms] *ERROR* Failed to initialize radeon, disabling IOCTL<br />
<br />
If your card is not supported by KMS (anything older than r100), then you can [[ATI#Disable KMS|disable KMS]]. This should fix the problem.<br />
<br />
If you're getting and error message in dmesg like this:<br />
platform radeon_cp.0: firmware: requesting radeon/R600_rlc.bin<br />
r600_cp: Failed to load firmware "radeon/R600_rlc.bin"<br />
[drm:r600_startup] *ERROR* Failed to load firmware!<br />
radeon 0000:01:00.0: disabling GPU acceleration<br />
Install linux-firmware or linux-firmware-git from [http://aur.archlinux.org/packages.php?ID=37306 AUR].</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=118629Dell Inspiron 15642010-10-03T19:32:06Z<p>Dcelasun: /* System Specs */</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M (2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel Wireless WiFi Link 5100 agn'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Microphone (out-of-the-box)<br />
* Webcam<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Solid_state_drive/Memory_cell_clearing&diff=118542Solid state drive/Memory cell clearing2010-10-02T16:38:51Z<p>Dcelasun: Better phrasing.</p>
<hr />
<div>[[Category: Storage (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|This article presents a method to reset all cells on an SSD to their factory default state thus recovering any loss of write performance.}}<br />
{{Article summary heading|Related Articles}}<br />
{{Article summary wiki|Solid State Drives}}<br />
{{Article summary wiki|Securely Wipe HDD}}<br />
{{Article summary end}}<br />
<br />
== Introduction ==<br />
<br />
On occasion, users may wish to completely reset an SSD's cells to the same virgin state they were manufactured, thus restoring it to its [http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=8 factory default write performance]. Write performance is known to degrade over time even on SSDs with native TRIM support. TRIM only safeguards against file deletes, not replacements such as an incremental save.<br />
{{Warning|Back up ALL data of importance prior to continuing! Using this procedure will destroy ALL data on the SSD and render it unrecoverable by even data recovery services! Users will have to repartition the device and restore the data after completing this procedure!}}<br />
<br />
== Step 1 - Make sure the drive security is not frozen ==<br />
Issue the following command:<br />
# hdparm -I /dev/sdX<br />
<br />
If the command output shows "frozen" one cannot continue to the next step. Most BIOSes block (do no allow) the ATA Secure Erase command by issuing a "SECURITY FREEZE" command to "freeze" the drive before booting an operating system.<br />
<br />
A possible solution for SATA drives is hot-(re)plug the data cable (which might crash the kernel). If hot-(re)pluging the SATA data cable crashes the kernel try letting the operating system fully boot up, then quickly hot-(re)plug both the SATA power and data cables.<br />
<br />
* It has been reported that hooking up the drive to an eSATA SIIG ExpressCard/54 with an eSATA enclosure will leave the drive security state to "not frozen."<br />
* Placing the target system into "sleep" (Clevo M865TU notebook, Fujitsu T2010 notebook) has reported to work as well; this may reset other drives to "not frozen."<br />
<br />
<pre>Security: <br />
Master password revision code = 65534<br />
supported<br />
not enabled<br />
not locked<br />
not frozen<br />
not expired: security count<br />
supported: enhanced erase<br />
2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.</pre><br />
<br />
== Step 2 - Enable security by setting a user password ==<br />
{{Note|When the user password is set the drive will be locked after next power cycle denying normal access until unlocked with the correct password).}}<br />
<br />
Any password will do, as this should only be temporary. After the secure erase the password will be set back to NULL. In this example, the password is "Eins" as shown:<br />
# hdparm --user-master u --security-set-pass Eins /dev/sdX<br />
security_password="Eins"<br />
/dev/sdX:<br />
Issuing SECURITY_SET_PASS command, password="Eins", user=user, mode=high<br />
<br />
As a sanity check, issue the following command<br />
<br />
# hdparm -I /dev/sdX<br />
<br />
The command output should display "enabled":<br />
<pre> Security: <br />
Master password revision code = 65534<br />
supported<br />
enabled<br />
not locked<br />
not frozen<br />
not expired: security count<br />
supported: enhanced erase<br />
Security level high<br />
2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.</pre><br />
<br />
== Step 3 - Issue the ATA Secure Erase command ==<br />
<br />
# time hdparm --user-master u --security-erase Eins /dev/sdX<br />
<br />
Wait until the command completes. This example output shows it took about 40 seconds for an Intel X25-M 80GB SSD, for a 1TB hard disk it might take 3 hours or more!<br />
<br />
security_password="Eins"<br />
/dev/sdX:<br />
Issuing SECURITY_ERASE command, password="Eins", user=user<br />
0.000u 0.000s 0:39.71 0.0% 0+0k 0+0io 0pf+0w<br />
<br />
The drive is now erased. After a successful erasure the drive security should automatically be set to disabled (thus no longer requiring a password for access). Verify this by running the following command:<br />
# hdparm -I /dev/sdX<br />
<br />
The command output should display "not enabled": <br />
<pre> Security: <br />
Master password revision code = 65534<br />
supported<br />
not enabled<br />
not locked<br />
not frozen<br />
not expired: security count<br />
supported: enhanced erase<br />
2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.</pre><br />
<br />
== Post Process Observation ==<br />
<br />
I experienced a "glitch" with my Intel X25-M (G2) after doing this procedure. I don't know if it's fdisk's fault or the procedure's fault.<br />
<br />
For some reason, after creating two partitions (1st = 68 G and 2nd = rest of drive), the 32 H and 32 S settings weren't retained. Creating just one partition, writing changes, and exiting gave a result consistent with the -H 32 -S 32 settings when checking via the "fdisk -l" command. However, after adding the 2nd partition, writing and running the same "fdisk -l" command, new values for the geometry were shown - they switched to 255/63! The solution was to start fdisk with the 32/32 parameters and write down the number of cylinders, then use cfdisk to do my partitioning.<br />
<br />
Example:<br />
<br />
# fdisk -H 32 -S 32 /dev/sdb<br />
<br />
Command (m for help): p<br />
<br />
Disk /dev/sdb: 80.0 GB, 80026361856 bytes<br />
32 heads, 32 sectors/track, 152638 cylinders, total 156301488 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 32 132812799 66406384 83 Linux<br />
/dev/sdb2 132812800 156301311 11744256 83 Linux<br />
<br />
Here the correct number of cylinders is 152638. I now went into cfdisk and invoked the "geometry" option via: {{Keypress|g}}. I then manually defined the number of heads to 32, sectors per track to 32, and cylinders to 152638. Now I setup my partitions:<br />
<br />
<pre> cfdisk (util-linux-ng 2.18)<br />
<br />
Disk Drive: /dev/sdb<br />
Size: 80026361856 bytes, 80.0 GB<br />
Heads: 32 Sectors per Track: 32 Cylinders: 152638<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------------------------------------<br />
sdb1 Primary ext4 68000.16 <br />
sdb2 Primary ext4 12026.12</pre><br />
<br />
Now querying the device via fdisk gave the consistent values.<br />
<br />
# fdisk -l /dev/sdb<br />
<br />
Disk /dev/sdb: 80.0 GB, 80026361856 bytes<br />
32 heads, 32 sectors/track, 152638 cylinders, total 156301488 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 32 132812799 66406384 83 Linux<br />
/dev/sdb2 132812800 156301311 11744256 83 Linux</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=User:Dcelasun&diff=118473User:Dcelasun2010-10-01T09:00:16Z<p>Dcelasun: </p>
<hr />
<div>Hello!<br />
<br />
I'm dcc24 from the forums. You can see my contributions [[Special:Contributions/Dcelasun|here]] (or see below) and contact me at dcelasun[at]gmail[dot]com<br />
<br />
= My contributions =<br />
<br />
==Written==<br />
*[[Asus EEE PC 1215n]]<br />
*[[Dell Inspiron 1564]]<br />
*[[Gmrun]]<br />
<br />
==Translated==<br />
*[[LVM_(Türkçe)]] (''finished'')<br />
<br />
==Contributed to==<br />
*[[VDR]]<br />
*[[ATI]]<br />
*[[Openbox]]<br />
*[[Matlab]]<br />
*[[Pidgin]]<br />
*[[Arch Compared to Other Distributions]]<br />
*[[Lenovo ThinkPad SL510]]<br />
*[[Arch Build System]]<br />
*[[Xfce]]<br />
*[[Hwdetect]]<br />
*[[Music Player Daemon]]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=LVM&diff=118466LVM2010-10-01T08:36:53Z<p>Dcelasun: /* Anlık Görüntüler */ Sorry, wrong page.</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|LVM}}<br />
<br />
=Introduction=<br />
<br />
LVM is a Logical Volume Manager for the Linux kernel. With LVM you can abstract your storage space and have "virtual partitions" which are easier to modify. The basic building blocks of LVM are:<br />
<br />
* '''Physical volume (PV)''': Partition on hard disk (or even hard disk itself or loopback file) on which you can have volume groups. It has a special header and is divided into physical extents. Think of physical volumes as big building blocks which can be used to build your hard drive.<br />
* '''Volume group (VG)''': Group of physical volumes that are used as storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.<br />
* '''Logical volume (LV)''': A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.<br />
* '''Physical extent (PE)''': A small part of a disk (usually 4MB) that can be assigned to a logical Volume. Think of physical extents as parts of disks that can be allocated to any partition.<br />
<br />
With LVM you can more easily handle your partitions (logical volumes) than normal hard drive partitions. For example, you can:<br />
<br />
* Use ''any number'' of disks as one big disk(VG)<br />
* Have partitions(LV) stretched ''over'' several disks (they can be as big as all of your disk storage together)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''as you like'' (it doesn't depend on position of the logical volumes within volume groups as with normal partitions)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''online'' (filesystems on them still need to be resized, but some support online resizing)<br />
* ''Name'' your disks(VG) and partitions(LV) as you like<br />
* Create small partitions(LV) and resize them "''dynamically''" as they get more filled (growing must be still done by hand, but you can do it online with some filesystems)<br />
* ...<br />
<br />
Example: <br />
'''Physical disks'''<br />
<br />
Disk1 (/dev/sda):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 50GB (Physical volume) |Partition2 80GB (Physical volume) |<br />
|/dev/sda1 |/dev/sda2 |<br />
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
Disk2 (/dev/sdb):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 120GB (Physical volume) |<br />
|/dev/sdb1 |<br />
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _|<br />
<br />
'''LVM logical volumes'''<br />
<br />
Volume Group1 (/dev/MyStorage/ = /dev/sda1 + /dev/sda2 + /dev/sdb1):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br />
|Logical volume1 15GB |Logical volume2 35GB |Logical volume3 200GB |<br />
|/dev/MyStorage/rootvol|/dev/MyStorage/homevol |/dev/MyStorage/mediavol |<br />
|_ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
To sum it all up: With LVM you can use all your storage space as one big disk (volume group) and have more flexibility over your partitions (logical volumes).<br />
<br />
=Installation=<br />
<br />
Before doing anything we need to load the appropriate module:<br />
# modprobe dm-mod<br />
If you already have Arch Linux installed and you just want to add/try a partition with LVM, jump to [[Lvm#Partition_disks|partition disks]].<br />
<br />
====Installing Arch Linux on LVM====<br />
Prior to running Arch Linux install scripts (/arch/setup) to install Arch Linux, you need to partition your disk with {{Codeline|cfdisk}} (or any other tool of your liking). Because grub legacy (grub with version less than 1.0) can't boot from LVM logical volumes you can't have {{Filename|/boot}} in LVM, so you need to create a boot partition. 100MB should be enough. The other solution would be to use lilo or grub with version 1.95 or newer.<br />
<br />
====Partition disks====<br />
Next you need to create a partition for LVM. Its filesystem type should be 'Linux LVM', so use a partition id 0x8e (filesystem type: 8e). You need to create only one LVM partition on each disk you want to use with LVM. Your logical volumes will reside inside these partitions so size them accordingly. If you will use only LVM and no other external partitions, use all the free space on each disk.<br />
<br />
{{Warning|/boot can't reside in an LVM partition because grub (version<1.95) does not support LVM.}}<br />
<br />
{{Tip|All LVM partitions on all disks can be configured to appear as one big disk.}}<br />
<br />
====Create Physical volumes====<br />
<br />
Now you need to initialize these partitions so they can be used by LVM. Use {{Codeline|fdisk -l}} to find out which partitions have filesystem type 'Linux LVM' and create a physical volume on them:<br />
# pvcreate /dev/sda2<br />
Substitute {{Filename|/dev/sda2}} with all your partitions to create physical volumes on all of them. This command creates a header on each partition so it can be used for LVM.<br />
You can track created physical volumes with:<br />
# pvdisplay<br />
<br />
====Create Volume group(s)====<br />
Next step is to create a volume group on this physical volume. First you need to create a volume group on one of the new partitions and then add to it all other physical volumes you want to have in it:<br />
# vgcreate VolGroup00 /dev/sda2<br />
# vgextend VolGroup00 /dev/sdb1<br />
Also you can use any other name you like instead of VolGroup00 for a volume group when creating it. You can track how your volume group grows with:<br />
# vgdisplay<br />
<br />
{{Note|You can create more than one volume group if you need to, but then you won't have all your storage presented as one disk.}}<br />
<br />
====Create Logical Volumes====<br />
Now we need to create logical volumes on this volume group. You create a logical volume with the next command by giving the name of a new logical volume, its size, and the volume group it will live on:<br />
# lvcreate -L 10G VolGroup00 -n lvolhome<br />
This will create a logical volume that you can access later with {{Filename|/dev/mapper/Volgroup00-lvolhome}} or {{Filename|/dev/VolGroup00/lvolhome}}. Same as with the volume groups, you can use any name you want for your logical volume when creating it.<br />
<br />
To create swap on a logical volume, an additional argument is needed:<br />
# lvcreate -C y -L 10G VolGroup00 -n lvolswap<br />
The {{Codeline|-C y}} is used to create a contiguous partition, which means that your swap space doesn't get partitioned over one or more disks nor over non-contiguous physical extents.<br />
<br />
If you want to fill all the free space left on a volume group, use the next command:<br />
# lvcreate -l +100%FREE VolGroup00 -n lvolmedia<br />
<br />
You can track created logical volumes with:<br />
# lvdisplay<br />
<br />
{{Note|You may need to load the ''device-mapper'' kernel module ('''modprobe dm-mod''') for the above commands to succeed:}}<br />
<br />
{{Tip|You can start out with relatively small logical volumes and expand them later if needed. For simplicity, leave some free space in the volume group so there is room for expansion.}}<br />
<br />
====Create filesystem and mount logical volumes====<br />
Your logical volumes should now be located in {{Filename|/dev/mapper/}} and {{Filename|/dev/YourVolumeGroupName}}. If you can't find them, use the next commands to bring up the module for creating device nodes and to make volume groups available:<br />
# modprobe dm-mod<br />
# vgchange -ay<br />
Now you can create filesystems on logical volumes and mount them as normal partitions (if you are installing Arch linux, skip this step. Use the arch installer to pick the LVM partitions that you have created):<br />
# mkfs.ext3 /dev/mapper/VolGroup00-lvolhome<br />
# mount /dev/mapper/VolGroup00-lvolhome /home<br />
If you are installing Arch linux, start /arch/setup, go to ''Prepare Hard Drive'' directly to step 3 ''Set Filesystem Mountpoints'' and '''''read the [[Lvm#Important|Important]] section below before proceeding with installation!'''''<br />
<br />
===Important===<br />
There are just a few things you need to be careful with while using/installing Arch Linux with LVM (in brackets are the corresponding menus during installation):<br />
# When choosing mountpoints, just select your newly created logical volumes (use: {{Filename|/dev/mapper/Volgroup00-lvolhome}}).<br>Do NOT select the actual partitions on which logical volumes were created (don't use: {{Filename|/dev/sda2}}). (''Set Filesystem Mountpoints'')<br />
# Make sure you change ''USELVM="no"'' to ''USELVM="yes"'' in {{Filename|/etc/rc.conf}} (''Configure System'')<br />
# Make sure that ''lvm2'' is in the HOOKS section of {{Filename|/etc/mkinitcpio.conf}} just before the ''filesystems'' so that your kernel will find LVM volumes at boot time. Also, if you wish to use LVM snapshots, add ''dm-snapshot'' to the MODULES variable. (''Configure System'')<br />
# Make sure {{Filename|/boot/grub/menu.lst}} uses the right volumes for root. It should look something like this: (''Install Bootloader'')<br />
...<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 '''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro<br />
initrd /kernel26.img<br />
...<br />
If you are using LILO check {{Filename|/etc/lilo.conf}}:<br />
image=/boot/vmlinuz26<br />
label=arch<br />
append="'''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro"<br />
initrd=/boot/kernel26.img<br />
<br />
= Configuration =<br />
<br />
== Grow logical volume ==<br />
To grow a logical volume you first need to grow the logical volume and then the filesystem to use the newly created free space. Let's say we have a logical volume of 15GB with ext3 on it and we want to grow it to 20G. We need to do the following steps: <br />
# lvextend -L 20G VolGroup00/lvolhome (or lvresize -L +5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
You may use {{Codeline|lvresize}} instead of {{Codeline|lvextend}}.<br />
<br />
If you want to fill all the free space on a volume group, use the next command:<br />
# lvextend -l +100%FREE VolGroup00/lvolhome<br />
<br />
{{Warning|Not all filesystems support growing without loss of data and/or growing online.}}<br />
<br />
{{Note|If you don't resize your filesystem, you will still have a volume with the same size as before (volume will be bigger but partly unused).}}<br />
<br />
== Shrink logical volume ==<br />
Because your filesystem is probably as big as the logical volume it resides on, you need to shrink the filesystem first and then shrink the logical volume. Depending on your filesystem, you may need to unmount it first. Let's say we have a logical volume of 15GB with ext3 on it and we want to shrink it to 10G. We need to do the following steps: <br />
# resize2fs /dev/VolGroup00/lvolhome 9G<br />
# lvreduce -L 10G VolGroup00/lvolhome (or lvresize -L -5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
Here we shrunk the filesystem more than needed so that when we shrunk the logical volume we didn't accidentally cut off the end of the filesystem. After that we normally grow the filesystem to fill all free space left on logical volume. You may use {{Codeline|lvresize}} instead of {{Codeline|lvreduce}}.<br />
<br />
{{Warning|Don't reduce the filesystem size to less than the amount of space occupied by data or you risk data loss.}}<br />
<br />
{{Warning|Not all filesystems support shrinking without loss of data and/or shrinking online.}}<br />
<br />
{{Note|It is better to reduce the filesystem to a smaller size than the logical volume, so that after resizing the logical volume, we don't accidentally cut off some data from the end of the filesystem.}}<br />
<br />
== Add partition to a volume group ==<br />
To add a partition to your volume group you must first make its type 'Linux LVM' (for example with {{Codeline|cfdisk}}). Then you need to create a physical volume on it and extend the volume group over it:<br />
# pvcreate /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdb1<br />
Now you have free space in your volume group that can be used by logical volumes in this group.<br />
<br />
{{Tip|You can add partitions from any disks to volume groups.}}<br />
<br />
== Remove partition from a volume group ==<br />
All of the data on that partition needs to be moved to another partition. Fortunately, LVM makes this easy:<br />
# pvmove /dev/sdb1<br />
If you want to have the data on a specific physical volume, specify that as the second argument to {{Codeline|pvmove}}:<br />
# pvmove /dev/sdb1 /dev/sdf1<br />
Then the physical volume needs to be removed from the volume group:<br />
# vgreduce myVg /dev/sdb1<br />
Or remove all empty physical volumes:<br />
# vgreduce --all vg0<br />
<br />
And lastly, if you want to use the partition for something else, and want to avoid LVM thinking that the partition is a physical volume:<br />
# pvremove /dev/sdb1<br />
<br />
== Snapshots ==<br />
====Introduction====<br />
LVM allows you to take a snapshot of your system in a much more efficient way than a traditional backup. It does this efficiently by using a COW (copy-on-write) policy. The initial snapshot you take simply contains hard-links to the inodes of your actual data. So long as your data remains unchanged, the snapshot merely contains its inode pointers and not the data itself. Whenever you modify a file or directory that the snapshot points to, LVM automatically clones the data, the old copy referenced by the snapshot, and the new copy referenced by your active system. Thus, you can snapshot a system with 35GB of data using just 2GB of free space so long as you modify less than 2GB (on both the original and snapshot).<br />
<br />
====Configuration====<br />
You create snapshot logical volumes just like normal ones.<br />
<br />
# lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv<br />
With that volume, you may modify less than 100M of data, before the snapshot volume fills up.<br />
<br />
It is important to have the ''dm-snapshot'' module listed in the MODULES variable of {{Filename|/etc/mkinitcpio.conf}}, otherwise the system will not boot. If you do this on an already installed system, make sure to rebuild the image with<br />
# mkinitcpio -g /boot/kernel26.img<br />
<br />
Todo: scripts to automate snapshots of root before updates, to rollback... updating {{Filename|menu.lst}} to boot snapshots (separate article?)<br />
<br />
snapshots are primarily used to provide a frozen copy of a filesystem to make backups; a backup taking two hours provides a more consistent image of the filesystem than directly backing up the partition.<br />
<br />
= Troubleshooting =<br />
====LVM commands don't work====<br />
*Load proper module:<br />
# modprobe dm-mod<br />
*Try preceding commands with ''lvm'' like this:<br />
# lvm pvdisplay<br />
<br />
==== Set Filesystem Mountpoints page doesn't show logical volumes ====<br />
If you are installing on a system where there is an existing volume group, you may find that even after doing "modprobe dm-mod" you don't see the list of logical volumes.<br />
<br />
In this case, you may also need to do:<br />
# vgchange -ay <volgroup><br />
<br />
in order to activate the volume group and make the logical volumes available.<br />
<br />
= Tips & Tricks =<br />
Todo<br />
<br />
= More Resources =<br />
Other LVM articles on the Archwiki:<br />
* [[Installing_with_Software_RAID_or_LVM|Installing with software RAID or LVM]]<br />
* [[RAID_Encryption_LVM|RAID encryption LVM]]<br />
External resources:<br />
* [http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) LVM on wikipedia]<br />
* [http://tldp.org/HOWTO/LVM-HOWTO/ LVM HOWTO on tldp.org ]<br />
* [http://www.gentoo.org/doc/en/lvm2.xml Gentoo LVM2 installation at gentoo.org ]<br />
* [http://en.gentoo-wiki.com/wiki/LVM LVM at en.gentoo-wiki.com]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=LVM&diff=118464LVM2010-10-01T08:36:08Z<p>Dcelasun: /* Snapshots */</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|LVM}}<br />
<br />
=Introduction=<br />
<br />
LVM is a Logical Volume Manager for the Linux kernel. With LVM you can abstract your storage space and have "virtual partitions" which are easier to modify. The basic building blocks of LVM are:<br />
<br />
* '''Physical volume (PV)''': Partition on hard disk (or even hard disk itself or loopback file) on which you can have volume groups. It has a special header and is divided into physical extents. Think of physical volumes as big building blocks which can be used to build your hard drive.<br />
* '''Volume group (VG)''': Group of physical volumes that are used as storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.<br />
* '''Logical volume (LV)''': A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.<br />
* '''Physical extent (PE)''': A small part of a disk (usually 4MB) that can be assigned to a logical Volume. Think of physical extents as parts of disks that can be allocated to any partition.<br />
<br />
With LVM you can more easily handle your partitions (logical volumes) than normal hard drive partitions. For example, you can:<br />
<br />
* Use ''any number'' of disks as one big disk(VG)<br />
* Have partitions(LV) stretched ''over'' several disks (they can be as big as all of your disk storage together)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''as you like'' (it doesn't depend on position of the logical volumes within volume groups as with normal partitions)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''online'' (filesystems on them still need to be resized, but some support online resizing)<br />
* ''Name'' your disks(VG) and partitions(LV) as you like<br />
* Create small partitions(LV) and resize them "''dynamically''" as they get more filled (growing must be still done by hand, but you can do it online with some filesystems)<br />
* ...<br />
<br />
Example: <br />
'''Physical disks'''<br />
<br />
Disk1 (/dev/sda):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 50GB (Physical volume) |Partition2 80GB (Physical volume) |<br />
|/dev/sda1 |/dev/sda2 |<br />
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
Disk2 (/dev/sdb):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 120GB (Physical volume) |<br />
|/dev/sdb1 |<br />
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _|<br />
<br />
'''LVM logical volumes'''<br />
<br />
Volume Group1 (/dev/MyStorage/ = /dev/sda1 + /dev/sda2 + /dev/sdb1):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br />
|Logical volume1 15GB |Logical volume2 35GB |Logical volume3 200GB |<br />
|/dev/MyStorage/rootvol|/dev/MyStorage/homevol |/dev/MyStorage/mediavol |<br />
|_ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
To sum it all up: With LVM you can use all your storage space as one big disk (volume group) and have more flexibility over your partitions (logical volumes).<br />
<br />
=Installation=<br />
<br />
Before doing anything we need to load the appropriate module:<br />
# modprobe dm-mod<br />
If you already have Arch Linux installed and you just want to add/try a partition with LVM, jump to [[Lvm#Partition_disks|partition disks]].<br />
<br />
====Installing Arch Linux on LVM====<br />
Prior to running Arch Linux install scripts (/arch/setup) to install Arch Linux, you need to partition your disk with {{Codeline|cfdisk}} (or any other tool of your liking). Because grub legacy (grub with version less than 1.0) can't boot from LVM logical volumes you can't have {{Filename|/boot}} in LVM, so you need to create a boot partition. 100MB should be enough. The other solution would be to use lilo or grub with version 1.95 or newer.<br />
<br />
====Partition disks====<br />
Next you need to create a partition for LVM. Its filesystem type should be 'Linux LVM', so use a partition id 0x8e (filesystem type: 8e). You need to create only one LVM partition on each disk you want to use with LVM. Your logical volumes will reside inside these partitions so size them accordingly. If you will use only LVM and no other external partitions, use all the free space on each disk.<br />
<br />
{{Warning|/boot can't reside in an LVM partition because grub (version<1.95) does not support LVM.}}<br />
<br />
{{Tip|All LVM partitions on all disks can be configured to appear as one big disk.}}<br />
<br />
====Create Physical volumes====<br />
<br />
Now you need to initialize these partitions so they can be used by LVM. Use {{Codeline|fdisk -l}} to find out which partitions have filesystem type 'Linux LVM' and create a physical volume on them:<br />
# pvcreate /dev/sda2<br />
Substitute {{Filename|/dev/sda2}} with all your partitions to create physical volumes on all of them. This command creates a header on each partition so it can be used for LVM.<br />
You can track created physical volumes with:<br />
# pvdisplay<br />
<br />
====Create Volume group(s)====<br />
Next step is to create a volume group on this physical volume. First you need to create a volume group on one of the new partitions and then add to it all other physical volumes you want to have in it:<br />
# vgcreate VolGroup00 /dev/sda2<br />
# vgextend VolGroup00 /dev/sdb1<br />
Also you can use any other name you like instead of VolGroup00 for a volume group when creating it. You can track how your volume group grows with:<br />
# vgdisplay<br />
<br />
{{Note|You can create more than one volume group if you need to, but then you won't have all your storage presented as one disk.}}<br />
<br />
====Create Logical Volumes====<br />
Now we need to create logical volumes on this volume group. You create a logical volume with the next command by giving the name of a new logical volume, its size, and the volume group it will live on:<br />
# lvcreate -L 10G VolGroup00 -n lvolhome<br />
This will create a logical volume that you can access later with {{Filename|/dev/mapper/Volgroup00-lvolhome}} or {{Filename|/dev/VolGroup00/lvolhome}}. Same as with the volume groups, you can use any name you want for your logical volume when creating it.<br />
<br />
To create swap on a logical volume, an additional argument is needed:<br />
# lvcreate -C y -L 10G VolGroup00 -n lvolswap<br />
The {{Codeline|-C y}} is used to create a contiguous partition, which means that your swap space doesn't get partitioned over one or more disks nor over non-contiguous physical extents.<br />
<br />
If you want to fill all the free space left on a volume group, use the next command:<br />
# lvcreate -l +100%FREE VolGroup00 -n lvolmedia<br />
<br />
You can track created logical volumes with:<br />
# lvdisplay<br />
<br />
{{Note|You may need to load the ''device-mapper'' kernel module ('''modprobe dm-mod''') for the above commands to succeed:}}<br />
<br />
{{Tip|You can start out with relatively small logical volumes and expand them later if needed. For simplicity, leave some free space in the volume group so there is room for expansion.}}<br />
<br />
====Create filesystem and mount logical volumes====<br />
Your logical volumes should now be located in {{Filename|/dev/mapper/}} and {{Filename|/dev/YourVolumeGroupName}}. If you can't find them, use the next commands to bring up the module for creating device nodes and to make volume groups available:<br />
# modprobe dm-mod<br />
# vgchange -ay<br />
Now you can create filesystems on logical volumes and mount them as normal partitions (if you are installing Arch linux, skip this step. Use the arch installer to pick the LVM partitions that you have created):<br />
# mkfs.ext3 /dev/mapper/VolGroup00-lvolhome<br />
# mount /dev/mapper/VolGroup00-lvolhome /home<br />
If you are installing Arch linux, start /arch/setup, go to ''Prepare Hard Drive'' directly to step 3 ''Set Filesystem Mountpoints'' and '''''read the [[Lvm#Important|Important]] section below before proceeding with installation!'''''<br />
<br />
===Important===<br />
There are just a few things you need to be careful with while using/installing Arch Linux with LVM (in brackets are the corresponding menus during installation):<br />
# When choosing mountpoints, just select your newly created logical volumes (use: {{Filename|/dev/mapper/Volgroup00-lvolhome}}).<br>Do NOT select the actual partitions on which logical volumes were created (don't use: {{Filename|/dev/sda2}}). (''Set Filesystem Mountpoints'')<br />
# Make sure you change ''USELVM="no"'' to ''USELVM="yes"'' in {{Filename|/etc/rc.conf}} (''Configure System'')<br />
# Make sure that ''lvm2'' is in the HOOKS section of {{Filename|/etc/mkinitcpio.conf}} just before the ''filesystems'' so that your kernel will find LVM volumes at boot time. Also, if you wish to use LVM snapshots, add ''dm-snapshot'' to the MODULES variable. (''Configure System'')<br />
# Make sure {{Filename|/boot/grub/menu.lst}} uses the right volumes for root. It should look something like this: (''Install Bootloader'')<br />
...<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 '''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro<br />
initrd /kernel26.img<br />
...<br />
If you are using LILO check {{Filename|/etc/lilo.conf}}:<br />
image=/boot/vmlinuz26<br />
label=arch<br />
append="'''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro"<br />
initrd=/boot/kernel26.img<br />
<br />
= Configuration =<br />
<br />
== Grow logical volume ==<br />
To grow a logical volume you first need to grow the logical volume and then the filesystem to use the newly created free space. Let's say we have a logical volume of 15GB with ext3 on it and we want to grow it to 20G. We need to do the following steps: <br />
# lvextend -L 20G VolGroup00/lvolhome (or lvresize -L +5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
You may use {{Codeline|lvresize}} instead of {{Codeline|lvextend}}.<br />
<br />
If you want to fill all the free space on a volume group, use the next command:<br />
# lvextend -l +100%FREE VolGroup00/lvolhome<br />
<br />
{{Warning|Not all filesystems support growing without loss of data and/or growing online.}}<br />
<br />
{{Note|If you don't resize your filesystem, you will still have a volume with the same size as before (volume will be bigger but partly unused).}}<br />
<br />
== Shrink logical volume ==<br />
Because your filesystem is probably as big as the logical volume it resides on, you need to shrink the filesystem first and then shrink the logical volume. Depending on your filesystem, you may need to unmount it first. Let's say we have a logical volume of 15GB with ext3 on it and we want to shrink it to 10G. We need to do the following steps: <br />
# resize2fs /dev/VolGroup00/lvolhome 9G<br />
# lvreduce -L 10G VolGroup00/lvolhome (or lvresize -L -5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
Here we shrunk the filesystem more than needed so that when we shrunk the logical volume we didn't accidentally cut off the end of the filesystem. After that we normally grow the filesystem to fill all free space left on logical volume. You may use {{Codeline|lvresize}} instead of {{Codeline|lvreduce}}.<br />
<br />
{{Warning|Don't reduce the filesystem size to less than the amount of space occupied by data or you risk data loss.}}<br />
<br />
{{Warning|Not all filesystems support shrinking without loss of data and/or shrinking online.}}<br />
<br />
{{Note|It is better to reduce the filesystem to a smaller size than the logical volume, so that after resizing the logical volume, we don't accidentally cut off some data from the end of the filesystem.}}<br />
<br />
== Add partition to a volume group ==<br />
To add a partition to your volume group you must first make its type 'Linux LVM' (for example with {{Codeline|cfdisk}}). Then you need to create a physical volume on it and extend the volume group over it:<br />
# pvcreate /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdb1<br />
Now you have free space in your volume group that can be used by logical volumes in this group.<br />
<br />
{{Tip|You can add partitions from any disks to volume groups.}}<br />
<br />
== Remove partition from a volume group ==<br />
All of the data on that partition needs to be moved to another partition. Fortunately, LVM makes this easy:<br />
# pvmove /dev/sdb1<br />
If you want to have the data on a specific physical volume, specify that as the second argument to {{Codeline|pvmove}}:<br />
# pvmove /dev/sdb1 /dev/sdf1<br />
Then the physical volume needs to be removed from the volume group:<br />
# vgreduce myVg /dev/sdb1<br />
Or remove all empty physical volumes:<br />
# vgreduce --all vg0<br />
<br />
And lastly, if you want to use the partition for something else, and want to avoid LVM thinking that the partition is a physical volume:<br />
# pvremove /dev/sdb1<br />
<br />
== Anlık Görüntüler ==<br />
====Introduction====<br />
LVM allows you to take a snapshot of your system in a much more efficient way than a traditional backup. It does this efficiently by using a COW (copy-on-write) policy. The initial snapshot you take simply contains hard-links to the inodes of your actual data. So long as your data remains unchanged, the snapshot merely contains its inode pointers and not the data itself. Whenever you modify a file or directory that the snapshot points to, LVM automatically clones the data, the old copy referenced by the snapshot, and the new copy referenced by your active system. Thus, you can snapshot a system with 35GB of data using just 2GB of free space so long as you modify less than 2GB (on both the original and snapshot).<br />
<br />
====Configuration====<br />
You create snapshot logical volumes just like normal ones.<br />
<br />
# lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv<br />
With that volume, you may modify less than 100M of data, before the snapshot volume fills up.<br />
<br />
It is important to have the ''dm-snapshot'' module listed in the MODULES variable of {{Filename|/etc/mkinitcpio.conf}}, otherwise the system will not boot. If you do this on an already installed system, make sure to rebuild the image with<br />
# mkinitcpio -g /boot/kernel26.img<br />
<br />
Todo: scripts to automate snapshots of root before updates, to rollback... updating {{Filename|menu.lst}} to boot snapshots (separate article?)<br />
<br />
snapshots are primarily used to provide a frozen copy of a filesystem to make backups; a backup taking two hours provides a more consistent image of the filesystem than directly backing up the partition.<br />
<br />
= Troubleshooting =<br />
====LVM commands don't work====<br />
*Load proper module:<br />
# modprobe dm-mod<br />
*Try preceding commands with ''lvm'' like this:<br />
# lvm pvdisplay<br />
<br />
==== Set Filesystem Mountpoints page doesn't show logical volumes ====<br />
If you are installing on a system where there is an existing volume group, you may find that even after doing "modprobe dm-mod" you don't see the list of logical volumes.<br />
<br />
In this case, you may also need to do:<br />
# vgchange -ay <volgroup><br />
<br />
in order to activate the volume group and make the logical volumes available.<br />
<br />
= Tips & Tricks =<br />
Todo<br />
<br />
= More Resources =<br />
Other LVM articles on the Archwiki:<br />
* [[Installing_with_Software_RAID_or_LVM|Installing with software RAID or LVM]]<br />
* [[RAID_Encryption_LVM|RAID encryption LVM]]<br />
External resources:<br />
* [http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) LVM on wikipedia]<br />
* [http://tldp.org/HOWTO/LVM-HOWTO/ LVM HOWTO on tldp.org ]<br />
* [http://www.gentoo.org/doc/en/lvm2.xml Gentoo LVM2 installation at gentoo.org ]<br />
* [http://en.gentoo-wiki.com/wiki/LVM LVM at en.gentoo-wiki.com]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=LVM&diff=118461LVM2010-10-01T08:30:49Z<p>Dcelasun: /* Remove partition from a volume group */ Extremely ambiguous! Doing some clarifications...</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|LVM}}<br />
<br />
=Introduction=<br />
<br />
LVM is a Logical Volume Manager for the Linux kernel. With LVM you can abstract your storage space and have "virtual partitions" which are easier to modify. The basic building blocks of LVM are:<br />
<br />
* '''Physical volume (PV)''': Partition on hard disk (or even hard disk itself or loopback file) on which you can have volume groups. It has a special header and is divided into physical extents. Think of physical volumes as big building blocks which can be used to build your hard drive.<br />
* '''Volume group (VG)''': Group of physical volumes that are used as storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.<br />
* '''Logical volume (LV)''': A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.<br />
* '''Physical extent (PE)''': A small part of a disk (usually 4MB) that can be assigned to a logical Volume. Think of physical extents as parts of disks that can be allocated to any partition.<br />
<br />
With LVM you can more easily handle your partitions (logical volumes) than normal hard drive partitions. For example, you can:<br />
<br />
* Use ''any number'' of disks as one big disk(VG)<br />
* Have partitions(LV) stretched ''over'' several disks (they can be as big as all of your disk storage together)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''as you like'' (it doesn't depend on position of the logical volumes within volume groups as with normal partitions)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''online'' (filesystems on them still need to be resized, but some support online resizing)<br />
* ''Name'' your disks(VG) and partitions(LV) as you like<br />
* Create small partitions(LV) and resize them "''dynamically''" as they get more filled (growing must be still done by hand, but you can do it online with some filesystems)<br />
* ...<br />
<br />
Example: <br />
'''Physical disks'''<br />
<br />
Disk1 (/dev/sda):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 50GB (Physical volume) |Partition2 80GB (Physical volume) |<br />
|/dev/sda1 |/dev/sda2 |<br />
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
Disk2 (/dev/sdb):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 120GB (Physical volume) |<br />
|/dev/sdb1 |<br />
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _|<br />
<br />
'''LVM logical volumes'''<br />
<br />
Volume Group1 (/dev/MyStorage/ = /dev/sda1 + /dev/sda2 + /dev/sdb1):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br />
|Logical volume1 15GB |Logical volume2 35GB |Logical volume3 200GB |<br />
|/dev/MyStorage/rootvol|/dev/MyStorage/homevol |/dev/MyStorage/mediavol |<br />
|_ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
To sum it all up: With LVM you can use all your storage space as one big disk (volume group) and have more flexibility over your partitions (logical volumes).<br />
<br />
=Installation=<br />
<br />
Before doing anything we need to load the appropriate module:<br />
# modprobe dm-mod<br />
If you already have Arch Linux installed and you just want to add/try a partition with LVM, jump to [[Lvm#Partition_disks|partition disks]].<br />
<br />
====Installing Arch Linux on LVM====<br />
Prior to running Arch Linux install scripts (/arch/setup) to install Arch Linux, you need to partition your disk with {{Codeline|cfdisk}} (or any other tool of your liking). Because grub legacy (grub with version less than 1.0) can't boot from LVM logical volumes you can't have {{Filename|/boot}} in LVM, so you need to create a boot partition. 100MB should be enough. The other solution would be to use lilo or grub with version 1.95 or newer.<br />
<br />
====Partition disks====<br />
Next you need to create a partition for LVM. Its filesystem type should be 'Linux LVM', so use a partition id 0x8e (filesystem type: 8e). You need to create only one LVM partition on each disk you want to use with LVM. Your logical volumes will reside inside these partitions so size them accordingly. If you will use only LVM and no other external partitions, use all the free space on each disk.<br />
<br />
{{Warning|/boot can't reside in an LVM partition because grub (version<1.95) does not support LVM.}}<br />
<br />
{{Tip|All LVM partitions on all disks can be configured to appear as one big disk.}}<br />
<br />
====Create Physical volumes====<br />
<br />
Now you need to initialize these partitions so they can be used by LVM. Use {{Codeline|fdisk -l}} to find out which partitions have filesystem type 'Linux LVM' and create a physical volume on them:<br />
# pvcreate /dev/sda2<br />
Substitute {{Filename|/dev/sda2}} with all your partitions to create physical volumes on all of them. This command creates a header on each partition so it can be used for LVM.<br />
You can track created physical volumes with:<br />
# pvdisplay<br />
<br />
====Create Volume group(s)====<br />
Next step is to create a volume group on this physical volume. First you need to create a volume group on one of the new partitions and then add to it all other physical volumes you want to have in it:<br />
# vgcreate VolGroup00 /dev/sda2<br />
# vgextend VolGroup00 /dev/sdb1<br />
Also you can use any other name you like instead of VolGroup00 for a volume group when creating it. You can track how your volume group grows with:<br />
# vgdisplay<br />
<br />
{{Note|You can create more than one volume group if you need to, but then you won't have all your storage presented as one disk.}}<br />
<br />
====Create Logical Volumes====<br />
Now we need to create logical volumes on this volume group. You create a logical volume with the next command by giving the name of a new logical volume, its size, and the volume group it will live on:<br />
# lvcreate -L 10G VolGroup00 -n lvolhome<br />
This will create a logical volume that you can access later with {{Filename|/dev/mapper/Volgroup00-lvolhome}} or {{Filename|/dev/VolGroup00/lvolhome}}. Same as with the volume groups, you can use any name you want for your logical volume when creating it.<br />
<br />
To create swap on a logical volume, an additional argument is needed:<br />
# lvcreate -C y -L 10G VolGroup00 -n lvolswap<br />
The {{Codeline|-C y}} is used to create a contiguous partition, which means that your swap space doesn't get partitioned over one or more disks nor over non-contiguous physical extents.<br />
<br />
If you want to fill all the free space left on a volume group, use the next command:<br />
# lvcreate -l +100%FREE VolGroup00 -n lvolmedia<br />
<br />
You can track created logical volumes with:<br />
# lvdisplay<br />
<br />
{{Note|You may need to load the ''device-mapper'' kernel module ('''modprobe dm-mod''') for the above commands to succeed:}}<br />
<br />
{{Tip|You can start out with relatively small logical volumes and expand them later if needed. For simplicity, leave some free space in the volume group so there is room for expansion.}}<br />
<br />
====Create filesystem and mount logical volumes====<br />
Your logical volumes should now be located in {{Filename|/dev/mapper/}} and {{Filename|/dev/YourVolumeGroupName}}. If you can't find them, use the next commands to bring up the module for creating device nodes and to make volume groups available:<br />
# modprobe dm-mod<br />
# vgchange -ay<br />
Now you can create filesystems on logical volumes and mount them as normal partitions (if you are installing Arch linux, skip this step. Use the arch installer to pick the LVM partitions that you have created):<br />
# mkfs.ext3 /dev/mapper/VolGroup00-lvolhome<br />
# mount /dev/mapper/VolGroup00-lvolhome /home<br />
If you are installing Arch linux, start /arch/setup, go to ''Prepare Hard Drive'' directly to step 3 ''Set Filesystem Mountpoints'' and '''''read the [[Lvm#Important|Important]] section below before proceeding with installation!'''''<br />
<br />
===Important===<br />
There are just a few things you need to be careful with while using/installing Arch Linux with LVM (in brackets are the corresponding menus during installation):<br />
# When choosing mountpoints, just select your newly created logical volumes (use: {{Filename|/dev/mapper/Volgroup00-lvolhome}}).<br>Do NOT select the actual partitions on which logical volumes were created (don't use: {{Filename|/dev/sda2}}). (''Set Filesystem Mountpoints'')<br />
# Make sure you change ''USELVM="no"'' to ''USELVM="yes"'' in {{Filename|/etc/rc.conf}} (''Configure System'')<br />
# Make sure that ''lvm2'' is in the HOOKS section of {{Filename|/etc/mkinitcpio.conf}} just before the ''filesystems'' so that your kernel will find LVM volumes at boot time. Also, if you wish to use LVM snapshots, add ''dm-snapshot'' to the MODULES variable. (''Configure System'')<br />
# Make sure {{Filename|/boot/grub/menu.lst}} uses the right volumes for root. It should look something like this: (''Install Bootloader'')<br />
...<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 '''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro<br />
initrd /kernel26.img<br />
...<br />
If you are using LILO check {{Filename|/etc/lilo.conf}}:<br />
image=/boot/vmlinuz26<br />
label=arch<br />
append="'''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro"<br />
initrd=/boot/kernel26.img<br />
<br />
= Configuration =<br />
<br />
== Grow logical volume ==<br />
To grow a logical volume you first need to grow the logical volume and then the filesystem to use the newly created free space. Let's say we have a logical volume of 15GB with ext3 on it and we want to grow it to 20G. We need to do the following steps: <br />
# lvextend -L 20G VolGroup00/lvolhome (or lvresize -L +5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
You may use {{Codeline|lvresize}} instead of {{Codeline|lvextend}}.<br />
<br />
If you want to fill all the free space on a volume group, use the next command:<br />
# lvextend -l +100%FREE VolGroup00/lvolhome<br />
<br />
{{Warning|Not all filesystems support growing without loss of data and/or growing online.}}<br />
<br />
{{Note|If you don't resize your filesystem, you will still have a volume with the same size as before (volume will be bigger but partly unused).}}<br />
<br />
== Shrink logical volume ==<br />
Because your filesystem is probably as big as the logical volume it resides on, you need to shrink the filesystem first and then shrink the logical volume. Depending on your filesystem, you may need to unmount it first. Let's say we have a logical volume of 15GB with ext3 on it and we want to shrink it to 10G. We need to do the following steps: <br />
# resize2fs /dev/VolGroup00/lvolhome 9G<br />
# lvreduce -L 10G VolGroup00/lvolhome (or lvresize -L -5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
Here we shrunk the filesystem more than needed so that when we shrunk the logical volume we didn't accidentally cut off the end of the filesystem. After that we normally grow the filesystem to fill all free space left on logical volume. You may use {{Codeline|lvresize}} instead of {{Codeline|lvreduce}}.<br />
<br />
{{Warning|Don't reduce the filesystem size to less than the amount of space occupied by data or you risk data loss.}}<br />
<br />
{{Warning|Not all filesystems support shrinking without loss of data and/or shrinking online.}}<br />
<br />
{{Note|It is better to reduce the filesystem to a smaller size than the logical volume, so that after resizing the logical volume, we don't accidentally cut off some data from the end of the filesystem.}}<br />
<br />
== Add partition to a volume group ==<br />
To add a partition to your volume group you must first make its type 'Linux LVM' (for example with {{Codeline|cfdisk}}). Then you need to create a physical volume on it and extend the volume group over it:<br />
# pvcreate /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdb1<br />
Now you have free space in your volume group that can be used by logical volumes in this group.<br />
<br />
{{Tip|You can add partitions from any disks to volume groups.}}<br />
<br />
== Remove partition from a volume group ==<br />
All of the data on that partition needs to be moved to another partition. Fortunately, LVM makes this easy:<br />
# pvmove /dev/sdb1<br />
If you want to have the data on a specific physical volume, specify that as the second argument to {{Codeline|pvmove}}:<br />
# pvmove /dev/sdb1 /dev/sdf1<br />
Then the physical volume needs to be removed from the volume group:<br />
# vgreduce myVg /dev/sdb1<br />
Or remove all empty physical volumes:<br />
# vgreduce --all vg0<br />
<br />
And lastly, if you want to use the partition for something else, and want to avoid LVM thinking that the partition is a physical volume:<br />
# pvremove /dev/sdb1<br />
<br />
== Snapshots ==<br />
====Introduction====<br />
LVM allows you to take a snapshot of your system in a much more efficient way than a traditional backup. It does this efficiently by using a COW (copy-on-write) policy. The initial snapshot you take simply contains hard-links to the inodes of your actual data. So long as your data remains unchanged, the snapshot merely contains its inode pointers and not the data itself. Whenever you modify a file or directory that the snapshot points to, LVM automatically clones the data, the old copy referenced by the snapshot, and the new copy referenced by your active system. Thus, you can snapshot a system with 35GB of data using just 2GB of free space so long as you modify less than 2GB (on both the original and snapshot).<br />
<br />
====Configuration====<br />
You create snapshot logical volumes just like normal ones.<br />
<br />
# lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv<br />
With that volume, you may modify less than 100M of data, before the snapshot volume fills up.<br />
<br />
It is important to have the ''dm-snapshot'' module listed in the MODULES variable of {{Filename|/etc/mkinitcpio.conf}}, otherwise the system will not boot. If you do this on an already installed system, make sure to rebuild the image with<br />
# mkinitcpio -g /boot/kernel26.img<br />
<br />
Todo: scripts to automate snapshots of root before updates, to rollback... updating {{Filename|menu.lst}} to boot snapshots (separate article?)<br />
<br />
snapshots are primarily used to provide a frozen copy of a filesystem to make backups; a backup taking two hours provides a more consistent image of the filesystem than directly backing up the partition.<br />
<br />
= Troubleshooting =<br />
====LVM commands don't work====<br />
*Load proper module:<br />
# modprobe dm-mod<br />
*Try preceding commands with ''lvm'' like this:<br />
# lvm pvdisplay<br />
<br />
==== Set Filesystem Mountpoints page doesn't show logical volumes ====<br />
If you are installing on a system where there is an existing volume group, you may find that even after doing "modprobe dm-mod" you don't see the list of logical volumes.<br />
<br />
In this case, you may also need to do:<br />
# vgchange -ay <volgroup><br />
<br />
in order to activate the volume group and make the logical volumes available.<br />
<br />
= Tips & Tricks =<br />
Todo<br />
<br />
= More Resources =<br />
Other LVM articles on the Archwiki:<br />
* [[Installing_with_Software_RAID_or_LVM|Installing with software RAID or LVM]]<br />
* [[RAID_Encryption_LVM|RAID encryption LVM]]<br />
External resources:<br />
* [http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) LVM on wikipedia]<br />
* [http://tldp.org/HOWTO/LVM-HOWTO/ LVM HOWTO on tldp.org ]<br />
* [http://www.gentoo.org/doc/en/lvm2.xml Gentoo LVM2 installation at gentoo.org ]<br />
* [http://en.gentoo-wiki.com/wiki/LVM LVM at en.gentoo-wiki.com]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=User:Dcelasun&diff=118458User:Dcelasun2010-10-01T08:10:07Z<p>Dcelasun: </p>
<hr />
<div>Hello!<br />
<br />
I'm dcc24 from the forums. You can see my contributions [[Special:Contributions/Dcelasun|here]] (or see below) and contact me at dcelasun[at]gmail[dot]com<br />
<br />
= My contributions =<br />
<br />
==Written==<br />
*[[Asus EEE PC 1215n]]<br />
*[[Dell Inspiron 1564]]<br />
*[[Gmrun]]<br />
<br />
==Translated==<br />
*[[LVM_(Türkçe)]] (''ongoing'')<br />
<br />
==Contributed to==<br />
*[[VDR]]<br />
*[[ATI]]<br />
*[[Openbox]]<br />
*[[Matlab]]<br />
*[[Pidgin]]<br />
*[[Arch Compared to Other Distributions]]<br />
*[[Lenovo ThinkPad SL510]]<br />
*[[Arch Build System]]<br />
*[[Xfce]]<br />
*[[Hwdetect]]<br />
*[[Music Player Daemon]]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=User:Dcelasun&diff=118457User:Dcelasun2010-10-01T08:04:02Z<p>Dcelasun: </p>
<hr />
<div>Hello!<br />
<br />
I'm dcc24 from the forums. You can see my contributions [[Special:Contributions/Dcelasun|here]] and contact me at dcelasun[at]gmail[dot]com<br />
<br />
= My contributions =</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=LVM&diff=118455LVM2010-10-01T07:56:15Z<p>Dcelasun: /* More Resources */ Removed dead link</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:File systems (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|LVM}}<br />
<br />
=Introduction=<br />
<br />
LVM is a Logical Volume Manager for the Linux kernel. With LVM you can abstract your storage space and have "virtual partitions" which are easier to modify. The basic building blocks of LVM are:<br />
<br />
* '''Physical volume (PV)''': Partition on hard disk (or even hard disk itself or loopback file) on which you can have volume groups. It has a special header and is divided into physical extents. Think of physical volumes as big building blocks which can be used to build your hard drive.<br />
* '''Volume group (VG)''': Group of physical volumes that are used as storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.<br />
* '''Logical volume (LV)''': A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.<br />
* '''Physical extent (PE)''': A small part of a disk (usually 4MB) that can be assigned to a logical Volume. Think of physical extents as parts of disks that can be allocated to any partition.<br />
<br />
With LVM you can more easily handle your partitions (logical volumes) than normal hard drive partitions. For example, you can:<br />
<br />
* Use ''any number'' of disks as one big disk(VG)<br />
* Have partitions(LV) stretched ''over'' several disks (they can be as big as all of your disk storage together)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''as you like'' (it doesn't depend on position of the logical volumes within volume groups as with normal partitions)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''online'' (filesystems on them still need to be resized, but some support online resizing)<br />
* ''Name'' your disks(VG) and partitions(LV) as you like<br />
* Create small partitions(LV) and resize them "''dynamically''" as they get more filled (growing must be still done by hand, but you can do it online with some filesystems)<br />
* ...<br />
<br />
Example: <br />
'''Physical disks'''<br />
<br />
Disk1 (/dev/sda):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 50GB (Physical volume) |Partition2 80GB (Physical volume) |<br />
|/dev/sda1 |/dev/sda2 |<br />
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
Disk2 (/dev/sdb):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 120GB (Physical volume) |<br />
|/dev/sdb1 |<br />
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _|<br />
<br />
'''LVM logical volumes'''<br />
<br />
Volume Group1 (/dev/MyStorage/ = /dev/sda1 + /dev/sda2 + /dev/sdb1):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br />
|Logical volume1 15GB |Logical volume2 35GB |Logical volume3 200GB |<br />
|/dev/MyStorage/rootvol|/dev/MyStorage/homevol |/dev/MyStorage/mediavol |<br />
|_ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
To sum it all up: With LVM you can use all your storage space as one big disk (volume group) and have more flexibility over your partitions (logical volumes).<br />
<br />
=Installation=<br />
<br />
Before doing anything we need to load the appropriate module:<br />
# modprobe dm-mod<br />
If you already have Arch Linux installed and you just want to add/try a partition with LVM, jump to [[Lvm#Partition_disks|partition disks]].<br />
<br />
====Installing Arch Linux on LVM====<br />
Prior to running Arch Linux install scripts (/arch/setup) to install Arch Linux, you need to partition your disk with {{Codeline|cfdisk}} (or any other tool of your liking). Because grub legacy (grub with version less than 1.0) can't boot from LVM logical volumes you can't have {{Filename|/boot}} in LVM, so you need to create a boot partition. 100MB should be enough. The other solution would be to use lilo or grub with version 1.95 or newer.<br />
<br />
====Partition disks====<br />
Next you need to create a partition for LVM. Its filesystem type should be 'Linux LVM', so use a partition id 0x8e (filesystem type: 8e). You need to create only one LVM partition on each disk you want to use with LVM. Your logical volumes will reside inside these partitions so size them accordingly. If you will use only LVM and no other external partitions, use all the free space on each disk.<br />
<br />
{{Warning|/boot can't reside in an LVM partition because grub (version<1.95) does not support LVM.}}<br />
<br />
{{Tip|All LVM partitions on all disks can be configured to appear as one big disk.}}<br />
<br />
====Create Physical volumes====<br />
<br />
Now you need to initialize these partitions so they can be used by LVM. Use {{Codeline|fdisk -l}} to find out which partitions have filesystem type 'Linux LVM' and create a physical volume on them:<br />
# pvcreate /dev/sda2<br />
Substitute {{Filename|/dev/sda2}} with all your partitions to create physical volumes on all of them. This command creates a header on each partition so it can be used for LVM.<br />
You can track created physical volumes with:<br />
# pvdisplay<br />
<br />
====Create Volume group(s)====<br />
Next step is to create a volume group on this physical volume. First you need to create a volume group on one of the new partitions and then add to it all other physical volumes you want to have in it:<br />
# vgcreate VolGroup00 /dev/sda2<br />
# vgextend VolGroup00 /dev/sdb1<br />
Also you can use any other name you like instead of VolGroup00 for a volume group when creating it. You can track how your volume group grows with:<br />
# vgdisplay<br />
<br />
{{Note|You can create more than one volume group if you need to, but then you won't have all your storage presented as one disk.}}<br />
<br />
====Create Logical Volumes====<br />
Now we need to create logical volumes on this volume group. You create a logical volume with the next command by giving the name of a new logical volume, its size, and the volume group it will live on:<br />
# lvcreate -L 10G VolGroup00 -n lvolhome<br />
This will create a logical volume that you can access later with {{Filename|/dev/mapper/Volgroup00-lvolhome}} or {{Filename|/dev/VolGroup00/lvolhome}}. Same as with the volume groups, you can use any name you want for your logical volume when creating it.<br />
<br />
To create swap on a logical volume, an additional argument is needed:<br />
# lvcreate -C y -L 10G VolGroup00 -n lvolswap<br />
The {{Codeline|-C y}} is used to create a contiguous partition, which means that your swap space doesn't get partitioned over one or more disks nor over non-contiguous physical extents.<br />
<br />
If you want to fill all the free space left on a volume group, use the next command:<br />
# lvcreate -l +100%FREE VolGroup00 -n lvolmedia<br />
<br />
You can track created logical volumes with:<br />
# lvdisplay<br />
<br />
{{Note|You may need to load the ''device-mapper'' kernel module ('''modprobe dm-mod''') for the above commands to succeed:}}<br />
<br />
{{Tip|You can start out with relatively small logical volumes and expand them later if needed. For simplicity, leave some free space in the volume group so there is room for expansion.}}<br />
<br />
====Create filesystem and mount logical volumes====<br />
Your logical volumes should now be located in {{Filename|/dev/mapper/}} and {{Filename|/dev/YourVolumeGroupName}}. If you can't find them, use the next commands to bring up the module for creating device nodes and to make volume groups available:<br />
# modprobe dm-mod<br />
# vgchange -ay<br />
Now you can create filesystems on logical volumes and mount them as normal partitions (if you are installing Arch linux, skip this step. Use the arch installer to pick the LVM partitions that you have created):<br />
# mkfs.ext3 /dev/mapper/VolGroup00-lvolhome<br />
# mount /dev/mapper/VolGroup00-lvolhome /home<br />
If you are installing Arch linux, start /arch/setup, go to ''Prepare Hard Drive'' directly to step 3 ''Set Filesystem Mountpoints'' and '''''read the [[Lvm#Important|Important]] section below before proceeding with installation!'''''<br />
<br />
===Important===<br />
There are just a few things you need to be careful with while using/installing Arch Linux with LVM (in brackets are the corresponding menus during installation):<br />
# When choosing mountpoints, just select your newly created logical volumes (use: {{Filename|/dev/mapper/Volgroup00-lvolhome}}).<br>Do NOT select the actual partitions on which logical volumes were created (don't use: {{Filename|/dev/sda2}}). (''Set Filesystem Mountpoints'')<br />
# Make sure you change ''USELVM="no"'' to ''USELVM="yes"'' in {{Filename|/etc/rc.conf}} (''Configure System'')<br />
# Make sure that ''lvm2'' is in the HOOKS section of {{Filename|/etc/mkinitcpio.conf}} just before the ''filesystems'' so that your kernel will find LVM volumes at boot time. Also, if you wish to use LVM snapshots, add ''dm-snapshot'' to the MODULES variable. (''Configure System'')<br />
# Make sure {{Filename|/boot/grub/menu.lst}} uses the right volumes for root. It should look something like this: (''Install Bootloader'')<br />
...<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 '''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro<br />
initrd /kernel26.img<br />
...<br />
If you are using LILO check {{Filename|/etc/lilo.conf}}:<br />
image=/boot/vmlinuz26<br />
label=arch<br />
append="'''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro"<br />
initrd=/boot/kernel26.img<br />
<br />
= Configuration =<br />
<br />
== Grow logical volume ==<br />
To grow a logical volume you first need to grow the logical volume and then the filesystem to use the newly created free space. Let's say we have a logical volume of 15GB with ext3 on it and we want to grow it to 20G. We need to do the following steps: <br />
# lvextend -L 20G VolGroup00/lvolhome (or lvresize -L +5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
You may use {{Codeline|lvresize}} instead of {{Codeline|lvextend}}.<br />
<br />
If you want to fill all the free space on a volume group, use the next command:<br />
# lvextend -l +100%FREE VolGroup00/lvolhome<br />
<br />
{{Warning|Not all filesystems support growing without loss of data and/or growing online.}}<br />
<br />
{{Note|If you don't resize your filesystem, you will still have a volume with the same size as before (volume will be bigger but partly unused).}}<br />
<br />
== Shrink logical volume ==<br />
Because your filesystem is probably as big as the logical volume it resides on, you need to shrink the filesystem first and then shrink the logical volume. Depending on your filesystem, you may need to unmount it first. Let's say we have a logical volume of 15GB with ext3 on it and we want to shrink it to 10G. We need to do the following steps: <br />
# resize2fs /dev/VolGroup00/lvolhome 9G<br />
# lvreduce -L 10G VolGroup00/lvolhome (or lvresize -L -5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
Here we shrunk the filesystem more than needed so that when we shrunk the logical volume we didn't accidentally cut off the end of the filesystem. After that we normally grow the filesystem to fill all free space left on logical volume. You may use {{Codeline|lvresize}} instead of {{Codeline|lvreduce}}.<br />
<br />
{{Warning|Don't reduce the filesystem size to less than the amount of space occupied by data or you risk data loss.}}<br />
<br />
{{Warning|Not all filesystems support shrinking without loss of data and/or shrinking online.}}<br />
<br />
{{Note|It is better to reduce the filesystem to a smaller size than the logical volume, so that after resizing the logical volume, we don't accidentally cut off some data from the end of the filesystem.}}<br />
<br />
== Add partition to a volume group ==<br />
To add a partition to your volume group you must first make its type 'Linux LVM' (for example with {{Codeline|cfdisk}}). Then you need to create a physical volume on it and extend the volume group over it:<br />
# pvcreate /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdb1<br />
Now you have free space in your volume group that can be used by logical volumes in this group.<br />
<br />
{{Tip|You can add partitions from any disks to volume groups.}}<br />
<br />
== Remove partition from a volume group ==<br />
All of the data on that partition needs to be moved to another partition. Fortunately, LVM makes this easy:<br />
# pvmove /dev/mapper/myvg-mypv<br />
If you want to have the data on a specific physical volume, specify that as the second argument to {{Codeline|pvmove}}.<br />
<br />
Then the physical volume needs to be removed from the volume group:<br />
# vgreduce myVg /dev/mapper/myvg-mypv<br />
Or remove all empty physical volumes:<br />
# vgreduce --all vg0<br />
<br />
And lastly, if you want to use the partition for something else, and want to avoid LVM thinking that the partition is a physical volume:<br />
# pvremove /dev/mapper/myvg-removedpv<br />
<br />
== Snapshots ==<br />
====Introduction====<br />
LVM allows you to take a snapshot of your system in a much more efficient way than a traditional backup. It does this efficiently by using a COW (copy-on-write) policy. The initial snapshot you take simply contains hard-links to the inodes of your actual data. So long as your data remains unchanged, the snapshot merely contains its inode pointers and not the data itself. Whenever you modify a file or directory that the snapshot points to, LVM automatically clones the data, the old copy referenced by the snapshot, and the new copy referenced by your active system. Thus, you can snapshot a system with 35GB of data using just 2GB of free space so long as you modify less than 2GB (on both the original and snapshot).<br />
<br />
====Configuration====<br />
You create snapshot logical volumes just like normal ones.<br />
<br />
# lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv<br />
With that volume, you may modify less than 100M of data, before the snapshot volume fills up.<br />
<br />
It is important to have the ''dm-snapshot'' module listed in the MODULES variable of {{Filename|/etc/mkinitcpio.conf}}, otherwise the system will not boot. If you do this on an already installed system, make sure to rebuild the image with<br />
# mkinitcpio -g /boot/kernel26.img<br />
<br />
Todo: scripts to automate snapshots of root before updates, to rollback... updating {{Filename|menu.lst}} to boot snapshots (separate article?)<br />
<br />
snapshots are primarily used to provide a frozen copy of a filesystem to make backups; a backup taking two hours provides a more consistent image of the filesystem than directly backing up the partition.<br />
<br />
= Troubleshooting =<br />
====LVM commands don't work====<br />
*Load proper module:<br />
# modprobe dm-mod<br />
*Try preceding commands with ''lvm'' like this:<br />
# lvm pvdisplay<br />
<br />
==== Set Filesystem Mountpoints page doesn't show logical volumes ====<br />
If you are installing on a system where there is an existing volume group, you may find that even after doing "modprobe dm-mod" you don't see the list of logical volumes.<br />
<br />
In this case, you may also need to do:<br />
# vgchange -ay <volgroup><br />
<br />
in order to activate the volume group and make the logical volumes available.<br />
<br />
= Tips & Tricks =<br />
Todo<br />
<br />
= More Resources =<br />
Other LVM articles on the Archwiki:<br />
* [[Installing_with_Software_RAID_or_LVM|Installing with software RAID or LVM]]<br />
* [[RAID_Encryption_LVM|RAID encryption LVM]]<br />
External resources:<br />
* [http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) LVM on wikipedia]<br />
* [http://tldp.org/HOWTO/LVM-HOWTO/ LVM HOWTO on tldp.org ]<br />
* [http://www.gentoo.org/doc/en/lvm2.xml Gentoo LVM2 installation at gentoo.org ]<br />
* [http://en.gentoo-wiki.com/wiki/LVM LVM at en.gentoo-wiki.com]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1215N&diff=118286ASUS Eee PC 1215N2010-09-27T13:43:21Z<p>Dcelasun: /* Relevant links */</p>
<hr />
<div>This page includes general information regarding Asus EEE PC 1215n and related notes on installing/using Arch Linux on it.<br />
<br />
=System Specs=<br />
'''CPU:''' Intel Atom D525 1.83GHz 667 MHz CPU, 1MB L2 Cache<br />
<br />
'''RAM:''' 2GB 1066MHz DDR3<br />
<br />
'''HDD:''' 250GB 5400RPM<br />
<br />
'''GPU:''' nVidia ION2 with Optimus (see below)<br />
<br />
'''Display:''' 12.1" 1366x768 LED display<br />
<br />
'''Wireless:''' TODO<br />
<br />
'''Bluetooth:''' TODO<br />
<br />
'''Webcam:''' TODO<br />
<br />
'''Card Reader:''' TODO<br />
<br />
= nVidia ION 2 with Optimus =<br />
<br />
nVidia Optimus is basically a software configuration that utilizes an Intel IGP + an nVidia GPU that writes to the Intel IGP's framebuffer. This is all done on the software side. The nVidia GPU is not wired to the outputs (VGA, HDMI etc.) At the time of this writing (September 27, 2010) Optimus on Linux sucks (i.e. doesn't work at all). You can still use the Intel IGP, but there is no way to access the discrete GPU. '''DO NOT''' try to install the nVidia binary driver, you have been warned.<br />
<br />
Things are not that bad however. There is a kernel module called "acpi_call" which enables you to power off the nVidia GPU, hence you can significantly improve battery life.<br />
<br />
David Airlie seems to be working on PRIME support (google it) but there is nothing that works for now.<br />
<br />
== Relevant links ==<br />
http://airlied.livejournal.com/71734.html<br />
<br />
https://launchpad.net/~hybrid-graphics-linux<br />
<br />
http://linux-hybrid-graphics.blogspot.com/2010/02/howto-install-vgaswitcheroo-for-linux.html</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1215N&diff=118285ASUS Eee PC 1215N2010-09-27T13:42:16Z<p>Dcelasun: Adding nVidia ION 2 w/ Optimus</p>
<hr />
<div>This page includes general information regarding Asus EEE PC 1215n and related notes on installing/using Arch Linux on it.<br />
<br />
=System Specs=<br />
'''CPU:''' Intel Atom D525 1.83GHz 667 MHz CPU, 1MB L2 Cache<br />
<br />
'''RAM:''' 2GB 1066MHz DDR3<br />
<br />
'''HDD:''' 250GB 5400RPM<br />
<br />
'''GPU:''' nVidia ION2 with Optimus (see below)<br />
<br />
'''Display:''' 12.1" 1366x768 LED display<br />
<br />
'''Wireless:''' TODO<br />
<br />
'''Bluetooth:''' TODO<br />
<br />
'''Webcam:''' TODO<br />
<br />
'''Card Reader:''' TODO<br />
<br />
= nVidia ION 2 with Optimus =<br />
<br />
nVidia Optimus is basically a software configuration that utilizes an Intel IGP + an nVidia GPU that writes to the Intel IGP's framebuffer. This is all done on the software side. The nVidia GPU is not wired to the outputs (VGA, HDMI etc.) At the time of this writing (September 27, 2010) Optimus on Linux sucks (i.e. doesn't work at all). You can still use the Intel IGP, but there is no way to access the discrete GPU. '''DO NOT''' try to install the nVidia binary driver, you have been warned.<br />
<br />
Things are not that bad however. There is a kernel module called "acpi_call" which enables you to power off the nVidia GPU, hence you can significantly improve battery life.<br />
<br />
David Airlie seems to be working on PRIME support (google it) but there is nothing that works for now.<br />
<br />
== Relevant links ==<br />
:http://airlied.livejournal.com/71734.html<br />
:https://launchpad.net/~hybrid-graphics-linux<br />
:http://linux-hybrid-graphics.blogspot.com/2010/02/howto-install-vgaswitcheroo-for-linux.html</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC&diff=118284ASUS Eee PC2010-09-27T13:34:47Z<p>Dcelasun: Added 1215n</p>
<hr />
<div>[[Category:ASUS (English)]]<br />
This should be the page to gather all information on installing and running arch on the Asus Eee. <br />
Why? Because the 'old' page is a bit confusing/outdated, wrongly named (makes finding it in a search hard) and the title limits it to just the install precedure.<br />
<br />
The 'old' page should be cleaned up and merged into this page, and any future information should also go on this page. If no one that actualy owns an Eee want to do it, then I (Mr.Elendig) can do it, but it will take some time.<br />
<br />
Until this page actualy get some contents, go to [[Installing Arch Linux on the Asus EEE PC]].<br />
<br />
= Eee 700 Series and 900=<br />
This should be filled with the majority of the content from [[Installing Arch Linux on the Asus EEE PC]].<br />
<br />
=== Installation ===<br />
Installation can be achieved from an external cdrom drive, or from a usb stick configured as described in [[Install from USB stick]]<br />
<br />
The wireless module (ath5k) is now part of the stock kernel. The stock kernel performs very well on the eeepc. You do not need to install any extra packages from AUR for wireless or install any special kernel.<br />
<br />
During installation make sure you add the following packages in addition to the base packages for wireless to work.<br />
<br />
wireless_tools<br />
netcfg<br />
<br />
Thats all you now need for a working eee.<br />
<br />
=== If you do want an optimized Pentium-M kernel ===<br />
toofishes created a repository for the Eee. You can find some basic packages like a Pentium-M optimized kernel. Add<br />
[eee]<br />
Server = http://code.toofishes.net/packages/eee<br />
to your {{Filename|/etc/pacman.conf}} to use the repository.<br />
<br />
Simply use pacman to install the package you need. Install the packages with this command:<br />
# pacman -S kernel-eee<br />
<br />
Then, add the following to {{Filename|/boot/grub/menu.lst}}; note that no initrd is needed:<br />
# (2) Arch Linux<br />
title Arch Linux EEE kernel<br />
root (hd0,0)<br />
kernel /boot/vmlinuzeee root=/dev/sda1 ro<br />
<br />
Restart and select Arch Linux EEE kernel from the grub boot menu.<br />
<br />
===Xorg===<br />
Xorg works without an xorg.conf on the eeepc fine with the new hotplugging system.<br />
<br />
# pacman -S xorg xf86-input-keyboard xf86-input-synaptics xf86-video-intel<br />
<br />
start hal<br />
<br />
# /etc/rc.d/hal start<br />
<br />
and add hal to the daemons line of your /etc/rc.conf file<br />
<br />
===Sound===<br />
If sound does not work in a new installation add the following line to {{Filename|/etc/modprobe.conf}}<br />
options snd-hda-intel model=3stack-dig<br />
<br />
= Eee 900A =<br />
<br />
The 900A is a 900 with a Intel Atom CPU and new hardware (the most is like in 901), you can get help in [[Asus Eee PC 900A]].<br />
<br />
= Eee 901, 904, and 1000(H) =<br />
The 901, 904, and 1000(H) all seem to share much-of, if not all the same hardware. The steps for setting up Arch Linux are as follows.<br />
NB. There is a separate wiki page as well dedicated to the [[Asus_Eee_PC_901|901]].<br />
<br />
== Setting up the Network ==<br />
Two PKGBUILD files are available in the AUR to help you get your network interfaces up and running. The first is delcake's "atl1e" drivers for your wired ethernet, and the second is jbooth's "eeert2860" drivers for wireless.<br />
<br />
=== atl1e ===<br />
delcake's PKGBUILD is located [http://aur.archlinux.org/packages.php?ID=18663 here] in the AUR.<br />
Note that in order to build this package, you will need to get the unrar and unzip packages from the mirror of you choice, as well as the LinuxDrivers.zip source code linked on the AUR page unless you did your wireless drivers first.<br />
<br />
#Transfer the PKGBUILD to your Eee PC. Get the source files too if you don't have internet yet.<br />
#Install the unrar and unzip packages if you don't already have them.<br />
#Issue a 'makepkg' command at the location of the PKGBUILD.<br />
<br />
If all goes well, a .pkg.tar.gz file that starts with the name atl1e will have been created in the same folder.<br />
<br />
As root, run 'pacman -U <package name>.pkg.tar.gz' to install your newly created module.<br />
In order to detect it, run both 'depmod -a' and 'modprobe atl1e' as root in that order.<br />
<br />
At this point, you should be able to issue an 'ifconfig -a' command and see your brand new eth0 device staring back at you. Don't forget to add atl1e to your modules list in /etc/rc.conf to automatically load your ethernet module during boot.<br />
<br />
* '''WARNING:''' You will need to recompile this module any time you do a kernel upgrade, so hang on to that PKGBUILD and zip file.<br />
<br />
=== eeert2860 ===<br />
jbooth's PKGBUILD is located [http://aur.archlinux.org/packages.php?ID=18705 here] in the AUR.<br />
Note that in order to build this package, you will need to get the wireless_tools package from the mirror of your choice, as well as Ralink's drivers listed under the sources section unless you did your wired drivers first.<br />
<br />
#Transfer the PKGBUILD to your Eee PC. Get the source files too if you don't have internet yet.<br />
#Install the wireless_tools package if you don't already have it.<br />
#Issue a 'makepkg' command at the location of the PKGBUILD.<br />
<br />
Hopefully, the makepkg command went through without a hitch, and a .pkg.tar.gz file will have been created in the same folder.<br />
<br />
As root, run 'pacman -U <package name>.pkg.tar.gz' to install your newly created module.<br />
In order to detect it, run both 'depmod -a' and 'modprobe rt2860sta' as root in that order.<br />
<br />
Now you should see your ra0 wireless device in the output of 'ifconfig -a'. As root, run 'ifconfig ra0 up' to bring up the interface for configuration.<br />
<br />
*'''Still no ra0 device?''' Make sure that the WLAN device is enabled in your BIOS.<br />
<br />
* '''WARNING:''' You will need to recompile this module any time you do a kernel upgrade, so hang on to the PKGBUILD and .tar.bz2 file.<br />
<br />
==Eee 901 20G lsmod and lspci==<br />
'''<br />
Note :''' This section was moved from the 70x/900 page.<br />
<br />
The following are from a stock ASUS EeePC 901 20G Linux version:<br />
<br />
lsmod:<br />
<pre><br />
Module Size Used by<br />
acpi_cpufreq 5004 0 <br />
freq_table 1988 1 acpi_cpufreq<br />
usb_storage 22980 0 <br />
libusual 6352 1 usb_storage<br />
pciehp 31172 0 <br />
pci_hotplug 9672 1 pciehp<br />
ehci_hcd 25420 0 <br />
uhci_hcd 18636 0 <br />
usbhid 13444 0 <br />
usbcore 91992 6 usb_storage,libusual,ehci_hcd,uhci_hcd,usbhid<br />
snd_pcm_oss 33568 0 <br />
snd_mixer_oss 13056 1 snd_pcm_oss<br />
rt2860sta 468248 1 <br />
atl1e 26388 0 <br />
fuse 34516 0 <br />
asus_acpi 6560 0 <br />
button 5648 0 <br />
processor 19820 1 acpi_cpufreq<br />
battery 7940 0 <br />
ac 3524 0 <br />
autofs4 15876 0 <br />
sr_mod 13284 0 <br />
cdrom 30624 1 sr_mod<br />
snd_hda_intel 284112 0 <br />
snd_pcm 50696 2 snd_pcm_oss,snd_hda_intel<br />
snd_timer 15556 1 snd_pcm<br />
snd_page_alloc 6728 2 snd_hda_intel,snd_pcm<br />
snd_hwdep 6084 1 snd_hda_intel<br />
snd 34852 6 snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_pcm,snd_timer,snd_hwdep<br />
soundcore 3744 1 snd<br />
genrtc 6028 0<br />
</pre><br />
<br />
lspci:<br />
<pre><br />
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)<br />
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)<br />
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)<br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)<br />
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Network controller: RaLink RT2790 Wireless 802.11n PCIe<br />
03:00.0 Ethernet controller: Atheros Corp. L1e Gigabit Ethernet Adapter (rev b0)<br />
</pre><br />
<br />
= Eee 904HA =<br />
[[Asus Eee PC 904HA]]<br />
<br />
= Eee T91MT =<br />
[[Asus Eee PC T91MT]]<br />
<br />
= Eee T101MT =<br />
[[Asus Eee PC T101MT]]<br />
<br />
= Eee 1000HA =<br />
[[Asus Eee PC 1000HA]]<br />
<br />
= Eee 1000HE =<br />
[[Asus Eee PC 1000HE]]<br />
<br />
= Eee 1001P =<br />
[[Asus Eee PC 1001p]]<br />
<br />
= Eee 1005HA =<br />
[[Asus Eee PC 1005HA]]<br />
<br />
= Eee 1005P(E) =<br />
[[Asus Eee PC 1005P]]<br />
<br />
= Eee 1201T =<br />
[[Asus Eee PC 1201T]]<br />
<br />
= Eee 1201NL =<br />
[[Asus Eee PC 1201NL]]<br />
<br />
= Eee 1215n =<br />
[[Asus EEE PC 1215n]]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1215N&diff=118283ASUS Eee PC 1215N2010-09-27T13:33:05Z<p>Dcelasun: </p>
<hr />
<div>This page includes general information regarding Asus EEE PC 1215n and related notes on installing/using Arch Linux on it.<br />
<br />
=System Specs=<br />
'''CPU:''' Intel Atom D525 1.83GHz 667 MHz CPU, 1MB L2 Cache<br />
<br />
'''RAM:''' 2GB 1066MHz DDR3<br />
<br />
'''HDD:''' 250GB 5400RPM<br />
<br />
'''GPU:''' nVidia ION2 with Optimus (meaning Intel IGP + an nVidia GPU that writes to the Intel IGP's framebuffer)<br />
<br />
'''Display:''' 12.1" 1366x768 LED display<br />
<br />
'''Wireless:''' TODO<br />
<br />
'''Bluetooth:''' TODO<br />
<br />
'''Webcam:''' TODO<br />
<br />
'''Card Reader:''' TODO</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1215N&diff=118282ASUS Eee PC 1215N2010-09-27T13:31:33Z<p>Dcelasun: Wikification</p>
<hr />
<div>This page includes general information regarding Asus EEE PC 1215n and related notes on installing/using Arch Linux on it.<br />
<br />
=Specs=<br />
'''CPU:''' Intel Atom D525 1.83GHz 667 MHz CPU, 1MB L2 Cache<br />
'''RAM:''' 2GB 1066MHz DDR3<br />
'''HDD:''' 250GB 5400RPM<br />
'''GPU:''' nVidia ION2 with Optimus (meaning Intel IGP + an nVidia GPU that writes to the Intel IGP's framebuffer)<br />
'''Display:''' 12.1" 1366x768 LED display<br />
'''Wireless:''' TODO<br />
'''Bluetooth:''' TODO<br />
'''Webcam:''' TODO<br />
'''Card Reader:''' TODO</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1215N&diff=118281ASUS Eee PC 1215N2010-09-27T13:30:13Z<p>Dcelasun: Initial version. I'll be filling this in in the upcoming days.</p>
<hr />
<div>This page includes general information regarding Asus EEE PC 1215n and related notes on installing/using Arch Linux on it.<br />
<br />
=Specs=<br />
*CPU:* Intel Atom D525 1.83GHz 667 MHz CPU, 1MB L2 Cache<br />
*RAM:* 2GB 1066MHz DDR3<br />
*HDD:* 250GB 5400RPM<br />
*GPU:* nVidia ION2 with Optimus (meaning Intel IGP + an nVidia GPU that writes to the Intel IGP's framebuffer)<br />
*Display:* 12.1" 1366x768 LED display<br />
*Wireless:* TODO<br />
*Bluetooth:* TODO<br />
*Webcam:* TODO<br />
*Card Reader:* TODO</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=VDR&diff=117322VDR2010-09-14T09:44:10Z<p>Dcelasun: /* LIRC */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see [[Lirc]]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from ArchVDR and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Extending VDR=<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xineliboutput - Full-Featured and Budget Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: vdr-plugin-xineliboutput.<br />
<br />
On the remote computer the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR], have to be installed.<br />
<br />
Adjust the file ~/.xine/keymap as described [[ Xineliboutput - Full-Featured and Budget Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>:37890#nocache" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback. <br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
Two concepts will be provided, since using the same techniques, the quality of the resulting stream should be similar.<br />
<br />
====Plugin StreamDev====<br />
An easy approach and also the recommended one is to set up the plugin Streamdev from ArchVDR. <br />
<br />
=====Server=====<br />
The plugin's config file (/etc/vdr/plugins/plugin.streamdev-server.conf) has to have a reference to the file externremux.sh.<br />
<br />
<pre><br />
-r /usr/bin/externremux.sh<br />
</pre><br />
<br />
That is the content of the file /usr/bin/externremux.sh, adjust it to your liking:<br />
<pre><br />
# externremux.sh<br />
<br />
# CONFIG START<br />
TMP=/tmp/externremux-${RANDOM:-$$}<br />
STREAMQUALITY="150"<br />
# CONFIG END<br />
<br />
mkdir -p $TMP<br />
mkfifo $TMP/out.avi<br />
(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &<br />
<br />
case ${1:-$STREAMQUALITY} in<br />
"100") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=100:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"150") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"200") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 360 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"250") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 400 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"300") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=300:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"350") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=350:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"400") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"450") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=450:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"500") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=500:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"750") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=750:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"1000") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=1000:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
<br />
*) touch $TMP/out.avi ;;<br />
esac<br />
</pre><br />
<br />
<br />
=====Client=====<br />
On the client side only VLC has to be installed, you can start the streaming process with<br />
<pre><br />
vlc "http://<VDR's public IP>:3000/extern;250/19"<br />
</pre><br />
<br />
In this example, channel 19 is being streamed with the "250" option resulting in 250 Kbit Video and 48 Kbit Audio streaming. Make sure to forward port 3000 to the computer running VDR.<br />
<br />
<br />
====VLC====<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
=====Server=====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
======Full-Featured Cards Only======<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
======Full-Featured and Budget Cards======<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
=====Client=====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<VDR's public IP>:1234<br />
</pre><br />
<br />
Make sure to forward port 1234 to the computer running VDR.<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ATI&diff=116924ATI2010-09-13T15:49:08Z<p>Dcelasun: /* With KMS enabled */ typos, grammar etc.</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{i18n|ATI}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of open source ATI/AMD video card drivers.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI Catalyst}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary end}}<br />
<br />
Owners of '''ATI''' video cards have a choice between ATI's proprietary driver ({{Package AUR|catalyst}}) and open source alternatives ({{Package Official|xf86-video-ati}} or {{Package Official|xf86-video-radeonhd}}).<br />
<br />
Currently, the performance of the open source drivers are not ''on par'' with the proprietary driver in terms of 3D performance and lack certain features, such as reliable TV-out support. They do, however, offer better dual-head support (<tt>xf86-video-ati</tt>), excellent 2D acceleration, and provide sufficient 3D acceleration for OpenGL-accelerated [[window manager]]s, such as [[Compiz]] or KWin. Currently, [http://www.archlinux.org/news/439/ the ATI Catalyst package is available in the AUR].<br />
<br />
If unsure, try the open source drivers first; they will suit most needs and are generally less problematic and flexible. (See the [http://www.x.org/wiki/RadeonFeature feature matrix] for details.) For an overview of ATI's proprietary "Catalyst" video card driver, see [[ATI Catalyst]]; this article covers the open source drivers.<br />
<br />
==Naming conventions==<br />
ATI's [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Comparison of AMD graphics processing units]].<br />
<br />
== Differences between open source drivers ==<br />
<br />
<div style="width: 50%; float: left"><br />
===<tt>xf86-video-ati</tt> (radeon)===<br />
*Works with Radeon chipsets up to HD 4xxx (latest R700 chipsets) as well as HD 5xxx (latest R800 chipsets). <br />
*Radeons up to the X1xxx series are fully supported, stable, and full 2D and 3D acceleration are provided. <br />
*Radeons from HD 2xxx to X4xxx have full 2D acceleration and functional 3D acceleration, but are not supported by all the features that the proprietary driver provides (for example, powersaving is still in a testing phase). <br />
*Supports DRI1, RandR 1.2/1.3, EXA acceleration and [[KMS|kernel mode-setting]]/DRI2 (with the latest Linux kernel, libdrm and Mesa versions).<br />
*All cards from HD 5xxx (R800) and newer are supported, but for now, with 2D support only.<br />
*'''HDMI''' support will soon be implemented in '''xf86-video-ati''' over AtomBIOS. It is already working for some chipsets (RV620 at least are working fine).<br />
</div><br />
<br />
<div style="width: 50%; float: right"><br />
===<tt>xf86-video-radeonhd</tt> (radeonhd)===<br />
*Driver for ATI R500 chipsets (Radeon X1000 series) and '''newer'''. <br />
*Written by Novell with specifications provided to the public by AMD. <br />
*Supports RandR 1.2 and is under heavy development. It does also support HDMI with sound (if your hardware is so equipped, except RV730 based chip sets).<br />
</div><br />
<br />
<div style="clear: both"></div> <!-- prevent overlapping paragraphs --><br />
<br />
Generally, '''xf86-video-ati''' seems to offer more consistent performance as compared to '''xf86-video-radeonhd''' and is more actively developed, so it should be your first choice, no matter which ATI card you own. xf86-video-radeonhd should be used as a "fallback" driver in case you encounter errors with xf86-video-ati and it '''should not be used''' as a primary driver - radeonhd's development has been unofficially halted. In case you need to use a driver for newer ATI cards, you should prefer the proprietary '''catalyst''' driver.<br />
<br />
{{Note|xf86-video-ati is recognized as "'''radeon'''" by Xorg (in xorg.conf) and xf86-video-radeonhd as "'''radeonhd'''". }}<br />
<br />
== Installation and configuration ==<br />
<br />
=== Installation ===<br />
{{Note| If you have previously installed the proprietary driver, make sure to remove <code>catalyst</code> and '''reboot'''.}}<br />
<br />
To install <code>xf86-video-ati</code> :<br />
pacman -S xf86-video-ati<br />
<br />
To install <code>xf86-video-radeonhd</code> : <br />
pacman -S xf86-video-radeonhd libgl ati-dri<br />
<br />
{{Note|All cards from HD3xxx (R600) and newer need to install additional firmware files.}}<br />
To install <code>linux-firmware</code> :<br />
pacman -S linux-firmware <br />
{{Note|The GIT versions of these drivers can be found on [[AUR]].}}<br />
<br />
=== Configuration ===<br />
You now have the choice between creating an xorg.conf, or attempting to use the recently enabled '''Xorg''' autodetection. <br />
<br />
==== Running Xorg without xorg.conf ====<br />
In most cases, Xorg can '''autodetect''' your hardware settings. The Xorg.conf configuration file in /etc/X11 is optional since Xorg-server 1.5.x.<br />
<br />
Always make sure you have '''mesa''', the group '''xorg''' and the group '''xorg-input-drivers''' installed:<br />
pacman -S xorg-input-drivers mesa xorg<br />
<br />
{{Note| With KMS (Kernel Mode Setting) enabled, '''xorg.conf may not be needed at all.''' For more info on Radeon Kernel mode-setting, read [[#Kernel mode-setting (KMS)]].}}<br />
<br />
==== Running Xorg with expanded xorg.conf ====<br />
{{Note| '''/etc/X11/xorg.conf''' no longer requires sections for all input devices because Udev can configure some/all via hotplugging. (Ensure '''xorg-input-drivers''' are installed.)}}<br />
<br />
In case you want manual configuration, edit your [[xorg.conf]], and add or make sure you have the following in their given sections:<br />
Section "Module"<br />
Load "glx"<br />
Load "dri"<br />
Load "drm"<br />
EndSection<br />
<br />
Device section for <code>xf86-video-ati</code> :<br />
Section "Device"<br />
Identifier "name" # your alias<br />
Driver "radeon"<br />
EndSection<br />
<br />
Device section for <code>xf86-video-radeonhd</code> :<br />
Section "Device"<br />
Identifier "name" # your alias<br />
Driver "radeonhd"<br />
Option "AccelMethod" "exa" # to enable 2D and Xv acceleration on R6xx/R7xx - default AccelMethod shadowfb<br />
Option "DRI" "on" # to enable 2D and Xv acceleration on R6xx/R7xx - default DRI disabled<br />
EndSection<br />
<br />
{{Note|Try below for smooth performance,over Option "DRI", for RS780M/MN [Radeon HD 3200] using the radeonhd driver(as of 3rd May 2009)}}<br />
<br />
This section (DRI) is not needed (thus deprecated), but use it if you encounter DRI related problems.<br />
Section "DRI"<br />
Group "video"<br />
Mode 0666<br />
EndSection<br />
<br />
Adding '''only''' the '''Device''' Section in the xorg.conf should fit most cases. Using that Section, you can enable features and tweak the driver's performance or behaviour.<br />
<br />
When using the opensource drivers, ensure <code>catalyst</code> is ''not'' installed -- '''ati-dri''' is being used instead. Otherwise, the wrong <code>libGL.so</code> will be installed, which will cause direct rendering to fail.<br />
<br />
== Kernel mode-setting (KMS) ==<br />
<br />
[[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 />
KMS for ATI video cards requires the [[Xorg]] free video user space driver {{Package Official|xf86-video-ati}} version 6.12.4 or later. <br />
<br />
=== Enabling experimental KMS ===<br />
<br />
Since kernel26 v.2.6.33, KMS is '''enabled''' by default for ATI cards. <br />
<br />
==== Early KMS start ====<br />
<br />
''This method will start KMS as early as possible in the [[boot process]] (when the [[initramfs]] is loaded).''<br />
<br />
# Remove all {{Codeline|<nowiki>vga=</nowiki>}} options from the ''kernel'' line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). Using other framebuffer drivers (such as <tt>[[uvesafb]]</tt> or <tt>radeonfb</tt>) will conflict with KMS. Remove any framebuffer related modules from {{Filename|/etc/mkinitcpio.conf}}. {{Codeline|<nowiki>video=</nowiki>}} can now be used in conjunction with KMS.<br />
# Add {{Codeline|radeon}} to MODULES array in {{Filename|/etc/mkinitcpio.conf}}. Depending on motherboard chipset, it may be necessary to add {{Codeline|intel_agp}} before the {{Codeline|radeon}} module. Previously, the {{Codeline|fbcon}} module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel.<br />
#* ''Following is probably not true since Linux 2.6.33, at least author didn't run into any problems:'' For newer ATI cards ('''R6xx''' and '''newer''') extra microcode is currently needed. Install <code>linux-firmware</code> and grab [http://aur.archlinux.org/packages.php?ID=31708 radeon-initrd] from AUR, '''build''' and '''install''' them and add {{Codeline|radeon}} to HOOKS array in {{Filename|/etc/mkinitcpio.conf}}.<br />
# Re-generate your initramfs: <pre># mkinitcpio -p kernel26</pre><br />
# Add {{Codeline|<nowiki>radeon.modeset=1</nowiki>}} to the kernel options in the bootloader configuration file to enable KMS.<br />
# '''Reboot''' the system.<br />
<br />
==== Late start ====<br />
<br />
''With this choice, KMS will be enabled when modules are loaded during the [[boot process]].''<br />
<br />
# Remove all {{Codeline|<nowiki>vga=</nowiki>}} options from the ''kernel'' line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). Using other framebuffer drivers (such as <tt>[[uvesafb]]</tt> or <tt>radeonfb</tt>) will conflict with KMS. Remove any framebuffer related modules from {{Filename|/etc/mkinitcpio.conf}}. {{Codeline|<nowiki>video=</nowiki>}} can now be used in conjunction with KMS.<br />
# Add {{Codeline|radeon}} to MODULES array in {{Filename|/etc/rc.conf}}. Depending on motherboard chipset, it may be necessary to add {{Codeline|intel_agp}} before the {{Codeline|radeon}} module. Previously, the {{Codeline|fbcon}} module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel.<br />
# '''Reboot''' the system.<br />
<br />
{{Tip|Some users have reported faster [[udev]] module loading by adding {{Codeline|<nowiki>options radeon modeset=1</nowiki>}} to {{Filename|/etc/modprobe.d/modprobe.conf}}.}}<br />
<br />
=== Troubleshooting KMS ===<br />
<br />
=== Generic problem solution ===<br />
<br />
If your card often crashes when loading the '''radeon''' module, starting your login manager, entering desktop or crashes when you start 3D apps like glxgears you can try if the kernel boot option "pci=nomsi" solves your problems. See https://bugzilla.kernel.org/show_bug.cgi?id=15626 for X200m cards.<br />
<br />
==== Disable KMS ====<br />
<br />
Users should consider disabling kernel mode-setting if encountering kernel panics, distorted framebuffer on boot, no GPU signal, [[Xorg]] refusing to start, Xorg falling back to Mesa software rasterizer (no 3D acceleration) or 'POWER OFF' problem (kernel 2.6.33-2)at shutdown.<br />
<br />
# Add {{Codeline|<nowiki>radeon.modeset=0</nowiki>}} (or {{Codeline|nomodeset}}, if this does not work) to the kernel options line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). That should work. If you want to remove KMS support from the initramfs, follow the next two steps.<br />
# If {{Codeline|radeon}} was added to the MODULES array in {{Filename|mkinitcpio.conf}} to enable ''early start'', remove it.<br />
# Rebuild the [[initramfs]] with <pre># mkinitcpio -p kernel26</pre><br />
<br />
{{Warning|Catalyst users will likely need to blacklist the {{Codeline|radeon}} module by adding {{Codeline|'''!'''radeon}} to the MODULES array in {{Filename|/etc/rc.conf}}.}}<br />
<br />
Alternatively, module options can be specified in a file within the {{Filename|/etc/modprobe.d}} directory. If using the '''radeon''' module ({{Codeline|<nowiki>lsmod | grep radeon</nowiki>}}) disable KMS by creating a file containing the above code:<br />
<br />
{{File|name=/etc/modprobe.d/radeon.conf|content=options radeon modeset=0}}<br />
<br />
==== Renaming {{Filename|xorg.conf}} ====<br />
<br />
Renaming {{Filename|/etc/X11/xorg.conf}}, which may include options that conflict with KMS, will force Xorg to autodetect hardware with sane defaults. After renaming, '''restart''' Xorg.<br />
<br />
== Performance tuning ==<br />
The following options apply to Section "'''Device'''" in /etc/X11/'''xorg.conf'''.<br />
<br />
=== Tuning performance with xf86-video-ati ===<br />
By design, xf86-video-ati runs at AGP 1x speed. It is generally safe to modify this. If you notice hangs, try reducing the value or removing the line entirely (you can use values 1, 2, 4, 8).<br />
Option "AGPMode" "4"<br />
<br />
'''ColorTiling''' is completely safe to enable and supposedly is enabled by default. People have noticed a performance increase when enabled via xorg.conf.<br />
Option "ColorTiling" "on"<br />
<br />
'''Acceleration architecture'''; this will work only on '''newer''' cards. If you enable this and then can't get back into X, remove it.<br />
Option "AccelMethod" "EXA"<br />
<br />
'''Page Flip''' is generally safe to enable. This would mostly be used on older cards, as enabling this would disable EXA. With recent drivers can be used together with EXA.<br />
Option "EnablePageFlip" "on" <br />
<br />
'''AGPFastWrite''' will enable fast writes for AGP cards. This one can be problematic, so be prepared to remove it if you can't get into X.<br />
Option "AGPFastWrite" "yes"<br />
<br />
'''EXAVSync ''' option attempts to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been know to cause instability on some chips.<br />
Really useful when enabling Xv overlay on videos on a 3D accelerated desktop. It is not necessary when KMS (thus DRI2 acceleration) is enabled.<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
See an example Device Section in xorg.conf:<br />
<pre><br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "DRI" "on" <br />
Option "DynamicPM" "on" # Dynamic powersaving.<br />
Option "ClockGating" "on" # Assisting option for powersaving.<br />
Option "AccelMethod" "EXA" # EXA should fit most cases.<br />
Option "EXAVSync" "on" # EXAVSync is explained above.<br />
Option "DMAForXv" "on" # Forced option in order to enable Xv overlay.<br />
Option "ScalerWidth" "2048" # That should fix some very rare bugs.<br />
Option "EnablePageFlip" "on" # It will not be enabled on R5xx cards.<br />
Option "RenderAccel" "on" # Optional. It should be enabled by default.<br />
Option "AccelDFS" "on" #Optional. See the man page.<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
</pre><br />
<br />
<br />
'''See the manpage for more configuration options.'''<br />
<code>man radeon</code><br />
<br />
A fine tool to try is [http://aur.archlinux.org/packages.php?do_Details=1&ID=2994 driconf]. It will allow you to modify several settings, like vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).<br />
<br />
== Powersaving ==<br />
<br />
The powersaving part is totally different with and without KMS.<br />
<br />
=== With KMS enabled ===<br />
<br />
With the radeon driver, power saving is disabled by default but the stock kernel (2.6.35 as of this writing) provides a sysfs option to enable it.<br />
<br />
Power saving through KMS is still a work in progress for the most part. It should work, but some chips do have problems with it. A common issue for all is screen blinking when the kernel switches between power states, and in some configurations it even causes system freezes. But KMS is awesome, so it's your choice. The UMS method is generally more stable, however its power savings might not be as good as those provided by KMS options.<br />
<br />
There are two ways to enable power management:<br />
<br />
1. Try adding radeon.dynpm=1 to the kernel parameters (if using the stock kernel < 2.6.35). If you are using kernel26>=2.6.35 this option is no longer needed and the sysfs interface will be present by default. If this option is passed to a kernel >= 2.6.35, the driver will fail and fall back to software rendering.<br />
<br />
2. Use the (unsupported) [radeon] repository:<br />
<br />
This repository gives you the git and more up-to-date version of the radeon driver and it's dependencies.<br />
<br />
[radeon]<br />
Server = http://gtklocker.tiven.org/radeon-repo/$arch/<br />
<br />
You can select the methods via sysfs. So, with root access, you have two choices:<br />
<br />
<code><br />
echo dynpm > /sys/class/drm/card0/device/power_method<br />
## dynamic clock switching based on GPU load<br />
</code><br />
<br />
<code><br />
echo profile > /sys/class/drm/card0/device/power_method<br />
## profile based frequency switching<br />
</code><br />
<br />
The "dynpm" method dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
<br />
The "profile" mode will allow you to select one of the five profiles below:<br />
<br />
* "default" uses the default clocks and does not change the power state. This is the default behavior.<br />
* "auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected when the monitors are in the dpms off state.<br />
* "low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto only uses "low" when displays are off.<br />
* "mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.<br />
* "high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state. <br />
<br />
So lets say we want the "low" option...for this, run this command:<br />
<br />
<code><br />
echo low > /sys/class/drm/card0/device/power_profile <br />
## forces GPU to lowest available frequency <br />
</code><br />
<br />
Replace "low" with any of the aforementioned profiles you wish.<br />
<br />
{{Note: These echo settings are not permanent, so when you find something that fits your needs, you will need to add it to /etc/rc.local, so it's executed at system startup.}}<br />
<br />
The "profile" method is not as aggressive as "dynpm," but is currently much more stable and flicker free and works with multiple heads active.<br />
<br />
Power management is supported on all asics (r1xx-evergreen) that include the appropriate power state tables in the vbios; not all boards do (especially older desktop cards).<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via lm_sensors tools or via sysfs in /sys/class/hwmon .<br />
<br />
To view the voltage that the GPU is running at, perform the following command and you will get something like it's output:<br />
<br />
<code><br />
~$ cat /sys/kernel/debug/dri/0/radeon_pm_info<br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</code><br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
=== Without KMS ===<br />
<br />
In your xorg.conf file, add 2 lines to "Device" Section:<br />
Option "DynamicPM" "on"<br />
Option "ClockGating" "on"<br />
<br />
If the two options are enabled successfully, you will see following lines in /var/log/Xorg.0.log:<br />
<br />
(**) RADEON(0): Option "ClockGating" "on"<br />
(**) RADEON(0): Option "DynamicPM" "on"<br />
<br />
Static power management enable success<br />
(II) RADEON(0): Dynamic Clock Gating Enabled<br />
(II) RADEON(0): Dynamic Power Management Enabled<br />
<br />
If you desire low power cost, you can add an extra line to "Device" Section of xorg.conf:<br />
Option "ForceLowPowerMode" "on"<br />
<br />
== TV out ==<br />
Since August 2007, there is TV-out support for all Radeons with integrated TV-out.<br />
<br />
It is somewhat limited for now, it doesn't always autodetect the output correctly and only NTSC mode works.<br />
<br />
First, check that you have an S-video output: <code>xrandr</code> should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set load_detection 1<br />
<br />
Setting tv standard to use:<br />
xrandr --output S-video --set tv_standard ntsc<br />
<br />
Adding a mode for it (currently it supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
I'll go for a clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
So far so good. Now let's try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
Also you may notice that the video is being played on monitor only and not on the TV. Where the Xv overlay is sent is controlled by XV_CRTC attribute.<br />
<br />
To send the output to the TV, I do<br />
xvattr -a XV_CRTC -v 1<br />
<br />
{{Note| you need to install '''xvattr''' from [[AUR]] to execute this command.}}<br />
<br />
To switch back to my monitor, I change this to <code>0</code>. <code>-1</code> is used for automatic switching in dualhead setups.<br />
<br />
Please see [http://www.x.org/wiki/radeonTV Enabling TV-Out Statically] for how to enable TV-out in your xorg config file.<br />
<br />
== HDMI with sound ==<br />
Given that your hardware supports it, and you have installed '''xf86-video-radeonhd''' (note: The driver '''xf86-video-ati''' will soon get HDMI support.) you can insert the following into xorg.conf to enable HDMI with sound:<br />
Section "Device"<br />
# ...<br />
Option "Audio" "on"<br />
Option "HDMI" "all"<br />
EndSection<br />
<br />
Restart X when you have done this, try to see if there is sound transmitted to TV via HDMI cable.<br />
# Connect your PC to the TV via HDMI cable (duh).<br />
# Use xrandr to get picture to the TV. Ex: <code>xrandr --output DVI-D_1 --mode 1280x768 --right-of PANEL</code>. Simply typing <code>xrandr</code> will give you a list of your valid outputs.<br />
# Run <code>aplay -l</code> to get the list of your sound devices. Find HDMI and note the card number and corresponding device number. Example of what you want to see: <code>card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]</code><br />
# Try sending sound to this device: <code>aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Center.wav</code>. Be sure to change plughw:z,y to match your hardware number found with last command. You should be able to hear the test sound from your TV.<br />
<br />
=== Using '''xf86-video-ati''' ===<br />
'''xf86-video-ati''' can enable HDMI output for some chipsets (RV620 for instance, and therefore probably R*600) . Using [[ATI#Kernel_mode-setting_.28KMS.29|KMS]], add radeon.audio=1 to your kernel line in /boot/grub/menu.lst. Then, use xrandr and aplay to get HDMI output, as explained above. <br />
<br />
=== Note on RV730 and RV710 ===<br />
<br />
'''xf86-video-radeonhd''' does not support yet audio through HDMI for these chipsets, but work is in progress.<br />
<br />
== Troubleshooting ==<br />
<br />
=== I encounter artifacts when logging into my DE or WM ===<br />
<br />
If you encounter artifacts, first try starting X without {{Filename|/etc/X11/xorg.conf}}. Recent versions of Xorg are capable of reliable auto-detection and auto-configuration for most use cases. Outdated or improperly configured {{Filename|xorg.conf}} files are known to cause trouble.<br />
<br />
In order to run without a configuration tile, it is recommended that the <tt>xorg-input-drivers</tt> package group be installed.<br />
<br />
Artifacts may also be related to [[kernel mode setting]]. Consider [[#Disable KMS|disabling KMS]].<br />
<br />
=== I have switched from catalyst to radeonhd or radeon and some things don't work ===<br />
<br />
First of all, don't panic. Uninstall catalyst, install xf86-video-radeonhd or xf86-video-ati and then '''''reboot'''''.<br />
<br />
Make sure you are not using the xorg.conf generated by catalyst. Your original should have been backed up and you can recall it:<br />
cp /etc/X11/xorg.conf.original-0 /etc/X11/xorg.conf<br />
<br />
Otherwise, stop your graphical server if running, and in a tty, type as root:<br />
Xorg -configure<br />
mv xorg.conf.new /etc/X11/xorg.conf<br />
and make sure you put the required options.<br />
<br />
If it still doesn't solve your problem, know that apparently catalyst has the bad idea to replace Xorg files with symbolic links pointing to its own files. The easiest at this point is to uninstall all catalyst stuff (just to be on the safe side) and then to reinstall xorg, libgl, ati-dri and xf86-video-radeonhd or xf86-video-ati.<br />
<br />
If it still doesn't work, then have a look into the forum, your problem might be a configuration issue.<br />
<br />
{{Note| When you switch to '''xf86-video-ati''' or '''xf86-video-radeonhd''', remember that you can login without xorg.conf as well (without problems in most cases), since Xorg can autodetect your settings. So '''xorg.conf''' is optional.}}<br />
<br />
=== I have installed a free driver and my card is painfully slow ===<br />
<br />
Some cards can be installed by default trying to use [[ATI#AMD/Ati cards and kernel mode-setting (KMS)|KMS]]. You can check whether this is your case running:<br />
dmesg | egrep "drm|radeon"<br />
<br />
This command might show something ''like'' this, meaning it is trying to default to KMS:<br />
[drm] radeon default to kernel modesetting.<br />
...<br />
[drm:radeon_driver_load_kms] *ERROR* Failed to initialize radeon, disabling IOCTL<br />
<br />
If your card is not supported by KMS (anything older than r100), then you can [[ATI#Disable KMS|disable KMS]]. This should fix the problem.<br />
<br />
If you're getting and error message in dmesg like this:<br />
platform radeon_cp.0: firmware: requesting radeon/R600_rlc.bin<br />
r600_cp: Failed to load firmware "radeon/R600_rlc.bin"<br />
[drm:r600_startup] *ERROR* Failed to load firmware!<br />
radeon 0000:01:00.0: disabling GPU acceleration<br />
Install linux-firmware or linux-firmware-git from [http://aur.archlinux.org/packages.php?ID=37306 AUR].</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=ATI&diff=116912ATI2010-09-13T06:48:59Z<p>Dcelasun: /* With KMS enabled */ Stock kernel provides the sysfs interface as of 2.6.35. I'vel also made some general syntax corrections etc.</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{i18n|ATI}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of open source ATI/AMD video card drivers.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI Catalyst}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary end}}<br />
<br />
Owners of '''ATI''' video cards have a choice between ATI's proprietary driver ({{Package AUR|catalyst}}) and open source alternatives ({{Package Official|xf86-video-ati}} or {{Package Official|xf86-video-radeonhd}}).<br />
<br />
Currently, the performance of the open source drivers are not ''on par'' with the proprietary driver in terms of 3D performance and lack certain features, such as reliable TV-out support. They do, however, offer better dual-head support (<tt>xf86-video-ati</tt>), excellent 2D acceleration, and provide sufficient 3D acceleration for OpenGL-accelerated [[window manager]]s, such as [[Compiz]] or KWin. Currently, [http://www.archlinux.org/news/439/ the ATI Catalyst package is available in the AUR].<br />
<br />
If unsure, try the open source drivers first; they will suit most needs and are generally less problematic and flexible. (See the [http://www.x.org/wiki/RadeonFeature feature matrix] for details.) For an overview of ATI's proprietary "Catalyst" video card driver, see [[ATI Catalyst]]; this article covers the open source drivers.<br />
<br />
==Naming conventions==<br />
ATI's [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Comparison of AMD graphics processing units]].<br />
<br />
== Differences between open source drivers ==<br />
<br />
<div style="width: 50%; float: left"><br />
===<tt>xf86-video-ati</tt> (radeon)===<br />
*Works with Radeon chipsets up to HD 4xxx (latest R700 chipsets) as well as HD 5xxx (latest R800 chipsets). <br />
*Radeons up to the X1xxx series are fully supported, stable, and full 2D and 3D acceleration are provided. <br />
*Radeons from HD 2xxx to X4xxx have full 2D acceleration and functional 3D acceleration, but are not supported by all the features that the proprietary driver provides (for example, powersaving is still in a testing phase). <br />
*Supports DRI1, RandR 1.2/1.3, EXA acceleration and [[KMS|kernel mode-setting]]/DRI2 (with the latest Linux kernel, libdrm and Mesa versions).<br />
*All cards from HD 5xxx (R800) and newer are supported, but for now, with 2D support only.<br />
*'''HDMI''' support will soon be implemented in '''xf86-video-ati''' over AtomBIOS. It is already working for some chipsets (RV620 at least are working fine).<br />
</div><br />
<br />
<div style="width: 50%; float: right"><br />
===<tt>xf86-video-radeonhd</tt> (radeonhd)===<br />
*Driver for ATI R500 chipsets (Radeon X1000 series) and '''newer'''. <br />
*Written by Novell with specifications provided to the public by AMD. <br />
*Supports RandR 1.2 and is under heavy development. It does also support HDMI with sound (if your hardware is so equipped, except RV730 based chip sets).<br />
</div><br />
<br />
<div style="clear: both"></div> <!-- prevent overlapping paragraphs --><br />
<br />
Generally, '''xf86-video-ati''' seems to offer more consistent performance as compared to '''xf86-video-radeonhd''' and is more actively developed, so it should be your first choice, no matter which ATI card you own. xf86-video-radeonhd should be used as a "fallback" driver in case you encounter errors with xf86-video-ati and it '''should not be used''' as a primary driver - radeonhd's development has been unofficially halted. In case you need to use a driver for newer ATI cards, you should prefer the proprietary '''catalyst''' driver.<br />
<br />
{{Note|xf86-video-ati is recognized as "'''radeon'''" by Xorg (in xorg.conf) and xf86-video-radeonhd as "'''radeonhd'''". }}<br />
<br />
== Installation and configuration ==<br />
<br />
=== Installation ===<br />
{{Note| If you have previously installed the proprietary driver, make sure to remove <code>catalyst</code> and '''reboot'''.}}<br />
<br />
To install <code>xf86-video-ati</code> :<br />
pacman -S xf86-video-ati<br />
<br />
To install <code>xf86-video-radeonhd</code> : <br />
pacman -S xf86-video-radeonhd libgl ati-dri<br />
<br />
{{Note|All cards from HD3xxx (R600) and newer need to install additional firmware files.}}<br />
To install <code>linux-firmware</code> :<br />
pacman -S linux-firmware <br />
{{Note|The GIT versions of these drivers can be found on [[AUR]].}}<br />
<br />
=== Configuration ===<br />
You now have the choice between creating an xorg.conf, or attempting to use the recently enabled '''Xorg''' autodetection. <br />
<br />
==== Running Xorg without xorg.conf ====<br />
In most cases, Xorg can '''autodetect''' your hardware settings. The Xorg.conf configuration file in /etc/X11 is optional since Xorg-server 1.5.x.<br />
<br />
Always make sure you have '''mesa''', the group '''xorg''' and the group '''xorg-input-drivers''' installed:<br />
pacman -S xorg-input-drivers mesa xorg<br />
<br />
{{Note| With KMS (Kernel Mode Setting) enabled, '''xorg.conf may not be needed at all.''' For more info on Radeon Kernel mode-setting, read [[#Kernel mode-setting (KMS)]].}}<br />
<br />
==== Running Xorg with expanded xorg.conf ====<br />
{{Note| '''/etc/X11/xorg.conf''' no longer requires sections for all input devices because Udev can configure some/all via hotplugging. (Ensure '''xorg-input-drivers''' are installed.)}}<br />
<br />
In case you want manual configuration, edit your [[xorg.conf]], and add or make sure you have the following in their given sections:<br />
Section "Module"<br />
Load "glx"<br />
Load "dri"<br />
Load "drm"<br />
EndSection<br />
<br />
Device section for <code>xf86-video-ati</code> :<br />
Section "Device"<br />
Identifier "name" # your alias<br />
Driver "radeon"<br />
EndSection<br />
<br />
Device section for <code>xf86-video-radeonhd</code> :<br />
Section "Device"<br />
Identifier "name" # your alias<br />
Driver "radeonhd"<br />
Option "AccelMethod" "exa" # to enable 2D and Xv acceleration on R6xx/R7xx - default AccelMethod shadowfb<br />
Option "DRI" "on" # to enable 2D and Xv acceleration on R6xx/R7xx - default DRI disabled<br />
EndSection<br />
<br />
{{Note|Try below for smooth performance,over Option "DRI", for RS780M/MN [Radeon HD 3200] using the radeonhd driver(as of 3rd May 2009)}}<br />
<br />
This section (DRI) is not needed (thus deprecated), but use it if you encounter DRI related problems.<br />
Section "DRI"<br />
Group "video"<br />
Mode 0666<br />
EndSection<br />
<br />
Adding '''only''' the '''Device''' Section in the xorg.conf should fit most cases. Using that Section, you can enable features and tweak the driver's performance or behaviour.<br />
<br />
When using the opensource drivers, ensure <code>catalyst</code> is ''not'' installed -- '''ati-dri''' is being used instead. Otherwise, the wrong <code>libGL.so</code> will be installed, which will cause direct rendering to fail.<br />
<br />
== Kernel mode-setting (KMS) ==<br />
<br />
[[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 />
KMS for ATI video cards requires the [[Xorg]] free video user space driver {{Package Official|xf86-video-ati}} version 6.12.4 or later. <br />
<br />
=== Enabling experimental KMS ===<br />
<br />
Since kernel26 v.2.6.33, KMS is '''enabled''' by default for ATI cards. <br />
<br />
==== Early KMS start ====<br />
<br />
''This method will start KMS as early as possible in the [[boot process]] (when the [[initramfs]] is loaded).''<br />
<br />
# Remove all {{Codeline|<nowiki>vga=</nowiki>}} options from the ''kernel'' line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). Using other framebuffer drivers (such as <tt>[[uvesafb]]</tt> or <tt>radeonfb</tt>) will conflict with KMS. Remove any framebuffer related modules from {{Filename|/etc/mkinitcpio.conf}}. {{Codeline|<nowiki>video=</nowiki>}} can now be used in conjunction with KMS.<br />
# Add {{Codeline|radeon}} to MODULES array in {{Filename|/etc/mkinitcpio.conf}}. Depending on motherboard chipset, it may be necessary to add {{Codeline|intel_agp}} before the {{Codeline|radeon}} module. Previously, the {{Codeline|fbcon}} module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel.<br />
#* ''Following is probably not true since Linux 2.6.33, at least author didn't run into any problems:'' For newer ATI cards ('''R6xx''' and '''newer''') extra microcode is currently needed. Install <code>linux-firmware</code> and grab [http://aur.archlinux.org/packages.php?ID=31708 radeon-initrd] from AUR, '''build''' and '''install''' them and add {{Codeline|radeon}} to HOOKS array in {{Filename|/etc/mkinitcpio.conf}}.<br />
# Re-generate your initramfs: <pre># mkinitcpio -p kernel26</pre><br />
# Add {{Codeline|<nowiki>radeon.modeset=1</nowiki>}} to the kernel options in the bootloader configuration file to enable KMS.<br />
# '''Reboot''' the system.<br />
<br />
==== Late start ====<br />
<br />
''With this choice, KMS will be enabled when modules are loaded during the [[boot process]].''<br />
<br />
# Remove all {{Codeline|<nowiki>vga=</nowiki>}} options from the ''kernel'' line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). Using other framebuffer drivers (such as <tt>[[uvesafb]]</tt> or <tt>radeonfb</tt>) will conflict with KMS. Remove any framebuffer related modules from {{Filename|/etc/mkinitcpio.conf}}. {{Codeline|<nowiki>video=</nowiki>}} can now be used in conjunction with KMS.<br />
# Add {{Codeline|radeon}} to MODULES array in {{Filename|/etc/rc.conf}}. Depending on motherboard chipset, it may be necessary to add {{Codeline|intel_agp}} before the {{Codeline|radeon}} module. Previously, the {{Codeline|fbcon}} module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel.<br />
# '''Reboot''' the system.<br />
<br />
{{Tip|Some users have reported faster [[udev]] module loading by adding {{Codeline|<nowiki>options radeon modeset=1</nowiki>}} to {{Filename|/etc/modprobe.d/modprobe.conf}}.}}<br />
<br />
=== Troubleshooting KMS ===<br />
<br />
=== Generic problem solution ===<br />
<br />
If your card often crashes when loading the '''radeon''' module, starting your login manager, entering desktop or crashes when you start 3D apps like glxgears you can try if the kernel boot option "pci=nomsi" solves your problems. See https://bugzilla.kernel.org/show_bug.cgi?id=15626 for X200m cards.<br />
<br />
==== Disable KMS ====<br />
<br />
Users should consider disabling kernel mode-setting if encountering kernel panics, distorted framebuffer on boot, no GPU signal, [[Xorg]] refusing to start, Xorg falling back to Mesa software rasterizer (no 3D acceleration) or 'POWER OFF' problem (kernel 2.6.33-2)at shutdown.<br />
<br />
# Add {{Codeline|<nowiki>radeon.modeset=0</nowiki>}} (or {{Codeline|nomodeset}}, if this does not work) to the kernel options line in the bootloader configuration file ({{Filename|/boot/grub/menu.lst}} for [[GRUB]] users). That should work. If you want to remove KMS support from the initramfs, follow the next two steps.<br />
# If {{Codeline|radeon}} was added to the MODULES array in {{Filename|mkinitcpio.conf}} to enable ''early start'', remove it.<br />
# Rebuild the [[initramfs]] with <pre># mkinitcpio -p kernel26</pre><br />
<br />
{{Warning|Catalyst users will likely need to blacklist the {{Codeline|radeon}} module by adding {{Codeline|'''!'''radeon}} to the MODULES array in {{Filename|/etc/rc.conf}}.}}<br />
<br />
Alternatively, module options can be specified in a file within the {{Filename|/etc/modprobe.d}} directory. If using the '''radeon''' module ({{Codeline|<nowiki>lsmod | grep radeon</nowiki>}}) disable KMS by creating a file containing the above code:<br />
<br />
{{File|name=/etc/modprobe.d/radeon.conf|content=options radeon modeset=0}}<br />
<br />
==== Renaming {{Filename|xorg.conf}} ====<br />
<br />
Renaming {{Filename|/etc/X11/xorg.conf}}, which may include options that conflict with KMS, will force Xorg to autodetect hardware with sane defaults. After renaming, '''restart''' Xorg.<br />
<br />
== Performance tuning ==<br />
The following options apply to Section "'''Device'''" in /etc/X11/'''xorg.conf'''.<br />
<br />
=== Tuning performance with xf86-video-ati ===<br />
By design, xf86-video-ati runs at AGP 1x speed. It is generally safe to modify this. If you notice hangs, try reducing the value or removing the line entirely (you can use values 1, 2, 4, 8).<br />
Option "AGPMode" "4"<br />
<br />
'''ColorTiling''' is completely safe to enable and supposedly is enabled by default. People have noticed a performance increase when enabled via xorg.conf.<br />
Option "ColorTiling" "on"<br />
<br />
'''Acceleration architecture'''; this will work only on '''newer''' cards. If you enable this and then can't get back into X, remove it.<br />
Option "AccelMethod" "EXA"<br />
<br />
'''Page Flip''' is generally safe to enable. This would mostly be used on older cards, as enabling this would disable EXA. With recent drivers can be used together with EXA.<br />
Option "EnablePageFlip" "on" <br />
<br />
'''AGPFastWrite''' will enable fast writes for AGP cards. This one can be problematic, so be prepared to remove it if you can't get into X.<br />
Option "AGPFastWrite" "yes"<br />
<br />
'''EXAVSync ''' option attempts to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been know to cause instability on some chips.<br />
Really useful when enabling Xv overlay on videos on a 3D accelerated desktop. It is not necessary when KMS (thus DRI2 acceleration) is enabled.<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
See an example Device Section in xorg.conf:<br />
<pre><br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "DRI" "on" <br />
Option "DynamicPM" "on" # Dynamic powersaving.<br />
Option "ClockGating" "on" # Assisting option for powersaving.<br />
Option "AccelMethod" "EXA" # EXA should fit most cases.<br />
Option "EXAVSync" "on" # EXAVSync is explained above.<br />
Option "DMAForXv" "on" # Forced option in order to enable Xv overlay.<br />
Option "ScalerWidth" "2048" # That should fix some very rare bugs.<br />
Option "EnablePageFlip" "on" # It will not be enabled on R5xx cards.<br />
Option "RenderAccel" "on" # Optional. It should be enabled by default.<br />
Option "AccelDFS" "on" #Optional. See the man page.<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
</pre><br />
<br />
<br />
'''See the manpage for more configuration options.'''<br />
<code>man radeon</code><br />
<br />
A fine tool to try is [http://aur.archlinux.org/packages.php?do_Details=1&ID=2994 driconf]. It will allow you to modify several settings, like vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).<br />
<br />
== Powersaving ==<br />
<br />
The powersaving part is totally different with and without KMS.<br />
<br />
=== With KMS enabled ===<br />
<br />
With the radeon driver, powersaving is disabled by default but the stock kernel (2.6.35 as of this writing) provides a sysfs option to enable it.<br />
<br />
Power saving through KMS is still a work in progress for the most part. It should work, but some chips do have problems with it. A common issue for all is screen blinking when the kernel switches between power states, and in some configurations it even causes system freezes. But KMS is awesome, so it's your choice. The UMS method is generally more stable, however its power savings might not be as good as those provided by KMS options.<br />
<br />
There are two ways to enable power management:<br />
<br />
1. Try adding radeon.dynpm=1 to the kernel parameters (if using the stock kernel < 2.6.35). If you are using kernel26>=2.6.35 this option is no longer needed and the sysfs interface will be present by default. If this option is passed to a kernel >= 2.6.35, the driver will fail and fall back to software rendering.<br />
<br />
2. Use the (unsupported) [radeon] repo:<br />
<br />
This repository gives you the git and more up-to-date version of the radeon driver and it's dependencies.<br />
<br />
[radeon]<br />
Server = http://gtklocker.tiven.org/radeon-repo/$arch/<br />
<br />
You can select the methods via sysfs. So, with root access, you have two choices:<br />
<br />
<code><br />
echo dynpm > /sys/class/drm/card0/device/power_method<br />
## dynamic clock switching based on GPU load<br />
</code><br />
<br />
<code><br />
echo profile > /sys/class/drm/card0/device/power_method<br />
## profile based frequency switching<br />
</code><br />
<br />
The "dynpm" method dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The reclocking is attemped during vertical blanking periods, but due to the timing of the reclocking functions, doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
<br />
The "profile" mode will allow you to select one of the five profiles below:<br />
<br />
* "default" uses the default clocks and does not change the power state. This is the default behavior.<br />
* "auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected when the monitors are in the dpms off state.<br />
* "low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto only uses "low" when displays are off.<br />
* "mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.<br />
* "high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state. <br />
<br />
So lets say we want the "low" option...for this, run this command:<br />
<br />
<code><br />
echo low > /sys/class/drm/card-0/device/power_profile <br />
## forces GPU to lowest available frequency <br />
</code><br />
<br />
Replace "low" with any of the aforementioned profiles you wish.<br />
<br />
{{Note: These echo settings are not permanent, so when you find something that fits your needs, you will need to add it to /etc/rc.local, so it's executed at system startup.}}<br />
<br />
The "profile" method is not as aggressive as "dynpm," but is currently much more stable and flicker free and works with multiple heads active.<br />
<br />
Power management is supported on all asics (r1xx-evergreen) that include the appropriate power state tables in the vbios; not all boards do (especially older desktop cards).<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via lm_sensors tools or via sysfs in /sys/class/hwmon .<br />
<br />
To view the voltage that the GPU is running at, perform the following command and you will get something like it's output:<br />
<br />
<code><br />
~$ cat /sys/kernel/debug/dri/0/radeon_pm_info<br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</code><br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
=== Without KMS ===<br />
<br />
In your xorg.conf file, add 2 lines to "Device" Section:<br />
Option "DynamicPM" "on"<br />
Option "ClockGating" "on"<br />
<br />
If the two options are enabled successfully, you will see following lines in /var/log/Xorg.0.log:<br />
<br />
(**) RADEON(0): Option "ClockGating" "on"<br />
(**) RADEON(0): Option "DynamicPM" "on"<br />
<br />
Static power management enable success<br />
(II) RADEON(0): Dynamic Clock Gating Enabled<br />
(II) RADEON(0): Dynamic Power Management Enabled<br />
<br />
If you desire low power cost, you can add an extra line to "Device" Section of xorg.conf:<br />
Option "ForceLowPowerMode" "on"<br />
<br />
== TV out ==<br />
Since August 2007, there is TV-out support for all Radeons with integrated TV-out.<br />
<br />
It is somewhat limited for now, it doesn't always autodetect the output correctly and only NTSC mode works.<br />
<br />
First, check that you have an S-video output: <code>xrandr</code> should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set load_detection 1<br />
<br />
Setting tv standard to use:<br />
xrandr --output S-video --set tv_standard ntsc<br />
<br />
Adding a mode for it (currently it supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
I'll go for a clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
So far so good. Now let's try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
Also you may notice that the video is being played on monitor only and not on the TV. Where the Xv overlay is sent is controlled by XV_CRTC attribute.<br />
<br />
To send the output to the TV, I do<br />
xvattr -a XV_CRTC -v 1<br />
<br />
{{Note| you need to install '''xvattr''' from [[AUR]] to execute this command.}}<br />
<br />
To switch back to my monitor, I change this to <code>0</code>. <code>-1</code> is used for automatic switching in dualhead setups.<br />
<br />
Please see [http://www.x.org/wiki/radeonTV Enabling TV-Out Statically] for how to enable TV-out in your xorg config file.<br />
<br />
== HDMI with sound ==<br />
Given that your hardware supports it, and you have installed '''xf86-video-radeonhd''' (note: The driver '''xf86-video-ati''' will soon get HDMI support.) you can insert the following into xorg.conf to enable HDMI with sound:<br />
Section "Device"<br />
# ...<br />
Option "Audio" "on"<br />
Option "HDMI" "all"<br />
EndSection<br />
<br />
Restart X when you have done this, try to see if there is sound transmitted to TV via HDMI cable.<br />
# Connect your PC to the TV via HDMI cable (duh).<br />
# Use xrandr to get picture to the TV. Ex: <code>xrandr --output DVI-D_1 --mode 1280x768 --right-of PANEL</code>. Simply typing <code>xrandr</code> will give you a list of your valid outputs.<br />
# Run <code>aplay -l</code> to get the list of your sound devices. Find HDMI and note the card number and corresponding device number. Example of what you want to see: <code>card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]</code><br />
# Try sending sound to this device: <code>aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Center.wav</code>. Be sure to change plughw:z,y to match your hardware number found with last command. You should be able to hear the test sound from your TV.<br />
<br />
=== Using '''xf86-video-ati''' ===<br />
'''xf86-video-ati''' can enable HDMI output for some chipsets (RV620 for instance, and therefore probably R*600) . Using [[ATI#Kernel_mode-setting_.28KMS.29|KMS]], add radeon.audio=1 to your kernel line in /boot/grub/menu.lst. Then, use xrandr and aplay to get HDMI output, as explained above. <br />
<br />
=== Note on RV730 and RV710 ===<br />
<br />
'''xf86-video-radeonhd''' does not support yet audio through HDMI for these chipsets, but work is in progress.<br />
<br />
== Troubleshooting ==<br />
<br />
=== I encounter artifacts when logging into my DE or WM ===<br />
<br />
If you encounter artifacts, first try starting X without {{Filename|/etc/X11/xorg.conf}}. Recent versions of Xorg are capable of reliable auto-detection and auto-configuration for most use cases. Outdated or improperly configured {{Filename|xorg.conf}} files are known to cause trouble.<br />
<br />
In order to run without a configuration tile, it is recommended that the <tt>xorg-input-drivers</tt> package group be installed.<br />
<br />
Artifacts may also be related to [[kernel mode setting]]. Consider [[#Disable KMS|disabling KMS]].<br />
<br />
=== I have switched from catalyst to radeonhd or radeon and some things don't work ===<br />
<br />
First of all, don't panic. Uninstall catalyst, install xf86-video-radeonhd or xf86-video-ati and then '''''reboot'''''.<br />
<br />
Make sure you are not using the xorg.conf generated by catalyst. Your original should have been backed up and you can recall it:<br />
cp /etc/X11/xorg.conf.original-0 /etc/X11/xorg.conf<br />
<br />
Otherwise, stop your graphical server if running, and in a tty, type as root:<br />
Xorg -configure<br />
mv xorg.conf.new /etc/X11/xorg.conf<br />
and make sure you put the required options.<br />
<br />
If it still doesn't solve your problem, know that apparently catalyst has the bad idea to replace Xorg files with symbolic links pointing to its own files. The easiest at this point is to uninstall all catalyst stuff (just to be on the safe side) and then to reinstall xorg, libgl, ati-dri and xf86-video-radeonhd or xf86-video-ati.<br />
<br />
If it still doesn't work, then have a look into the forum, your problem might be a configuration issue.<br />
<br />
{{Note| When you switch to '''xf86-video-ati''' or '''xf86-video-radeonhd''', remember that you can login without xorg.conf as well (without problems in most cases), since Xorg can autodetect your settings. So '''xorg.conf''' is optional.}}<br />
<br />
=== I have installed a free driver and my card is painfully slow ===<br />
<br />
Some cards can be installed by default trying to use [[ATI#AMD/Ati cards and kernel mode-setting (KMS)|KMS]]. You can check whether this is your case running:<br />
dmesg | egrep "drm|radeon"<br />
<br />
This command might show something ''like'' this, meaning it is trying to default to KMS:<br />
[drm] radeon default to kernel modesetting.<br />
...<br />
[drm:radeon_driver_load_kms] *ERROR* Failed to initialize radeon, disabling IOCTL<br />
<br />
If your card is not supported by KMS (anything older than r100), then you can [[ATI#Disable KMS|disable KMS]]. This should fix the problem.<br />
<br />
If you're getting and error message in dmesg like this:<br />
platform radeon_cp.0: firmware: requesting radeon/R600_rlc.bin<br />
r600_cp: Failed to load firmware "radeon/R600_rlc.bin"<br />
[drm:r600_startup] *ERROR* Failed to load firmware!<br />
radeon 0000:01:00.0: disabling GPU acceleration<br />
Install linux-firmware or linux-firmware-git from [http://aur.archlinux.org/packages.php?ID=37306 AUR].</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=116856Dell Inspiron 15642010-09-12T15:00:53Z<p>Dcelasun: /* System Specs */</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M(2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel Wireless WiFi Link 5100 agn'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Microphone (out-of-the-box)<br />
* Webcam<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=116855Dell Inspiron 15642010-09-12T15:00:15Z<p>Dcelasun: /* Hardware Details */</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M(2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel 5100 a/b/g/n'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Microphone (out-of-the-box)<br />
* Webcam<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=116854Dell Inspiron 15642010-09-12T14:58:59Z<p>Dcelasun: /* What's Not Tested */</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M(2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel 5100 a/b/g/n'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Microphone (out-of-the-box)<br />
* Webcam<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=116853Dell Inspiron 15642010-09-12T14:58:39Z<p>Dcelasun: /* What Works */</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M(2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel 5100 a/b/g/n'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Microphone (out-of-the-box)<br />
* Webcam<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio<br />
* Microphone</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=116852Dell Inspiron 15642010-09-12T14:58:04Z<p>Dcelasun: /* What Works */ Power profiling and temperature monitoring with xf86-video-ati</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M(2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel 5100 a/b/g/n'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
- Using [[ATI|xf86-video-ati]] the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** [[ATI#Powersaving|Power profiling]] (requires kernel26>=2.6.35)<br />
** [[ATI#Powersaving|Temperature monitoring]] (requires kernel26>='''2.6.36''')<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio<br />
* Microphone</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Openbox&diff=116850Openbox2010-09-12T14:53:34Z<p>Dcelasun: /* Gmrun */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Openbox}}<br />
<br />
Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the [http://openbox.org/ official website]. This article will pertain to running Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
Openbox is available from the standard repositories:<br />
# pacman -S openbox<br />
<br />
Once installed, pacman will direct you to copy the default {{Filename|menu.xml}} and {{Filename|rc.xml}} configuration files to {{Filename|~/.config/openbox}}, for example:<br />
<br />
{{Note | Do this as a regular user, not as root.}}<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox<br />
$ cp /etc/xdg/openbox/autostart.sh ~/.config/openbox<br />
<br />
{{Filename|rc.xml}} is the core configuration file for Openbox. It is used to manage keyboard shortcuts, themes, virtual desktops and other features.<br />
<br />
{{Filename|menu.xml}} controls the Openbox application menu that appears when you click on your desktop. The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs. See the menu section below for more details, or visit the [http://icculus.org/openbox/ Openbox website].<br />
<br />
{{Filename|autostart.sh}} The default autostart file sets up a number of things for you. You can use this script to launch a panel, to set your desktop wallpaper, or anything else. Visit the [http://openbox.org/wiki/Help:Autostart Openbox Wiki website].<br />
<br />
== Stand-alone window manager ==<br />
<br />
To run Openbox on its own, simply add the following to the bottom of {{Filename|~/.xinitrc}}:<br />
exec openbox-session<br />
<br />
If you have used another window manager before, such as Xfwm, and Openbox won't start after logging out of X, try moving the autostart folder:<br />
mv ~/.config/autostart ~/.config/autostart-bak<br />
<br />
Using D-Bus/HAL or similar, use this instead:<br />
exec ck-launch-session openbox-session<br />
<br />
If you also use '''polkit''' and '''D-Bus''' (e.g. for automount drivers in nautilus from Gnome 2.28 / 2.30) use:<br />
exec ck-launch-session dbus-launch openbox-session<br />
<br />
{{Note | [http://www.archlinux.org/packages/extra/i686/pyxdg/ pyxdg] is required for Openbox's xdg-autostart}}<br />
<br />
== Window manager for Desktop Environments ==<br />
<br />
=== GNOME ===<br />
==== GNOME 2.26 ====<br />
'''''Follow the next guide for GNOME 2.24. If it fails try this:'''''<br />
<br />
If after installing openbox and trying to log into the 'Gnome/openbox' session but it always fails then you can do the following as one way to achieve running openbox as your window manager every time you log into the 'Gnome' session from your login manager (xdm, gdm, kdm, entrance, slim, etc.)<br />
<br />
#Log into your Gnome only session (which would still be using metacity as its window manager) if you aren't already.<br />
#Install openbox if you have not done so already<br />
#Explore your menus to ''System &rarr; Preferences &rarr; Startup Applications'' (possibly named 'Session' for older versions of Gnome)<br />
#Open Startup Application, select '+ Add' and enter the text as seen in the box below whilst omitting the text behind the #.<br />
#Now hit the 'Add' button for that data entry window and make sure the checkbox beside your new entry is selected.<br />
#Thus log out of your gnome session and log back in and you should be running openbox as your window manager.<br />
#Enjoy!<br />
<br />
Name: Openbox Windox Manager # Can be changed<br />
Command: openbox --replace # Text should not be removed from this line, but possibly added to it<br />
Comment: Replaces metacity with openbox # Can be changed<br />
<br />
This creates an entry in a startup list which is executed by gnome everytime that particular user's gnome-session is started.<br />
<br />
==== GNOME 2.24 ====<br />
First, create {{Filename|/usr/share/applications/openbox.desktop}} containing the following:<br />
[Desktop Entry]<br />
Type=Application<br />
Encoding=UTF-8<br />
Name=OpenBox<br />
Exec=openbox<br />
NoDisplay=true<br />
# name of loadable control center module<br />
X-GNOME-WMSettingsModule=openbox<br />
# name we put on the WM spec check window<br />
X-GNOME-WMName=OpenBox<br />
Then, in gconf, set {{Codeline|/desktop/gnome/session/required_components/windowmanager}} to {{Codeline|openbox}}:<br />
$ gconftool-2 -s -t string /desktop/gnome/session/required_components/windowmanager openbox<br />
Finally, choose the '''GNOME''' session in the GDM sessions menu.<br />
<br />
==== GNOME 2.22 and previous ====<br />
# If you use GDM, select the "GNOME/Openbox" login option<br />
# If you use {{Codeline|startx}}, add {{Codeline|exec openbox-gnome-session}} to {{Filename|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-gnome-session<br />
<br />
=== KDE ===<br />
# If you use KDM, select the "KDE/Openbox" login option<br />
# If you use startx, add {{Codeline|exec openbox-kde-session}} to {{Filename|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-kde-session<br />
<br />
=== Xfce4 ===<br />
Log into a normal Xfce4 session. From your terminal of choice, do:<br />
$ killall xfwm4 ; openbox & exit<br />
<br />
This will kill xfwm4, run Openbox, and close the terminal. <br />
<br />
Log out, making sure to check the "Save session for future logins" checkbox. On next login, Xfce4 will use Openbox as its WM. To be able to exit the session using xfce4-session, open your file {{Filename|~/.config/openbox/menu.xml}} (if it isn't there, copy it from {{Filename|/etc/xdg/openbox/menu.xml}}). <br />
<br />
Look for the entry:<br />
<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
</action><br />
</item><br />
<br />
and change it to:<br />
<br />
<item label="Exit Openbox"><br />
<action name="Execute"><br />
<prompt>yes</prompt><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Otherwise, using the "Exit" entry of the root-menu will cause Openbox to terminate its execution, leaving you without a window manager.<br />
<br />
If you have an issue changing between virtual desktops with the mouse wheel skipping over virtual desktops, open your {{Filename|~/.config/openbox/rc.xml}} file and move the mouse binds with actions "DesktopPrevious" and "DesktopNext" from the context "Desktop" to the context "Root" (you may need to define the Root context).<br />
<br />
If you want to use the Openbox root-menu instead of Xfce's, you may terminate Xfdesktop by running the following command in a terminal:<br />
$ xfdesktop --quit<br />
<br />
However, Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities, such as ROX, for these functions.<br />
<br />
(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)<br />
<br />
== Preferences ==<br />
<br />
Currently, there are two options for configuring the core Openbox preferences; manually edit the {{Filename|rc.xml}}, or use the ObConf tool.<br />
<br />
=== Manual configuration ===<br />
<br />
To configure Openbox manually, simply edit {{Filename|~/.config/openbox/rc.xml}} with your favorite text editor. The config file provides plenty of comments throughout, and [http://openbox.org/wiki/Configuration full documentation] is available at the official website.<br />
<br />
=== ObConf ===<br />
<br />
[http://icculus.org/openbox/index.php/ObConf:About ObConf] is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.<br />
<br />
To install ObConf, run:<br />
# pacman -S obconf<br />
<br />
{{Note | ObConf cannot be used to configure keyboard shortcuts and some other advanced features. For these modifications, you must edit {{Filename|rc.xml}} manually (see above). Other option is [http://code.google.com/p/obkey/ ObKey] application (available in [[AUR]]).}}<br />
<br />
=== Application configuration ===<br />
<br />
Openbox features per-application settings, allowing you to define rules for your programs. For example, you can:<br />
* load your web browser on a certain desktop<br />
* load your terminal without a window border<br />
* load your torrent client at a certain position on your screen<br />
<br />
These are defined in {{Filename|~/.config/openbox/rc.xml}}. As you might expect, the instructions are well-documented within the file itself. Full details can also be found here: http://openbox.org/wiki/Help:Applications<br />
<br />
== Menus ==<br />
<br />
The default Openbox menu includes a variety of applications to get you started, but you'll probably want to customize this at some point. There are a number of ways to do so:<br />
<br />
=== Manual configuration ===<br />
<br />
Similar to the {{Filename|rc.xml}} file, you can edit {{Filename|~/.config/openbox/menu.xml}} with your favourite text editor. Although many of the settings are self-explanatory, [http://openbox.org/wiki/Help:Menus full documentation] is available.<br />
<br />
=== MenuMaker ===<br />
<br />
[http://menumaker.sourceforge.net/ MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox. MenuMaker will search your computer for executable programs and create an XML menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.<br />
<br />
MenuMaker is available in the community repository:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu by running:<br />
$ mmaker -v OpenBox3<br />
<br />
By default, MenuMaker will not overwrite an existing menu.xml. To do so, run it with the -f (force) argument:<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
To see a full list of options, run {{Codeline|mmaker --help}}.<br />
<br />
This will give you a pretty thorough menu. Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.<br />
<br />
=== Obmenu ===<br />
<br />
Obmenu is a GUI-based menu editor for Openbox. For those who don't enjoy editing XML source code, this is probably the best option for you.<br />
<br />
It is available in the community repository:<br />
# pacman -S obmenu<br />
<br />
Once installed, simply run {{Codeline|obmenu}} and add or remove the desired applications.<br />
<br />
==== Obm-xdg ====<br />
<br />
<tt>obm-xdg</tt> is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.<br />
<br />
To use obm-xdg, add the following line to {{Filename|~/.config/openbox/menu.xml}}:<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Then run {{Codeline|openbox --reconfigure}} to refresh the Openbox menu. You should now see a sub-menu labeled '''xdg''' in your menu.<br />
<br />
{{Note | If you do not have GNOME installed, then you need to install '''gnome-menus''' package for obm-xdg to work.}}<br />
<br />
=== Python based xdg menu script ===<br />
<br />
This script can be found in Fedora's Openbox package. You will only have to put the script somewhere and add a menu entry.<br />
<br />
Here is my paste: http://pastebin.com/f2f827625<br />
And here is the head: http://cvs.fedoraproject.org/viewvc/devel/openbox/xdg-menu?view=markup<br />
<br />
Download the one you like (maybe you'll prefer the head version of course). You can put the file anywhere, I used ~/Documents/build/xdg-menu (just modify the menu entry later according to YOUR filename/path.)<br />
<br />
Then open your menu.xml with your favourite text editor and add the following entry where you want the new menu (of course, you can modify the label however you want):<br />
<menu id="apps-menu" label="xdgmenu" execute="python /home/shiki/Documents/build/xdg-menu"/><br />
<br />
Save the file, and run: {{Codeline|openbox --reconfigure}}.<br />
<br />
=== OpenBox Menu Generator ===<br />
<br />
OpenBox Menu Generator, avaliable in the AUR as [http://aur.archlinux.org/packages.php?ID=27300 obmenugen-bin] is a menu generator for OpenBox using the *.desktop files. It provides a text file to filter using basic regex which menu items are hidden.<br />
To use, simply run:<br />
$ obmenugen<br />
Then update OpenBox by:<br />
$ openbox --reconfigure<br />
<br />
=== Pipe menus ===<br />
<br />
Openbox (and other WMs like WindowMaker and PekWM) allow you to write scripts that dynamically build menus on the fly. Some examples are system monitors, media player controls, and weather forecasts. Many examples can be found on the openbox [http://openbox.org/wiki/Openbox:Pipemenus site].<br />
<br />
Xyne has also created a file browser and brisbin33 has one for scanning for / connecting to wireless hot spots (requires netcfg). The relevant forum posts for these utilities are [http://bbs.archlinux.org/viewtopic.php?id=77197&p=1 here] and [http://bbs.archlinux.org/viewtopic.php?id=78290 here]<br />
<br />
== Startup programs ==<br />
<br />
Openbox features support for running programs at startup. This is provided by the "openbox-session" command.<br />
<br />
There are two ways to enable autostart:<br />
# If you use startx/xinit to log into your X session, edit {{Filename|~/.xinitrc}} and change the line that executes ''openbox'' to execute '''openbox-session''' instead.<br />
# If you log in with GDM/KDM, then select the ''Openbox'' session and it will automatically use autostart.<br />
<br />
Startup programs are managed in {{Filename|~/.config/openbox/autostart.sh}}. Full instructions and best practices for how to do this are available at the [http://openbox.org/wiki/Help:Autostart Openbox website].<br />
<br />
== Themes and appearance ==<br />
<br />
With the exception of the Openbox Themes topic, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME, KDE or Xfce.<br />
<br />
=== Openbox themes ===<br />
<br />
Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. They also determine the appearance of the application menu and on-screen display (OSD). <br />
<br />
Additional themes are available from the standard repositories:<br />
<br />
# pacman -S openbox-themes<br />
<br />
This package is by no means definitive. You can download more themes at websites such as:<br />
*[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org]<br />
*[http://customize.org/browse/tags/openbox customize.org]<br />
*http://www.minuslab.net/themes/<br />
*http://celo.wordpress.com/themes/<br />
*http://vault.openmonkey.com/pages/openbox<br />
*http://hewphoria.com/?p=submission&type=theme&cat=7<br />
<br />
Downloaded themes should be extracted to <tt>~/.themes</tt> and can be installed or selected with the [[Openbox#Preferences|ObConf]] tool.<br />
<br />
Creating new themes is fairly easy and again [http://openbox.org/wiki/Help:Themes well-documented].<br />
<br />
For a GUI theme editor, take a look at [http://xyne.archlinux.ca/info/obtheme ObTheme].<br />
<br />
=== X11 Appearance ===<br />
<br />
If you are running Openbox as a standalone, you will need to configure .Xdefaults file.<br />
Save a copy to ~/.Xdefaults and /home/root/.Xdefaults for windows opened as Root.<br />
<br />
Xdefaults is a user-level configuration dotfile, typically located at ~/.Xdefaults. When present, it is parsed by the xrdb (Xorg resource database) program automatically when Xorg is started, and can be used to set or override preferences for X and X applications. It can do many operations, including:<br />
<br />
- defining terminal colours<br />
- configuring terminal preferences<br />
- setting DPI, antialiasing, hinting and other X font settings<br />
- changing the Xcursor theme<br />
- theming xscreensaver<br />
- altering preferences on low-level X applications (xclock, xpdf, etc.) <br />
<br />
Xdefaults Arch WiKi<br />
http://wiki.archlinux.org/index.php/Xdefaults<br />
<br />
=== X11 Mouse cursors ===<br />
<br />
Extract the desired Xcursor theme to either <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.<br />
<br />
Add this to {{Filename|~/.Xdefaults}}:<br />
Xcursor.theme: [name-of-cursor-theme]<br />
where {{Codeline|[name-of-cursor-theme]}} is the name of the cursor theme directory. For example:<br />
Xcursor.theme: Vanilla-DMZ-AA<br />
To change the size:<br />
Xcursor.size: [size]<br />
Sometimes it is required to symlink the icon directory into each user directory to make the window manager use them:<br />
$ mkdir ~/.icons<br />
$ ln -s /usr/share/icons/[name-of-cursor-theme] ~/.icons/default<br />
<br />
For more information read the Arch WiKi<br />
http://wiki.archlinux.org/index.php/X11_Cursors<br />
<br />
=== GTK Themes ===<br />
<br />
==== GTK2/GTK+ ====<br />
<br />
First, extract the desired theme to <tt>/usr/share/themes</tt> (system-wide access) or <tt>~/.themes</tt> (local user access), then:<br />
<br />
GTK+ themes can be managed easily with the '''[[LXDE | lxappearance]]''', '''gtk-chtheme''', or '''switch2''' utilities. To install, run:<br />
# pacman -S lxappearance<br />
and/or<br />
# pacman -S gtk-chtheme<br />
and/or<br />
# pacman -S gtk-theme-switch2<br />
<br />
Now you can simply run {{Codeline|lxappearance}}, {{Codeline|gtk-chtheme}} or {{Codeline|switch2}} to set the desired theme.<br />
<br />
==== GTK1 ====<br />
For legacy GTK1 themes, install the '''gtk-theme-switch''' package:<br />
# pacman -S gtk-theme-switch<br />
Then run {{Codeline|switch}} to select a desired theme.<br />
<br />
==== GTK fonts ====<br />
<br />
To manually change the type and size of your fonts, add the following to {{Filename|~/.gtkrc.mine}}:<br />
style "user-font"<br />
{<br />
font_name = "[font-name] [size]"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "[font-name] [size]"<br />
<br />
where {{Codeline|[font-name] [size]}} is the desired font and point size. For example:<br />
style "user-font"<br />
{<br />
font_name = "DejaVu Sans 8"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "DejaVu Sans 8"<br />
<br />
Both {{Codeline|font_name}} and {{Codeline|gtk-font-name}} fields are required for backwards compatibility.<br />
<br />
You can also use '''gtk-chtheme''' or '''lxappearance''' to set GTK font settings. Please refer to the above section.<br />
<br />
==== GTK Icons ====<br />
<br />
First, extract the desired icon theme to <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access), then:<br />
<br />
Add the following to {{Filename|~/.gtkrc.mine}}: <br />
gtk-icon-theme-name = "[name-of-icon-theme]"<br />
<br />
where {{Codeline|[name-of-icon-theme]}} is the name of the icon theme directory. For example:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
Ensure {{Filename|~/.gtkrc-2.0}} is configured to parse {{Filename|~/.gtkrc.mine}}:<br />
<br />
# ~/.gtkrc-2.0<br />
# -- THEME AUTO-WRITTEN DO NOT EDIT<br />
include "/usr/share/themes/Rezlooks-Gilouche/gtk-2.0/gtkrc"<br />
include "/home/username/.gtkrc.mine"<br />
# -- THEME AUTO-WRITTEN DO NOT EDIT<br />
<br />
You can use '''lxappearance''' to choose GTK icon themes. Please refer to the above section.<br />
<br />
=== Desktop icons ===<br />
Openbox does not provide a means to display icons on the desktop. Xfdesktop, PcmanFM, [http://rox.sourceforge.net ROX], [http://idesk.sourceforge.net iDesk], or even Nautilus (and the gnome-settings-daemon) can provide this function. <br />
<br />
ROX and PCmanFM have the additional advantage of being lightweight file managers.<br />
<br />
=== Desktop wallpaper ===<br />
<br />
Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like [[Feh]] or [[Nitrogen]]. Other options include ImageMagick, hsetroot and xsetbg. Or Pcmanfm and Xfdesktop can do it too.<br />
<br />
You can disable the wallpaper loading in gnome-settings-daemon like this:<br />
$ gconftool-2 --set /apps/gnome_settings_daemon/plugins/background/active --type bool False<br />
<br />
== Recommended programs ==<br />
<br />
There is a [[Lightweight Applications|list of Lightweight Software]] at Arch's wiki; most of it nicely fits with Openbox.<br />
<br />
=== Login managers ===<br />
<br />
[http://slim.berlios.de/ SLiM] provides a lightweight and elegant graphical login solution for standalone Openbox configurations. Refer to Arch's [[SLiM]] wiki for detailed instructions.<br />
<br />
[http://qingy.sourceforge.net/ Qingy] is ultralight and very configurable graphical login. It support login to both console and X Windows sessions. It uses [http://www.directfb.org DirectFB], therefore it does not start X Windows unless you choose X Windows session. See article about [[Qingy]] at Arch's wiki.<br />
<br />
=== Composite desktop ===<br />
<br />
[[Xcompmgr]] is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.<br />
(It's worth noting that xcompmgr is no longer developed, and so any issues are unlikely to be fixed)<br />
(Developed an issue with tint2 0.9, the systray icons have a tendency to corrupt)<br />
<br />
[[Cairo Compmgr | Cairo Composite Manager]] -- A versatile and extensible composite manager which uses cairo for rendering, is an alternative.<br />
<br />
=== Panels, trays, and pagers ===<br />
<br />
There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:<br />
<br />
==== Panels ====<br />
* [[PyPanel]]<br />
* [http://nsf.110mb.com/bmpanel/ BMPanel]<br />
* [[tint2]]<br />
* [http://www.gnomefiles.org/app.php/LXPanel LXPanel]<br />
* [http://fbpanel.sourceforge.net fbpanel]<br />
* [http://freshmeat.net/projects/perlpanel/ PerlPanel]<br />
* [http://www.chatjunkies.org/fspanel/ fspanel]<br />
* [http://www.xfce.org/projects/xfce4-panel/ Xfce4-panel]<br />
* [http://live.gnome.org/GnomePanel/ GnomePanel]<br />
* [https://launchpad.net/awn avant-window-navigator]<br />
* [http://developer.berlios.de/projects/cairo-dock/ cairo-dock]<br />
* [http://code.google.com/p/wbar/ wbar]<br />
* [http://www.screenlets.org/ screenlets]<br />
* [http://www.failedprojects.de/pancake/ pancake]<br />
<br />
==== Trays ====<br />
* [http://stalonetray.sourceforge.net/ Stalonetray]<br />
* [http://download.gna.org/fvwm-crystal/trayer/1.0/ Trayer]<br />
<br />
==== Pagers ====<br />
* [http://projects.l3ib.org/trac/visibility Visibility]<br />
* [http://bbtools.sourceforge.net/ bbpager]<br />
* [http://aur.archlinux.org/packages.php?ID=17563 netwmpager]<br />
* [http://useperl.ru/ipager/index.en.html IPager]<br />
* [http://code.google.com/p/neap/ neap]<br />
<br />
Make your choice and add it to your startup file. If you wish to set the desktop layout without using a pager, you can use [http://aur.archlinux.org/packages.php?ID=34376 obsetlayout], which is a packaged version of the setlayout tool from the Openbox wiki.<br />
<br />
=== File managers ===<br />
<br />
There are many possibilities, but the most popular lightweight file managers are:<br />
* [[Thunar]]. Thunar supports auto-mount features and other plugins. <br />
* [http://rox.sourceforge.net ROX] (ROX provides desktop icons)<br />
# pacman -S rox<br />
* [http://pcmanfm.sourceforge.net PCManFM] (pcmanfm also provides desktop icons)<br />
# pacman -S pcmanfm<br />
To access NTFS drives with PCManFM, install ntfs-3g:<br />
# pacman -S ntfs-3g<br />
and make sure you're added to group hal:<br />
# gpasswd -a username hal<br />
For even lighter options, consider [http://www.obsession.se/gentoo/ Gentoo] or [http://emelfm2.net/ emelFM2], both of which use the familiar 'Midnight Commander' two pane layout.<br />
<br />
Others:<br />
Xfe<br />
muCommander<br />
''(Will edit it later after I have tried them both.)''<br />
<br />
Of course, you can also use GNOME's Nautilus. Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections)<br />
<br />
=== Application launchers ===<br />
<br />
==== dmenu ====<br />
<br />
Set-up dmenu as described in the [[dmenu]] wiki article. Then, add the following entry to the <keyboard> section {{Filename|~/.config/openbox/rc.xml}} to enable a shortcut to launch dmenu:<br />
<keybind key="W-space"><br />
<action name="Execute"><br />
<execute>dmenu_run</execute><br />
</action><br />
</keybind><br />
<br />
==== [[Gmrun]] ====<br />
<br />
[http://sourceforge.net/projects/gmrun gmrun] provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:<br />
# pacman -S gmrun<br />
For details regarding Gmrun, see the wiki article [[Gmrun|here]].<br />
Add the following entry to the <keyboard> section {{Filename|~/.config/openbox/rc.xml}} to enable Alt+F2 functionality:<br />
<keybind key="A-F2"><br />
<action name="execute"><execute>gmrun</execute></action><br />
</keybind><br />
<br />
==== Bashrun ====<br />
<br />
[http://bashrun.sourceforge.net bashrun] provides a different, barebones approach to a run dialog, using a specialized bash session within a small xterm window. It is available in the community repository and can be launched through the Alt+F2 style approach mentioned previously. To make bashrun act more like a traditional run dialog, add the following entry to the <applications> section {{Filename|~/.config/openbox/rc.xml}}:<br />
<application name="bashrun"><br />
<desktop>all</desktop><br />
<decor>no</decor> # switch to yes if you prefer a bordered window<br />
<focus>yes</focus><br />
<skip_pager>yes</skip_pager><br />
<layer>above</layer><br />
</application><br />
<br />
==== Launchy ====<br />
<br />
[http://www.launchy.net/ Launchy] is a less minimalistic approach; it is skinnable and offers more functionality such as a calculator, checking the weather, etc. Originally for Windows, similar to Gnome Do.<br />
# pacman -S launchy<br />
It is launched by Ctrl+Space key combination.<br />
<br />
==== LXPanel ====<br />
<br />
The LXPanel run dialog can be executed with <br />
lxpanelctl run<br />
<br />
==== gnome-panel ====<br />
<br />
The gnome-panel run dialog can be executed with <br />
gnome-panel-control --run-dialog<br />
<br />
=== Clipboard managers ===<br />
<br />
You may wish to install a clipboard manager for feature rich copy/paste ability. '''xfce4-clipman-plugin, parcellite,''' or '''glipper-old''' may be installed via pacman. Add your choice to autostart.sh. From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.<br />
<br />
=== Volume managers ===<br />
<br />
==== gvolwheel ====<br />
<br />
a lightweight audio mixer which lets you control the audio volume through a tray icon [http://aur.archlinux.org/packages.php?ID=25502] <br />
<br />
==== gvtray ====<br />
<br />
A master volume mixer in the system tray [http://aur.archlinux.org/packages.php?ID=6362]<br />
<br />
==== obmixer ====<br />
<br />
Obmixer is a mixer appplet written in C which is intended to be a lightweight alternative to gnome volume control [http://aur.archlinux.org/packages.php?ID=31131]<br />
<br />
==== volti ====<br />
<br />
GTK+ application for controlling audio volume from system tray/notification area [http://aur.archlinux.org/packages.php?ID=33525]<br />
<br />
==== volumeicon ====<br />
<br />
Volume control for your system tray [http://aur.archlinux.org/packages.php?ID=35793]<br />
<br />
==== volwheel ====<br />
<br />
Tray icon to change volume with the mouse [http://www.archlinux.org/packages/community/i686/volwheel/]<br />
<br />
=== Keyboard layout switchers ===<br />
<br />
==== fbxkb ====<br />
<br />
Keyboard indicator and switcher [http://aur.archlinux.org/packages.php?ID=3458]<br />
<br />
==== xxkb ====<br />
<br />
keyboard layout switcher/indicator [http://www.archlinux.org/packages/community/i686/xxkb/]<br />
<br />
==== axkb ====<br />
<br />
QT4 keyboard layout switcher [http://aur.archlinux.org/packages.php?ID=25555]<br />
<br />
==== xneur ====<br />
<br />
X Neural Switcher is a text analyser, it detects the language of input and corrects it if needed [http://aur.archlinux.org/packages.php?ID=9750]<br />
<br />
== Tips and tricks ==<br />
<br />
=== File associations ===<br />
Since Openbox and the applications you are going to use with it are not very well integrated you might run into the issue that your browser does not know which programm it is supposed to use for certain types of files. The package in the AUR [http://aur.archlinux.org/packages.php?ID=23170 gnome-defaults-list] contains a list of file-types and programms specific to the gnome desktop. It will be installed to<br />
/etc/gnome/defaults.list<br />
Open it with your text-editor and now you can search&replace everything with your appropriate programms. Like totem<=>vlc or eog<=>mirage. Save the file to:<br />
~/.local/share/applications/defaults.list<br />
<br />
Another way is to use the package ''perl-file-mimeinfo'' from the repositories, and invoke the mimeopen command like this:<br />
mimeopen -d /path/to/file<br />
You will then be asked what application to use when opening /path/to/file:<br />
Please choose a default application for files of type text/plain<br />
1) notepad (wine-extension-txt)<br />
2) Leafpad (leafpad)<br />
3) OpenOffice.org Writer (writer)<br />
4) gVim (gvim)<br />
5) Other...<br />
Your answer will be set as the default handler for that type of file.<br />
<br />
=== Copy and paste ===<br />
<br />
From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.<br />
<br />
=== Transparency ===<br />
<br />
By using the program transset-df, it is virtually the same as [[transset]], (available by: pacman -S transset-df) you can enable transparancy of windows on the fly. For instance by editing the following in {{Filename|~/.config/openbox/rc.xml}} you can have your middle mouse scroll enable and disable transparency by scrolling down and up on the scroll button, respectively, while over the title bar (it is in the <mouse> section):<br />
<context name="Titlebar"><br />
<mousebind button="Left" action="Press"><br />
<action name="Focus"/><br />
<action name="Raise"/><br />
</mousebind><br />
<mousebind button="Left" action="Drag"><br />
<action name="Move"/><br />
</mousebind><br />
<mousebind button="Left" action="DoubleClick"><br />
<action name="ToggleMaximizeFull"/><br />
</mousebind><br />
<mousebind button="Middle" action="Press"><br />
<action name="Lower"/> <br />
<action name="FocusToBottom"/><br />
<action name="Unfocus"/><br />
</mousebind><br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Right" action="Press"><br />
<action name="Focus"/><br />
<action name="Raise"/><br />
<action name="ShowMenu"><br />
<menu>client-menu</menu><br />
</action><br />
</mousebind><br />
</context><br />
As of now, it only appears to work when no other actions are taken.<br />
<br />
=== Xprop values for applications ===<br />
If you use per-application settings frequently, you might find this bash alias handy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use, run '''{{Codeline|xp}}''' and click on the running program that you'd like to define with per-app settings. The result will display only the info that Openbox requires, namely the WM_WINDOW_ROLE and WM_CLASS (name and class) values:<br />
<br />
[thayer@dublin:~] $ xp<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Xprop for Firefox ====<br />
<br />
For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless {{Codeline|class&#61;"Firefox*"}} is used, regardless of what xprop reports as the actual WM_CLASS values.<br />
<br />
=== Linking the menu to a command ===<br />
<br />
Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script, xdotool, can simulate a keypress by running a command. Xdotool is [http://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd available on AUR]. To use it, simply add the following code to the <keyboard> section of your {{Filename|rc.xml}}:<br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
Restart/reconfigure Openbox. You can now magically summon your menu at your cursor position by running the following command:<br />
# xdotool key ctrl+alt+q<br />
Of course, you can change the shortcut to your liking.<br />
<br />
=== Urxvt in the background ===<br />
<br />
With Openbox, running a terminal as desktop background is easy. You won't need '''devilspie''' here.<br />
<br />
First you must enable transparency, open your {{Filename|.Xdefaults}} file (if it doesn't exist yet, create it in your home folder).<br />
URxvt*transparent:true<br />
URxvt*scrollBar:false<br />
URxvt*geometry:124x24 #I don't use the whole screen, if you want a full screen term don't bother with this and see below.<br />
URxvt*borderLess:true<br />
URxvt*foreground:Black #Font color. My wallpaper is White, you may wish to change this to White.<br />
<br />
Then edit your {{Filename|.config/openbox/rc.xml}} file:<br />
<application name="URxvt"><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<position><br />
<x>center</x><br />
<y>20</y><br />
</position><br />
<layer>below</layer><br />
<desktop>all</desktop><br />
<maximized>true</maximized> #Only if you want a full size terminal.<br />
</application><br />
<br />
The ''magic'' comes from the {{Codeline|<layer>below</layer>}} line, which place the application under all others. Here Urxvt is displayed on all desktops, change it to your convenience.<br />
<br />
Note: Instead of using <application name="URxvt">, you can use another name ("URxvt-bg" for example), and use the -name option when starting uxrvt. That way, only the urxvt terminals which you choose to name URxvt-bg would be captured and modified by the application rule in rc.xml. For example: urxvt -name URxvt-bg (case sensitive)<br />
<br />
=== Keyboard Volume Control ===<br />
If you use ALSA for sound, you can use the amixer program to adjust the volume of sound. You can use Openbox's keybindings to act like multimedia keys. (Alternatively, you can probably find out the names of your real multimedia keys and map them.) For example, in the <keyboard> section of rc.xml:<br />
<br />
<keybind key="W-Up"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+</command><br />
</action><br />
</keybind><br />
<br />
This binds Windows key + Up arrow to increase your master ALSA volume by 5%. Corresponding binding for volume down:<br />
<br />
<keybind key="W-Down"><br />
<action name="Execute"><br />
<command>amixer set Master 5%-</command><br />
</action><br />
</keybind><br />
<br />
As another example you can also use the XF86Audio keybindings:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
The above example should work for the majority of multimedia keyboards. It should enable to raise, lower and mute the Master control of your audio device by using the respective multimedia keyboard keys. Notice also that in this example:<br />
<br />
* The "Mute" key should unmute the Master control if it is already in mute mode.<br />
* The "Raise" and "Lower" keys should unmute the Master control if it is in mute mode.<br />
<br />
== Resources ==<br />
<br />
* [http://openbox.org/ Openbox Website] &ndash; The official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] &ndash; A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
<!-- vim: set ft=Wikipedia: --></div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Openbox&diff=116849Openbox2010-09-12T14:52:23Z<p>Dcelasun: /* Gmrun */ Gmrun now has its own article.</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Openbox}}<br />
<br />
Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the [http://openbox.org/ official website]. This article will pertain to running Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
Openbox is available from the standard repositories:<br />
# pacman -S openbox<br />
<br />
Once installed, pacman will direct you to copy the default {{Filename|menu.xml}} and {{Filename|rc.xml}} configuration files to {{Filename|~/.config/openbox}}, for example:<br />
<br />
{{Note | Do this as a regular user, not as root.}}<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox<br />
$ cp /etc/xdg/openbox/autostart.sh ~/.config/openbox<br />
<br />
{{Filename|rc.xml}} is the core configuration file for Openbox. It is used to manage keyboard shortcuts, themes, virtual desktops and other features.<br />
<br />
{{Filename|menu.xml}} controls the Openbox application menu that appears when you click on your desktop. The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs. See the menu section below for more details, or visit the [http://icculus.org/openbox/ Openbox website].<br />
<br />
{{Filename|autostart.sh}} The default autostart file sets up a number of things for you. You can use this script to launch a panel, to set your desktop wallpaper, or anything else. Visit the [http://openbox.org/wiki/Help:Autostart Openbox Wiki website].<br />
<br />
== Stand-alone window manager ==<br />
<br />
To run Openbox on its own, simply add the following to the bottom of {{Filename|~/.xinitrc}}:<br />
exec openbox-session<br />
<br />
If you have used another window manager before, such as Xfwm, and Openbox won't start after logging out of X, try moving the autostart folder:<br />
mv ~/.config/autostart ~/.config/autostart-bak<br />
<br />
Using D-Bus/HAL or similar, use this instead:<br />
exec ck-launch-session openbox-session<br />
<br />
If you also use '''polkit''' and '''D-Bus''' (e.g. for automount drivers in nautilus from Gnome 2.28 / 2.30) use:<br />
exec ck-launch-session dbus-launch openbox-session<br />
<br />
{{Note | [http://www.archlinux.org/packages/extra/i686/pyxdg/ pyxdg] is required for Openbox's xdg-autostart}}<br />
<br />
== Window manager for Desktop Environments ==<br />
<br />
=== GNOME ===<br />
==== GNOME 2.26 ====<br />
'''''Follow the next guide for GNOME 2.24. If it fails try this:'''''<br />
<br />
If after installing openbox and trying to log into the 'Gnome/openbox' session but it always fails then you can do the following as one way to achieve running openbox as your window manager every time you log into the 'Gnome' session from your login manager (xdm, gdm, kdm, entrance, slim, etc.)<br />
<br />
#Log into your Gnome only session (which would still be using metacity as its window manager) if you aren't already.<br />
#Install openbox if you have not done so already<br />
#Explore your menus to ''System &rarr; Preferences &rarr; Startup Applications'' (possibly named 'Session' for older versions of Gnome)<br />
#Open Startup Application, select '+ Add' and enter the text as seen in the box below whilst omitting the text behind the #.<br />
#Now hit the 'Add' button for that data entry window and make sure the checkbox beside your new entry is selected.<br />
#Thus log out of your gnome session and log back in and you should be running openbox as your window manager.<br />
#Enjoy!<br />
<br />
Name: Openbox Windox Manager # Can be changed<br />
Command: openbox --replace # Text should not be removed from this line, but possibly added to it<br />
Comment: Replaces metacity with openbox # Can be changed<br />
<br />
This creates an entry in a startup list which is executed by gnome everytime that particular user's gnome-session is started.<br />
<br />
==== GNOME 2.24 ====<br />
First, create {{Filename|/usr/share/applications/openbox.desktop}} containing the following:<br />
[Desktop Entry]<br />
Type=Application<br />
Encoding=UTF-8<br />
Name=OpenBox<br />
Exec=openbox<br />
NoDisplay=true<br />
# name of loadable control center module<br />
X-GNOME-WMSettingsModule=openbox<br />
# name we put on the WM spec check window<br />
X-GNOME-WMName=OpenBox<br />
Then, in gconf, set {{Codeline|/desktop/gnome/session/required_components/windowmanager}} to {{Codeline|openbox}}:<br />
$ gconftool-2 -s -t string /desktop/gnome/session/required_components/windowmanager openbox<br />
Finally, choose the '''GNOME''' session in the GDM sessions menu.<br />
<br />
==== GNOME 2.22 and previous ====<br />
# If you use GDM, select the "GNOME/Openbox" login option<br />
# If you use {{Codeline|startx}}, add {{Codeline|exec openbox-gnome-session}} to {{Filename|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-gnome-session<br />
<br />
=== KDE ===<br />
# If you use KDM, select the "KDE/Openbox" login option<br />
# If you use startx, add {{Codeline|exec openbox-kde-session}} to {{Filename|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-kde-session<br />
<br />
=== Xfce4 ===<br />
Log into a normal Xfce4 session. From your terminal of choice, do:<br />
$ killall xfwm4 ; openbox & exit<br />
<br />
This will kill xfwm4, run Openbox, and close the terminal. <br />
<br />
Log out, making sure to check the "Save session for future logins" checkbox. On next login, Xfce4 will use Openbox as its WM. To be able to exit the session using xfce4-session, open your file {{Filename|~/.config/openbox/menu.xml}} (if it isn't there, copy it from {{Filename|/etc/xdg/openbox/menu.xml}}). <br />
<br />
Look for the entry:<br />
<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
</action><br />
</item><br />
<br />
and change it to:<br />
<br />
<item label="Exit Openbox"><br />
<action name="Execute"><br />
<prompt>yes</prompt><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Otherwise, using the "Exit" entry of the root-menu will cause Openbox to terminate its execution, leaving you without a window manager.<br />
<br />
If you have an issue changing between virtual desktops with the mouse wheel skipping over virtual desktops, open your {{Filename|~/.config/openbox/rc.xml}} file and move the mouse binds with actions "DesktopPrevious" and "DesktopNext" from the context "Desktop" to the context "Root" (you may need to define the Root context).<br />
<br />
If you want to use the Openbox root-menu instead of Xfce's, you may terminate Xfdesktop by running the following command in a terminal:<br />
$ xfdesktop --quit<br />
<br />
However, Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities, such as ROX, for these functions.<br />
<br />
(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)<br />
<br />
== Preferences ==<br />
<br />
Currently, there are two options for configuring the core Openbox preferences; manually edit the {{Filename|rc.xml}}, or use the ObConf tool.<br />
<br />
=== Manual configuration ===<br />
<br />
To configure Openbox manually, simply edit {{Filename|~/.config/openbox/rc.xml}} with your favorite text editor. The config file provides plenty of comments throughout, and [http://openbox.org/wiki/Configuration full documentation] is available at the official website.<br />
<br />
=== ObConf ===<br />
<br />
[http://icculus.org/openbox/index.php/ObConf:About ObConf] is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.<br />
<br />
To install ObConf, run:<br />
# pacman -S obconf<br />
<br />
{{Note | ObConf cannot be used to configure keyboard shortcuts and some other advanced features. For these modifications, you must edit {{Filename|rc.xml}} manually (see above). Other option is [http://code.google.com/p/obkey/ ObKey] application (available in [[AUR]]).}}<br />
<br />
=== Application configuration ===<br />
<br />
Openbox features per-application settings, allowing you to define rules for your programs. For example, you can:<br />
* load your web browser on a certain desktop<br />
* load your terminal without a window border<br />
* load your torrent client at a certain position on your screen<br />
<br />
These are defined in {{Filename|~/.config/openbox/rc.xml}}. As you might expect, the instructions are well-documented within the file itself. Full details can also be found here: http://openbox.org/wiki/Help:Applications<br />
<br />
== Menus ==<br />
<br />
The default Openbox menu includes a variety of applications to get you started, but you'll probably want to customize this at some point. There are a number of ways to do so:<br />
<br />
=== Manual configuration ===<br />
<br />
Similar to the {{Filename|rc.xml}} file, you can edit {{Filename|~/.config/openbox/menu.xml}} with your favourite text editor. Although many of the settings are self-explanatory, [http://openbox.org/wiki/Help:Menus full documentation] is available.<br />
<br />
=== MenuMaker ===<br />
<br />
[http://menumaker.sourceforge.net/ MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox. MenuMaker will search your computer for executable programs and create an XML menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.<br />
<br />
MenuMaker is available in the community repository:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu by running:<br />
$ mmaker -v OpenBox3<br />
<br />
By default, MenuMaker will not overwrite an existing menu.xml. To do so, run it with the -f (force) argument:<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
To see a full list of options, run {{Codeline|mmaker --help}}.<br />
<br />
This will give you a pretty thorough menu. Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.<br />
<br />
=== Obmenu ===<br />
<br />
Obmenu is a GUI-based menu editor for Openbox. For those who don't enjoy editing XML source code, this is probably the best option for you.<br />
<br />
It is available in the community repository:<br />
# pacman -S obmenu<br />
<br />
Once installed, simply run {{Codeline|obmenu}} and add or remove the desired applications.<br />
<br />
==== Obm-xdg ====<br />
<br />
<tt>obm-xdg</tt> is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.<br />
<br />
To use obm-xdg, add the following line to {{Filename|~/.config/openbox/menu.xml}}:<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Then run {{Codeline|openbox --reconfigure}} to refresh the Openbox menu. You should now see a sub-menu labeled '''xdg''' in your menu.<br />
<br />
{{Note | If you do not have GNOME installed, then you need to install '''gnome-menus''' package for obm-xdg to work.}}<br />
<br />
=== Python based xdg menu script ===<br />
<br />
This script can be found in Fedora's Openbox package. You will only have to put the script somewhere and add a menu entry.<br />
<br />
Here is my paste: http://pastebin.com/f2f827625<br />
And here is the head: http://cvs.fedoraproject.org/viewvc/devel/openbox/xdg-menu?view=markup<br />
<br />
Download the one you like (maybe you'll prefer the head version of course). You can put the file anywhere, I used ~/Documents/build/xdg-menu (just modify the menu entry later according to YOUR filename/path.)<br />
<br />
Then open your menu.xml with your favourite text editor and add the following entry where you want the new menu (of course, you can modify the label however you want):<br />
<menu id="apps-menu" label="xdgmenu" execute="python /home/shiki/Documents/build/xdg-menu"/><br />
<br />
Save the file, and run: {{Codeline|openbox --reconfigure}}.<br />
<br />
=== OpenBox Menu Generator ===<br />
<br />
OpenBox Menu Generator, avaliable in the AUR as [http://aur.archlinux.org/packages.php?ID=27300 obmenugen-bin] is a menu generator for OpenBox using the *.desktop files. It provides a text file to filter using basic regex which menu items are hidden.<br />
To use, simply run:<br />
$ obmenugen<br />
Then update OpenBox by:<br />
$ openbox --reconfigure<br />
<br />
=== Pipe menus ===<br />
<br />
Openbox (and other WMs like WindowMaker and PekWM) allow you to write scripts that dynamically build menus on the fly. Some examples are system monitors, media player controls, and weather forecasts. Many examples can be found on the openbox [http://openbox.org/wiki/Openbox:Pipemenus site].<br />
<br />
Xyne has also created a file browser and brisbin33 has one for scanning for / connecting to wireless hot spots (requires netcfg). The relevant forum posts for these utilities are [http://bbs.archlinux.org/viewtopic.php?id=77197&p=1 here] and [http://bbs.archlinux.org/viewtopic.php?id=78290 here]<br />
<br />
== Startup programs ==<br />
<br />
Openbox features support for running programs at startup. This is provided by the "openbox-session" command.<br />
<br />
There are two ways to enable autostart:<br />
# If you use startx/xinit to log into your X session, edit {{Filename|~/.xinitrc}} and change the line that executes ''openbox'' to execute '''openbox-session''' instead.<br />
# If you log in with GDM/KDM, then select the ''Openbox'' session and it will automatically use autostart.<br />
<br />
Startup programs are managed in {{Filename|~/.config/openbox/autostart.sh}}. Full instructions and best practices for how to do this are available at the [http://openbox.org/wiki/Help:Autostart Openbox website].<br />
<br />
== Themes and appearance ==<br />
<br />
With the exception of the Openbox Themes topic, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME, KDE or Xfce.<br />
<br />
=== Openbox themes ===<br />
<br />
Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. They also determine the appearance of the application menu and on-screen display (OSD). <br />
<br />
Additional themes are available from the standard repositories:<br />
<br />
# pacman -S openbox-themes<br />
<br />
This package is by no means definitive. You can download more themes at websites such as:<br />
*[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org]<br />
*[http://customize.org/browse/tags/openbox customize.org]<br />
*http://www.minuslab.net/themes/<br />
*http://celo.wordpress.com/themes/<br />
*http://vault.openmonkey.com/pages/openbox<br />
*http://hewphoria.com/?p=submission&type=theme&cat=7<br />
<br />
Downloaded themes should be extracted to <tt>~/.themes</tt> and can be installed or selected with the [[Openbox#Preferences|ObConf]] tool.<br />
<br />
Creating new themes is fairly easy and again [http://openbox.org/wiki/Help:Themes well-documented].<br />
<br />
For a GUI theme editor, take a look at [http://xyne.archlinux.ca/info/obtheme ObTheme].<br />
<br />
=== X11 Appearance ===<br />
<br />
If you are running Openbox as a standalone, you will need to configure .Xdefaults file.<br />
Save a copy to ~/.Xdefaults and /home/root/.Xdefaults for windows opened as Root.<br />
<br />
Xdefaults is a user-level configuration dotfile, typically located at ~/.Xdefaults. When present, it is parsed by the xrdb (Xorg resource database) program automatically when Xorg is started, and can be used to set or override preferences for X and X applications. It can do many operations, including:<br />
<br />
- defining terminal colours<br />
- configuring terminal preferences<br />
- setting DPI, antialiasing, hinting and other X font settings<br />
- changing the Xcursor theme<br />
- theming xscreensaver<br />
- altering preferences on low-level X applications (xclock, xpdf, etc.) <br />
<br />
Xdefaults Arch WiKi<br />
http://wiki.archlinux.org/index.php/Xdefaults<br />
<br />
=== X11 Mouse cursors ===<br />
<br />
Extract the desired Xcursor theme to either <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.<br />
<br />
Add this to {{Filename|~/.Xdefaults}}:<br />
Xcursor.theme: [name-of-cursor-theme]<br />
where {{Codeline|[name-of-cursor-theme]}} is the name of the cursor theme directory. For example:<br />
Xcursor.theme: Vanilla-DMZ-AA<br />
To change the size:<br />
Xcursor.size: [size]<br />
Sometimes it is required to symlink the icon directory into each user directory to make the window manager use them:<br />
$ mkdir ~/.icons<br />
$ ln -s /usr/share/icons/[name-of-cursor-theme] ~/.icons/default<br />
<br />
For more information read the Arch WiKi<br />
http://wiki.archlinux.org/index.php/X11_Cursors<br />
<br />
=== GTK Themes ===<br />
<br />
==== GTK2/GTK+ ====<br />
<br />
First, extract the desired theme to <tt>/usr/share/themes</tt> (system-wide access) or <tt>~/.themes</tt> (local user access), then:<br />
<br />
GTK+ themes can be managed easily with the '''[[LXDE | lxappearance]]''', '''gtk-chtheme''', or '''switch2''' utilities. To install, run:<br />
# pacman -S lxappearance<br />
and/or<br />
# pacman -S gtk-chtheme<br />
and/or<br />
# pacman -S gtk-theme-switch2<br />
<br />
Now you can simply run {{Codeline|lxappearance}}, {{Codeline|gtk-chtheme}} or {{Codeline|switch2}} to set the desired theme.<br />
<br />
==== GTK1 ====<br />
For legacy GTK1 themes, install the '''gtk-theme-switch''' package:<br />
# pacman -S gtk-theme-switch<br />
Then run {{Codeline|switch}} to select a desired theme.<br />
<br />
==== GTK fonts ====<br />
<br />
To manually change the type and size of your fonts, add the following to {{Filename|~/.gtkrc.mine}}:<br />
style "user-font"<br />
{<br />
font_name = "[font-name] [size]"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "[font-name] [size]"<br />
<br />
where {{Codeline|[font-name] [size]}} is the desired font and point size. For example:<br />
style "user-font"<br />
{<br />
font_name = "DejaVu Sans 8"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "DejaVu Sans 8"<br />
<br />
Both {{Codeline|font_name}} and {{Codeline|gtk-font-name}} fields are required for backwards compatibility.<br />
<br />
You can also use '''gtk-chtheme''' or '''lxappearance''' to set GTK font settings. Please refer to the above section.<br />
<br />
==== GTK Icons ====<br />
<br />
First, extract the desired icon theme to <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access), then:<br />
<br />
Add the following to {{Filename|~/.gtkrc.mine}}: <br />
gtk-icon-theme-name = "[name-of-icon-theme]"<br />
<br />
where {{Codeline|[name-of-icon-theme]}} is the name of the icon theme directory. For example:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
Ensure {{Filename|~/.gtkrc-2.0}} is configured to parse {{Filename|~/.gtkrc.mine}}:<br />
<br />
# ~/.gtkrc-2.0<br />
# -- THEME AUTO-WRITTEN DO NOT EDIT<br />
include "/usr/share/themes/Rezlooks-Gilouche/gtk-2.0/gtkrc"<br />
include "/home/username/.gtkrc.mine"<br />
# -- THEME AUTO-WRITTEN DO NOT EDIT<br />
<br />
You can use '''lxappearance''' to choose GTK icon themes. Please refer to the above section.<br />
<br />
=== Desktop icons ===<br />
Openbox does not provide a means to display icons on the desktop. Xfdesktop, PcmanFM, [http://rox.sourceforge.net ROX], [http://idesk.sourceforge.net iDesk], or even Nautilus (and the gnome-settings-daemon) can provide this function. <br />
<br />
ROX and PCmanFM have the additional advantage of being lightweight file managers.<br />
<br />
=== Desktop wallpaper ===<br />
<br />
Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like [[Feh]] or [[Nitrogen]]. Other options include ImageMagick, hsetroot and xsetbg. Or Pcmanfm and Xfdesktop can do it too.<br />
<br />
You can disable the wallpaper loading in gnome-settings-daemon like this:<br />
$ gconftool-2 --set /apps/gnome_settings_daemon/plugins/background/active --type bool False<br />
<br />
== Recommended programs ==<br />
<br />
There is a [[Lightweight Applications|list of Lightweight Software]] at Arch's wiki; most of it nicely fits with Openbox.<br />
<br />
=== Login managers ===<br />
<br />
[http://slim.berlios.de/ SLiM] provides a lightweight and elegant graphical login solution for standalone Openbox configurations. Refer to Arch's [[SLiM]] wiki for detailed instructions.<br />
<br />
[http://qingy.sourceforge.net/ Qingy] is ultralight and very configurable graphical login. It support login to both console and X Windows sessions. It uses [http://www.directfb.org DirectFB], therefore it does not start X Windows unless you choose X Windows session. See article about [[Qingy]] at Arch's wiki.<br />
<br />
=== Composite desktop ===<br />
<br />
[[Xcompmgr]] is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.<br />
(It's worth noting that xcompmgr is no longer developed, and so any issues are unlikely to be fixed)<br />
(Developed an issue with tint2 0.9, the systray icons have a tendency to corrupt)<br />
<br />
[[Cairo Compmgr | Cairo Composite Manager]] -- A versatile and extensible composite manager which uses cairo for rendering, is an alternative.<br />
<br />
=== Panels, trays, and pagers ===<br />
<br />
There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:<br />
<br />
==== Panels ====<br />
* [[PyPanel]]<br />
* [http://nsf.110mb.com/bmpanel/ BMPanel]<br />
* [[tint2]]<br />
* [http://www.gnomefiles.org/app.php/LXPanel LXPanel]<br />
* [http://fbpanel.sourceforge.net fbpanel]<br />
* [http://freshmeat.net/projects/perlpanel/ PerlPanel]<br />
* [http://www.chatjunkies.org/fspanel/ fspanel]<br />
* [http://www.xfce.org/projects/xfce4-panel/ Xfce4-panel]<br />
* [http://live.gnome.org/GnomePanel/ GnomePanel]<br />
* [https://launchpad.net/awn avant-window-navigator]<br />
* [http://developer.berlios.de/projects/cairo-dock/ cairo-dock]<br />
* [http://code.google.com/p/wbar/ wbar]<br />
* [http://www.screenlets.org/ screenlets]<br />
* [http://www.failedprojects.de/pancake/ pancake]<br />
<br />
==== Trays ====<br />
* [http://stalonetray.sourceforge.net/ Stalonetray]<br />
* [http://download.gna.org/fvwm-crystal/trayer/1.0/ Trayer]<br />
<br />
==== Pagers ====<br />
* [http://projects.l3ib.org/trac/visibility Visibility]<br />
* [http://bbtools.sourceforge.net/ bbpager]<br />
* [http://aur.archlinux.org/packages.php?ID=17563 netwmpager]<br />
* [http://useperl.ru/ipager/index.en.html IPager]<br />
* [http://code.google.com/p/neap/ neap]<br />
<br />
Make your choice and add it to your startup file. If you wish to set the desktop layout without using a pager, you can use [http://aur.archlinux.org/packages.php?ID=34376 obsetlayout], which is a packaged version of the setlayout tool from the Openbox wiki.<br />
<br />
=== File managers ===<br />
<br />
There are many possibilities, but the most popular lightweight file managers are:<br />
* [[Thunar]]. Thunar supports auto-mount features and other plugins. <br />
* [http://rox.sourceforge.net ROX] (ROX provides desktop icons)<br />
# pacman -S rox<br />
* [http://pcmanfm.sourceforge.net PCManFM] (pcmanfm also provides desktop icons)<br />
# pacman -S pcmanfm<br />
To access NTFS drives with PCManFM, install ntfs-3g:<br />
# pacman -S ntfs-3g<br />
and make sure you're added to group hal:<br />
# gpasswd -a username hal<br />
For even lighter options, consider [http://www.obsession.se/gentoo/ Gentoo] or [http://emelfm2.net/ emelFM2], both of which use the familiar 'Midnight Commander' two pane layout.<br />
<br />
Others:<br />
Xfe<br />
muCommander<br />
''(Will edit it later after I have tried them both.)''<br />
<br />
Of course, you can also use GNOME's Nautilus. Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections)<br />
<br />
=== Application launchers ===<br />
<br />
==== dmenu ====<br />
<br />
Set-up dmenu as described in the [[dmenu]] wiki article. Then, add the following entry to the <keyboard> section {{Filename|~/.config/openbox/rc.xml}} to enable a shortcut to launch dmenu:<br />
<keybind key="W-space"><br />
<action name="Execute"><br />
<execute>dmenu_run</execute><br />
</action><br />
</keybind><br />
<br />
==== [[Gmrun]] ====<br />
<br />
[http://sourceforge.net/projects/gmrun gmrun] provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:<br />
# pacman -S gmrun<br />
Add the following entry to the <keyboard> section {{Filename|~/.config/openbox/rc.xml}} to enable Alt+F2 functionality:<br />
<keybind key="A-F2"><br />
<action name="execute"><execute>gmrun</execute></action><br />
</keybind><br />
<br />
==== Bashrun ====<br />
<br />
[http://bashrun.sourceforge.net bashrun] provides a different, barebones approach to a run dialog, using a specialized bash session within a small xterm window. It is available in the community repository and can be launched through the Alt+F2 style approach mentioned previously. To make bashrun act more like a traditional run dialog, add the following entry to the <applications> section {{Filename|~/.config/openbox/rc.xml}}:<br />
<application name="bashrun"><br />
<desktop>all</desktop><br />
<decor>no</decor> # switch to yes if you prefer a bordered window<br />
<focus>yes</focus><br />
<skip_pager>yes</skip_pager><br />
<layer>above</layer><br />
</application><br />
<br />
==== Launchy ====<br />
<br />
[http://www.launchy.net/ Launchy] is a less minimalistic approach; it is skinnable and offers more functionality such as a calculator, checking the weather, etc. Originally for Windows, similar to Gnome Do.<br />
# pacman -S launchy<br />
It is launched by Ctrl+Space key combination.<br />
<br />
==== LXPanel ====<br />
<br />
The LXPanel run dialog can be executed with <br />
lxpanelctl run<br />
<br />
==== gnome-panel ====<br />
<br />
The gnome-panel run dialog can be executed with <br />
gnome-panel-control --run-dialog<br />
<br />
=== Clipboard managers ===<br />
<br />
You may wish to install a clipboard manager for feature rich copy/paste ability. '''xfce4-clipman-plugin, parcellite,''' or '''glipper-old''' may be installed via pacman. Add your choice to autostart.sh. From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.<br />
<br />
=== Volume managers ===<br />
<br />
==== gvolwheel ====<br />
<br />
a lightweight audio mixer which lets you control the audio volume through a tray icon [http://aur.archlinux.org/packages.php?ID=25502] <br />
<br />
==== gvtray ====<br />
<br />
A master volume mixer in the system tray [http://aur.archlinux.org/packages.php?ID=6362]<br />
<br />
==== obmixer ====<br />
<br />
Obmixer is a mixer appplet written in C which is intended to be a lightweight alternative to gnome volume control [http://aur.archlinux.org/packages.php?ID=31131]<br />
<br />
==== volti ====<br />
<br />
GTK+ application for controlling audio volume from system tray/notification area [http://aur.archlinux.org/packages.php?ID=33525]<br />
<br />
==== volumeicon ====<br />
<br />
Volume control for your system tray [http://aur.archlinux.org/packages.php?ID=35793]<br />
<br />
==== volwheel ====<br />
<br />
Tray icon to change volume with the mouse [http://www.archlinux.org/packages/community/i686/volwheel/]<br />
<br />
=== Keyboard layout switchers ===<br />
<br />
==== fbxkb ====<br />
<br />
Keyboard indicator and switcher [http://aur.archlinux.org/packages.php?ID=3458]<br />
<br />
==== xxkb ====<br />
<br />
keyboard layout switcher/indicator [http://www.archlinux.org/packages/community/i686/xxkb/]<br />
<br />
==== axkb ====<br />
<br />
QT4 keyboard layout switcher [http://aur.archlinux.org/packages.php?ID=25555]<br />
<br />
==== xneur ====<br />
<br />
X Neural Switcher is a text analyser, it detects the language of input and corrects it if needed [http://aur.archlinux.org/packages.php?ID=9750]<br />
<br />
== Tips and tricks ==<br />
<br />
=== File associations ===<br />
Since Openbox and the applications you are going to use with it are not very well integrated you might run into the issue that your browser does not know which programm it is supposed to use for certain types of files. The package in the AUR [http://aur.archlinux.org/packages.php?ID=23170 gnome-defaults-list] contains a list of file-types and programms specific to the gnome desktop. It will be installed to<br />
/etc/gnome/defaults.list<br />
Open it with your text-editor and now you can search&replace everything with your appropriate programms. Like totem<=>vlc or eog<=>mirage. Save the file to:<br />
~/.local/share/applications/defaults.list<br />
<br />
Another way is to use the package ''perl-file-mimeinfo'' from the repositories, and invoke the mimeopen command like this:<br />
mimeopen -d /path/to/file<br />
You will then be asked what application to use when opening /path/to/file:<br />
Please choose a default application for files of type text/plain<br />
1) notepad (wine-extension-txt)<br />
2) Leafpad (leafpad)<br />
3) OpenOffice.org Writer (writer)<br />
4) gVim (gvim)<br />
5) Other...<br />
Your answer will be set as the default handler for that type of file.<br />
<br />
=== Copy and paste ===<br />
<br />
From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.<br />
<br />
=== Transparency ===<br />
<br />
By using the program transset-df, it is virtually the same as [[transset]], (available by: pacman -S transset-df) you can enable transparancy of windows on the fly. For instance by editing the following in {{Filename|~/.config/openbox/rc.xml}} you can have your middle mouse scroll enable and disable transparency by scrolling down and up on the scroll button, respectively, while over the title bar (it is in the <mouse> section):<br />
<context name="Titlebar"><br />
<mousebind button="Left" action="Press"><br />
<action name="Focus"/><br />
<action name="Raise"/><br />
</mousebind><br />
<mousebind button="Left" action="Drag"><br />
<action name="Move"/><br />
</mousebind><br />
<mousebind button="Left" action="DoubleClick"><br />
<action name="ToggleMaximizeFull"/><br />
</mousebind><br />
<mousebind button="Middle" action="Press"><br />
<action name="Lower"/> <br />
<action name="FocusToBottom"/><br />
<action name="Unfocus"/><br />
</mousebind><br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Right" action="Press"><br />
<action name="Focus"/><br />
<action name="Raise"/><br />
<action name="ShowMenu"><br />
<menu>client-menu</menu><br />
</action><br />
</mousebind><br />
</context><br />
As of now, it only appears to work when no other actions are taken.<br />
<br />
=== Xprop values for applications ===<br />
If you use per-application settings frequently, you might find this bash alias handy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use, run '''{{Codeline|xp}}''' and click on the running program that you'd like to define with per-app settings. The result will display only the info that Openbox requires, namely the WM_WINDOW_ROLE and WM_CLASS (name and class) values:<br />
<br />
[thayer@dublin:~] $ xp<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Xprop for Firefox ====<br />
<br />
For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless {{Codeline|class&#61;"Firefox*"}} is used, regardless of what xprop reports as the actual WM_CLASS values.<br />
<br />
=== Linking the menu to a command ===<br />
<br />
Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script, xdotool, can simulate a keypress by running a command. Xdotool is [http://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd available on AUR]. To use it, simply add the following code to the <keyboard> section of your {{Filename|rc.xml}}:<br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
Restart/reconfigure Openbox. You can now magically summon your menu at your cursor position by running the following command:<br />
# xdotool key ctrl+alt+q<br />
Of course, you can change the shortcut to your liking.<br />
<br />
=== Urxvt in the background ===<br />
<br />
With Openbox, running a terminal as desktop background is easy. You won't need '''devilspie''' here.<br />
<br />
First you must enable transparency, open your {{Filename|.Xdefaults}} file (if it doesn't exist yet, create it in your home folder).<br />
URxvt*transparent:true<br />
URxvt*scrollBar:false<br />
URxvt*geometry:124x24 #I don't use the whole screen, if you want a full screen term don't bother with this and see below.<br />
URxvt*borderLess:true<br />
URxvt*foreground:Black #Font color. My wallpaper is White, you may wish to change this to White.<br />
<br />
Then edit your {{Filename|.config/openbox/rc.xml}} file:<br />
<application name="URxvt"><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<position><br />
<x>center</x><br />
<y>20</y><br />
</position><br />
<layer>below</layer><br />
<desktop>all</desktop><br />
<maximized>true</maximized> #Only if you want a full size terminal.<br />
</application><br />
<br />
The ''magic'' comes from the {{Codeline|<layer>below</layer>}} line, which place the application under all others. Here Urxvt is displayed on all desktops, change it to your convenience.<br />
<br />
Note: Instead of using <application name="URxvt">, you can use another name ("URxvt-bg" for example), and use the -name option when starting uxrvt. That way, only the urxvt terminals which you choose to name URxvt-bg would be captured and modified by the application rule in rc.xml. For example: urxvt -name URxvt-bg (case sensitive)<br />
<br />
=== Keyboard Volume Control ===<br />
If you use ALSA for sound, you can use the amixer program to adjust the volume of sound. You can use Openbox's keybindings to act like multimedia keys. (Alternatively, you can probably find out the names of your real multimedia keys and map them.) For example, in the <keyboard> section of rc.xml:<br />
<br />
<keybind key="W-Up"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+</command><br />
</action><br />
</keybind><br />
<br />
This binds Windows key + Up arrow to increase your master ALSA volume by 5%. Corresponding binding for volume down:<br />
<br />
<keybind key="W-Down"><br />
<action name="Execute"><br />
<command>amixer set Master 5%-</command><br />
</action><br />
</keybind><br />
<br />
As another example you can also use the XF86Audio keybindings:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
The above example should work for the majority of multimedia keyboards. It should enable to raise, lower and mute the Master control of your audio device by using the respective multimedia keyboard keys. Notice also that in this example:<br />
<br />
* The "Mute" key should unmute the Master control if it is already in mute mode.<br />
* The "Raise" and "Lower" keys should unmute the Master control if it is in mute mode.<br />
<br />
== Resources ==<br />
<br />
* [http://openbox.org/ Openbox Website] &ndash; The official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] &ndash; A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
<!-- vim: set ft=Wikipedia: --></div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Gmrun&diff=116848Gmrun2010-09-12T14:52:04Z<p>Dcelasun: Initial version. Mostly taken from crunchbang wiki.</p>
<hr />
<div>= Gmrun =<br />
[http://sourceforge.net/projects/gmrun Gmrun] is an application launcher similar to gnome-run, xfrun4 etc.<br />
<br />
== Usage ==<br />
* GUI apps can just be typed in and run by pressing enter, terminal apps can be run by using ctrl-enter. Entering ctrl-enter with a blank input box will open up a blank terminal.<br />
* Gmrun features tab completion, entering tab will bring up a scrollable list of possible matches.<br />
* Web addresses entered into Gmrun will launch a web browser automatically.<br />
* The same goes for email addresses, using the '<nowiki>mailto:</nowiki>' prefix e.g. <nowiki>mailto:foo@bar.com</nowiki>, will launch your email client.<br />
* More shortcuts can be added to ~/.gmrun (covered below) or you can modify the system-wide file at /usr/share/gmrun/gmrunc.<br />
* You can enter search mode by entering '!' as the first letter, the title should change from 'Run program' to 'Search', letters you input will then automatically come up with suggestions from your command history.<br />
* Ctrl-r will allow you to search backwards through that history.<br />
* Ctrl-s will search forward through the history.<br />
* Ctrl-g will cancel a search <br />
* If an extension has been defined in the configuration file, files can be launched by the correct program just by typing the file name.<br />
* Press escape to exit, without running anything.<br />
<br />
== Configuration ==<br />
<br />
The configuration file is located at /usr/share/gmrun/gmrunc but you can create a per-user configuration in ~/.gmrun.<br />
Please note that '%u' is expanded to the full command entered, '%s' is the last part after the shortcut, e.g. if you enter the URL:<pre>http://www.archlinux.org</pre>%u would expand to<pre>http://www.archlinux.org</pre>and %s would expand to <pre>//www.archlinux.org</pre>Here is an example configuration file.<br />
<pre><br />
# gmrun configuration file<br />
# gmrun is (C) Mihai Bazon, <mishoo@infoiasi.ro><br />
# GPL v2.0 applies<br />
<br />
# Set terminal<br />
Terminal = urxvt<br />
TermExec = ${Terminal} -e<br />
AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man<br />
<br />
# Set window geometry (except height)<br />
Width = 400<br />
Top = 300<br />
Left = 450<br />
<br />
# History size<br />
History = 256<br />
<br />
# Shows last history line selected when invoked<br />
ShowLast = 1<br />
<br />
# Show files starting with '.'<br />
# Default is 0 (off), set it to 1 if you want "hidden" files to show up<br />
# in the completion window<br />
ShowDotFiles = 0<br />
<br />
# Timeout (in milliseconds) after which gmrun will simulate a TAB press<br />
# Set this to NULL if don't like this feature.<br />
TabTimeout = 0<br />
<br />
# URL handlers<br />
# If the entered text is "http://www.google.com" then:<br />
# - %u gets replaced with the whole URL ("http://www.google.com")<br />
# - %s gets replaced with "//www.google.com". This is useful for URL-s<br />
# like "man:printf" --> %s will get replaced with "printf"<br />
URL_http = firefox %u<br />
URL_mailto = firefox -remote "mailto(%s)"<br />
URL_man = ${TermExec} 'man %s'<br />
URL_info = ${TermExec} 'info %s'<br />
URL_pd = ${TermExec} 'perldoc %s'<br />
URL_file = pcmanfm %s<br />
URL_readme = ${TermExec} 'less /usr/doc/%s/README'<br />
URL_info = ${TermExec} 'info %s'<br />
URL_sh = sh -c '%s'<br />
<br />
# extension handlers<br />
EXT:doc,rtf = AbiWord %s<br />
EXT:txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am,php,css,js,py = gedit %s<br />
EXT:mpeg,mpg,avi,mkv,flv = vlc %s<br />
EXT:ps = gv %s<br />
EXT:pdf = epdfview %s<br />
</pre><br />
Some of the above modifiers are explained below.<br />
<br />
* 'ShowDotFiles' Whether to show dotfiles eg .gmrun in the autocomplete menu, 1 = true, 0 = false. <br />
* 'TabTimeout' Whether to show the tab complete menu automatically when something is inputted, 1 = true, 0 = false.<br />
* 'Terminal' The command to run when Ctrl-enter is entered without other input.<br />
* 'TermExec' The command to run when running a specific command in the terminal eg 'ls ~ (Ctrl-enter)'.<br />
* 'URL_http' The command to run when a web address is entered.<br />
* 'URL_mailto' The command to run when an email address is entered.<br />
* 'EXT:html' command to open html files with, based on the file extension, another might be 'EXT:txt = gedit %s'<br />
* 'Top' & 'Left' The placement of the window, in pixels from the respective edge.<br />
* 'Width' The width in pixels of the window.<br />
* 'History' Length of command history that is stored.<br />
<br />
=== Adding Custom Shortcuts ===<br />
Shortcuts can easily be added. See the examples below.<br />
<br />
==== Search Google ====<br />
<pre><br />
URL_cb = firefox 'http://www.google.com/q=%s'<br />
</pre><br />
Which is used like this:<br />
<pre>g:Arch</pre><br />
Would search Google for 'Arch'. <br />
<br />
== Keybindings ==<br />
<br />
You can use your [[Desktop_Environment|Desktop Environment]]'s or [[Window_Manager|Windows Manager]]'s keybinding settings to set one for gmrun.</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=MATLAB&diff=116184MATLAB2010-09-01T09:53:28Z<p>Dcelasun: Structural changes, some grammatical corrections etc.</p>
<hr />
<div>{{stub}}<br />
[[Category:Science (English)]]<br />
<br />
== For the 32bit student edition 2008b ==<br />
=== x86 ===<br />
Just install (might require a few extra packages, but then can be install via pacman.<br />
(I will try to make a list when I install next)<br />
<br />
For graphical install and interface libxp is needed.<br />
<br />
pacman -S libxp <br />
Install from iso file<br />
modprobe loop<br />
mount -o loop matu2k8b.iso /media/iso/<br />
/media/iso/install<br />
<br />
=== x86_64 ===<br />
These are instructions for the installation of 32-bit Matlab on a 64-bit system. Unfortunately, 32-bit is the only version available to students; 64-bit versions are available if you pay more money. These instructions have been updated for the student r2009A version - however the instructions should work with any current version of Matlab. To start off with we need to install a bunch of lib32 packages, not all found with pacman. Check the [[AUR]] for lib32-printproto, lib32-libxp and lib32-libxpm. Install lib32-printproto first, because it's required by lib32-libxp.<br />
<br />
$ pacman -S lib32-mesa<br />
$ pacman -S lib32-glibc<br />
$ pacman -S lib32-libxmu<br />
$ pacman -S lib32-zlib<br />
$ pacman -S lib32-ncurses<br />
$ pacman -S lib32-libxtst<br />
$ pacman -S lib32-libxi<br />
$ pacman -S lib32-libxrender<br />
$ pacman -S lib32-libxfixes<br />
$ pacman -S lib32-freetype2 lib32-fontconfig lib32-libxdamage <br />
<br />
$ yaourt -S lib32-printproto<br />
$ yaourt -S lib32-libxp<br />
$ yaourt -S lib32-libxpm<br />
<br />
My system is not a fresh install so there may be some other packages needed.<br />
<br />
Once they are installed <br />
<br />
$ ./install -glnx86<br />
<br />
After fixing any library dependency problems, you will be able to guide the installer through the install process. If activation doesn't work in the installer you'll need to login to Wolfram's site and download a license file which you'll put in {MATLAB}/licenses. After the install process, you'll need to create a symbolic link because the installer oddly thinks it's installing the 64-bit version of Matlab:<br />
<br />
$ cd {MATLAB}/sys/java/jre<br />
$ ln -s glnx86 glnxa64<br />
<br />
In the above, {MATLAB} should be replaced by the root directory you chose for your installation.<br />
<br />
You'll also need to put another link in matlab's bin folder because despite asking matlab to install the 32bit version, it still thinks you want to use the 64bit one.<br />
<br />
$ cd {MATLAB}/bin<br />
$ ln -s glnx86 glnxa64<br />
<br />
After that you'll need to edit the {MATLAB}/bin/matlab script to get the java settings correct. After the comments at the top of the file, you'll need the line<br />
<br />
export MATLAB_JAVA={Path of JRE}<br />
<br />
Where {Path of JRE} will be /opt/java/jre if you're using Sun's JRE. The path is one level up from where rt.jar is located. That is, rt.jar should be in /opt/java/jre/libs if you used /opt/java/jre for MATLAB_JAVA. In Matlab R2010a it works pretty well, if you use the intern JRE with<br />
<br />
export MATLAB_JAVA={Path of Matlab}/sys/java/jre/glnx86/jre<br />
<br />
To run it, you'll need to:<br />
<br />
$ /{MATLAB}/bin/matlab -glnx86 -desktop<br />
<br />
At this point you may have to resolve more library dependencies or troubleshoot Java. Your version of Matlab may need a specific version of Sun's JRE installed.<br />
<br />
=== General ===<br />
As one installs matlab, it might complain that there isn't a package, for the most part just look at the package name and then install it with pacman, or in the case of x86_64 there are some libraries only in AUR.<br />
<br />
== OpenGL Acceleration ==<br />
<br />
Once Matlab is installed type<br />
<br />
<pre>opengl info</pre><br />
<br />
The output should be similar to the following:<br />
<br />
<pre><br />
Version = 2.0 Mesa 7.8.2<br />
Vendor = Advanced Micro Devices, Inc.<br />
Renderer = Mesa DRI R600 (RV710 9552) 20090101 x86/MMX/SSE2 TCL DRI2<br />
MaxTextureSize = 4096<br />
Visual = 0xcb (TrueColor, depth 24, RGB mask 0xff0000 0xff00 0x00ff)<br />
Software = false<br />
# of Extensions = 107<br />
<br />
Driver Bug Workarounds:<br />
OpenGLBitmapZbufferBug = 0<br />
OpenGLWobbleTesselatorBug = 0<br />
OpenGLLineSmoothingBug = 0<br />
OpenGLClippedImageBug = 0<br />
OpenGLEraseModeBug = 0<br />
</pre><br />
This will vary with card you are using, but the important part is "Software = false". If it's not "false" for you, then there is a problem with your hardware acceleration.<br />
<br />
=== Nvidia ===<br />
<br />
With an nVidia card, the output should be similar to this:<br />
<pre><br />
>> opengl info<br />
Version = 2.1.2 NVIDIA 177.82<br />
Vendor = NVIDIA Corporation<br />
Renderer = Quadro NVS 140M/PCI/SSE2<br />
MaxTextureSize = 8192<br />
Visual = 0x21 (TrueColor, depth 16, RGB mask 0xf800 0x07e0 0x001f)<br />
Software = false<br />
# of Extensions = 144<br />
<br />
Driver Bug Workarounds:<br />
OpenGLBitmapZbufferBug = 0<br />
OpenGLWobbleTesselatorBug = 0<br />
OpenGLLineSmoothingBug = 0<br />
OpenGLClippedImageBug = 1<br />
OpenGLEraseModeBug = 0<br />
</pre><br />
<br />
With the nVidia card all it required to start working was to copy the libGLU.so from the matlab installed library /usr/local/matlab/sys/opengl/lib/glnx86/libGLU.so to /usr/lib directory. Note that in x86_64 this might be a different directory.</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Dell_Inspiron_1564&diff=116088Dell Inspiron 15642010-08-31T13:48:37Z<p>Dcelasun: /* What Works */</p>
<hr />
<div>[[Category:Dell (English)]]<br />
This page is about my experiences with a Dell Inspiron 1564, using Arch i686.<br />
<br />
= System Specs =<br />
There are several configurations of this machine. Mine is as follows:<br />
<br />
'''CPU:''' Intel Core i3 330M(2.13GHz)<br />
<br />
'''RAM:''' 3072MB (1x1024 + 1x2048) 1067MHz DDR3 Dual Channel<br />
<br />
'''Disk:''' <strike>320GB Serial ATA (5400RPM)</strike> '''Upgraded with Seagate Momentus 7200.4 500GB'''<br />
<br />
'''LCD:''' 15.6" 1366X768 HD WLED<br />
<br />
'''Video:''' 512 MB ATI Mobility Radeon HD 4330<br />
<br />
'''WLAN:''' <strike>Dell 1397 Mini (a/b/g) (Broadcom BCM4312 chipset)</strike> '''Upgraded with Intel 5100 a/b/g/n'''<br />
<br />
= Hardware Details =<br />
<br />
lspci output:<br />
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)<br />
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)<br />
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)<br />
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)<br />
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)<br />
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)<br />
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)<br />
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)<br />
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)<br />
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)<br />
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)<br />
02:00.0 VGA compatible controller: ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series]<br />
02:00.1 Audio device: ATI Technologies Inc RV710/730<br />
04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)<br />
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)<br />
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)<br />
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)<br />
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)<br />
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)<br />
lsusb output:<br />
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 001 Device 008: ID 413c:8162 Dell Computer Corp. <br />
Bus 001 Device 007: ID 413c:8161 Dell Computer Corp. <br />
Bus 001 Device 006: ID 0c45:6480 Microdia <br />
Bus 001 Device 005: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device<br />
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)<br />
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
= What Works =<br />
<br />
* [[cpufrequtils|CPU frequency scaling]]<br />
* Coretemp module for temperature monitoring (requires kernel26>=2.6.35)<br />
* Function keys<br />
* Card Reader<br />
* Using the [[ATI Catalyst]] driver the following works:<br />
** [[pm-utils|Suspend and hibernate]]<br />
** 3D acceleration<br />
** VAAPI GPU video acceleration (see [[ATI_Catalyst#Video_acceleration|here]])<br />
** HDMI Video (audio not tested)<br />
<br />
= What Doesn't Work =<br />
<br />
As of Catalyst 10.7, the new ATI 2D Acceleration Architecture causes black rectangle corruption. (See ATI bugs [http://ati.cchtml.com/show_bug.cgi?id=1839 #1839] and [http://ati.cchtml.com/show_bug.cgi?id=1845 #1845])<br />
<br />
Currently, the fix involves reverting back to the old XAA acceleration. To do this run the following as root:<br />
<pre>aticonfig --set-pcs-str=DDX,ForceXAA,TRUE</pre><br />
<br />
= What's Not Tested =<br />
<br />
* Bluetooth<br />
* HDMI Audio<br />
* Microphone</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=115958Laptop/Dell2010-08-30T07:48:35Z<p>Dcelasun: Added Inspiron 1564</p>
<hr />
<div>[[Category:Hardware Compatibility List (English)]]<br />
{| style="background-color: #f3f9ff; margin: 1em 2.5% 0 2.5%; padding: 3px 3px; border: 1px solid #aaa;"<br />
|-<br />
|align="center"|'''[[HCL|Hardware Compatibility List]] - [[HCL/Laptops|Laptops main page]]''' <br> [[HCL/Laptops/Acer|Acer]] - [[HCL/Laptops/Apple|Apple]] - [[HCL/Laptops/Asus|Asus]] - [[HCL/Laptops/Compaq|Compaq]] - [[HCL/Laptops/Dell|Dell]] - [[HCL/Laptops/Digital|Digital]] - [[HCL/Laptops/ECS|ECS]] - [[HCL/Laptops/Siemens-Fujitsu|Siemens-Fujitsu]] - [[HCL/Laptops/Gateway|Gateway]] - [[HCL/Laptops/Hitachi|Hitachi]] - [[HCL/Laptops/Higrade|Higrade]] - [[HCL/Laptops/HP|HP]] - [[HCL/Laptops/IBM|IBM/Lenovo]] - [[HCL/Laptops/Medion|Medion]] - [[HCL/Laptops/Micron|Micron]] - [[HCL/Laptops/Mitac|Mitac]] - [[HCL/Laptops/Mitsubishi|Mitsubishi]] - [[HCL/Laptops/NEC|NEC]] - [[HCL/Laptops/Panasonic|Panasonic]] - [[HCL/Laptops/Samsung|Samsung]] - [[HCL/Laptops/Sony|Sony]] - [[HCL/Laptops/Toshiba|Toshiba]] - [[HCL/Laptops/Zenith|Zenith]] - [[HCL/Laptops/Other|Other]]<br />
|}<br />
{| align="right" width="300px" style="background-color: #f3f9ff; margin: 1em 2.5% 0 2.5%; padding: 3px; border: 1px solid #aaa;"<br />
| style="background-color:white" | <small>'''[[HCL|Hardware Compatibility List (HCL)]]'''</small><br />
|-<br />
|<small> ''Full Systems'' </small><br />
|-<br />
|<small>[[HCL/Laptops|Laptops]] - [[HCL/Desktops|Desktops]] - [[HCL/Servers|Servers]] - [[HCL/Virtual Machines|Virtual Machines]]</small><br />
|-<br />
|<small>''Components''</small><br />
<small>[[HCL/Web Cameras|Web Cameras]] - [[HCL/UPS|UPS]] - [[HCL/Floppy Drives|Floppy Drives]] - [[HCL/CD and DVD Writer/Readers|CD and DVD Writer/Readers]] - [[HCL/SCSI Adapters|SCSI Adapters]] - [[HCL/Gadgets|Gadgets]] - [[HCL/SATA IDE Cards|SATA IDE Cards]] - [[HCL/Keyboards|Keyboards]] - [[HCL/Main Boards|Main Boards]] - [[HCL/RAID Controllers|RAID Controllers]]</small><br />
|}<br />
== Model Version ==<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
! rowspan=2 | Model Version:<br />
! rowspan=2 | Arch Linux<br>Install CD Version:<br> <br />
! colspan=8 | Hardware Support:<br />
! rowspan=2 | Remark:<br />
|- <br />
! Video: || Sound: || Ethernet: || Wireless: || Bluetooth: || Power<br>Management:<br> || Modem: || Other:<br />
|-<br />
|-<br />
| e1405 || Any || 3D with x86-video-intel-2.0, native resolution with xorg-server-1.3 (1440x900)|| Intel HD audio with alsa || Yes || Yes, ipw3945 || Yes || Suspend-to-ram shaky, hibernate is flawless || Untested || SD Card reader works out of the box || Everything else works without a hitch ||<br />
|-<br />
| d420 || Duke || 3D with xf86-video-i810 and 915resolution, native resolution with xorg-server-1.2 (1280x800) || Intel HD audio with alsa || Yes (with tg3) || Yes (with ipw3945) || N/A || Both hibernate and suspend-to-ram and works with powersaved || Untested || Have not tested SD Card reader || External D-Bay dvd/cdrw works, docking station mostly works (can undock, but locks up on redocking) ||<br />
|-<br />
| d620 || Duke || 3D with nvidia, native resolution with xorg-server-1.2 (1440x900)<br> 3D with Intel 945GM, native resolution 1440x900 || Intel HD audio with alsa || Yes || Yes, bcm4311 PCIE with bcm43xx (with kernel >= 2.6.21). Yes for some models with iwl3945. || N/A|| Suspend-to-ram perfect, hibernate works fine. || Untested || not tested Smart Card Reader || Everything else works without a hitch ||<br />
|-<br />
| d820 || Duke || 3D with nvidia drivers || Intel HD audio with alsa || Yes || Yes, IPW3945 || YES|| Suspending with KDE works || Untested || Everything works, even fingerprint reader with bioapi and pam_bioapi || Everything else works without a hitch ||<br />
|-<br />
| Inspiron1501 || Duke || 3D with proprietary ATI fglrx || Intel HD audio with alsa || Yes || Yes, bcm4311 PCIE with bcm43xx (with kernel >= 2.6.21) || N/A|| Untested || Untested || Smart Card Reader works out of the box || Everything else works without a hitch ||<br />
|-<br />
| XPS M1210 || Duke || 3D with nvidia open source drivers || sigmatel audio with alsa || b44 module, out of the box || IPW 3945, command-line wireless_tools || not tested || not tested || not tested || rico card reader worked out of the box, hotkeys using keytouch, webcam works unstable. in mplayer use driver=v4l2:device=/dev/video0 || Everything else works without a hitch ||<br />
|-<br />
| Inspiron 1520 || Core Dump || 3D with nvidia|| sigmatel audio with alsa|| b44 module, out of the box || b43, need firmware || Yes ||Both hibernate and suspend-to-ram and works with pm-utils || untested ||hotkeys works out of the box using hal ||Everything else works without a hitch ||<br />
|-<br />
| [[Dell_Inspiron_1525|Inspiron 1525]] || Archlinux 2008.06 - "Overlord" FTP Install || 3D with x86-video-intel-2.4.3, native resolution with xorg-server-1.5.3 (1280x800)|| Intel HD audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (sky2 module) || PRO/Wireless 3945ABG with iwlwifi-3945-ucode-15.28.2.8 || Untested (doesn't have) || Untested || Untested || SD Card Reader works out of the box || Fn+Up/Down (lcd bright control) works independently of the OS. Everything else work out of the box||<br />
|- <br />
| Inspiron 1525 || Core Dump (2008.03 iso) || 3D with x86-video-intel-2.2, native resolution with xorg-server-1.4 (1280x800)|| Intel HD audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (sky2 module) || Broadcom BCM4310: Yes, ndiswrapper (AUR broadcom-wl work, must blacklist ssb module)|| Untested (doesn't have) || Untested || Untested || SD Card Reader (Ricoh) works out of the box || Fn+Up/Down (lcd bright control) works independently of the OS , Media keys configured with KeyTouch . DVDRW drive and everything else work out of the box||<br />
|- <br />
| [[Dell Inspiron 1564|Inspiron 1564]] || Core Dump || 3D with either [[ATI Catalyst|Catalyst]] or [[ATI|xf86-video-ati]], both works flawlessly. || Intel HD audio with ALSA || Realtek RTL8101E Ethernet Controller || Intel WiFi Link 5100 with iwlagn driver || Untested || Both suspend and hibernate work flawlessly with [[pm-utils]] || Untested || Realtek Card Reader works out-of-the-box. LCD brightness works out-of-the-box, volume keys need configuring through keybindings. || Overall, this laptop is Linux friendly. ||<br />
|- <br />
| Inspiron 1300 || Don't Panic (Core Dump version) || 3D with xf86-video-intel || intel || b44 module, out of the box || BCM4318 based card, works with ndiswrapper || N/A || Untested || Untested || || Everything works out of the box except wireless and sometimes screen resolution ||<br />
|- <br />
| [[Dell XPS M1330]] || Don't Panic (2007.08-2) || For dedicated graphics (NVIDIA 8400m) works with nvidia package || Works with Intel HD Audio and Alsa, but need to configure mic || Yes || Works with iwl4965 || Can set BT but haven't tested with any devices|| Suspend works fine with pm-utils (acpi-cpufreq problem: http://bbs.archlinux.org/viewtopic.php?id=44500) || Untested || 2.0MP webcam works with uvcvideo, media keys work with keytouch or esekeyd, IR remote works, SD card works || Everything basically worked out of the box except the microphone ||<br />
|- <br />
| [[Dell Latitude D830]] || Don't Panic (2007.08-2) || NVIDIA Quadro NVS 140M with proprietary NVIDIA drivers || Alsa with the snd_hda_intel module || yes, with tg3 module || yes, with iwl3965 module || yes || yes, with pm-utils || untested || || ||<br />
|- <br />
| Dell Studio XPS M1640 || (2009.08) || ATI HD4670 Mobile works with xf86-video-ati (see the forums for 3d support), Catalyst Untested || Works with Intel HD Audio and Alsa. || Yes || Works with iwlagn || BT Works || UWorks but when useing xf86-video-ati there is video corruption upon boot || N/A || Webcam works, media keys work with the dell_laptop kernel module, IR works, Card reader works || Everything basically worked out of the box||<br />
|}</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=115956Laptop/Dell2010-08-30T07:38:31Z<p>Dcelasun: CSS and syntax fixes.</p>
<hr />
<div>[[Category:Hardware Compatibility List (English)]]<br />
{| style="background-color: #f3f9ff; margin: 1em 2.5% 0 2.5%; padding: 3px 3px; border: 1px solid #aaa;"<br />
|-<br />
|align="center"|'''[[HCL|Hardware Compatibility List]] - [[HCL/Laptops|Laptops main page]]''' <br> [[HCL/Laptops/Acer|Acer]] - [[HCL/Laptops/Apple|Apple]] - [[HCL/Laptops/Asus|Asus]] - [[HCL/Laptops/Compaq|Compaq]] - [[HCL/Laptops/Dell|Dell]] - [[HCL/Laptops/Digital|Digital]] - [[HCL/Laptops/ECS|ECS]] - [[HCL/Laptops/Siemens-Fujitsu|Siemens-Fujitsu]] - [[HCL/Laptops/Gateway|Gateway]] - [[HCL/Laptops/Hitachi|Hitachi]] - [[HCL/Laptops/Higrade|Higrade]] - [[HCL/Laptops/HP|HP]] - [[HCL/Laptops/IBM|IBM/Lenovo]] - [[HCL/Laptops/Medion|Medion]] - [[HCL/Laptops/Micron|Micron]] - [[HCL/Laptops/Mitac|Mitac]] - [[HCL/Laptops/Mitsubishi|Mitsubishi]] - [[HCL/Laptops/NEC|NEC]] - [[HCL/Laptops/Panasonic|Panasonic]] - [[HCL/Laptops/Samsung|Samsung]] - [[HCL/Laptops/Sony|Sony]] - [[HCL/Laptops/Toshiba|Toshiba]] - [[HCL/Laptops/Zenith|Zenith]] - [[HCL/Laptops/Other|Other]]<br />
|}<br />
{| align="right" width="300px" style="background-color: #f3f9ff; margin: 1em 2.5% 0 2.5%; padding: 3px; border: 1px solid #aaa;"<br />
| style="background-color:white" | <small>'''[[HCL|Hardware Compatibility List (HCL)]]'''</small><br />
|-<br />
|<small> ''Full Systems'' </small><br />
|-<br />
|<small>[[HCL/Laptops|Laptops]] - [[HCL/Desktops|Desktops]] - [[HCL/Servers|Servers]] - [[HCL/Virtual Machines|Virtual Machines]]</small><br />
|-<br />
|<small>''Components''</small><br />
<small>[[HCL/Web Cameras|Web Cameras]] - [[HCL/UPS|UPS]] - [[HCL/Floppy Drives|Floppy Drives]] - [[HCL/CD and DVD Writer/Readers|CD and DVD Writer/Readers]] - [[HCL/SCSI Adapters|SCSI Adapters]] - [[HCL/Gadgets|Gadgets]] - [[HCL/SATA IDE Cards|SATA IDE Cards]] - [[HCL/Keyboards|Keyboards]] - [[HCL/Main Boards|Main Boards]] - [[HCL/RAID Controllers|RAID Controllers]]</small><br />
|}<br />
== Model Version ==<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
! rowspan=2 | Model Version:<br />
! rowspan=2 | Arch Linux<br>Install CD Version:<br> <br />
! colspan=8 | Hardware Support:<br />
! rowspan=2 | Remark:<br />
|- <br />
! Video: || Sound: || Ethernet: || Wireless: || Bluetooth: || Power<br>Management:<br> || Modem: || Other:<br />
|-<br />
|-<br />
| e1405 || Any || 3D with x86-video-intel-2.0, native resolution with xorg-server-1.3 (1440x900)|| Intel HD audio with alsa || Yes || Yes, ipw3945 || Yes || Suspend-to-ram shaky, hibernate is flawless || Untested || SD Card reader works out of the box || Everything else works without a hitch ||<br />
|-<br />
| d420 || Duke || 3D with xf86-video-i810 and 915resolution, native resolution with xorg-server-1.2 (1280x800) || Intel HD audio with alsa || Yes (with tg3) || Yes (with ipw3945) || N/A || Both hibernate and suspend-to-ram and works with powersaved || Untested || Have not tested SD Card reader || External D-Bay dvd/cdrw works, docking station mostly works (can undock, but locks up on redocking) ||<br />
|-<br />
| d620 || Duke || 3D with nvidia, native resolution with xorg-server-1.2 (1440x900)<br> 3D with Intel 945GM, native resolution 1440x900 || Intel HD audio with alsa || Yes || Yes, bcm4311 PCIE with bcm43xx (with kernel >= 2.6.21). Yes for some models with iwl3945. || N/A|| Suspend-to-ram perfect, hibernate works fine. || Untested || not tested Smart Card Reader || Everything else works without a hitch ||<br />
|-<br />
| d820 || Duke || 3D with nvidia drivers || Intel HD audio with alsa || Yes || Yes, IPW3945 || YES|| Suspending with KDE works || Untested || Everything works, even fingerprint reader with bioapi and pam_bioapi || Everything else works without a hitch ||<br />
|-<br />
| Inspiron1501 || Duke || 3D with proprietary ATI fglrx || Intel HD audio with alsa || Yes || Yes, bcm4311 PCIE with bcm43xx (with kernel >= 2.6.21) || N/A|| Untested || Untested || Smart Card Reader works out of the box || Everything else works without a hitch ||<br />
|-<br />
| XPS M1210 || Duke || 3D with nvidia open source drivers || sigmatel audio with alsa || b44 module, out of the box || IPW 3945, command-line wireless_tools || not tested || not tested || not tested || rico card reader worked out of the box, hotkeys using keytouch, webcam works unstable. in mplayer use driver=v4l2:device=/dev/video0 || Everything else works without a hitch ||<br />
|-<br />
| Inspiron 1520 || Core Dump || 3D with nvidia|| sigmatel audio with alsa|| b44 module, out of the box || b43, need firmware || Yes ||Both hibernate and suspend-to-ram and works with pm-utils || untested ||hotkeys works out of the box using hal ||Everything else works without a hitch ||<br />
|-<br />
| [[Dell_Inspiron_1525|Inspiron 1525]] || Archlinux 2008.06 - "Overlord" FTP Install || 3D with x86-video-intel-2.4.3, native resolution with xorg-server-1.5.3 (1280x800)|| Intel HD audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (sky2 module) || PRO/Wireless 3945ABG with iwlwifi-3945-ucode-15.28.2.8 || Untested (doesn't have) || Untested || Untested || SD Card Reader works out of the box || Fn+Up/Down (lcd bright control) works independently of the OS. Everything else work out of the box||<br />
|- <br />
| Inspiron 1525 || Core Dump (2008.03 iso) || 3D with x86-video-intel-2.2, native resolution with xorg-server-1.4 (1280x800)|| Intel HD audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (sky2 module) || Broadcom BCM4310: Yes, ndiswrapper (AUR broadcom-wl work, must blacklist ssb module)|| Untested (doesn't have) || Untested || Untested || SD Card Reader (Ricoh) works out of the box || Fn+Up/Down (lcd bright control) works independently of the OS , Media keys configured with KeyTouch . DVDRW drive and everything else work out of the box||<br />
|- <br />
| Inspiron 1300 || Don't Panic (Core Dump version) || 3D with xf86-video-intel || intel || b44 module, out of the box || BCM4318 based card, works with ndiswrapper || N/A || Untested || Untested || || Everything works out of the box except wireless and sometimes screen resolution ||<br />
|- <br />
| [[Dell XPS M1330]] || Don't Panic (2007.08-2) || For dedicated graphics (NVIDIA 8400m) works with nvidia package || Works with Intel HD Audio and Alsa, but need to configure mic || Yes || Works with iwl4965 || Can set BT but haven't tested with any devices|| Suspend works fine with pm-utils (acpi-cpufreq problem: http://bbs.archlinux.org/viewtopic.php?id=44500) || Untested || 2.0MP webcam works with uvcvideo, media keys work with keytouch or esekeyd, IR remote works, SD card works || Everything basically worked out of the box except the microphone ||<br />
|- <br />
| [[Dell Latitude D830]] || Don't Panic (2007.08-2) || NVIDIA Quadro NVS 140M with proprietary NVIDIA drivers || Alsa with the snd_hda_intel module || yes, with tg3 module || yes, with iwl3965 module || yes || yes, with pm-utils || untested || || ||<br />
|- <br />
| Dell Studio XPS M1640 || (2009.08) || ATI HD4670 Mobile works with xf86-video-ati (see the forums for 3d support), Catalyst Untested || Works with Intel HD Audio and Alsa. || Yes || Works with iwlagn || BT Works || UWorks but when useing xf86-video-ati there is video corruption upon boot || N/A || Webcam works, media keys work with the dell_laptop kernel module, IR works, Card reader works || Everything basically worked out of the box||<br />
|}</div>Dcelasunhttps://wiki.archlinux.org/index.php?title=Pidgin&diff=114363Pidgin2010-08-18T14:35:45Z<p>Dcelasun: /* Pidgin-OTR */ Fix very small typo.</p>
<hr />
<div>[[Category:Internet and Email (English)]]<br />
{{i18n|Pidgin}}<br />
[[de:Pidgin]]<br />
<br />
'''Pidgin''' (formerly Gaim) is an instant messaging client for Linux that can connect to many different IM networks, such as Live Messenger, Yahoo, IRC, AIM, etc. One of Pidgin's key features is that you can use many networks at the same time.<br />
<br />
==Installation==<br />
# pacman -S pidgin<br />
<br />
You may also want to install extra plugins from the <tt>purple-plugin-pack</tt>.<br />
<br />
==Spellcheck==<br />
Aspell will be installed as a dependency, but to prevent all of your text from showing up as incorrect you will need to install an aspell dictionary:<br />
# pacman -S aspell-en<br />
<br />
This installs the English dictionary. Use <tt>pacman -Ss aspell</tt> to list available languages.<br />
<br />
{{Note| The '''switch spell'''-plugin is included in the purple-plugin-pack (see above). It allows you to switch between multiple languages.}}<br />
<br />
==Sound fix==<br />
If the sound does not work with the automatic settings, configure [[ALSA]], then change the play method ('Command') to the following:<br />
aplay %s<br />
<br />
Another (unconfirmed) solution is to install following package and use 'Automatic':<br />
gstreamer0.10-good<br />
<br />
==Browser error==<br />
If clicking a link within Pidgin creates an error message about trying to use 'sensible-browser' to open a link, try editing {{Filename|~/.purple/prefs.xml}}. Find the line referencing 'sensible-browser' and change it to this:<br />
<pref name='command' type='path' value='firefox'/><br />
<br />
This example assumes you use [[Firefox]].<br />
<br />
==QIP Encoding bug==<br />
There is another bug in character encoding when communicating between Pidgin and QIP, which especially affects Czech language, but there are also other languages affected. There are two possible solutions. The better one is to upgrade from QIP to QIP Infimum, second solution is to install and enable plugin from '''pidgin-qip-decoder''' package currently available from [[AUR]].<br />
<br />
==IRC==<br />
This is a small tutorial for connecting to Freenode. It should work for other IRC networks as long as you substitute the port numbers and other specific settings.<br />
<br />
Go to Accounts -> Manage Accounts -> Add -> Fill/select the following options:<br />
Protocol: IRC <br />
Username: <your username><br />
<br />
Now go to Buddies -> New instant message ( or hit ctrl + m) fill 'freenode.net' in the textbox and <username>@irc.freenode.net -> then click 'Ok'. Type:<br />
/join #archlinux (channel is irrelevant)<br />
<br />
In order to register your nick, type:<br />
/msg nickserv register <password> <email-addres><br />
<br />
Follow the instructions from the registration mail. For further help type:<br />
/msg nickserv help<br />
/msg nickserv help <command><br />
<br />
This final step will add your channel to 'Buddies': go to Buddies -> Add chat -> fill the correct channel in the textbox named channel (#archlinux).<br />
<br />
==Xfire==<br />
Install one of the two pacakages from the [[AUR]]:<br />
<br />
Stable:<br />
pidgin-gfire<br />
Or the development/SVN:<br />
pidgin-gfire-svn <br />
<br />
Now add a new account and select xfire as protocol.<br />
<br />
==Facebook XMPP==<br />
Since Facebook Chat supports XMPP, you can use Pidgin without extra plugins. See this article for more information: [http://blog.facebook.com/blog.php?post=297991732130 Facebook Chat Now Available Everywhere]<br />
<br />
{{Note| In order to utilise facebook chat through XMPP and pidgin, you will require a facebook "username", this is located in facebook -> account settings -> username [below real name]}}<br />
<br />
1. Go to "Accounts" and select "Manage Accounts."<br />
<br />
2. On the Basic tab, enter the following info:<br />
: Protocol: XMPP<br />
: Username: ''Your facebookID'' (without e-mail domain, e.g. @yahoo.com, etc)<br />
: Domain: chat.facebook.com (make sure you haven't typed any extra space)<br />
: Resource: Pidgin<br />
: Password: ''Your Password''<br />
: Local alias: ''Your Name''<br />
<br />
3. Click the Advanced tab, then enter the following info:<br />
: Connect port: 5222<br />
: Connect server: chat.facebook.com (make sure you haven't typed any extra space)<br />
: (Uncheck the box labeled "Require SSL/TLS")<br />
<br />
Most users probably get a '503: Service unavailable' after this. You need the package '''cyrus-sasl-plugins''' for correct authentication. [http://permalink.gmane.org/gmane.network.jabber.devel/31961 Source]<br />
<br />
# pacman -Sy cyrus-sasl-plugins<br />
<br />
== Privacy ==<br />
Pidgin has some privacy rules set by default. Namely, the whole world cannot send you messages; only your contacts or people selected from a list. Adjust this, and other settings through:<br />
Tools -> Privacy<br />
<br />
=== Pidgin-OTR ===<br />
This is a plugin that brings Off-The-Record (OTR) messaging to Pidgin. OTR is a cryptographic protocol that will encrypt your instant messages.<br />
<br />
First you need to install the Pidgin OTR plugin itself, like so:<br />
$ pacman -S pidgin-otr<br />
<br />
Once this has been done, OTR has been added to Pidgin. <br />
<br />
To enable OTR, start Pidgin and go to Tools -> Plugins or press Ctrl + U. Scroll down to the entry entitled "Off-The-Record Messaging". If the checkbox beside it is not checked, check it.<br />
<br />
Next, click on the plugin entry and select "Configure plugin" at the bottom. Select which account you wish to generate a key for, then click "Generate". You will have now generated a private key. If you are not sure what the other options do, leave them, the default options will work fine.<br />
<br />
The next step is to contact a buddy who also has OTR installed. In the chat window, a new icon should appear to the top right of your text input box. Click on it, and select "Start private conversation". This will start an 'Unverified' session. Unverified sessions are encrypted, but not verified - that is, you have started a private conversation with someone using your buddy's account who has OTR, but who might not be your buddy. The steps for verification of a buddy are beyond the scope of this section; however, they might be added in the future.<br />
<br />
== Perl plugins ==<br />
If you encounter problems loading any perl plugins you need to modify the PKGBUILD removing "--disable-perl" or use [http://aur.archlinux.org/packages.php?ID=25500 pidgin-perl].<br />
<br />
== Sametime protocol ==<br />
Sametime support is not available in the default version of Arch Linux's Pidgin package. This section will demonstrate how to enable this feature via AUR and the 'Meanwhile' plugin. This section assumes that you are familiar with using the AUR and that you are performing the following commands in {{Filename|~/builds}} directory.<br />
<br />
First, download and extract the AUR package for Meanwhile.<br />
$ wget http://aur.archlinux.org/packages/meanwhile/meanwhile.tar.gz && tar xfvz meanwhile.tar.gz<br />
<br />
Then change in to the extracted directory:<br />
$ cd meanwhile<br />
<br />
If you are building this on a x86 machine you will probably need to add the following to the PKGBUILD<br />
arch=('i686')<br />
<br />
Now the package must be built:<br />
$ makepkg -s<br />
<br />
Install the package as root:<br />
# pacman -U meanwhile-version-arch.pkg.tar.gz<br />
<br />
Now download and extract Pidgin from AUR (this will use pidgin-gnome, change to preference):<br />
$ cd ~/builds && wget http://aur.archlinux.org/packages/pidgin-gnome/pidgin-gnome.tar.gz && tar xfvz pidgin-gnome.tar.gz<br />
<br />
Change into the extracted directory:<br />
$ cd pidgin-gnome<br />
<br />
In order to have 'Sametime' support you must remove the following from PKGBUILD<br />
--disable-meanwhile <br />
<br />
Build the package:<br />
$ makepkg -s<br />
<br />
Install the package as root:<br />
# pacman -U pidgin-gnome-2.5.8-1-i686.pkg.tar.gz<br />
<br />
Pidgin now has the 'Sametime' protocol as an option when creating accounts.<br />
<br />
== Other packages ==<br />
Arch has other Pidgin-related packages. Here are the most popular (for a thorough list, search the AUR):<br />
*pidgin-libnotify - Libnotify support, for theme-consistent notifications<br />
*pidgin-guifications - Toaster-style popup notifications<br />
*microblog-purple - Libpurple plug-in supporting microblog services like Twitter<br />
<br />
<br />
== Trouble-shooting ==<br />
<br />
*If facebook XMPP verification does not work for you, there a package in the aur [http://aur.archlinux.org/packages.php?ID=34479 pidgin-facebookchat] which does not require a unique user name (you may login with an email address)<br />
<br />
*The facebookchat plugin will prompt for varification (enter these two words...), if that fails, hit cancel and log onto facebook with pidgin open, this will configre the plugin's security setting)<br />
<br />
<br />
== External links ==<br />
*[http://pidgin.im Pidgin homepage]</div>Dcelasun