https://wiki.archlinux.org/api.php?action=feedcontributions&user=Piezoelectric&feedformat=atomArchWiki - User contributions [en]2024-03-29T08:18:18ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Kernel_Patches_and_Patchsets&diff=119528Talk:Kernel Patches and Patchsets2010-10-21T00:52:41Z<p>Piezoelectric: </p>
<hr />
<div>This might be a good place to describe what the Arch Linux patches do (changing the boot icon, etc ...) --[[User:Piezoelectric|Piezoelectric]] 20:52, 20 October 2010 (EDT)<br />
<br />
Removed from '''Category:Development'''<br />
<br />
It's not about ''developing'' kernel patches.<br><br />
--[[User:Gog|Gog]] 08:28, 18 October 2009 (EDT)</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=ATI&diff=106313ATI2010-05-14T00:40:39Z<p>Piezoelectric: /* Kernel mode-setting (KMS) */ video= is now OK to use with radeon KMS</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.<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.<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 libgl ati-dri<br />
<br />
To install <code>xf86-video-radeonhd</code> : <br />
pacman -S xf86-video-radeonhd libgl ati-dri<br />
<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 '''HAL''', '''mesa''', the group '''xorg''' and the group '''xorg-input-drivers''' installed:<br />
pacman -S hal xorg-input-drivers mesa xorg<br />
<br />
and that HAL has been added in DAEMONS array in '''/etc/rc.conf''' and is '''running'''.<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 [http://wiki.archlinux.org/index.php/ATI#AMD.2FAti_cards_and_kernel_mode-setting_.28KMS.29 this.]}}<br />
<br />
==== Running Xorg with expanded xorg.conf ====<br />
{{Note| '''/etc/X11/xorg.conf''' no longer requires sections for all input devices because HAL can configure some/all via hotplugging. (Ensure '''HAL''' is running and '''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. Grab [http://aur.archlinux.org/packages.php?ID=33016 radeon_ucode] and [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 />
=== Tuning performance with xf86-video-radeonhd ===<br />
TODO<br />
<br />
== Powersaving ==<br />
<br />
=== With KMS enabled ===<br />
<br />
TODO (After kernel26>=2.6.34 passes to [core]<br />
<br />
=== Without KMS ===<br />
<br />
TODO<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 />
=== 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, the '''HAL''' daemon must be installed and running, and it is recommended that {{Package Official|xorg-input-drivers}} 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 />
=== I am using the open source drivers and 3D acceleration doesn't work ===<br />
<br />
Owners of HD 3000 and HD 4000 series cards may require additional firmware files for IRQ support; otherwise, GPU acceleration is disabled:<br />
<br />
$ dmesg | egrep "drm|radeon"<br />
...<br />
r600_cp: Failed to load firmware "radeon/R700_rlc.bin"<br />
[drm:rv770_startup] *ERROR* Failed to load firmware!<br />
radeon 0000:01:00.0: disabling GPU acceleration<br />
<br />
The required files are available from the {{Package AUR|radeon_ucode}} package in the [[AUR]] ({{Bug|19007}}). Furthermore, this firmware may be required in the initial ramdisk. The {{Package AUR|radeon-initrd}} package provides an appropriate [[mkinitcpio]] hook.</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=User_talk:Allan/Pacman_Hooks_-_Version_1&diff=102812User talk:Allan/Pacman Hooks - Version 12010-04-11T17:01:10Z<p>Piezoelectric: /* Matt's Method */</p>
<hr />
<div>Hi, I think it would be really useful to have pacman hooks for a simliar reason:<br />
<br />
As a zsh user, whenever I update a package, I need to manually run the rehash built-in so that zsh will recognize new/updated paths.<br />
<br />
A pacman PostInstall hook would cut out this step.<br />
<br />
Thanks!<br />
Noah<br />
<br />
binaural gmail com<br />
<br />
== Matt's Method ==<br />
<br />
-- [[User:Piezoelectric|Piezoelectric]] 13:00, 11 April 2010 (EDT)<br />
<br />
Hey, Allan, I like your idea. In fact I came across it after posting a feature request [http://bugs.archlinux.org/task/19044 FS#19044]. I'll outline my ideas here in a similar matter to your own.<br />
<br />
=== Directory Layout ===<br />
/etc/pacman.d/<br />
/hooks.sh<br />
/local.d/<br />
/<pkgname>.install<br />
<br />
=== hooks.sh ===<br />
<br />
This is the general dispatch file, while the entire functionality of this file ''could'' be built directly into pacman, and the file itself ignored altogether, I think it's best to do it like this, because what we are going for in the first place is maximum per-user flexibility. <br />
<br />
{{File|name=hooks.sh|content=<br />
#!/bin/sh<br />
<br />
# this is just the basic idea, no error checking, etc<br />
<br />
#action will be one of: pre_install, post_install, pre_upgrade,<br />
# post_upgrade, pre_remove, post_remove<br />
action=$1<br />
<br />
# package will be the package name in question<br />
package=$2<br />
<br />
# get local install info<br />
source /etc/pacman.d/${package}.install<br />
<br />
# execute local action if it exists<br />
$action<br />
<br />
}}<br />
<br />
=== <pkgname>.install example ===<br />
<br />
=== TODO ===<br />
<br />
Each <tt><pkgname>.install</tt> should be able to specify when in it will be performed in relation to the install file that comes with the package. Ex: <tt>TIMING={before|replace|after}</tt><br />
<br />
I'll integrate this idea in a little bit, I just wanted to make note of it in case someone happens across this in the short time that I step away =)</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=User_talk:Allan/Pacman_Hooks_-_Version_1&diff=102811User talk:Allan/Pacman Hooks - Version 12010-04-11T17:00:30Z<p>Piezoelectric: /* Matt's Method */</p>
<hr />
<div>Hi, I think it would be really useful to have pacman hooks for a simliar reason:<br />
<br />
As a zsh user, whenever I update a package, I need to manually run the rehash built-in so that zsh will recognize new/updated paths.<br />
<br />
A pacman PostInstall hook would cut out this step.<br />
<br />
Thanks!<br />
Noah<br />
<br />
binaural gmail com<br />
<br />
== Matt's Method ==<br />
<br />
-- [[User:Piezoelectric|Piezoelectric]] 13:00, 11 April 2010 (EDT)<br />
<br />
Hey, Allan, I like your idea. In fact I came across it after posting a feature request [http://bugs.archlinux.org/task/19044 FS#19044]. I'll outline my ideas here in a similar matter to your own.<br />
<br />
=== Directory Layout ===<br />
/etc/pacman.d/<br />
/hooks.sh<br />
/local.d/<br />
/<pkgname>.install<br />
<br />
=== hooks.sh ===<br />
<br />
This is the general dispatch file, while the entire functionality of this file ''could'' be built directly into pacman, and the file itself ignored altogether, I think it's best to do it like this, because what we are going for in the first place is maximum per-user flexibility. <br />
<br />
{{File|name=hooks.sh|content=<br />
#!/bin/sh<br />
<br />
# this is just the basic idea, no error checking, etc<br />
<br />
#action will be one of: pre_install, post_install, pre_upgrade,<br />
# post_upgrade, pre_remove, post_remove<br />
action=$1<br />
<br />
# package will be the package name in question<br />
package=$2<br />
<br />
# get local install info<br />
source /etc/pacman.d/${package}.install<br />
<br />
# execute local action if it exists<br />
$action<br />
<br />
}}<br />
<br />
=== TODO ===<br />
<br />
Each <tt><pkgname>.install</tt> should be able to specify when in it will be performed in relation to the install file that comes with the package. Ex: <tt>TIMING={before|replace|after}</tt><br />
<br />
I'll integrate this idea in a little bit, I just wanted to make note of it in case someone happens across this in the short time that I step away =)</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=User_talk:Allan/Pacman_Hooks_-_Version_1&diff=102810User talk:Allan/Pacman Hooks - Version 12010-04-11T17:00:10Z<p>Piezoelectric: </p>
<hr />
<div>Hi, I think it would be really useful to have pacman hooks for a simliar reason:<br />
<br />
As a zsh user, whenever I update a package, I need to manually run the rehash built-in so that zsh will recognize new/updated paths.<br />
<br />
A pacman PostInstall hook would cut out this step.<br />
<br />
Thanks!<br />
Noah<br />
<br />
binaural gmail com<br />
<br />
== Matt's Method ==<br />
<br />
-- [[User:Piezoelectric|Piezoelectric]] 13:00, 11 April 2010 (EDT)<br />
<br />
Hey, Allan, I like your idea. In fact I came across it after posting a feature request [http://bugs.archlinux.org/task/19044 FS#19044]. I'll outline my idea's here in a similar matter to your own.<br />
<br />
=== Directory Layout ===<br />
/etc/pacman.d/<br />
/hooks.sh<br />
/local.d/<br />
/<pkgname>.install<br />
<br />
=== hooks.sh ===<br />
<br />
This is the general dispatch file, while the entire functionality of this file ''could'' be built directly into pacman, and the file itself ignored altogether, I think it's best to do it like this, because what we are going for in the first place is maximum per-user flexibility. <br />
<br />
{{File|name=hooks.sh|content=<br />
#!/bin/sh<br />
<br />
# this is just the basic idea, no error checking, etc<br />
<br />
#action will be one of: pre_install, post_install, pre_upgrade,<br />
# post_upgrade, pre_remove, post_remove<br />
action=$1<br />
<br />
# package will be the package name in question<br />
package=$2<br />
<br />
# get local install info<br />
source /etc/pacman.d/${package}.install<br />
<br />
# execute local action if it exists<br />
$action<br />
<br />
}}<br />
<br />
=== TODO ===<br />
<br />
Each <tt><pkgname>.install</tt> should be able to specify when in it will be performed in relation to the install file that comes with the package. Ex: <tt>TIMING={before|replace|after}</tt><br />
<br />
I'll integrate this idea in a little bit, I just wanted to make note of it in case someone happens across this in the short time that I step away =)</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:Initscripts/rc.conf&diff=102793Talk:Initscripts/rc.conf2010-04-11T14:15:55Z<p>Piezoelectric: /* Localization */</p>
<hr />
<div>= Localization =<br />
<br />
Can't HARDWARECLOCK also be set to ntp? -- [[User:piezoelectric|piezoelectric]]<br />
<br />
:no - setting it to ntp, blank, null, or anything else just stops adjtime from running and disables the hwclock load in rc.sysinit and save in rc.shutdown [[User:Thestinger|Thestinger]] 13:51, 7 April 2010 (EDT)<br />
<br />
::I see that, but there might be some mention that HARDWARECLOCK shouldn't be UTC or localtime if the user wants to use NTP (which I suspect a lot of people do). -- [[User:Piezoelectric|Piezoelectric]] 10:15, 11 April 2010 (EDT)</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:Diskless_system&diff=102764Talk:Diskless system2010-04-11T01:00:36Z<p>Piezoelectric: /* NBD */</p>
<hr />
<div>Thanks, Net147, those edits helped me remove the last issues I had with my diskless setup. I moved your DHCP workaround to the top of the list, that is a very good script you have. --[[User:Geekner|Geekner]]<br />
<br />
== dnsmasq and pxe boot ==<br />
<br />
I sucessful booted a VirtualBox machine without the three dhcp-option-force parameter in dnsmasq.conf.<br />
The configfile is searched along a path according to the syslinux wiki, so it it is not neccessary.<br />
<br />
<br />
== DHCP/Network Daemon Workaround ==<br />
Changed to a more simple fix (derived from Net147's script) making use of confd to keep it closer to vanilla. <br />
Also note if you want to change it back to the old way that the -p option is not actually required as it is implied by -s.<br />
--[[User:Mikep|Mikep]] 18:29, 9 January 2010 (EST)<br />
<br />
<br />
== NBD ==<br />
It seems like the thing to do these days is NBD instead of NFS. Any interest in changing the article or amending it with an NBD option? (I would do it, not asking anyone else to.) -- [[User:Piezoelectric|Piezoelectric]] 21:00, 10 April 2010 (EDT)</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:ATI&diff=102763Talk:ATI2010-04-11T00:59:00Z<p>Piezoelectric: /* Forking this article for proprietary */</p>
<hr />
<div>== Forking this article for proprietary ==<br />
Cleaned up some info today and noticed this article is really getting unruly. I propose that we fork the proprietary portion to its own article, such as "ATI Catalyst". Considering that the fglrx is now absolutely unsupported by Arch Linux, it would help make this article much less daunting to newcomers.<br />
<br />
--[[User:Thayer | Thayer]] Mon Jan 4 10:53:18 PST 2010<br />
<br />
:I wholly agree.<br />
<br />
:-- [[User:Pointone|pointone]] 23:53, 13 February 2010 (EST)<br />
:-- [[User:piezoelectric|piezoelectric]] 20:58, 10 April 2010 (EDT)<br />
<br />
== EXA and Adobe Flash performance ==<br />
<br />
I noticed that enabling <br />
<pre>Option "AccelMethod" "EXA"</pre><br />
as mentioned under "Performance tuning" lead to significantly worse Flash performance. This was using extra/flashplugin 10.0.22.87-1, aur/firefox-beta 3.5rc2-1 and extra/xf86-video-ati 6.12.2-2. My card (ATI Radeon 9550) uses the RV350 chipset, hence it is a bit dated. <br />
<br />
If this isn't just a local phenomena, perhaps it should be mentioned?<br />
<br />
----<br />
<br />
I don't know. I disabled EXA, and got even worse Flash performance, according to a flash benchmark test I found at Snails Animation [http://www.snailsanimation.com/benchmark08_play.php]. (flashplugin 10.0.32.18-1.1, firefox 3.5.3-1, xf86-video-ati 6.12.2-2.) Same card and chipset, though. --[[User:Rataxes|Rataxes]] 16:38, 15 September 2009 (EDT)<br />
<br />
== KMS notes ==<br />
KMS on r5xx not works with linux 2.6.31.3. only if libdrm, libgl, mesa, xf86-video-ati - all installed from git.<br />
<br />
KMS seems to be enabled by default on r5xx with latest packages from arch. Should all those messages about it being unsupported be removed? [[User:TheCycoONE|TheCycoONE]]<br />
<br />
=== KMS Early ===<br />
I don't know how others feel about this, but my preferred setup is to put <tt>options radeon modeset=1</tt> in <tt>modprobe.conf</tt> and then to include <tt>modprobe.con</tt> along with the <tt>radeon</tt> module in <tt>mkinitcpio.conf</tt>. This way KMS is enabled once for both early and late start. Also, in the event of problems, <tt>radeon.modeset=1</tt> can still be added as a kernel option to the bootloader. --[[User:piezoelectric|piezoelectric]]<br />
<br />
== mesa PKGBUILD ==<br />
Added a note in the KMS setup section about where to locate libgl and ati-dri in the ABS. Hope it helps. I was banging my head on that one for a week. [[User:Wriggary|Wriggary]] 20:04, 29 January 2010 (EST)<br />
<br />
== Driver ati or radeon ==<br />
<br />
I just did the tutorial installing:<br />
pacman -S xf86-video-ati libgl ati-dri<br />
I could only get it working by changing in xorg.conf:<br />
Driver "vesa"<br />
to:<br />
Driver "ati"<br />
and not:<br />
Driver "radeon"<br />
as the tutorial stated. I have no idea why/how, but maybe it'll help people reading it here.</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:ATI&diff=102762Talk:ATI2010-04-11T00:58:37Z<p>Piezoelectric: /* Forking this article for proprietary */</p>
<hr />
<div>== Forking this article for proprietary ==<br />
Cleaned up some info today and noticed this article is really getting unruly. I propose that we fork the proprietary portion to its own article, such as "ATI Catalyst". Considering that the fglrx is now absolutely unsupported by Arch Linux, it would help make this article much less daunting to newcomers.<br />
<br />
--[[User:Thayer | Thayer]] Mon Jan 4 10:53:18 PST 2010<br />
<br />
:I wholly agree.<br />
<br />
:-- [[User:Pointone|pointone]] 23:53, 13 February 2010 (EST)<br />
:--[[User:Piezoelectric|Piezoelectric]] 20:58, 10 April 2010 (EDT)<br />
<br />
== EXA and Adobe Flash performance ==<br />
<br />
I noticed that enabling <br />
<pre>Option "AccelMethod" "EXA"</pre><br />
as mentioned under "Performance tuning" lead to significantly worse Flash performance. This was using extra/flashplugin 10.0.22.87-1, aur/firefox-beta 3.5rc2-1 and extra/xf86-video-ati 6.12.2-2. My card (ATI Radeon 9550) uses the RV350 chipset, hence it is a bit dated. <br />
<br />
If this isn't just a local phenomena, perhaps it should be mentioned?<br />
<br />
----<br />
<br />
I don't know. I disabled EXA, and got even worse Flash performance, according to a flash benchmark test I found at Snails Animation [http://www.snailsanimation.com/benchmark08_play.php]. (flashplugin 10.0.32.18-1.1, firefox 3.5.3-1, xf86-video-ati 6.12.2-2.) Same card and chipset, though. --[[User:Rataxes|Rataxes]] 16:38, 15 September 2009 (EDT)<br />
<br />
== KMS notes ==<br />
KMS on r5xx not works with linux 2.6.31.3. only if libdrm, libgl, mesa, xf86-video-ati - all installed from git.<br />
<br />
KMS seems to be enabled by default on r5xx with latest packages from arch. Should all those messages about it being unsupported be removed? [[User:TheCycoONE|TheCycoONE]]<br />
<br />
=== KMS Early ===<br />
I don't know how others feel about this, but my preferred setup is to put <tt>options radeon modeset=1</tt> in <tt>modprobe.conf</tt> and then to include <tt>modprobe.con</tt> along with the <tt>radeon</tt> module in <tt>mkinitcpio.conf</tt>. This way KMS is enabled once for both early and late start. Also, in the event of problems, <tt>radeon.modeset=1</tt> can still be added as a kernel option to the bootloader. --[[User:piezoelectric|piezoelectric]]<br />
<br />
== mesa PKGBUILD ==<br />
Added a note in the KMS setup section about where to locate libgl and ati-dri in the ABS. Hope it helps. I was banging my head on that one for a week. [[User:Wriggary|Wriggary]] 20:04, 29 January 2010 (EST)<br />
<br />
== Driver ati or radeon ==<br />
<br />
I just did the tutorial installing:<br />
pacman -S xf86-video-ati libgl ati-dri<br />
I could only get it working by changing in xorg.conf:<br />
Driver "vesa"<br />
to:<br />
Driver "ati"<br />
and not:<br />
Driver "radeon"<br />
as the tutorial stated. I have no idea why/how, but maybe it'll help people reading it here.</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:ATI&diff=102761Talk:ATI2010-04-11T00:56:43Z<p>Piezoelectric: /* KMS Early */</p>
<hr />
<div>== Forking this article for proprietary ==<br />
Cleaned up some info today and noticed this article is really getting unruly. I propose that we fork the proprietary portion to its own article, such as "ATI Catalyst". Considering that the fglrx is now absolutely unsupported by Arch Linux, it would help make this article much less daunting to newcomers.<br />
<br />
--[[User:Thayer | Thayer]] Mon Jan 4 10:53:18 PST 2010<br />
<br />
:I wholly agree.<br />
<br />
:-- [[User:Pointone|pointone]] 23:53, 13 February 2010 (EST)<br />
<br />
== EXA and Adobe Flash performance ==<br />
<br />
I noticed that enabling <br />
<pre>Option "AccelMethod" "EXA"</pre><br />
as mentioned under "Performance tuning" lead to significantly worse Flash performance. This was using extra/flashplugin 10.0.22.87-1, aur/firefox-beta 3.5rc2-1 and extra/xf86-video-ati 6.12.2-2. My card (ATI Radeon 9550) uses the RV350 chipset, hence it is a bit dated. <br />
<br />
If this isn't just a local phenomena, perhaps it should be mentioned?<br />
<br />
----<br />
<br />
I don't know. I disabled EXA, and got even worse Flash performance, according to a flash benchmark test I found at Snails Animation [http://www.snailsanimation.com/benchmark08_play.php]. (flashplugin 10.0.32.18-1.1, firefox 3.5.3-1, xf86-video-ati 6.12.2-2.) Same card and chipset, though. --[[User:Rataxes|Rataxes]] 16:38, 15 September 2009 (EDT)<br />
<br />
== KMS notes ==<br />
KMS on r5xx not works with linux 2.6.31.3. only if libdrm, libgl, mesa, xf86-video-ati - all installed from git.<br />
<br />
KMS seems to be enabled by default on r5xx with latest packages from arch. Should all those messages about it being unsupported be removed? [[User:TheCycoONE|TheCycoONE]]<br />
<br />
=== KMS Early ===<br />
I don't know how others feel about this, but my preferred setup is to put <tt>options radeon modeset=1</tt> in <tt>modprobe.conf</tt> and then to include <tt>modprobe.con</tt> along with the <tt>radeon</tt> module in <tt>mkinitcpio.conf</tt>. This way KMS is enabled once for both early and late start. Also, in the event of problems, <tt>radeon.modeset=1</tt> can still be added as a kernel option to the bootloader. --[[User:piezoelectric|piezoelectric]]<br />
<br />
== mesa PKGBUILD ==<br />
Added a note in the KMS setup section about where to locate libgl and ati-dri in the ABS. Hope it helps. I was banging my head on that one for a week. [[User:Wriggary|Wriggary]] 20:04, 29 January 2010 (EST)<br />
<br />
== Driver ati or radeon ==<br />
<br />
I just did the tutorial installing:<br />
pacman -S xf86-video-ati libgl ati-dri<br />
I could only get it working by changing in xorg.conf:<br />
Driver "vesa"<br />
to:<br />
Driver "ati"<br />
and not:<br />
Driver "radeon"<br />
as the tutorial stated. I have no idea why/how, but maybe it'll help people reading it here.</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:Diskless_system&diff=102760Talk:Diskless system2010-04-11T00:53:31Z<p>Piezoelectric: </p>
<hr />
<div>Thanks, Net147, those edits helped me remove the last issues I had with my diskless setup. I moved your DHCP workaround to the top of the list, that is a very good script you have. --[[User:Geekner|Geekner]]<br />
<br />
== dnsmasq and pxe boot ==<br />
<br />
I sucessful booted a VirtualBox machine without the three dhcp-option-force parameter in dnsmasq.conf.<br />
The configfile is searched along a path according to the syslinux wiki, so it it is not neccessary.<br />
<br />
<br />
== DHCP/Network Daemon Workaround ==<br />
Changed to a more simple fix (derived from Net147's script) making use of confd to keep it closer to vanilla. <br />
Also note if you want to change it back to the old way that the -p option is not actually required as it is implied by -s.<br />
--[[User:Mikep|Mikep]] 18:29, 9 January 2010 (EST)<br />
<br />
<br />
== NBD ==<br />
It seems like the thing to do these days is NBD instead of NFS. Any interest in changing the article or amending it with an NBD option? (I would do it, not asking anyone else to.) --[[User:piezoelectric|piezoelectric]]</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Archiso_as_pxe_server&diff=102757Archiso as pxe server2010-04-11T00:04:15Z<p>Piezoelectric: Setup DNS in live environment, fix spelling of environment =)</p>
<hr />
<div>{{stub}}<br />
<br />
= Introduction =<br />
How to setup an enviroment to acts as server for Arch Linux live media. Done all these steps Arch Linux live media is able to boot via PXE on your network.<br />
<br />
== Inside the live environment ==<br />
<br />
# '' Boot the image in one that machine via USB or CD.<br />
# '' login as root<br />
# '' ifconfig eth0 192.168.0.7<br />
# '' route add default gw 192.168.0.1<br />
# '' echo 192.168.0.1 >> /etc/resolv.conf<br />
# '' pacman -Sy dnsmasq nbd<br />
# '' ./archiso-pxe-server (by default will get ip from eth0 and use the bootdevice)<br />
<br />
== Inside your installation ==<br />
# '' pacman -Sy dnsmasq nbd<br />
# '' mount archlinux-2010.03.19-core-i686.iso /mnt/iso -o loop<br />
# '' sed -i 's|bootmnt|mnt/iso|' archiso-pxe-server<br />
# '' ./archiso-pxe-server 192.168.0.7 archlinux-2010.03.19-core-i686.iso<br />
<br />
<br />
<br />
This is the archiso-pxe-server script:<br />
#!/bin/bash<br />
<br />
# A basic script to setup a PXE server enviroment for Arch Linux live-media.<br />
# Contributed by Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar><br />
<br />
# Requires: dnsmasq and nbd packages<br />
<br />
# usage example: archiso-pxe-server [ip] [bootdevice/isoimage]<br />
<br />
BOOT=/bootmnt/boot<br />
TFTPBOOT=/var/tftpboot<br />
<br />
IP="$1"<br />
ISO="$2"<br />
<br />
IP_ETH0=`ifconfig eth0 | awk -F":| +" '/inet addr/{print $4}'`<br />
if grep archisolabel /proc/cmdline > /dev/null; then<br />
LABEL=`sed "s/.\+archisolabel=\([^ ]\+\).\+/\1/" /proc/cmdline`<br />
else<br />
LABEL=""<br />
fi<br />
<br />
usage()<br />
{<br />
echo<br />
echo "archiso-pxe-server [ip] [bootdevice]"<br />
echo<br />
echo " options:"<br />
echo " [ip] ip address of the local interface to serve (default use ip of eth0)"<br />
echo " [bootdevice] boot device of Arch Linux Live media (for example /dev/cdrom)"<br />
echo<br />
}<br />
<br />
copy_files()<br />
{<br />
if [ ! -d $TFTPBOOT ]; then<br />
mkdir -p $TFTPBOOT/boot/i686<br />
mkdir -p $TFTPBOOT/boot/x86_64<br />
mkdir -p $TFTPBOOT/pxelinux.cfg<br />
[ -f $BOOT/vmlinuz26 ] && cp $BOOT/vmlinuz26 $TFTPBOOT/boot<br />
[ -f $BOOT/archiso.img ] && cp $BOOT/archiso.img $TFTPBOOT/boot<br />
[ -f $BOOT/i686/vmlinuz26 ] && cp $BOOT/i686/vmlinuz26 $TFTPBOOT/boot/i686<br />
[ -f $BOOT/i686/archiso.img ] && cp $BOOT/i686/archiso.img $TFTPBOOT/boot/i686<br />
[ -f $BOOT/x86_64/vmlinuz26 ] && cp $BOOT/x86_64/vmlinuz26 $TFTPBOOT/boot/x86_64<br />
[ -f $BOOT/x86_64/archiso.img ] && cp $BOOT/x86_64/archiso.img $TFTPBOOT/boot/x86_64<br />
cp $BOOT/memtest $TFTPBOOT/boot<br />
cp $BOOT/x86test $TFTPBOOT/boot<br />
cp $BOOT/splash.png $TFTPBOOT/boot<br />
cp $BOOT/isolinux/pxelinux.0 $TFTPBOOT<br />
cp $BOOT/isolinux/chain.c32 $TFTPBOOT<br />
cp $BOOT/isolinux/reboot.c32 $TFTPBOOT<br />
cp $BOOT/isolinux/vesamenu.c32 $TFTPBOOT<br />
sed 's|IPAPPEND 0|IPAPPEND 3|g' \<br />
$BOOT/isolinux/isolinux.cfg > \<br />
$TFTPBOOT/pxelinux.cfg/default<br />
fi<br />
}<br />
<br />
start_pxe_server()<br />
{<br />
dnsmasq \<br />
--enable-tftp \<br />
--tftp-root=$TFTPBOOT \<br />
--dhcp-boot=/pxelinux.0,"${IP}" \<br />
--dhcp-range=${IP%.*}.2,${IP%.*}.254,86400<br />
}<br />
<br />
start_nbd_server()<br />
{<br />
nbd-server 9040 ${ISO} -r<br />
}<br />
<br />
check_parameters()<br />
{<br />
if [ -z "$IP_ETH0" -a -z "$IP" ]; then<br />
echo "ERROR: missing IP address"<br />
usage<br />
exit 1<br />
else<br />
IP=$IP_ETH0<br />
fi<br />
<br />
if [ -z "$LABEL" -a -z "$ISO" ]; then<br />
echo "ERROR: can't determine boot device, please specify on command line"<br />
usage<br />
exit 1<br />
else<br />
ISO="/dev/disk/by-label/$LABEL"<br />
fi<br />
}<br />
<br />
check_parameters<br />
copy_files<br />
start_pxe_server<br />
start_nbd_server</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:ATI&diff=102731Talk:ATI2010-04-10T17:23:02Z<p>Piezoelectric: /* KMS notes */</p>
<hr />
<div>== Forking this article for proprietary ==<br />
Cleaned up some info today and noticed this article is really getting unruly. I propose that we fork the proprietary portion to its own article, such as "ATI Catalyst". Considering that the fglrx is now absolutely unsupported by Arch Linux, it would help make this article much less daunting to newcomers.<br />
<br />
--[[User:Thayer | Thayer]] Mon Jan 4 10:53:18 PST 2010<br />
<br />
:I wholly agree.<br />
<br />
:-- [[User:Pointone|pointone]] 23:53, 13 February 2010 (EST)<br />
<br />
== EXA and Adobe Flash performance ==<br />
<br />
I noticed that enabling <br />
<pre>Option "AccelMethod" "EXA"</pre><br />
as mentioned under "Performance tuning" lead to significantly worse Flash performance. This was using extra/flashplugin 10.0.22.87-1, aur/firefox-beta 3.5rc2-1 and extra/xf86-video-ati 6.12.2-2. My card (ATI Radeon 9550) uses the RV350 chipset, hence it is a bit dated. <br />
<br />
If this isn't just a local phenomena, perhaps it should be mentioned?<br />
<br />
----<br />
<br />
I don't know. I disabled EXA, and got even worse Flash performance, according to a flash benchmark test I found at Snails Animation [http://www.snailsanimation.com/benchmark08_play.php]. (flashplugin 10.0.32.18-1.1, firefox 3.5.3-1, xf86-video-ati 6.12.2-2.) Same card and chipset, though. --[[User:Rataxes|Rataxes]] 16:38, 15 September 2009 (EDT)<br />
<br />
== KMS notes ==<br />
KMS on r5xx not works with linux 2.6.31.3. only if libdrm, libgl, mesa, xf86-video-ati - all installed from git.<br />
<br />
KMS seems to be enabled by default on r5xx with latest packages from arch. Should all those messages about it being unsupported be removed? [[User:TheCycoONE|TheCycoONE]]<br />
<br />
=== KMS Early ===<br />
I don't know how others feel about this, but my preferred setup is to put ''options radeon modeset=1'' in ''modprobe.conf'' and then to include ''modprobe.con'' along with the ''radeon'' module in ''mkinitcpio.conf''. This way KMS is enabled once for both early and late start. Also, in the event of problems, ''radeon.modeset=1'' can still be added as a kernel option to the bootloader. [[User:piezoelectric|piezoelectric]]<br />
<br />
== mesa PKGBUILD ==<br />
Added a note in the KMS setup section about where to locate libgl and ati-dri in the ABS. Hope it helps. I was banging my head on that one for a week. [[User:Wriggary|Wriggary]] 20:04, 29 January 2010 (EST)<br />
<br />
== Driver ati or radeon ==<br />
<br />
I just did the tutorial installing:<br />
pacman -S xf86-video-ati libgl ati-dri<br />
I could only get it working by changing in xorg.conf:<br />
Driver "vesa"<br />
to:<br />
Driver "ati"<br />
and not:<br />
Driver "radeon"<br />
as the tutorial stated. I have no idea why/how, but maybe it'll help people reading it here.</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:Initscripts/rc.conf&diff=101996Talk:Initscripts/rc.conf2010-04-07T15:57:45Z<p>Piezoelectric: Created page with '= Localization = Can't HARDWARECLOCK also be set to ntp?'</p>
<hr />
<div>= Localization =<br />
<br />
Can't HARDWARECLOCK also be set to ntp?</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:ATI&diff=91629Talk:ATI2010-01-10T16:20:48Z<p>Piezoelectric: </p>
<hr />
<div>== Forking this article for proprietary ==<br />
Cleaned up some info today and noticed this article is really getting unruly. I propose that we fork the proprietary portion to its own article, such as "ATI Catalyst". Considering that the fglrx is now absolutely unsupported by Arch Linux, it would help make this article much less daunting to newcomers.<br />
<br />
--[[User:Thayer | Thayer]] Mon Jan 4 10:53:18 PST 2010<br />
<br />
== EXA and Adobe Flash performance ==<br />
<br />
I noticed that enabling <br />
<pre>Option "AccelMethod" "EXA"</pre><br />
as mentioned under "Performance tuning" lead to significantly worse Flash performance. This was using extra/flashplugin 10.0.22.87-1, aur/firefox-beta 3.5rc2-1 and extra/xf86-video-ati 6.12.2-2. My card (ATI Radeon 9550) uses the RV350 chipset, hence it is a bit dated. <br />
<br />
If this isn't just a local phenomena, perhaps it should be mentioned?<br />
<br />
----<br />
<br />
I don't know. I disabled EXA, and got even worse Flash performance, according to a flash benchmark test I found at Snails Animation [http://www.snailsanimation.com/benchmark08_play.php]. (flashplugin 10.0.32.18-1.1, firefox 3.5.3-1, xf86-video-ati 6.12.2-2.) Same card and chipset, though. --[[User:Rataxes|Rataxes]] 16:38, 15 September 2009 (EDT)<br />
<br />
== KMS notes ==<br />
KMS on r5xx not works with linux 2.6.31.3. only if libdrm, libgl, mesa, xf86-video-ati - all installed from git.<br />
<br />
<br />
== fbcon module ==<br />
What are where is this fbcon module referred to in the KMS section? Is this out of date? I feel some more explanation is needed.</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=84758NVIDIA2009-11-22T18:15:38Z<p>Piezoelectric: </p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Information on installing, configuring and troubleshooting the proprietary NVIDIA Drivers.}}<br />
{{Article summary heading|Languages}}<br />
{{i18n_entry|English|NVIDIA}}<br />
{{i18n_entry|Türkçe|NVIDIA (Türkçe)}}<br />
{{i18n_entry|Italiano|NVIDIA (Italiano)}}<br />
{{i18n_entry|Nederlands|NVIDIA (Nederlands)}}<br />
{{i18n_entry|Русский|NVIDIA (Russian)}}<br />
{{i18n_entry|Česky|NVIDIA (česky)}}<br />
{{Article summary end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]]. See [[Nforce_Drivers|nForce]] for subjects covering the motherboard drivers.<br />
<br />
==Installing==<br />
These instructions are for those using the stock kernel26 package. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
{{Tip|It is usually beneficial to install the NVIDIA driver through pacman rather then through the package provided by the NVIDIA site, this allows the driver to be updated when upgrading the system.}}<br />
<br />
1. Visit NVIDIA's [http://www.nvidia.com/Download/index.aspx?lang=en-us driver download site] to find out the appropiate driver for a given card.<br />
<br />
2. Install the driver for newer cards:<br />
# pacman -S nvidia nvidia-utils<br />
<br />
:Whereas users with older cards should install:<br />
# pacman -S nvidia-96xx nvidia-96xx-utils<br />
<br />
:or:<br />
# pacman -S nvidia-173xx nvidia-173xx-utils<br />
<br />
{{Note|For the latest card models, it may be required to install {{Package AUR|nvidia-beta}} and {{Package AUR|nvidia-utils-beta}} from the [[AUR]] since the stable drivers may not support the newly introduced features.}}<br />
<br />
Once the driver has been installed, continue to: [[#Configuring]].<br />
<br />
===Alternate install: custom kernel===<br />
First of all, it is of advantage to know how the ABS system works by reading some of the other articles about it:<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[The_Arch_package_making_HOW-TO_-_with_guidelines|package making]]<br />
<br />
The following is a short tutorial for making a custom nvidia driver package using ABS:<br />
<br />
Install ABS and generate the tree:<br />
# pacman -S abs<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/devel/abs<br />
Make a copy of the nvidia package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/devel/abs/<br />
Go into the temporary nvidia build directory:<br />
$ cd ~/devel/abs/nvidia<br />
It is required to edit the files {{Filename|nvidia.install}} and {{Filename|PKGBUILD}} file so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropiate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the <code>KERNEL_VERSION="2.6.xx-ARCH"</code> variable with the custom kernel version, such as <code>KERNEL_VERSION="2.6.22.6"</code> or <code>KERNEL_VERSION"2.6.22.6-custom"</code> depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the <code>_kernver='2.6.xx-ARCH'</code> variable to match the appropiate version, as above.<br />
# If there are more than one kernels in the system installed in parallel, (such as a custom kernel alongside the default -ARCH kernel) change the <code>"pkgname=nvidia"</code> variable in the PKGBUILD to a unique identifier, such as nvidia-2622 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original.<br />
<br />
Then do:<br />
$ makepkg -c -i<br />
The {{Codeline|-c}} operand tells makepkg to clean left over files after building the nvidia driver, whereas {{Codeline|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==Configuring==<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. Once the [[HAL]] daemon is running, one can [[Xorg#Running Xorg|test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a {{Filename|/etc/xorg.conf}} configuration file in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a [[Xorg#Manual configuration|number of settings]] that can bypass Xorg's and HAL's auto-discovered or pre-configured options.<br />
<br />
===Automatic configuration===<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{Filename|xorg.conf}}) and can be run by:<br />
nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{Filename|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
===Minimal configuration===<br />
To create a basic {{Filename|/etc/X11/xorg.conf}}, as root:<br />
touch /etc/X11/xorg.conf<br />
<br />
And add the driver:<br />
<pre><br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
EndSection<br />
</pre><br />
<br />
{{Tip|Make sure, in order to have full multimedia functionality, to have '''hal''' and '''xorg-input-drivers''' installed.}}<br />
<br />
==Tweaking==<br />
<br />
===GUI: nvidia-settings===<br />
The NVIDIA package includes the {{Codeline|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
Or add it to the the desktop environment's auto-startup method.<br />
<br />
{{Tip | On rare occasions the {{Filename|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the issue.}}<br />
<br />
===Advanced: xorg.conf===<br />
Edit {{Filename|/etc/X11/xorg.conf}}, and add the option to the correct section. NVIDIA tests and ships the drivers with the recommended setting so note that some edits may cause instability, tearing, among other problems. Since not all options may work for a given system, consider backing up {{Filename|xorg.conf}} before making any edits. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
====Enabling desktop composition====<br />
As of NVIDIA driver version 180.44, support for GLX with the Damage and Composite X extensions is enabled by default. Refer to [[Composite]] for detailed instructions.<br />
<br />
====Disabling the logo on startup====<br />
Add the {{Codeline|"NoLogo"}} option under section {{Codeline|Device}}:<br />
Option "NoLogo" "True"<br />
<br />
====Enabling hardware acceleration====<br />
Add the {{Codeline|"RenderAccel"}} option under section {{Codeline|Device}}:<br />
Option "RenderAccel" "True"<br />
{{Note|RenderAccel is enabled by default since drivers version 97.46.xx}}<br />
<br />
====Overriding monitor detection====<br />
The {{Codeline|"ConnectedMonitor"}} option under section {{Codeline|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{Codeline|"CRT"}} for analog connections, {{Codeline|"DFP"}} for digital monitors and {{Codeline|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the disply is a flat panel. "DFP" is intended for DVI digital connections only.}}<br />
<br />
====Enabling triple buffering====<br />
Enable the use of triple buffering by adding the {{Codeline|"TripleBuffer"}} Option under section {{Codeline|Device}}:<br />
Option "TripleBuffer" "True"<br />
<br />
Use this option if the graphics card has plenty of ram (equal or greater than 128MB). The setting only takes effect when syncing to vblank is enabled, one of the options featured in nvidia-settings.<br />
<br />
{{Note|This option may introduce full-screen tearing}}<br />
<br />
====Enabling backing store====<br />
This option is used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server, thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed. BackingStore is not bound to NVIDIA drivers but to X server itself. ATI users would benefit from this option as well.<br />
<br />
Add under section {{Codeline|Device}}:<br />
Option "BackingStore" "True"<br />
<br />
====Using OS-level events====<br />
Taken from the NVIDIA driver's [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt README] file: ''"[...] Use OS-level events to efficiently notify X when a client has performed direct rendering to a window that needs to be composited."'' It may help improving performance, but it is currently incompatible with SLI and Multi-GPU modes.<br />
<br />
Add under section {{Codeline|Device}}:<br />
Option "DamageEvents" "True"<br />
{{Note|This option is enabled by default in newer driver versions.}}<br />
<br />
====Enabling power saving====<br />
Add under section <code>Monitor</code>:<br />
Option "DPMS" "True"<br />
<br />
====Forcing Powermizer performance level (for laptops)====<br />
Add under section {{Codeline|Device}}:<br />
# Force Powermizer to a certain level at all times<br />
# level 0x1=highest<br />
# level 0x2=med<br />
# level 0x3=lowest<br />
<br />
# AC settings:<br />
Option "RegistryDwords" "PowerMizerLevelAC=0x3"<br />
# Battery settings:<br />
Option "RegistryDwords" "PowerMizerLevel=0x3"<br />
Settings are better explained in [http://tutanhamon.com.ua/technovodstvo/NVIDIA-UNIX-driver/ NVIDIA Driver for X.org:Performance and Power Saving Hints].<br />
<br />
=====Letting the GPU set its own performance level based on temperature=====<br />
Add under section {{Codeline|Device}}:<br />
Option "RegistryDwords" "PerfLevelSrc=0x3333"<br />
<br />
====Disable vblank interrupts (for laptops)====<br />
When running the interrupt detection utility {{Codeline|powertop}}, it can be observed that the Nvidia driver will generate an interrupt for every vblank. To disable, place in the {{Codeline|Device}} section:<br />
Option "OnDemandVBlankInterrupts" "True"<br />
This will reduce interrupts to about one or two per second.<br />
<br />
====Enabling overclocking====<br />
To enable overclocking, place the following line in the {{Codeline|Device}} section:<br />
Option "Coolbits" "1"<br />
This will enable on the fly overclocking by running nvidia-settings inside X.<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
====Enable screen rotation through XRandR====<br />
Place the following line in the {{Codeline|Device}} section:<br />
Option "RandRRotation" "True"<br />
After restarting Xorg, type:<br />
xrandr -o left<br />
The Screen should be rotated. To restore, type:<br />
xrandr -o normal<br />
{{Note| Editing xorg.conf may be unnecessary since screen rotation should be enabled by default, ideally by using the respective DE tools, such as SystemSettings in KDE.}}<br />
<br />
==Tips and tricks==<br />
<br />
===Using TV-out===<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here]<br />
<br />
===X with a TV (DFP) as the only display===<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force nvidia to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the "DFP" section (again, "DFP-0" or similar), click on the "Acquire Edid" Button and store it somewhere, for example, {{Filename|/etc/X11/dfp0.edid}}.<br />
<br />
Edit xorg.conf by adding to the "Device" section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The "ConnectedMonitor" option forces the driver to recognize the DFP as if it were connected. The "CustomEDID" provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
===Displaying GPU temperature in the shell===<br />
====Method 1====<br />
{{Note|This method requires that you're using X. Use Method 2 if you are not. Also note that method 2 will not work with newer nvidia cards such as the G210/220.}}<br />
To display the GPU temp in the shell, use nvidia-settings as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
One can combine grep and cut or sed, awk, etc. to parse the output to a two digit number for use in utils such as rrdtool or conky, among others.<br />
<br />
Example:<br />
$ nvidia-settings -q gpucoretemp | grep host | cut -c42-43<br />
41<br />
====Method 2====<br />
Use nvclock which is available from the [extra] repo. Note that nvclock cannot access thermal sensors on newer nvidia cards such as the G210/220.<br />
<br />
==Troubleshooting==<br />
<br />
===Old Xorg Settings===<br />
If upgrading from an old installation, please remove old {{Filename|/usr/X11R6}} paths as it can cause trouble during installation.<br />
<br />
===Corrupted screen: "Six screens" issue===<br />
For some users using Geforce GT 100M's, the screen turns out corrupted after X starts; divided into 6 sections with a resolution limited to 640x480.<br />
<br />
To solve this problem, enable the Validation Mode {{Codeline|NoTotalSizeCheck}} in section {{Codeline|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
==='/dev/nvidiactl' errors===<br />
Trying to start an opengl application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the <code>FREQUENTLY ASKED QUESTIONS</code> <br />
section of <code>/usr/share/doc/NVIDIA_GLX-1.0/README</code> <br />
for steps to correct.<br />
<br />
Solve by adding the appropiate user to the "video" group and relogin:<br />
# gpasswd -a username video<br />
<br />
===32 bit applications do not start===<br />
Under 64 bit systems, installing {{Codeline|lib32-nvidia-utils}} that corresponds to the same version installed for the 64 bit driver fixes the issue.<br />
<br />
===Errors after updating the kernel===<br />
Every time the kernel26 package is updated, it is a requirement to reinstall the nvidia package and rebooting afterwards.<br />
<br />
===Crashing in general===<br />
* Try disabling {{Codeline|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type", add {{Codeline|nopat}} at the end of the {{Codeline|kernel}} line in {{Codeline|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{Codeline|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{Codeline|nopat}} to the {{Codeline|kernel}} line in {{Codeline|menu.lst}}.<br />
More information about trouble-shooting the driver can be found in the [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums.]<br />
<br />
===Bad performance after installing a new driver version===<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on: <br />
glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No <br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
===Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace===<br />
If while using the legacy nvidia drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in {{Filename|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{Codeline|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt NVIDIA Driver's Readme:Appendix K] for more information.<br />
<br />
===Refresh rate not detected properly by XRandR dependant utilities===<br />
The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the {{Codeline|MetaMode}} bounding box, which may contain one or more actual modes. This means that if multiple MetaModes have the same bounding box, XRandR will not be able to distinguish between them.<br />
<br />
In order to support {{Codeline|DynamicTwinView}}, the NVIDIA driver must make each MetaMode appear to be unique to XRandR. Presently, the Nvidia driver accomplishes this by using the refresh rate as a unique identifier.<br />
<br />
Use {{Codeline|nvidia-settings -q RefreshRate}} to query the actual refresh rate on each display device.<br />
<br />
The XRandR extension is currently being redesigned by the X.Org community, so the refresh rate workaround may be removed at some point in the future.<br />
<br />
This workaround can also be disabled by setting the "DynamicTwinView" X configuration option to "false", which will disable NV-CONTROL support for manipulating MetaModes, but will cause the XRandR and XF86VidMode visible refresh rate to be accurate.<br />
<br />
==External links==<br />
* [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums]<br />
* [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt Official readme for NVIDIA drivers]</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=84757NVIDIA2009-11-22T18:12:53Z<p>Piezoelectric: </p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Information on installing, configuring and troubleshooting the proprietary NVIDIA Drivers.}}<br />
{{Article summary heading|Languages}}<br />
{{i18n_entry|English|NVIDIA}}<br />
{{i18n_entry|Türkçe|NVIDIA (Türkçe)}}<br />
{{i18n_entry|Italiano|NVIDIA (Italiano)}}<br />
{{i18n_entry|Nederlands|NVIDIA (Nederlands)}}<br />
{{i18n_entry|Русский|NVIDIA (Russian)}}<br />
{{i18n_entry|Česky|NVIDIA (česky)}}<br />
{{Article summary end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]]. See [[Nforce_Drivers|nForce]] for subjects covering the motherboard drivers.<br />
<br />
==Installing==<br />
These instructions are for those using the stock kernel26 package. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
{{Tip|It is usually beneficial to install the NVIDIA driver through pacman rather then through the package provided by the NVIDIA site, this allows the driver to be updated when upgrading the system.}}<br />
<br />
1. Visit NVIDIA's [http://www.nvidia.com/Download/index.aspx?lang=en-us driver download site] to find out the appropiate driver for a given card.<br />
<br />
2. Install the driver for newer cards:<br />
# pacman -S nvidia nvidia-utils<br />
<br />
:Whereas users with older cards should install:<br />
# pacman -S nvidia-96xx nvidia-96xx-utils<br />
<br />
:or:<br />
# pacman -S nvidia-173xx nvidia-173xx-utils<br />
<br />
{{Note|For the latest card models, it may be required to install {{Package AUR|nvidia-beta}} and {{Package AUR|nvidia-utils-beta}} from the [[AUR]] since the stable drivers may not support the newly introduced features.}}<br />
<br />
Once the driver has been installed, continue to: [[#Configuring]].<br />
<br />
===Alternate install: custom kernel===<br />
First of all, it is of advantage to know how the ABS system works by reading some of the other articles about it:<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[The_Arch_package_making_HOW-TO_-_with_guidelines|package making]]<br />
<br />
The following is a short tutorial for making a custom nvidia driver package using ABS:<br />
<br />
Install ABS and generate the tree:<br />
# pacman -S abs<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/devel/abs<br />
Make a copy of the nvidia package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/devel/abs/<br />
Go into the temporary nvidia build directory:<br />
$ cd ~/devel/abs/nvidia<br />
It is required to edit the files {{Filename|nvidia.install}} and {{Filename|PKGBUILD}} file so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropiate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the <code>KERNEL_VERSION="2.6.xx-ARCH"</code> variable with the custom kernel version, such as <code>KERNEL_VERSION="2.6.22.6"</code> or <code>KERNEL_VERSION"2.6.22.6-custom"</code> depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# (Doesn't seem to be necessary anymore, the PKGBUILD looks in nvidia.install) In PKGBUILD, change the <code>_kernver='2.6.xx-ARCH'</code> variable to match the appropiate version, as above.<br />
# If there are more than one kernels in the system installed in parallel, (such as a custom kernel alongside the default -ARCH kernel) change the <code>"pkgname=nvidia"</code> variable in the PKGBUILD to a unique identifier, such as nvidia-2622 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original.<br />
<br />
Then do:<br />
$ makepkg -c -i<br />
The {{Codeline|-c}} operand tells makepkg to clean left over files after building the nvidia driver, whereas {{Codeline|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==Configuring==<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. Once the [[HAL]] daemon is running, one can [[Xorg#Running Xorg|test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a {{Filename|/etc/xorg.conf}} configuration file in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a [[Xorg#Manual configuration|number of settings]] that can bypass Xorg's and HAL's auto-discovered or pre-configured options.<br />
<br />
===Automatic configuration===<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{Filename|xorg.conf}}) and can be run by:<br />
nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{Filename|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
===Minimal configuration===<br />
To create a basic {{Filename|/etc/X11/xorg.conf}}, as root:<br />
touch /etc/X11/xorg.conf<br />
<br />
And add the driver:<br />
<pre><br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
EndSection<br />
</pre><br />
<br />
{{Tip|Make sure, in order to have full multimedia functionality, to have '''hal''' and '''xorg-input-drivers''' installed.}}<br />
<br />
==Tweaking==<br />
<br />
===GUI: nvidia-settings===<br />
The NVIDIA package includes the {{Codeline|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
Or add it to the the desktop environment's auto-startup method.<br />
<br />
{{Tip | On rare occasions the {{Filename|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the issue.}}<br />
<br />
===Advanced: xorg.conf===<br />
Edit {{Filename|/etc/X11/xorg.conf}}, and add the option to the correct section. NVIDIA tests and ships the drivers with the recommended setting so note that some edits may cause instability, tearing, among other problems. Since not all options may work for a given system, consider backing up {{Filename|xorg.conf}} before making any edits. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
====Enabling desktop composition====<br />
As of NVIDIA driver version 180.44, support for GLX with the Damage and Composite X extensions is enabled by default. Refer to [[Composite]] for detailed instructions.<br />
<br />
====Disabling the logo on startup====<br />
Add the {{Codeline|"NoLogo"}} option under section {{Codeline|Device}}:<br />
Option "NoLogo" "True"<br />
<br />
====Enabling hardware acceleration====<br />
Add the {{Codeline|"RenderAccel"}} option under section {{Codeline|Device}}:<br />
Option "RenderAccel" "True"<br />
{{Note|RenderAccel is enabled by default since drivers version 97.46.xx}}<br />
<br />
====Overriding monitor detection====<br />
The {{Codeline|"ConnectedMonitor"}} option under section {{Codeline|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{Codeline|"CRT"}} for analog connections, {{Codeline|"DFP"}} for digital monitors and {{Codeline|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the disply is a flat panel. "DFP" is intended for DVI digital connections only.}}<br />
<br />
====Enabling triple buffering====<br />
Enable the use of triple buffering by adding the {{Codeline|"TripleBuffer"}} Option under section {{Codeline|Device}}:<br />
Option "TripleBuffer" "True"<br />
<br />
Use this option if the graphics card has plenty of ram (equal or greater than 128MB). The setting only takes effect when syncing to vblank is enabled, one of the options featured in nvidia-settings.<br />
<br />
{{Note|This option may introduce full-screen tearing}}<br />
<br />
====Enabling backing store====<br />
This option is used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server, thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed. BackingStore is not bound to NVIDIA drivers but to X server itself. ATI users would benefit from this option as well.<br />
<br />
Add under section {{Codeline|Device}}:<br />
Option "BackingStore" "True"<br />
<br />
====Using OS-level events====<br />
Taken from the NVIDIA driver's [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt README] file: ''"[...] Use OS-level events to efficiently notify X when a client has performed direct rendering to a window that needs to be composited."'' It may help improving performance, but it is currently incompatible with SLI and Multi-GPU modes.<br />
<br />
Add under section {{Codeline|Device}}:<br />
Option "DamageEvents" "True"<br />
{{Note|This option is enabled by default in newer driver versions.}}<br />
<br />
====Enabling power saving====<br />
Add under section <code>Monitor</code>:<br />
Option "DPMS" "True"<br />
<br />
====Forcing Powermizer performance level (for laptops)====<br />
Add under section {{Codeline|Device}}:<br />
# Force Powermizer to a certain level at all times<br />
# level 0x1=highest<br />
# level 0x2=med<br />
# level 0x3=lowest<br />
<br />
# AC settings:<br />
Option "RegistryDwords" "PowerMizerLevelAC=0x3"<br />
# Battery settings:<br />
Option "RegistryDwords" "PowerMizerLevel=0x3"<br />
Settings are better explained in [http://tutanhamon.com.ua/technovodstvo/NVIDIA-UNIX-driver/ NVIDIA Driver for X.org:Performance and Power Saving Hints].<br />
<br />
=====Letting the GPU set its own performance level based on temperature=====<br />
Add under section {{Codeline|Device}}:<br />
Option "RegistryDwords" "PerfLevelSrc=0x3333"<br />
<br />
====Disable vblank interrupts (for laptops)====<br />
When running the interrupt detection utility {{Codeline|powertop}}, it can be observed that the Nvidia driver will generate an interrupt for every vblank. To disable, place in the {{Codeline|Device}} section:<br />
Option "OnDemandVBlankInterrupts" "True"<br />
This will reduce interrupts to about one or two per second.<br />
<br />
====Enabling overclocking====<br />
To enable overclocking, place the following line in the {{Codeline|Device}} section:<br />
Option "Coolbits" "1"<br />
This will enable on the fly overclocking by running nvidia-settings inside X.<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
====Enable screen rotation through XRandR====<br />
Place the following line in the {{Codeline|Device}} section:<br />
Option "RandRRotation" "True"<br />
After restarting Xorg, type:<br />
xrandr -o left<br />
The Screen should be rotated. To restore, type:<br />
xrandr -o normal<br />
{{Note| Editing xorg.conf may be unnecessary since screen rotation should be enabled by default, ideally by using the respective DE tools, such as SystemSettings in KDE.}}<br />
<br />
==Tips and tricks==<br />
<br />
===Using TV-out===<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here]<br />
<br />
===X with a TV (DFP) as the only display===<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force nvidia to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the "DFP" section (again, "DFP-0" or similar), click on the "Acquire Edid" Button and store it somewhere, for example, {{Filename|/etc/X11/dfp0.edid}}.<br />
<br />
Edit xorg.conf by adding to the "Device" section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The "ConnectedMonitor" option forces the driver to recognize the DFP as if it were connected. The "CustomEDID" provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
===Displaying GPU temperature in the shell===<br />
====Method 1====<br />
{{Note|This method requires that you're using X. Use Method 2 if you are not. Also note that method 2 will not work with newer nvidia cards such as the G210/220.}}<br />
To display the GPU temp in the shell, use nvidia-settings as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
One can combine grep and cut or sed, awk, etc. to parse the output to a two digit number for use in utils such as rrdtool or conky, among others.<br />
<br />
Example:<br />
$ nvidia-settings -q gpucoretemp | grep host | cut -c42-43<br />
41<br />
====Method 2====<br />
Use nvclock which is available from the [extra] repo. Note that nvclock cannot access thermal sensors on newer nvidia cards such as the G210/220.<br />
<br />
==Troubleshooting==<br />
<br />
===Old Xorg Settings===<br />
If upgrading from an old installation, please remove old {{Filename|/usr/X11R6}} paths as it can cause trouble during installation.<br />
<br />
===Corrupted screen: "Six screens" issue===<br />
For some users using Geforce GT 100M's, the screen turns out corrupted after X starts; divided into 6 sections with a resolution limited to 640x480.<br />
<br />
To solve this problem, enable the Validation Mode {{Codeline|NoTotalSizeCheck}} in section {{Codeline|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
==='/dev/nvidiactl' errors===<br />
Trying to start an opengl application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the <code>FREQUENTLY ASKED QUESTIONS</code> <br />
section of <code>/usr/share/doc/NVIDIA_GLX-1.0/README</code> <br />
for steps to correct.<br />
<br />
Solve by adding the appropiate user to the "video" group and relogin:<br />
# gpasswd -a username video<br />
<br />
===32 bit applications do not start===<br />
Under 64 bit systems, installing {{Codeline|lib32-nvidia-utils}} that corresponds to the same version installed for the 64 bit driver fixes the issue.<br />
<br />
===Errors after updating the kernel===<br />
Every time the kernel26 package is updated, it is a requirement to reinstall the nvidia package and rebooting afterwards.<br />
<br />
===Crashing in general===<br />
* Try disabling {{Codeline|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type", add {{Codeline|nopat}} at the end of the {{Codeline|kernel}} line in {{Codeline|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{Codeline|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{Codeline|nopat}} to the {{Codeline|kernel}} line in {{Codeline|menu.lst}}.<br />
More information about trouble-shooting the driver can be found in the [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums.]<br />
<br />
===Bad performance after installing a new driver version===<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on: <br />
glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No <br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
===Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace===<br />
If while using the legacy nvidia drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in {{Filename|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{Codeline|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt NVIDIA Driver's Readme:Appendix K] for more information.<br />
<br />
===Refresh rate not detected properly by XRandR dependant utilities===<br />
The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the {{Codeline|MetaMode}} bounding box, which may contain one or more actual modes. This means that if multiple MetaModes have the same bounding box, XRandR will not be able to distinguish between them.<br />
<br />
In order to support {{Codeline|DynamicTwinView}}, the NVIDIA driver must make each MetaMode appear to be unique to XRandR. Presently, the Nvidia driver accomplishes this by using the refresh rate as a unique identifier.<br />
<br />
Use {{Codeline|nvidia-settings -q RefreshRate}} to query the actual refresh rate on each display device.<br />
<br />
The XRandR extension is currently being redesigned by the X.Org community, so the refresh rate workaround may be removed at some point in the future.<br />
<br />
This workaround can also be disabled by setting the "DynamicTwinView" X configuration option to "false", which will disable NV-CONTROL support for manipulating MetaModes, but will cause the XRandR and XF86VidMode visible refresh rate to be accurate.<br />
<br />
==External links==<br />
* [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums]<br />
* [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt Official readme for NVIDIA drivers]</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:Hwdetect&diff=81878Talk:Hwdetect2009-11-05T07:07:39Z<p>Piezoelectric: </p>
<hr />
<div>== Use ==<br />
Is hwdetect still used?<br />
<br />
== Exported? ==<br />
What does "exported" mean? To where? Why?<br />
<br />
== How ==<br />
<br />
And it is used how?<br />
-- Good question, I don't see a point to this page if some examples aren't given</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Talk:Acpid&diff=78128Talk:Acpid2009-10-17T04:05:59Z<p>Piezoelectric: Created page with '= Kacpid = Can someone add a section about this? Is it an alternative to ACPID?'</p>
<hr />
<div>= Kacpid =<br />
<br />
Can someone add a section about this? Is it an alternative to ACPID?</div>Piezoelectrichttps://wiki.archlinux.org/index.php?title=Wake-on-LAN&diff=77884Wake-on-LAN2009-10-16T01:16:03Z<p>Piezoelectric: /* Across the internet */</p>
<hr />
<div>[[Category:Network]]<br />
<br />
=Introduction=<br />
This article deals with Wake-on-LAN (wol, wake on lan), what it is, how it can be used from an Arch Linux computer, and its general uses. Basically put, Wake-on-LAN, otherwise known as 'wol' is the ability to switch a computer that is connected to a network (be it the internet or intranet) on. This can be a very useful ability.<br />
<br />
It is important to note that Wake-on-LAN applies to the computers being physically connected (ie, not wireless).<br />
<br />
=Does my motherboard support Wake-on-LAN?=<br />
<br />
For Wake-on-LAN to work, the target computer motherboard must support this feature. Generally speaking, the Wake-on-LAN (non)ability of the target motherboard will be specified by the hardware manufacturer. Sometimes, this ability is evident by browsing through said motherboard's BIOS and looking for something like 'PCI Power up'. Most modern motherboards should support Wake-on-LAN.<br />
<br />
=Ensure that Wake-on-LAN is enabled and survives a reboot=<br />
<br />
A common problem with the Wake-on-LAN in computers running Linux is that the network drivers have Wake-on-LAN switched off by default. To manually switch on the Wake-on-LAN feature on your driver, you'll need ethtool:<br />
pacman -Sy ethtool<br />
<br />
First query the driver to see if it's defaulted to 'on' by using ethtool:<br />
<br />
<pre> ethtool eth0 | grep Wake-on<br />
Supports Wake-on: pg<br />
Wake-on: d</pre><br />
<br />
{{Note|We need a 'Wake-on' value of 'g' for WOL to work.}}<br />
<br />
To enable the wol feature in the driver, simply run the following<br />
ethtool -s eth0 wol g<br />
<br />
This command does not last beyond the '''next''' reboot. To execute the command every time you shutdown your computer, add the command using an absolute path into {{Filename|/etc/rc.shutdown}} using your fav text editor. <br />
{{Note|I placed the following lines BEFORE the "# Terminate all processes" but I don't think it really matters.}}<br />
<br />
# Setup WOL for next boot<br />
stat_busy "Setting WOL to Active"<br />
/usr/sbin/ethtool -s eth0 wol g<br />
stat_done<br />
<br />
For more information on this, please read the [http://ahh.sourceforge.net/wol/faq.html wol FAQ] (not available at the moment - 11/12/2008)<br />
<br />
*If for some reason, you find that after using the command to switch your network drivers Wake-on-LAN feature on, the computer shuts down normally but then starts again, experiment with combinations of [u/b/m]g<br />
<br />
=Wake-on-LAN in different situations=<br />
<br />
The computer that you want to use Wake-on-LAN on may be directly linked to your computer through a network cable, connected to the same router that you are using, or remotely, across the internet.<br />
<br />
There are four essential things needed in order to use Wake-on-LAN on a target PC:<br />
<br />
#Some kind of Wake-on-LAN software on the host (your) PC<br />
#A connection to the internet or intranet of the target PC<br />
#The MAC address of the target PC<br />
#The internal or external IP of the target PC<br />
<br />
*Firstly, install a Wake-on-LAN software. In this article, [http://ahh.sourceforge.net/wol/ wol] will be used. It can be installed from the [[AUR_User_Guidelines#.5Bcommunity.5D|[community]]] repository.<br />
<br />
*'''It is recommended that you read the documentation of wol'''<br />
<br />
man wol<br />
wol --help<br />
<br />
*wol requires several parameters, the most basic needed:<br />
<br />
wol MACADDRESS<br />
<br />
*But it is good practice to include the IP address or hostname, therefore this syntax should be the minimal used:<br />
<br />
wol -i HOSTNAME_OR_IP MACADDRESS<br />
<br />
*The documentation of wol states that:<br />
<br />
::''Each MAC-ADDRESS is written as x:x:x:x:x:x, where x is a hexadecimal number between 0 and ff which represents one byte of the address, which is in network byte order (big endian).''<br />
<br />
*To obtain the MACADDRESS of the target computer:<br />
<br />
ifconfig | grep HWaddr<br />
<br />
The port, IP or hostname of the target PC will be addressed in the relevant following sections.<br />
<br />
==Across your intranet/network (no router)==<br />
<br />
If you are connected directly to another computer through a network cable, or have disabled your router firewall (not a good idea), then using Wake-on-LAN should be very simple.<br />
<br />
===For two computers connected to each other===<br />
<br />
wol MACADDRESS_OF_TARGET_PC<br />
<br />
===For computers connected to a non-firewalled router===<br />
<br />
wol -i INTERNAL_IP_OF_TARGET_PC MACADDRESS_OF_TARGET_PC<br />
<br />
*To find the internal IP (it's the first grepped entry):<br />
<br />
ifconfig | grep 'inet addr'<br />
<br />
*Since you are not firewalled, then there is no need to worry about port redirects.<br />
*If you intend to continue using Wake-on-LAN, it is recommended that you assign your computer's MACADDRESS to a specific IP on your router. Consult your router for details as to how to do this.<br />
<br />
==Across your intranet/network (router)==<br />
<br />
The syntax used in this situation:<br />
<br />
wol -p PORT_FORWARDED_TO_INTERNAL_IP -i INTERNAL_IP MACADDRESS_OF_TARGET_PC<br />
<br />
*When you send the MagicPacket signal to the target computer via a specific port, the signal passes through your router. The router must be instructed to forward any signal heading for that specific port to the internal IP of the target PC.<br />
<br />
*It is recommended that for multiple computers connected to one computer, to assign a different port forward to each internal IP<br />
<br />
*For port forwarding help, please consult http://portforward.com/ (though this website has some Windows specific content, it has a very large database of router web interfaces)<br />
<br />
==Across the internet==<br />
<br />
The syntax needed in this case:<br />
<br />
wol -p X -i HOSTNAME_OR_EXTERNAL_IP_OF_TARGET MACADDRESS<br />
<br />
*Assuming that you know the external IP of the target machine, and that the [[Wake-on-LAN#Across_your_intranet.2Fnetwork_.28router.29|router ports]] on both sides have been forwarding correctly, then this should be exactly as the syntax states.<br />
<br />
<br />
Usually it is necessary to forward your wol port (typically UDP 9) to the broadcast address on your network, not to a particular IP. Most routers do not allow you to forward to broadcast, however if you can get shell access to your router (through telnet, ssh, serial cable, etc) you can implement this workaround:<br />
arp -s 192.168.1.254 FF:FF:FF:FF:FF:FF<br />
<br />
(The above command assumes your network is 192.168.1.0/24). Now, forward UDP port 9 to 192.168.1.254. This has worked for me on a Linksys WRT54G running Tomato, and on the Verizon FIOS ActionTec router.<br />
<br />
=Additional Notes=<br />
<br />
*A common problem is that some forget to switch on the Wake-on-LAN feature in their BIOS.<br />
<br />
*In some systems the BIOS option "Boot from PCI/PCI-E" needs to be Enabled.<br />
<br />
=Example WOL script=<br />
Here is a script you can use to automate wol to several different machine. Modify as you see fit:<br />
<br />
<pre>#!/bin/bash<br />
<br />
# definition of MAC addresses<br />
monster=01:12:46:82:ab:4f<br />
chronic=00:3a:53:21:bc:30<br />
powerless=1a:32:41:02:29:92<br />
ghost=01:1a:d2:56:6b:e6<br />
<br />
while [ "$input1" != quit ]; do<br />
echo "Which PC to wake?"<br />
echo "p) powerless"<br />
echo "m) monster"<br />
echo "c) chronic"<br />
echo "g) ghost"<br />
echo "b) wake monster, wait 40sec, then wake chronic"<br />
echo "q) quit and take no action"<br />
read input1<br />
if [ $input1 == p ]; then<br />
/usr/bin/wol $powerless<br />
exit 1<br />
fi<br />
<br />
if [ $input1 == m ]; then<br />
/usr/bin/wol $monster<br />
exit 1<br />
fi<br />
<br />
if [ $input1 == c ]; then<br />
/usr/bin/wol $chronic<br />
exit 1<br />
fi<br />
<br />
# this line requires an IP address in /etc/hosts for ghost<br />
# and should use wol over the internet provided that port 9<br />
# is forwarded to ghost on ghost's router<br />
<br />
if [ $input1 == g ]; then<br />
/usr/bin/wol -v -h -p 9 ghost $ghost<br />
exit 1<br />
fi<br />
<br />
if [ $input1 == b ]; then<br />
/usr/bin/wol $monster<br />
echo "monster sent, now waiting for 40sec then waking chronic"<br />
sleep 40<br />
/usr/bin/wol $chronic<br />
exit 1<br />
fi<br />
<br />
if [ $input1 == Q ] || [ $input1 == q ]; then<br />
echo "later!"<br />
exit 1<br />
fi<br />
<br />
done<br />
echo "this is the (quit) end!! c-ya!"</pre></div>Piezoelectric