https://wiki.archlinux.org/api.php?action=feedcontributions&user=Bzhb&feedformat=atomArchWiki - User contributions [en]2024-03-29T09:33:26ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=NVIDIA&diff=757970NVIDIA2022-11-25T13:45:11Z<p>Bzhb: /* Enabling SLI */ fix grep command</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:Nvidia]]<br />
[[fa:اِنویدیا]]<br />
[[ja:NVIDIA]]<br />
[[pt:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[zh-hans:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA/Tips and tricks}}<br />
{{Related|NVIDIA/Troubleshooting}}<br />
{{Related|Nouveau}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|PRIME}}<br />
{{Related|Bumblebee}}<br />
{{Related|nvidia-xrun}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
This article covers the proprietary [https://www.nvidia.com NVIDIA] graphics card driver. For the open-source driver, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|$ lspci -k {{!}} grep -A 2 -E "(VGA{{!}}3D)"}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* Visiting NVIDIA's [https://www.nvidia.com/Download/index.aspx driver download site] and using the dropdown lists.<br />
:* Finding the code name (e.g. NV50, NVC0, etc.) on [https://nouveau.freedesktop.org/wiki/CodeNames/ nouveau wiki's code names page] or [https://gitlab.freedesktop.org/nouveau/wiki/-/blob/master/sources/CodeNames.mdwn nouveau's GitLab], then looking up the name in NVIDIA's [https://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver.<br />
<br />
3. Install the appropriate driver for your card:<br />
<br />
{{Note|<br />
*When installing {{Pkg|dkms}}, read [[Dynamic Kernel Module Support#Installation]]<br />
*{{Pkg|nvidia}} may not boot on Linux 5.18 (or later) on systems with Intel CPUs due to {{Bug|74886}}/{{Bug|74891}}. Until this is fixed, a workaround is disabling the [https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/007/indirect-branch-tracking/ Indirect Branch Tracking] CPU security feature by setting the {{ic|1=ibt=off}} [[kernel parameter]] from the [[bootloader]]. This security feature is responsible for [https://lwn.net/Articles/889475/ mitigating a class of exploit techniques], but [https://www.reddit.com/r/archlinux/comments/v0x3c4/psa_if_you_run_kernel_518_with_nvidia_pass_ibtoff/ is deemed safe as a temporary stopgap solution]. You can alternatively try {{Pkg|nvidia-open}} and continue using IBT.<br />
*{{Pkg|nvidia-open}} does not work on systems that have AMD integrated GPUs due to [https://github.com/NVIDIA/open-gpu-kernel-modules/issues/282 nvidia-open issue #282].}}<br />
<br />
:* For the [https://nouveau.freedesktop.org/CodeNames.html#NV110 Maxwell (NV110/GM''XXX'')] series and newer, [[install]] the {{Pkg|nvidia}} package (for use with the {{Pkg|linux}} kernel) or {{Pkg|nvidia-lts}} (for use with the {{Pkg|linux-lts}} kernel) package.<br />
:** If these packages do not work, {{AUR|nvidia-beta}} may have a newer driver version that offers support.<br />
:* Alternatively for the [https://nouveau.freedesktop.org/CodeNames.html#NV160 Turing (NV160/TU''XXX'')] series or newer the {{Pkg|nvidia-open}} package may be installed for open source kernel modules on the {{Pkg|linux}} kernel (On other kernels {{Pkg|nvidia-open-dkms}} must be used).<br />
:** This is currently '''alpha quality''' on desktop cards, so there will be issues.<br />
:* For the [https://nouveau.freedesktop.org/CodeNames.html#NVE0 Kepler (NVE0/GK''XXX'')] series, [[install]] the {{AUR|nvidia-470xx-dkms}} package.<br />
:* For the [https://nouveau.freedesktop.org/CodeNames.html#NVC0 Fermi (NVC0/GF1''XX'')] series, [[install]] the {{AUR|nvidia-390xx-dkms}} package.<br />
:* For even older cards, have a look at [[#Unsupported drivers]].<br />
<br />
4. For 32-bit application support, also install the corresponding ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-utils}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the {{ic|nouveau}} module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Xorg configuration]] or [[#Wayland]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have an older card, NVIDIA no longer actively supports drivers for your card. This means that these drivers [https://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not officially support the current Xorg version]. It thus might be easier to use the [[nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, NVIDIA's legacy drivers are still available and might provide better 3D performance/stability.<br />
<br />
* For the [https://nouveau.freedesktop.org/CodeNames.html#NV50 Tesla (NV50/G80-90-GT2''XX'')] series, [[install]] the {{AUR|nvidia-340xx-dkms}} package.<br />
* For the [https://nouveau.freedesktop.org/CodeNames.html#NV40 Curie (NV40/G70)] series and older, drivers are no longer packaged for Arch Linux.<br />
<br />
=== Custom kernel ===<br />
<br />
If using a custom kernel, compilation of the NVIDIA kernel modules can be automated with [[DKMS]]. Install the {{Pkg|nvidia-dkms}} package (or a specific branch), and the corresponding headers for your kernel.<br />
<br />
Ensure your kernel has {{ic|1=CONFIG_DRM_SIMPLEDRM=y}}, and if using {{ic|CONFIG_DEBUG_INFO_BTF}} then this is needed in the PKGBUILD (since kernel 5.16):<br />
<br />
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids<br />
<br />
The NVIDIA module will be rebuilt after every NVIDIA or kernel update thanks to the DKMS [[pacman hook]].<br />
<br />
=== DRM kernel mode setting ===<br />
<br />
To enable DRM ([[Wikipedia:Direct Rendering Manager|Direct Rendering Manager]]) [[kernel mode setting]], add the {{ic|1=nvidia_drm.modeset=1}} [[kernel parameter]].<br />
<br />
{{Note|1=<nowiki/><br />
* The NVIDIA driver does '''not''' provide an {{ic|fbdev}} driver for the high-resolution console for the kernel compiled-in {{ic|vesafb}} module. However, the kernel compiled-in {{ic|efifb}} module supports a high-resolution console on EFI systems. This method requires GRUB or rEFInd and is described in [[NVIDIA/Tips and tricks#Fixing terminal resolution]].[https://forums.fedoraforum.org/showthread.php?t=306271][https://www.reddit.com/r/archlinux/comments/4gwukx/nvidia_drivers_and_high_resolution_tty_possible/][https://www.reddit.com/r/archlinux/comments/86lqc5/tty_resolution_nvidia_psaish/].<br />
* NVIDIA drivers prior to version 470 (e.g. {{AUR|nvidia-390xx-dkms}}) do not support hardware accelerated XWayland, causing non-Wayland-native applications to suffer from poor performance in Wayland sessions.<br />
}}<br />
<br />
==== Early loading ====<br />
<br />
For basic functionality, just adding the kernel parameter should suffice. If you want to ensure it is loaded at the earliest possible occasion, or are noticing startup issues (such as the {{ic|nvidia}} kernel module being loaded after the [[display manager]]) you can add {{ic|nvidia}}, {{ic|nvidia_modeset}}, {{ic|nvidia_uvm}} and {{ic|nvidia_drm}} to the initramfs.<br />
<br />
===== mkinitcpio =====<br />
<br />
If you use [[mkinitcpio]] initramfs, follow [[mkinitcpio#MODULES]] to add modules.<br />
<br />
If added to the initramfs, do not forget to run [[mkinitcpio]] every time there is a {{Pkg|nvidia}} driver update. See [[#pacman hook]] to automate these steps.<br />
<br />
===== Booster =====<br />
<br />
If you use [[Booster]], follow [[Booster#Early module loading]].<br />
<br />
===== pacman hook =====<br />
<br />
To avoid the possibility of forgetting to update [[initramfs]] after an NVIDIA driver upgrade, you may want to use a [[pacman hook]]:<br />
<br />
{{hc|/etc/pacman.d/hooks/nvidia.hook|2=<br />
[Trigger]<br />
Operation=Install<br />
Operation=Upgrade<br />
Operation=Remove<br />
Type=Package<br />
Target=nvidia<br />
Target=linux<br />
# Change the linux part above and in the Exec line if a different kernel is used<br />
<br />
[Action]<br />
Description=Update NVIDIA module in initcpio<br />
Depends=mkinitcpio<br />
When=PostTransaction<br />
NeedsTargets<br />
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'<br />
}}<br />
<br />
Make sure the {{ic|Target}} package set in this hook is the one you have installed in steps above (e.g. {{ic|nvidia}}, {{ic|nvidia-dkms}}, {{ic|nvidia-lts}} or {{ic|nvidia-ck-''something''}}).<br />
<br />
{{Note|The complication in the {{ic|Exec}} line above is in order to avoid running ''mkinitcpio'' multiple times if both {{ic|nvidia}} and {{ic|linux}} get updated. In case this does not bother you, the {{ic|1=Target=linux}} and {{ic|NeedsTargets}} lines may be dropped, and the {{ic|Exec}} line may be reduced to simply {{ic|1=Exec=/usr/bin/mkinitcpio -P}}.}}<br />
<br />
=== Hardware accelerated video decoding ===<br />
<br />
Accelerated video decoding with VDPAU is supported on GeForce 8 series cards and newer. Accelerated video decoding with NVDEC is supported on Fermi (~400 series) cards and newer. See [[Hardware video acceleration]] for details.<br />
<br />
=== Hardware accelerated video encoding with NVENC ===<br />
<br />
NVENC requires the {{ic|nvidia_uvm}} module and the creation of related device nodes under {{ic|/dev}}.<br />
<br />
The latest driver package provides a [[udev rule]] which creates device nodes automatically, so no further action is required.<br />
<br />
If you are using an old driver (e.g. {{AUR|nvidia-340xx-dkms}}), you need to create device nodes. Invoking the {{ic|nvidia-modprobe}} utility automatically creates them. You can create {{ic|/etc/udev/rules.d/70-nvidia.rules}} to run it automatically:<br />
<br />
{{hc|/etc/udev/rules.d/70-nvidia.rules|2=<br />
ACTION=="add", DEVPATH=="/bus/pci/drivers/nvidia", RUN+="/usr/bin/nvidia-modprobe -c0 -u"<br />
}}<br />
<br />
== Xorg configuration ==<br />
<br />
The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file. You can [[Xorg#Running|start X]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
<br />
{{Tip|For more configuration options, see [[NVIDIA/Troubleshooting]].}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
<br />
# Load "dri"<br />
<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
=== nvidia-settings ===<br />
<br />
The {{Pkg|nvidia-settings}} tool lets you configure many options using either CLI or GUI. Running {{ic|nvidia-settings}} without any options launches the GUI, for CLI options see {{man|1|nvidia-settings}}.<br />
<br />
You can run the CLI/GUI as a non-root user and save the settings to {{ic|~/.nvidia-settings-rc}} by using the option ''Save Current Configuration'' under ''nvidia-settings Configuration'' tab.<br />
<br />
To load the {{ic|~/.nvidia-settings-rc}} for the current user:<br />
<br />
$ nvidia-settings --load-config-only<br />
<br />
See [[Autostarting]] to start this command on every boot.<br />
<br />
{{Note|<br />
* [[Xorg]] may not start or crash on startup after saving {{ic|nvidia-settings}} changes. Adjusting or deleting the generated {{ic|~/.nvidia-settings-rc}} and/or [[Xorg]] file(s) should recover normal startup.<br />
* [[Cinnamon]] desktop can override changes made through {{ic|nvidia-settings}}. You can [[Cinnamon#Cinnamon overrides settings in xorg.conf|adjust the Cinnamon startup behavior to prevent that]].}}<br />
<br />
=== Manual configuration ===<br />
<br />
Several tweaks (which cannot be enabled [[#Automatic configuration|automatically]] or with [[#nvidia-settings|nvidia-settings]]) can be performed by editing your configuration file. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [https://download.nvidia.com/XFree86/Linux-x86_64/470.63.01/README/ NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Minimal configuration ====<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "NVIDIA Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce GTX 1050 Ti"<br />
EndSection<br />
}}<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
<br />
Option "ConnectedMonitor" "DFP"<br />
<br />
{{Note|Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
{{Out of date|Potentially obsolete[https://lists.archlinux.org/archives/list/aur-requests@lists.archlinux.org/thread/GXJG7D3ALUQKOE2DT4XCL4UXQUFDDSEC/], upstream package also seems to be ancient.}}<br />
<br />
Add to kernel paremeters:<br />
<br />
nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1<br />
<br />
Alternatively, add the following under section {{ic|Device}}:<br />
<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl-dkms}}.<br />
<br />
{{Note|Installing {{AUR|nvidia-bl-dkms}} will provide a {{ic|/sys/class/backlight/nvidia_backlight/}} interface to backlight brightness control, but your system may continue to issue backlight control changes on {{ic|/sys/class/backlight/acpi_video0/}}. One solution in this case is to watch for changes on, e.g. {{ic|acpi_video0/brightness}} with ''inotifywait'' and to translate and write to {{ic|nvidia_backlight/brightness}} accordingly. See [[Backlight#sysfs modified but no brightness change]].}}<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|Since the GTX 10xx Series (1080, 1070, 1060, etc) only 2-way SLI is supported. 3-way and 4-way SLI may work for CUDA/OpenCL applications, but will most likely break all OpenGL applications.}}<br />
<br />
Taken from the NVIDIA driver's [https://download.nvidia.com/XFree86/Linux-x86_64/515.65.01/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
<br />
{{hc|# lspci {{!}} grep -E "VGA{{!}}3D controller"|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
03:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
08:00.0 3D controller: NVIDIA Corporation GM108GLM [Quadro K620M / Quadro M500M] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the ''nvidia-xconfig'' utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
<br />
{{hc|$ nvidia-settings -q all {{!}} grep SLIMode|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning|After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
If this configuration does not work, you may need to use the PCI Bus ID provided by {{ic|nvidia-settings}},<br />
<br />
{{hc|$ nvidia-settings -q all {{!}} grep -i pcibus|<br />
Attribute 'PCIBus' (host:0[gpu:0]): 101.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.<br />
Attribute 'PCIBus' (host:0[gpu:1]): 23.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.<br />
}}<br />
<br />
and comment out the PrimaryGPU option in your xorg.d configuration,<br />
<br />
{{hc|/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf|<br />
...<br />
<br />
Section "OutputClass"<br />
...<br />
# Option "PrimaryGPU" "yes"<br />
...<br />
}}<br />
<br />
Using this configuration may also solve any graphical boot issues.<br />
<br />
=== Multiple monitors ===<br />
<br />
See [[Multihead]] for more general information.<br />
<br />
==== Using nvidia-settings ====<br />
<br />
The [[#nvidia-settings|nvidia-settings]] tool can configure multiple monitors.<br />
<br />
For CLI configuration, first get the {{ic|CurrentMetaMode}} by running:<br />
<br />
{{hc|$ nvidia-settings -q CurrentMetaMode|2=<br />
Attribute 'CurrentMetaMode' (hostnmae:0.0): id=50, switchable=no, source=nv-control :: DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0}<br />
}}<br />
<br />
Save everything after the {{ic|::}} to the end of the attribute (in this case: {{ic|1=DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0}<nowiki/>}}) and use to reconfigure your displays with {{ic|1=nvidia-settings --assign "CurrentMetaMode=''your_meta_mode''"}}.<br />
<br />
{{Tip|You can create shell aliases for the different monitor and resolution configurations you use.}}<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1: 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1: 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[https://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection<br />
}}<br />
<br />
===== Vertical sync using TwinView =====<br />
<br />
If you are using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
===== Gaming using TwinView =====<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting games in a separate X server|starting games in a separate X server]].<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor. Mosaic mode requires a valid SLI configuration. Even if using Base mode without SLI, the GPUs must still be SLI capable/compatible.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the ''nvidia-xconfig'' command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, [https://devtalk.nvidia.com/default/topic/579449/linux/basemosaic-v295-vs-v310-vs-v325-only-up-to-three-screens-/post/3954733/#3954733 GeForce cards are artificially limited to 3 monitors] in Base Mosaic mode. Quadro cards support more than 3 monitors. As of September 2014, the Windows driver has dropped this artificial restriction, but it remains in the Linux driver.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
== Wayland ==<br />
<br />
See [[Wayland#Requirements]] for more information.<br />
<br />
For further configuration options, take a look at the wiki pages or documentation of the respective compositor.<br />
<br />
Regarding XWayland take a look at [[Wayland#XWayland]].<br />
<br />
Follow [[GDM#Wayland and the proprietary NVIDIA driver]] when using GDM.<br />
<br />
== Tips and tricks ==<br />
<br />
See [[NVIDIA/Tips and tricks]].<br />
<br />
== Troubleshooting ==<br />
<br />
See [[NVIDIA/Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [https://forums.developer.nvidia.com/t/current-graphics-driver-releases/28500 Current graphics driver releases in official NVIDIA Forum]<br />
* [https://forums.developer.nvidia.com/c/gpu-unix-graphics/linux/148 NVIDIA Developers Forum - Linux Subforum]</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=732639Laptop/Dell2022-06-14T11:03:24Z<p>Bzhb: /* G15 */ Formulation improvement</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:ノートパソコン/Dell]]<br />
{{Laptops navigation}}<br />
<br />
== Inspiron ==<br />
<br />
{{Laptops table header}}<br />
| Inspiron 1420 || 2012-09 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 1501 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 1520 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || <br />
|-<br />
| [[Dell Inspiron 1525|Inspiron 1525]] || 2008-06-24 (Arch Linux 2008.06 Overlord) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || {{ic|Fn+Up/Down}} (LCD brightness control) is OS independent.<br />
|-<br />
| Inspiron 1764 || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Fan control/monitoring is completely broken with {{AUR|i8kutils}}<br />
|-<br />
| [[Dell Inspiron 14 3420|Inspiron 14 3000 Series (Model 3420)]] || 2016-09-03 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Inspiron 15 3000 Series (Model 3541) || 2016-01-01 || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>Need to disable early microcode loading<br />
|-<br />
| [[Dell Inspiron 5547|Inspiron 15 5000 Series (Model 5547)]] || 2016-01-25 || {{G|AMD GPU: Untested}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|SD card reader: Untested}} || <br />
|-<br />
| [[Dell Inspiron 5566|Inspiron 15 5000 Series (Model 5566)]] || 2020-09-24 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|SD card reader: Untested}} || <sup>*</sup>HDMI untested.<br />
|-<br />
| Inspiron 15 5000 Series (Model 5559) || 2021-07-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 15 7000 Series (Model 7537) || 2016-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Volume up / down button needs some modifying to work all other buttons work with drivers that come with the kernel. ACPI battery is not detected on bootup and requires you to plug in and out the AC adapter.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7570) || 2021-10-27 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || USB-C DisplayPort alt-mode tested with a Dell P2721Q monitor. 65W of power, USB hub and Video delivered over USB-C work well. Rare issues with the monitor sometimes losing the video connection when switching users or logging out (on resolution changes). The power and USB keep working though.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7548) || 2015-05 || {{G|Yes<sup>*</sup>}} || {{Y|Untested}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|SD card reader: Untested}} || <sup>*</sup>HDMI untested.<br/>If the kernel [https://bbs.archlinux.org/viewtopic.php?id=200763 panics] during bootup replace the 'keyboard'-hook with the specific module.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7559) || 2016-08 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <sup>*</sup>[https://github.com/Bumblebee-Project/bbswitch/issues/140 bumblebee with issue]<br />
|-<br />
| Inspiron 15 7000 Series (Model 7566) || 2016-12 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || <sup>*</sup>HDMI hot-plug not working.<br />
|-<br />
| [[Dell Inspiron 15 (7590)|Inspiron 15 7000 Series (Model 7590)]] || 2020-02 || {{Yes}} || {{Y|Partial<sup>*</sup>}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Thunderbolt: Untested}} || <sup>*</sup>May need {{ic|1=snd_hda_intel.dmic_detect=0}}. Cannot get microphone working.<br />
|-<br />
| Inspiron 13 7000 Series (7370) || 2017-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Partial<sup>*</sup>}} || [https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1641290 Fingerprint reader is unsupported].|| <sup>*</sup>Does not wake up after closing the screen lid.<br/>{{ic|Fn}} [https://bugzilla.kernel.org/show_bug.cgi?id=198393 Wireless toggle does not work]<br />
|-<br />
| Inspiron M5030 || 2015-08-16 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || {{AUR|i8kutils}} required for fan control<br />
|-<br />
| Inspiron Duo 1090 || 2014-10-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Dell Inspiron 5567|Inspiron 15 5000 Series (model 5567) - Intel i5, no AMD || 2020-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell Inspiron 5575|Inspiron 15 5000 Series (model 5575)]] || 2019-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested:<br/>HDMI<br/>SD card reader}} || <br />
|-<br />
| [[Dell Inspiron 7586|Inspiron 15 7000 Series (model 7586)]] || 2019-07-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|Webcam: Untested}} || Fingerprint reader works with proprietary driver.<br />
|-<br />
| [[Dell Inspiron 13 (5391)|Inspiron 13 5000 Series (model 5391)]] || 2020-09 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{-}} || || <br />
|-<br />
| Inspiron 13 7000 Series (model 7348) || 2021 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Inspiron 14 7425 2-in-1 || 2022-05-05 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{No}} || {{Yes}} || {{Y|Fingerprint reader: Untested}} || <br />
|}<br />
<br />
== Latitude ==<br />
<br />
{{Laptops table header}}<br />
| Latitude D620 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested: Smart card reader}} || <br />
|-<br />
| Latitude D820 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} ||{{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude D830 || 2007-08-01 (Arch Linux 0.9 Don't Panic) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| Latitude E5400 || 2021-11-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Bluetooth LED does not glow. || <br />
|-<br />
| Latitude 5290 2-in-1 || 2022-05 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Power off: OK}} || {{Y|Untested:<br/>Webcam<br/>Fingerprint sensor}} || <br />
|-<br />
| Latitude 5490 || 2022-02 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested<sup>**</sup>}} || Random Screen flicker with ''i915 [drm] *ERROR* CPU pipe A FIFO underrun'' in kernel logs. Solved with {{ic|1=intel_idle.max_cstate=4}} || <sup>*</sup>[[Laptop#Audio_mute_LED|audio mute LED]] use {{ic|1=model=mute-led-gpio}}<br/><sup>**</sup>[https://bbs.archlinux.org/viewtopic.php?pid=1902231#p1902231 Kernel panic on suspend] solved with {{ic|1=acpi_enforce_resources=lax i915.enable_dc=0}}<br />
|-<br />
| Latitude E5500 || 2016-03-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || <br />
|-<br />
| [[Dell Latitude E5430|Latitude E5430]] || 2016-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude E5540 || 2016-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Latitude E5570 || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || BIOS may report incorrect RAM size, OK on UEFI.<br />
|-<br />
| [[Dell Latitude E5580|Latitude E5580]] || 2018-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude E5401 || 2019-10 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|Untested:<br/>Webcam<br/>Thunderbolt}} || Poor thermal design (i7 i7-9850H CPU @ 2.60GHz)<br />
|-<br />
| Latitude E6230 || 2018-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{G|Hibernate: Untested}} || RFID reader requires [https://blog.g3rt.nl/enable-dell-nfc-contactless-reader.html enabling RFID radio]<br/>Touchpad (alps a10) shaky || <br />
|-<br />
| Latitude E6410 || 2018-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Y|Partial<sup>*</sup>}} || Fingerprint Sensor not functioning, no drivers seem to exist || <sup>*</sup>Suspension on closing the lid not working right<br />
|-<br />
| Latitude E6410 (BIOS A16)|| 2018-08-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || SD card reader is unreliable. For advanced touchpad functionality see [[Touchpad Synaptics]] || [[EFISTUB]] bootmanager does not work for me, [[GRUB]] works. <br />
|-<br />
| Latitude E6420 || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || <br />
|-<br />
| Latitude E6430 || 2018-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || {{Y|Untested:<br/>SD card reader<br/>smart card reader}} || Touchpad shaky<br />
|-<br />
| Latitude E6530 || 2014-10-01 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <sup>*</sup>If Optimus is enabled, output is VGA only, otherwise HDMI works when NVIDIA GPU is disabled in BIOS.<br />
|-<br />
| [[Dell Latitude E7270|Latitude E7270]] || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>After UEFI update<br/>High suspend usage with power share port active<br />
|-<br />
| [[Dell Latitude 7370|Latitude 7370]] || 2019-05-11 || {{Yes}} || {{Y|Untested}} || {{-}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| Latitude 7390 ( 2-in-1 ) || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell Latitude E7440|Latitude E7440]] || 2019-05-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| [https://www.dell.com/us/business/p/latitude-e7450-ultrabook/pd?oc=cal147w7pf2 Latitude E7450] || 2016-03-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Partial<sup>*</sup>}} || Modem: No<br/>Synaptics touchpad + stick. || <sup>*</sup>Hibernate does not work<br />
|-<br />
| [[Dell Latitude E7470|Latitude E7470]] || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || Buggy [[UEFI]] : impossible to pass kernel parameters via [[efibootmgr]], nor shell bcfg, nor the built-in gui.<br />
|-<br />
| [[Dell Latitude 3500|Latitude 3500]] || 2020-10-28 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Fingerprint reader works with proprietary driver. || See linked article for more details<br />
|-<br />
| Latitude 5580 || 2017-11-06 (±) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>Needs BIOS update with [[fwupd]]) to avoid occasional black screen when resuming<br />
|-<br />
| Latitude 7420 || 2020-10 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>See: https://github.com/intel/thermal_daemon/issues/341 <br />
|-<br />
| [[Dell Latitude 7480|Latitude 7480]] || 2019-11-07 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{R|No: IR Webcam<br/>Fingerprint reader}} ||<br />
|-<br />
| [[Dell Latitude 7490|Latitude 7490]] || 2019-05-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| Latitude 5511 || 2020-10 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Fix freezes with {{ic|1=nvme_core.default_ps_max_latency_us=0}}<br />
|-<br />
| [[Dell Latitude 3420|Latitude 3420]] || 2022-02-04 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}}|| {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|}<br />
<br />
== Precision ==<br />
<br />
{{Laptops table header}}<br />
| Precision M4800 || 2014-04-01 || {{G|Yes<sup>*</sup>}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || colspan=2 | <sup>*</sup>{{ic|nomodeset}} is ''required'' to boot.<br />
|-<br />
| Precision M6700 || 2017-01-01 || {{Yes}} || {{G|HDMI audio: Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | Occasional GPU freezes with "GPU has fallen off the bus" errors since kernel 4.14.15-1 and NVIDIA 387.34<br />
|-<br />
| Precision 7710 || 2017-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|HDMI audio: Untested}} || {{Y|Untested}} || {{G|Hibernation: Untested}} || colspan=2 | Suspend works if no BIOS hard drive password. {{ic|xcalib -a -i}} is very slow<br />
|-<br />
| Precision 7710 || 2016-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|HDMI audio: Untested}} || {{Y|Untested}} || {{Yes}} || colspan=2 | kernel≥5.12.9 or nvidia≥465.24.02-5 causes no display to be seen after X launches. DFP-2 shows as disconnected.<br />
|-<br />
| Precision 5510 || 2020-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || colspan=2 | Essentially the same device as the [[Dell XPS 15 9550]]<br />
|-<br />
| Precision 3530 || 2020-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || colspan=2 | You need to disable early microcode loading. Upgrade Thunderbolt controller to latest firmware from Windows and optionally disable Thunderbolt security within the BIOS (e.g. for TB16 docking station).<br />
|-<br />
| Precision 5520 || 2018-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || || <br />
|-<br />
| Precision 5530 || 2018-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{G|Hibernation: Untested}} || colspan=2 | <sup>*</sup>Needs occasional driver reloads with {{ic|modprobe btusb}}. Need to change sleep state as per [[Dell XPS 15 9570]]. <br />
|}<br />
<br />
== Studio ==<br />
<br />
{{Laptops table header}}<br />
| Studio 1749 || 2013-01-04 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{-}} || {{G|Hibernate: Untested}} || || <sup>*</sup>Add {{ic|1=options snd-hda-intel index=0 model=dell-m6-dmic}} to {{ic|/etc/modprobe.d/alsa-base.conf}}<br />
|-<br />
| Studio XPS M1640 || 2009-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|}<br />
<br />
== Vostro ==<br />
<br />
{{Laptops table header}}<br />
| Vostro 1710 || 2018-11-26 || {{Y|Untested}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Vostro 5481 || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Vostro 3583 || 2019-12-21 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Reload {{ic|ath10k_pci}} after resuming from sleep if WiFi stops working<br />
|-<br />
| Vostro 3560 || 2020-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Vostro 5590 || 2021-01-23 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}}|| ||<br />
|-<br />
| Vostro 7500 || 2020-10-16 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{-}} || {{Yes}} || {{-}} || {{Y|Untested}} || {{R|No: Finger print scanner}} || UEFI does not pass kernel parameters on boot<br />
|}<br />
<br />
== XPS ==<br />
<br />
{{Laptops table header}}<br />
| XPS L322 || 2013-03 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | ALPS Touchpad recognized only as PS/2 mouse, two-finger scroll, finger tap-to-click, etc... does not work.<br />
|-<br />
| [[Dell XPS M1330|XPS M1330]] || 2021-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>''acpi_cpufreq'' see: [https://bbs.archlinux.org/viewtopic.php?id=44500 forums]<br />
|-<br />
| [[Dell XPS 13 (9333)|XPS 13 (9333)]] || 2016-16-16 || {{Y|Untested}} || {{Y|Untested}} || {{-}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| [[Dell XPS 13 (9310)|XPS 13 (9310)]] || 2016-16-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9343)|XPS 13 (9343)]] || 2016-16-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9350)|XPS 13 (9350)]] || 2016-11-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || Apply firmware updates<br />
|-<br />
| [[Dell XPS 13 (9360)|XPS 13 (9360)]] || 2016-11-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9370)|XPS 13 (9370)]] || 2018-05-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9380)|XPS 13 (9380)]] || 2019 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 2-in-1 (9365)|XPS 13 2-in-1 (9365)]] || 2017-10-22 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (7390)|XPS 13 (7390)]] || 2019-12-21 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested: Fingerprint sensor}} || <br />
|-<br />
| [[Dell XPS 13 2-in-1 (7390)|XPS 13 2-in-1 (7390)]] || 2019-09-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|No: Camera, Fingerprint Sensor}} || System freezes on boot. See device page for fix.<br />
|-<br />
| [[Dell XPS 15|XPS 15]] || 2016-11-17 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 17 (9700)|XPS 17 (9700)]] || 2020-09-18 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|}<br />
<br />
== G3 ==<br />
<br />
{{Laptops table header}}<br />
| G3 15 3590 || 2020-19-10 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || [[GPGPU#CUDA|CUDA]] is not working with Linux 5.9 || Works well with {{AUR|optimus-manager-git}}, follow their [https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options#configuration-1--built-in-power-management-inside-the-nvidia-driver page on power management]. <br />
|}<br />
<br />
== G5 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G5 5590-9340|G5 5590-9340]] || 2020-08-20 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|No: Fingerprint reader<sup>*</sup>}} || <sup>*</sup>drivers might be extracted from Ubuntu image of this laptop<br />
|}<br />
<br />
== G15 ==<br />
<br />
{{Laptops table header}}<br />
| G15 5515 AMD EDITION || 2022-02-12 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || Touchpad disables randomly on boot, create {{hc|/etc/modprobe.d/i2c-touchpad.conf|softdep i2c_hid pre: pinctrl_amd}}<br />
|-<br />
| G15 5511 || 2022-04-11 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <sup>*</sup>[https://askubuntu.com/questions/1220493/18-04-audio-realtek-alc3254-fails-on-new-dell-g3-15-3590?newreg=60fffc5843d74914a8d8de74e33c7114 needs kernel parameter]: {{ic|1=snd_hda_intel.dmic_detect=0}}. <br />
<br />
Also with kernel 5.18 nvidia needs {{ic|1=ibt=off}} to work, see Note on [https://wiki.archlinux.org/title/NVIDIA#Installation Nvidia page]</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=732638Laptop/Dell2022-06-14T11:01:43Z<p>Bzhb: /* G15 */ fix link to arrive on the relevant section</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:ノートパソコン/Dell]]<br />
{{Laptops navigation}}<br />
<br />
== Inspiron ==<br />
<br />
{{Laptops table header}}<br />
| Inspiron 1420 || 2012-09 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 1501 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 1520 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || <br />
|-<br />
| [[Dell Inspiron 1525|Inspiron 1525]] || 2008-06-24 (Arch Linux 2008.06 Overlord) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || {{ic|Fn+Up/Down}} (LCD brightness control) is OS independent.<br />
|-<br />
| Inspiron 1764 || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Fan control/monitoring is completely broken with {{AUR|i8kutils}}<br />
|-<br />
| [[Dell Inspiron 14 3420|Inspiron 14 3000 Series (Model 3420)]] || 2016-09-03 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Inspiron 15 3000 Series (Model 3541) || 2016-01-01 || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>Need to disable early microcode loading<br />
|-<br />
| [[Dell Inspiron 5547|Inspiron 15 5000 Series (Model 5547)]] || 2016-01-25 || {{G|AMD GPU: Untested}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|SD card reader: Untested}} || <br />
|-<br />
| [[Dell Inspiron 5566|Inspiron 15 5000 Series (Model 5566)]] || 2020-09-24 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|SD card reader: Untested}} || <sup>*</sup>HDMI untested.<br />
|-<br />
| Inspiron 15 5000 Series (Model 5559) || 2021-07-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 15 7000 Series (Model 7537) || 2016-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Volume up / down button needs some modifying to work all other buttons work with drivers that come with the kernel. ACPI battery is not detected on bootup and requires you to plug in and out the AC adapter.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7570) || 2021-10-27 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || USB-C DisplayPort alt-mode tested with a Dell P2721Q monitor. 65W of power, USB hub and Video delivered over USB-C work well. Rare issues with the monitor sometimes losing the video connection when switching users or logging out (on resolution changes). The power and USB keep working though.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7548) || 2015-05 || {{G|Yes<sup>*</sup>}} || {{Y|Untested}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|SD card reader: Untested}} || <sup>*</sup>HDMI untested.<br/>If the kernel [https://bbs.archlinux.org/viewtopic.php?id=200763 panics] during bootup replace the 'keyboard'-hook with the specific module.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7559) || 2016-08 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <sup>*</sup>[https://github.com/Bumblebee-Project/bbswitch/issues/140 bumblebee with issue]<br />
|-<br />
| Inspiron 15 7000 Series (Model 7566) || 2016-12 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || <sup>*</sup>HDMI hot-plug not working.<br />
|-<br />
| [[Dell Inspiron 15 (7590)|Inspiron 15 7000 Series (Model 7590)]] || 2020-02 || {{Yes}} || {{Y|Partial<sup>*</sup>}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Thunderbolt: Untested}} || <sup>*</sup>May need {{ic|1=snd_hda_intel.dmic_detect=0}}. Cannot get microphone working.<br />
|-<br />
| Inspiron 13 7000 Series (7370) || 2017-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Partial<sup>*</sup>}} || [https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1641290 Fingerprint reader is unsupported].|| <sup>*</sup>Does not wake up after closing the screen lid.<br/>{{ic|Fn}} [https://bugzilla.kernel.org/show_bug.cgi?id=198393 Wireless toggle does not work]<br />
|-<br />
| Inspiron M5030 || 2015-08-16 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || {{AUR|i8kutils}} required for fan control<br />
|-<br />
| Inspiron Duo 1090 || 2014-10-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Dell Inspiron 5567|Inspiron 15 5000 Series (model 5567) - Intel i5, no AMD || 2020-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell Inspiron 5575|Inspiron 15 5000 Series (model 5575)]] || 2019-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested:<br/>HDMI<br/>SD card reader}} || <br />
|-<br />
| [[Dell Inspiron 7586|Inspiron 15 7000 Series (model 7586)]] || 2019-07-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|Webcam: Untested}} || Fingerprint reader works with proprietary driver.<br />
|-<br />
| [[Dell Inspiron 13 (5391)|Inspiron 13 5000 Series (model 5391)]] || 2020-09 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{-}} || || <br />
|-<br />
| Inspiron 13 7000 Series (model 7348) || 2021 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Inspiron 14 7425 2-in-1 || 2022-05-05 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{No}} || {{Yes}} || {{Y|Fingerprint reader: Untested}} || <br />
|}<br />
<br />
== Latitude ==<br />
<br />
{{Laptops table header}}<br />
| Latitude D620 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested: Smart card reader}} || <br />
|-<br />
| Latitude D820 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} ||{{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude D830 || 2007-08-01 (Arch Linux 0.9 Don't Panic) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| Latitude E5400 || 2021-11-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Bluetooth LED does not glow. || <br />
|-<br />
| Latitude 5290 2-in-1 || 2022-05 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Power off: OK}} || {{Y|Untested:<br/>Webcam<br/>Fingerprint sensor}} || <br />
|-<br />
| Latitude 5490 || 2022-02 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested<sup>**</sup>}} || Random Screen flicker with ''i915 [drm] *ERROR* CPU pipe A FIFO underrun'' in kernel logs. Solved with {{ic|1=intel_idle.max_cstate=4}} || <sup>*</sup>[[Laptop#Audio_mute_LED|audio mute LED]] use {{ic|1=model=mute-led-gpio}}<br/><sup>**</sup>[https://bbs.archlinux.org/viewtopic.php?pid=1902231#p1902231 Kernel panic on suspend] solved with {{ic|1=acpi_enforce_resources=lax i915.enable_dc=0}}<br />
|-<br />
| Latitude E5500 || 2016-03-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || <br />
|-<br />
| [[Dell Latitude E5430|Latitude E5430]] || 2016-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude E5540 || 2016-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Latitude E5570 || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || BIOS may report incorrect RAM size, OK on UEFI.<br />
|-<br />
| [[Dell Latitude E5580|Latitude E5580]] || 2018-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude E5401 || 2019-10 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|Untested:<br/>Webcam<br/>Thunderbolt}} || Poor thermal design (i7 i7-9850H CPU @ 2.60GHz)<br />
|-<br />
| Latitude E6230 || 2018-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{G|Hibernate: Untested}} || RFID reader requires [https://blog.g3rt.nl/enable-dell-nfc-contactless-reader.html enabling RFID radio]<br/>Touchpad (alps a10) shaky || <br />
|-<br />
| Latitude E6410 || 2018-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Y|Partial<sup>*</sup>}} || Fingerprint Sensor not functioning, no drivers seem to exist || <sup>*</sup>Suspension on closing the lid not working right<br />
|-<br />
| Latitude E6410 (BIOS A16)|| 2018-08-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || SD card reader is unreliable. For advanced touchpad functionality see [[Touchpad Synaptics]] || [[EFISTUB]] bootmanager does not work for me, [[GRUB]] works. <br />
|-<br />
| Latitude E6420 || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || <br />
|-<br />
| Latitude E6430 || 2018-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || {{Y|Untested:<br/>SD card reader<br/>smart card reader}} || Touchpad shaky<br />
|-<br />
| Latitude E6530 || 2014-10-01 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <sup>*</sup>If Optimus is enabled, output is VGA only, otherwise HDMI works when NVIDIA GPU is disabled in BIOS.<br />
|-<br />
| [[Dell Latitude E7270|Latitude E7270]] || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>After UEFI update<br/>High suspend usage with power share port active<br />
|-<br />
| [[Dell Latitude 7370|Latitude 7370]] || 2019-05-11 || {{Yes}} || {{Y|Untested}} || {{-}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| Latitude 7390 ( 2-in-1 ) || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell Latitude E7440|Latitude E7440]] || 2019-05-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| [https://www.dell.com/us/business/p/latitude-e7450-ultrabook/pd?oc=cal147w7pf2 Latitude E7450] || 2016-03-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Partial<sup>*</sup>}} || Modem: No<br/>Synaptics touchpad + stick. || <sup>*</sup>Hibernate does not work<br />
|-<br />
| [[Dell Latitude E7470|Latitude E7470]] || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || Buggy [[UEFI]] : impossible to pass kernel parameters via [[efibootmgr]], nor shell bcfg, nor the built-in gui.<br />
|-<br />
| [[Dell Latitude 3500|Latitude 3500]] || 2020-10-28 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Fingerprint reader works with proprietary driver. || See linked article for more details<br />
|-<br />
| Latitude 5580 || 2017-11-06 (±) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>Needs BIOS update with [[fwupd]]) to avoid occasional black screen when resuming<br />
|-<br />
| Latitude 7420 || 2020-10 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>See: https://github.com/intel/thermal_daemon/issues/341 <br />
|-<br />
| [[Dell Latitude 7480|Latitude 7480]] || 2019-11-07 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{R|No: IR Webcam<br/>Fingerprint reader}} ||<br />
|-<br />
| [[Dell Latitude 7490|Latitude 7490]] || 2019-05-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| Latitude 5511 || 2020-10 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Fix freezes with {{ic|1=nvme_core.default_ps_max_latency_us=0}}<br />
|-<br />
| [[Dell Latitude 3420|Latitude 3420]] || 2022-02-04 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}}|| {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|}<br />
<br />
== Precision ==<br />
<br />
{{Laptops table header}}<br />
| Precision M4800 || 2014-04-01 || {{G|Yes<sup>*</sup>}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || colspan=2 | <sup>*</sup>{{ic|nomodeset}} is ''required'' to boot.<br />
|-<br />
| Precision M6700 || 2017-01-01 || {{Yes}} || {{G|HDMI audio: Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | Occasional GPU freezes with "GPU has fallen off the bus" errors since kernel 4.14.15-1 and NVIDIA 387.34<br />
|-<br />
| Precision 7710 || 2017-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|HDMI audio: Untested}} || {{Y|Untested}} || {{G|Hibernation: Untested}} || colspan=2 | Suspend works if no BIOS hard drive password. {{ic|xcalib -a -i}} is very slow<br />
|-<br />
| Precision 7710 || 2016-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|HDMI audio: Untested}} || {{Y|Untested}} || {{Yes}} || colspan=2 | kernel≥5.12.9 or nvidia≥465.24.02-5 causes no display to be seen after X launches. DFP-2 shows as disconnected.<br />
|-<br />
| Precision 5510 || 2020-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || colspan=2 | Essentially the same device as the [[Dell XPS 15 9550]]<br />
|-<br />
| Precision 3530 || 2020-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || colspan=2 | You need to disable early microcode loading. Upgrade Thunderbolt controller to latest firmware from Windows and optionally disable Thunderbolt security within the BIOS (e.g. for TB16 docking station).<br />
|-<br />
| Precision 5520 || 2018-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || || <br />
|-<br />
| Precision 5530 || 2018-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{G|Hibernation: Untested}} || colspan=2 | <sup>*</sup>Needs occasional driver reloads with {{ic|modprobe btusb}}. Need to change sleep state as per [[Dell XPS 15 9570]]. <br />
|}<br />
<br />
== Studio ==<br />
<br />
{{Laptops table header}}<br />
| Studio 1749 || 2013-01-04 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{-}} || {{G|Hibernate: Untested}} || || <sup>*</sup>Add {{ic|1=options snd-hda-intel index=0 model=dell-m6-dmic}} to {{ic|/etc/modprobe.d/alsa-base.conf}}<br />
|-<br />
| Studio XPS M1640 || 2009-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|}<br />
<br />
== Vostro ==<br />
<br />
{{Laptops table header}}<br />
| Vostro 1710 || 2018-11-26 || {{Y|Untested}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Vostro 5481 || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Vostro 3583 || 2019-12-21 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Reload {{ic|ath10k_pci}} after resuming from sleep if WiFi stops working<br />
|-<br />
| Vostro 3560 || 2020-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Vostro 5590 || 2021-01-23 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}}|| ||<br />
|-<br />
| Vostro 7500 || 2020-10-16 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{-}} || {{Yes}} || {{-}} || {{Y|Untested}} || {{R|No: Finger print scanner}} || UEFI does not pass kernel parameters on boot<br />
|}<br />
<br />
== XPS ==<br />
<br />
{{Laptops table header}}<br />
| XPS L322 || 2013-03 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | ALPS Touchpad recognized only as PS/2 mouse, two-finger scroll, finger tap-to-click, etc... does not work.<br />
|-<br />
| [[Dell XPS M1330|XPS M1330]] || 2021-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>''acpi_cpufreq'' see: [https://bbs.archlinux.org/viewtopic.php?id=44500 forums]<br />
|-<br />
| [[Dell XPS 13 (9333)|XPS 13 (9333)]] || 2016-16-16 || {{Y|Untested}} || {{Y|Untested}} || {{-}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| [[Dell XPS 13 (9310)|XPS 13 (9310)]] || 2016-16-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9343)|XPS 13 (9343)]] || 2016-16-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9350)|XPS 13 (9350)]] || 2016-11-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || Apply firmware updates<br />
|-<br />
| [[Dell XPS 13 (9360)|XPS 13 (9360)]] || 2016-11-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9370)|XPS 13 (9370)]] || 2018-05-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9380)|XPS 13 (9380)]] || 2019 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 2-in-1 (9365)|XPS 13 2-in-1 (9365)]] || 2017-10-22 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (7390)|XPS 13 (7390)]] || 2019-12-21 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested: Fingerprint sensor}} || <br />
|-<br />
| [[Dell XPS 13 2-in-1 (7390)|XPS 13 2-in-1 (7390)]] || 2019-09-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|No: Camera, Fingerprint Sensor}} || System freezes on boot. See device page for fix.<br />
|-<br />
| [[Dell XPS 15|XPS 15]] || 2016-11-17 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 17 (9700)|XPS 17 (9700)]] || 2020-09-18 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|}<br />
<br />
== G3 ==<br />
<br />
{{Laptops table header}}<br />
| G3 15 3590 || 2020-19-10 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || [[GPGPU#CUDA|CUDA]] is not working with Linux 5.9 || Works well with {{AUR|optimus-manager-git}}, follow their [https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options#configuration-1--built-in-power-management-inside-the-nvidia-driver page on power management]. <br />
|}<br />
<br />
== G5 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G5 5590-9340|G5 5590-9340]] || 2020-08-20 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|No: Fingerprint reader<sup>*</sup>}} || <sup>*</sup>drivers might be extracted from Ubuntu image of this laptop<br />
|}<br />
<br />
== G15 ==<br />
<br />
{{Laptops table header}}<br />
| G15 5515 AMD EDITION || 2022-02-12 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || Touchpad disables randomly on boot, create {{hc|/etc/modprobe.d/i2c-touchpad.conf|softdep i2c_hid pre: pinctrl_amd}}<br />
|-<br />
| G15 5511 || 2022-04-11 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <sup>*</sup>[https://askubuntu.com/questions/1220493/18-04-audio-realtek-alc3254-fails-on-new-dell-g3-15-3590?newreg=60fffc5843d74914a8d8de74e33c7114 needs kernel parameter]: {{ic|1=snd_hda_intel.dmic_detect=0}}. Also with kernel 5.18 needs {{ic|1=ibt=off}}, see Note on [https://wiki.archlinux.org/title/NVIDIA#Installation Nvidia page]</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=732637Laptop/Dell2022-06-14T10:59:06Z<p>Bzhb: /* G15 */ Pointer to issue with kernel 5.18</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:ノートパソコン/Dell]]<br />
{{Laptops navigation}}<br />
<br />
== Inspiron ==<br />
<br />
{{Laptops table header}}<br />
| Inspiron 1420 || 2012-09 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 1501 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 1520 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || <br />
|-<br />
| [[Dell Inspiron 1525|Inspiron 1525]] || 2008-06-24 (Arch Linux 2008.06 Overlord) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || {{ic|Fn+Up/Down}} (LCD brightness control) is OS independent.<br />
|-<br />
| Inspiron 1764 || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Fan control/monitoring is completely broken with {{AUR|i8kutils}}<br />
|-<br />
| [[Dell Inspiron 14 3420|Inspiron 14 3000 Series (Model 3420)]] || 2016-09-03 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Inspiron 15 3000 Series (Model 3541) || 2016-01-01 || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>Need to disable early microcode loading<br />
|-<br />
| [[Dell Inspiron 5547|Inspiron 15 5000 Series (Model 5547)]] || 2016-01-25 || {{G|AMD GPU: Untested}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|SD card reader: Untested}} || <br />
|-<br />
| [[Dell Inspiron 5566|Inspiron 15 5000 Series (Model 5566)]] || 2020-09-24 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|SD card reader: Untested}} || <sup>*</sup>HDMI untested.<br />
|-<br />
| Inspiron 15 5000 Series (Model 5559) || 2021-07-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Inspiron 15 7000 Series (Model 7537) || 2016-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Volume up / down button needs some modifying to work all other buttons work with drivers that come with the kernel. ACPI battery is not detected on bootup and requires you to plug in and out the AC adapter.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7570) || 2021-10-27 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || USB-C DisplayPort alt-mode tested with a Dell P2721Q monitor. 65W of power, USB hub and Video delivered over USB-C work well. Rare issues with the monitor sometimes losing the video connection when switching users or logging out (on resolution changes). The power and USB keep working though.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7548) || 2015-05 || {{G|Yes<sup>*</sup>}} || {{Y|Untested}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|SD card reader: Untested}} || <sup>*</sup>HDMI untested.<br/>If the kernel [https://bbs.archlinux.org/viewtopic.php?id=200763 panics] during bootup replace the 'keyboard'-hook with the specific module.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7559) || 2016-08 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <sup>*</sup>[https://github.com/Bumblebee-Project/bbswitch/issues/140 bumblebee with issue]<br />
|-<br />
| Inspiron 15 7000 Series (Model 7566) || 2016-12 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || <sup>*</sup>HDMI hot-plug not working.<br />
|-<br />
| [[Dell Inspiron 15 (7590)|Inspiron 15 7000 Series (Model 7590)]] || 2020-02 || {{Yes}} || {{Y|Partial<sup>*</sup>}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Thunderbolt: Untested}} || <sup>*</sup>May need {{ic|1=snd_hda_intel.dmic_detect=0}}. Cannot get microphone working.<br />
|-<br />
| Inspiron 13 7000 Series (7370) || 2017-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Partial<sup>*</sup>}} || [https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1641290 Fingerprint reader is unsupported].|| <sup>*</sup>Does not wake up after closing the screen lid.<br/>{{ic|Fn}} [https://bugzilla.kernel.org/show_bug.cgi?id=198393 Wireless toggle does not work]<br />
|-<br />
| Inspiron M5030 || 2015-08-16 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Y|Untested}} || || {{AUR|i8kutils}} required for fan control<br />
|-<br />
| Inspiron Duo 1090 || 2014-10-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Dell Inspiron 5567|Inspiron 15 5000 Series (model 5567) - Intel i5, no AMD || 2020-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell Inspiron 5575|Inspiron 15 5000 Series (model 5575)]] || 2019-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested:<br/>HDMI<br/>SD card reader}} || <br />
|-<br />
| [[Dell Inspiron 7586|Inspiron 15 7000 Series (model 7586)]] || 2019-07-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|Webcam: Untested}} || Fingerprint reader works with proprietary driver.<br />
|-<br />
| [[Dell Inspiron 13 (5391)|Inspiron 13 5000 Series (model 5391)]] || 2020-09 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{-}} || || <br />
|-<br />
| Inspiron 13 7000 Series (model 7348) || 2021 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || <br />
|-<br />
| Inspiron 14 7425 2-in-1 || 2022-05-05 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{No}} || {{Yes}} || {{Y|Fingerprint reader: Untested}} || <br />
|}<br />
<br />
== Latitude ==<br />
<br />
{{Laptops table header}}<br />
| Latitude D620 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested: Smart card reader}} || <br />
|-<br />
| Latitude D820 || 2007-05-17 (Arch Linux 2007.05 Duke) || {{Yes}} || {{Yes}} || {{Yes}} ||{{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude D830 || 2007-08-01 (Arch Linux 0.9 Don't Panic) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| Latitude E5400 || 2021-11-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Bluetooth LED does not glow. || <br />
|-<br />
| Latitude 5290 2-in-1 || 2022-05 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Power off: OK}} || {{Y|Untested:<br/>Webcam<br/>Fingerprint sensor}} || <br />
|-<br />
| Latitude 5490 || 2022-02 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested<sup>**</sup>}} || Random Screen flicker with ''i915 [drm] *ERROR* CPU pipe A FIFO underrun'' in kernel logs. Solved with {{ic|1=intel_idle.max_cstate=4}} || <sup>*</sup>[[Laptop#Audio_mute_LED|audio mute LED]] use {{ic|1=model=mute-led-gpio}}<br/><sup>**</sup>[https://bbs.archlinux.org/viewtopic.php?pid=1902231#p1902231 Kernel panic on suspend] solved with {{ic|1=acpi_enforce_resources=lax i915.enable_dc=0}}<br />
|-<br />
| Latitude E5500 || 2016-03-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || <br />
|-<br />
| [[Dell Latitude E5430|Latitude E5430]] || 2016-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude E5540 || 2016-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Latitude E5570 || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || BIOS may report incorrect RAM size, OK on UEFI.<br />
|-<br />
| [[Dell Latitude E5580|Latitude E5580]] || 2018-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Latitude E5401 || 2019-10 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|Untested:<br/>Webcam<br/>Thunderbolt}} || Poor thermal design (i7 i7-9850H CPU @ 2.60GHz)<br />
|-<br />
| Latitude E6230 || 2018-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{G|Hibernate: Untested}} || RFID reader requires [https://blog.g3rt.nl/enable-dell-nfc-contactless-reader.html enabling RFID radio]<br/>Touchpad (alps a10) shaky || <br />
|-<br />
| Latitude E6410 || 2018-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Y|Partial<sup>*</sup>}} || Fingerprint Sensor not functioning, no drivers seem to exist || <sup>*</sup>Suspension on closing the lid not working right<br />
|-<br />
| Latitude E6410 (BIOS A16)|| 2018-08-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || SD card reader is unreliable. For advanced touchpad functionality see [[Touchpad Synaptics]] || [[EFISTUB]] bootmanager does not work for me, [[GRUB]] works. <br />
|-<br />
| Latitude E6420 || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || <br />
|-<br />
| Latitude E6430 || 2018-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || {{Y|Untested:<br/>SD card reader<br/>smart card reader}} || Touchpad shaky<br />
|-<br />
| Latitude E6530 || 2014-10-01 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <sup>*</sup>If Optimus is enabled, output is VGA only, otherwise HDMI works when NVIDIA GPU is disabled in BIOS.<br />
|-<br />
| [[Dell Latitude E7270|Latitude E7270]] || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>After UEFI update<br/>High suspend usage with power share port active<br />
|-<br />
| [[Dell Latitude 7370|Latitude 7370]] || 2019-05-11 || {{Yes}} || {{Y|Untested}} || {{-}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| Latitude 7390 ( 2-in-1 ) || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell Latitude E7440|Latitude E7440]] || 2019-05-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| [https://www.dell.com/us/business/p/latitude-e7450-ultrabook/pd?oc=cal147w7pf2 Latitude E7450] || 2016-03-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Partial<sup>*</sup>}} || Modem: No<br/>Synaptics touchpad + stick. || <sup>*</sup>Hibernate does not work<br />
|-<br />
| [[Dell Latitude E7470|Latitude E7470]] || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || || Buggy [[UEFI]] : impossible to pass kernel parameters via [[efibootmgr]], nor shell bcfg, nor the built-in gui.<br />
|-<br />
| [[Dell Latitude 3500|Latitude 3500]] || 2020-10-28 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Fingerprint reader works with proprietary driver. || See linked article for more details<br />
|-<br />
| Latitude 5580 || 2017-11-06 (±) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>Needs BIOS update with [[fwupd]]) to avoid occasional black screen when resuming<br />
|-<br />
| Latitude 7420 || 2020-10 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>See: https://github.com/intel/thermal_daemon/issues/341 <br />
|-<br />
| [[Dell Latitude 7480|Latitude 7480]] || 2019-11-07 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{R|No: IR Webcam<br/>Fingerprint reader}} ||<br />
|-<br />
| [[Dell Latitude 7490|Latitude 7490]] || 2019-05-11 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| Latitude 5511 || 2020-10 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Fix freezes with {{ic|1=nvme_core.default_ps_max_latency_us=0}}<br />
|-<br />
| [[Dell Latitude 3420|Latitude 3420]] || 2022-02-04 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}}|| {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|}<br />
<br />
== Precision ==<br />
<br />
{{Laptops table header}}<br />
| Precision M4800 || 2014-04-01 || {{G|Yes<sup>*</sup>}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || colspan=2 | <sup>*</sup>{{ic|nomodeset}} is ''required'' to boot.<br />
|-<br />
| Precision M6700 || 2017-01-01 || {{Yes}} || {{G|HDMI audio: Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | Occasional GPU freezes with "GPU has fallen off the bus" errors since kernel 4.14.15-1 and NVIDIA 387.34<br />
|-<br />
| Precision 7710 || 2017-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|HDMI audio: Untested}} || {{Y|Untested}} || {{G|Hibernation: Untested}} || colspan=2 | Suspend works if no BIOS hard drive password. {{ic|xcalib -a -i}} is very slow<br />
|-<br />
| Precision 7710 || 2016-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|HDMI audio: Untested}} || {{Y|Untested}} || {{Yes}} || colspan=2 | kernel≥5.12.9 or nvidia≥465.24.02-5 causes no display to be seen after X launches. DFP-2 shows as disconnected.<br />
|-<br />
| Precision 5510 || 2020-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || colspan=2 | Essentially the same device as the [[Dell XPS 15 9550]]<br />
|-<br />
| Precision 3530 || 2020-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || colspan=2 | You need to disable early microcode loading. Upgrade Thunderbolt controller to latest firmware from Windows and optionally disable Thunderbolt security within the BIOS (e.g. for TB16 docking station).<br />
|-<br />
| Precision 5520 || 2018-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernation: Untested}} || || <br />
|-<br />
| Precision 5530 || 2018-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{G|Hibernation: Untested}} || colspan=2 | <sup>*</sup>Needs occasional driver reloads with {{ic|modprobe btusb}}. Need to change sleep state as per [[Dell XPS 15 9570]]. <br />
|}<br />
<br />
== Studio ==<br />
<br />
{{Laptops table header}}<br />
| Studio 1749 || 2013-01-04 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{-}} || {{G|Hibernate: Untested}} || || <sup>*</sup>Add {{ic|1=options snd-hda-intel index=0 model=dell-m6-dmic}} to {{ic|/etc/modprobe.d/alsa-base.conf}}<br />
|-<br />
| Studio XPS M1640 || 2009-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|}<br />
<br />
== Vostro ==<br />
<br />
{{Laptops table header}}<br />
| Vostro 1710 || 2018-11-26 || {{Y|Untested}} || {{Y|Untested}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| Vostro 5481 || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Vostro 3583 || 2019-12-21 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Reload {{ic|ath10k_pci}} after resuming from sleep if WiFi stops working<br />
|-<br />
| Vostro 3560 || 2020-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| Vostro 5590 || 2021-01-23 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}}|| ||<br />
|-<br />
| Vostro 7500 || 2020-10-16 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{-}} || {{Yes}} || {{-}} || {{Y|Untested}} || {{R|No: Finger print scanner}} || UEFI does not pass kernel parameters on boot<br />
|}<br />
<br />
== XPS ==<br />
<br />
{{Laptops table header}}<br />
| XPS L322 || 2013-03 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | ALPS Touchpad recognized only as PS/2 mouse, two-finger scroll, finger tap-to-click, etc... does not work.<br />
|-<br />
| [[Dell XPS M1330|XPS M1330]] || 2021-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Yes<sup>*</sup>}} || || <sup>*</sup>''acpi_cpufreq'' see: [https://bbs.archlinux.org/viewtopic.php?id=44500 forums]<br />
|-<br />
| [[Dell XPS 13 (9333)|XPS 13 (9333)]] || 2016-16-16 || {{Y|Untested}} || {{Y|Untested}} || {{-}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Untested}} || || <br />
|-<br />
| [[Dell XPS 13 (9310)|XPS 13 (9310)]] || 2016-16-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9343)|XPS 13 (9343)]] || 2016-16-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9350)|XPS 13 (9350)]] || 2016-11-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || Apply firmware updates<br />
|-<br />
| [[Dell XPS 13 (9360)|XPS 13 (9360)]] || 2016-11-16 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9370)|XPS 13 (9370)]] || 2018-05-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (9380)|XPS 13 (9380)]] || 2019 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 2-in-1 (9365)|XPS 13 2-in-1 (9365)]] || 2017-10-22 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 13 (7390)|XPS 13 (7390)]] || 2019-12-21 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested: Fingerprint sensor}} || <br />
|-<br />
| [[Dell XPS 13 2-in-1 (7390)|XPS 13 2-in-1 (7390)]] || 2019-09-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|No: Camera, Fingerprint Sensor}} || System freezes on boot. See device page for fix.<br />
|-<br />
| [[Dell XPS 15|XPS 15]] || 2016-11-17 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[Dell XPS 17 (9700)|XPS 17 (9700)]] || 2020-09-18 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|}<br />
<br />
== G3 ==<br />
<br />
{{Laptops table header}}<br />
| G3 15 3590 || 2020-19-10 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || [[GPGPU#CUDA|CUDA]] is not working with Linux 5.9 || Works well with {{AUR|optimus-manager-git}}, follow their [https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options#configuration-1--built-in-power-management-inside-the-nvidia-driver page on power management]. <br />
|}<br />
<br />
== G5 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G5 5590-9340|G5 5590-9340]] || 2020-08-20 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|No: Fingerprint reader<sup>*</sup>}} || <sup>*</sup>drivers might be extracted from Ubuntu image of this laptop<br />
|}<br />
<br />
== G15 ==<br />
<br />
{{Laptops table header}}<br />
| G15 5515 AMD EDITION || 2022-02-12 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || Touchpad disables randomly on boot, create {{hc|/etc/modprobe.d/i2c-touchpad.conf|softdep i2c_hid pre: pinctrl_amd}}<br />
|-<br />
| G15 5511 || 2022-04-11 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || <sup>*</sup>[https://askubuntu.com/questions/1220493/18-04-audio-realtek-alc3254-fails-on-new-dell-g3-15-3590?newreg=60fffc5843d74914a8d8de74e33c7114 needs kernel parameter]: {{ic|1=snd_hda_intel.dmic_detect=0}}. Also with kernel 5.18 needs {{ic|1=ibt=off}}, see Note on [https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting Nvidia page]</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=726190Laptop/Dell2022-04-11T10:28:18Z<p>Bzhb: /* G15 */ HDA Nvidia via HDMI/DisplayPort</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:ノートパソコン/Dell]]<br />
{{Laptops navigation}}<br />
<br />
== Inspiron ==<br />
<br />
{{Laptops table header}}<br />
| Inspiron 1420 || 2012-09 || 3D with {{Pkg|xf86-video-nouveau}} || Intel HD Audio with ALSA || Yes || Yes, {{pkg|broadcom-wl}} is needed || Untested || Untested || Untested || Untested || Everything that I have tested works great without any problems<br />
|-<br />
| Inspiron 1501 || 2007-05-17 (Arch Linux 2007.05 Duke) || 3D with proprietary ATI fglrx || Intel HD audio with ALSA || Yes || Yes, BCM4311 PCI-E with bcm43xx || N/A || Untested || Untested || Smart card reader works out-of-the-box || Everything else works without a hitch<br />
|-<br />
| Inspiron 1520 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || 3D with NVIDIA || SigmaTel audio with ALSA || ''b44'' module, out of the box || ''b43'', need firmware || Yes || || Untested || Hot keys work out-of-the-box || Everything else works without a hitch<br />
|-<br />
| [[Dell Inspiron 1525|Inspiron 1525]] || 2008-06-24 (Arch Linux 2008.06 Overlord) || 3D with {{Pkg|xf86-video-intel}} 2.4.3, native resolution with {{Pkg|xorg-server}} 1.5.3 (1280x800) || Intel HD Audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (''sky2'' module) || PRO/Wireless 3945ABG with ''iwlwifi-3945-ucode'' 15.28.2.8 || Untested (does not have) || Untested || Untested || SD card reader works out-of-the-box || {{ic|Fn+Up/Down}} (LCD brightness control) works independently of the OS. Everything else work out-of-the-box.<br />
|-<br />
| Inspiron 1525 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || 3D with {{Pkg|xf86-video-intel}} 2.2, native resolution with {{Pkg|xorg-server}} 1.4 (1280x800)|| Intel HD Audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (''sky2'' module) || Broadcom BCM4310: Yes, [[ndiswrapper]] ({{pkg|broadcom-wl}} works, but must blacklist {{ic|ssb}} module) || Untested (does not have) || Untested || Untested || SD card reader (Ricoh) works out-of-the-box || {{ic|Fn+Up/Down}} (LCD brightness control) works independently of the OS. DVD-RW drive and everything else work out-of-the-box.<br />
|-<br />
| Inspiron 1764 || 2011-08-19 || 3D with {{Pkg|xf86-video-intel}} || Works well with ALSA || Realtek RTL8101E 10/100 Ethernet Controller || [[Broadcom wireless|Broadcom BCM43224]] 802.11a/b/g/n works well with [[Broadcom_wireless#brcm80211|brcmsmac]] || Untested || Untested || Does not have a modem || SD card reader and LCD brightness {{ic|Fn}} keys work out-of-the-box || Fan control/monitoring is completely broken with {{AUR|i8kutils}}<br />
|-<br />
| [[Dell Inspiron 14 3420|Inspiron 14 3000 Series (Model 3420)]] || 2016-09-03 || Intel® HD Graphics 4000. Works out of the box with {{Pkg|xf86-video-intel}}. || Works well with {{Pkg|alsa-utils}}. || Yes, works out of the box || Yes, with {{pkg|broadcom-wl}} || Untested || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || No || Synaptics touchpad work flawlessly. Wifi on/off and brightness ''Fn keys'' work flawlessly. Webcam and integrated microphone work. || Volume up / down and player control buttons need configuring through key bindings to work.<br />
|-<br />
| [[Dell Inspiron 15 3541|Inspiron 15 3000 Series (Model 3541)]] || 2016-01-01 || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || Suspend works. You need to disable early microcode loading || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell Inspiron 5547|Inspiron 15 5000 Series (Model 5547)]] || 2016-01-25 || Hybrid graphics/AMD Radeon R7 M260/M265, Please read [[Hybrid graphics#Dynamic switching]]. This has not be tested yet.|| Works with Intel HD Audio and [[PulseAudio]], but need to configure [[PulseAudio/Troubleshooting#Microphone_not_detected_by_PulseAudio|microphone]] || Yes || Yes, works out of the box || Yes, works out of the box || Suspend-to-RAM untested. Hibernate untested. Disk spindown untested. || No modem || HDMI work, need configuration to swith between monitor. The touchpad work properly, but just test the basics || Webcam works, SD card reader untested<br />
|-<br />
| [[Dell Inspiron 5566|Inspiron 15 5000 Series (Model 5566)]] || 2020-09-24 || Intel® HD Graphics 620. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio with ALSA. || Not tested. || Yes, with {{Pkg|networkmanager}} and {{Pkg|dhcpcd}} or {{AUR|networkmanager-iwd}} || Yes, works with {{Pkg|bluez-utils}}. || Suspend-to-RAM untested. Hibernate untested. Disk spindown untested. But good battery performance using [[TLP]]. || No modem || The touchpad work properly, but just test the basics. HDMI untested. || Webcam works, SD card reader untested.<br />
|-<br />
| [[Dell Inspiron 15 5559|Inspiron 15 5000 Series (Model 5559)]] || 2021-07-19 || Intel® HD Graphics 520. || Intel HD Audio with ALSA || Yes, out of the box. || Intel Corp. Wireless 3160 with iwlwifi and nmcli || Untested. || Untested. || Untested. || {{-}} || {{-}}<br />
|-<br />
| Inspiron 15 7000 Series (Model 7537) || 2016-06-01 || Intel® HD Graphics 4400. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || Yes RJ45 Ethernet || Intel 7260N or 7260AC, Works out of the box with iwlwifi. || Yes, works out of the box. || Suspend-to-RAM perfect. Hibernate perfect. Disk spindown untested. || No modem || HDMI perfect. The touchpad works with minimal configuration. || Volume up / down button needs some modifying to work all other buttons work with drivers that come with the kernel. ACPI battery is not detected on bootup and requires you to plug in and out the AC adapter.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7570) || 2021-10-27 || Intel® UHD Graphics 620 (KBL GT2). Works out of the box with both modesetting and {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || Yes RJ45 Ethernet || Intel 9260N or 9260AC, Works out of the box with iwlwifi. || Yes, works out of the box. || Suspend-to-RAM perfect. Hibernate perfect. || No modem || HDMI perfect. Touchpad perfect (gestures not tested). Webcam perfect (uvcvideo). USB-C DisplayPort alt-mode works reasonably well. || USB-C DisplayPort alt-mode tested with a Dell P2721Q monitor. 65W of power, USB hub and Video delivered over USB-C work well. Rare issues with the monitor sometimes losing the video connection when switching users or logging out (on resolution changes). The power and USB keep working though.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7548) || 2015-05 || AMD Radeon® R7 M270 || Untested || N/A || Yes, works out of the box || Yes, works out of the box || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || No modem || HDMI is currently untested. The touchpad (clickpad) needs some tweaking to work properly. If the kernel [https://bbs.archlinux.org/viewtopic.php?id=200763 panics] during bootup replace the 'keyboard'-hook with the specifc module.|| Webcam works, SD card reader untested<br />
|-<br />
| Inspiron 15 7000 Series (Model 7559) || 2016-08 || Hybrid graphics NVIDIA GM107M(GeForce GTX960M)({{Pkg|nvidia}}) + Intel HD Graphics 530 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] ([https://github.com/Bumblebee-Project/bbswitch/issues/140 see this issue]) || Intel HD Audio. Works out of the box. || Yes (you may need the [[Network_configuration/Ethernet#Realtek_RTL8111/8168B|r8168]] module). || Yes, works out of the box || Yes || Suspend-to-RAM and hibernate works. || No modem || HDMI tested only for presentation with projector via HDMI-VGA cable - works out of the box. || Webcam works, SD card reader works, ACPI battery detection works<br />
|-<br />
| Inspiron 15 7000 Series (Model 7566) || 2016-12 || Hybrid graphics NVIDIA GM107M(GeForce GTX960M)({{Pkg|nvidia}}) + Intel HD Graphics 530 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] || Intel HD Audio. Works out of the box. || Yes. || Yes, works out of the box || Yes || Suspend-to-RAM works. Otherwise untested. || No modem || HDMI has issues connecting monitor after turning laptop on. If monitor is connected before, there is no problem.(might be caused by bad config) || Webcam works, SD card reader works, ACPI battery detection works<br />
|-<br />
| [[Dell Inspiron 15 (7590)|Inspiron 15 7000 Series (Model 7590)]] || 2020-02 || Hybrid graphics NVIDIA GTX1650 ({{Pkg|nvidia}}) + Intel HD Graphics 620 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] || Intel HD Audio. May require `snd_hda_intel.dmic_detect=0` kernel option to work. Cannot get microphone working. || N/A, did not check thunderbolt yet. || Yes, works out of the box || Untested || Suspend-to-RAM works. About 10 hours of youtube watching if NVIDIA card is not powered || No modem || HDMI works out of the box. Did not check thunderbolt, but according to the link it works || Webcam works, ACPI battery detection works<br />
|-<br />
| Inspiron 13 7000 Series (7370) || 2017-12 || Intel® UHD-Graphics 620. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || N/A || Intel® Dual Band Wireless-AC 7265, works out of the box || Yes || Suspend-to-RAM works. Does not wake up after closing the screen lid. || N/A || HDMI works, SD card reader works, USB-C works with support for DisplayPort and charging, keyboard backlight brightness control works || Integrated [https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1641290 fingerprint reader is unsupported]. {{ic|Fn}} keys work except [https://bugzilla.kernel.org/show_bug.cgi?id=198393 Wireless toggle]<br />
|-<br />
| Inspiron M5030 || 2015-08-16 || [[ATI]] works fine, catalyst untested || Yes, works out of the box || Yes || Yes, works out of the box || N/A || Untested || N/A || Everything works alright, and out of the box. || {{AUR|i8kutils}} required for fan control<br />
|-<br />
| Inspiron Duo 1090 (hybrid touchscreen netbook/tablet) || 2014-10-01 || Intel Atom Integrated VGA graphics controller. Software 3D, works out-of-the-box (1366x768). || Intel HD Audio with ALSA || No. || Yes, Qualcomm Atheros (ath9k) || Untested || Suspend-to-RAM works flawlessly. Hibernate untested. || No. || eGalax touchscreen and Synaptics touchpad work flawlessly. All function keys (Power manager, Wifi on/off, touchpad on/off, brightness and audio up/down work flawlessly. Webcam and integrated microphone work. || Audio out works, no standard audio-in or video out ports. USB audio-in and USB video-out untested.<br />
|-<br />
| Dell Inspiron 5567|Inspiron 15 5000 Series (model 5567) - Intel i5, no AMD || 2020-04-01 || Intel HD Graphics, 3D with {{Pkg|mesa}}, modesetting driver. {{ic|<nowiki>export MESA_LOADER_DRIVER_OVERRIDE=i965</nowiki>}} if you do not want to use a compositor. || Intel HD audio || Yes || Yes || Yes || Yes || Yes || Everything else works || Make sure to not have {{Pkg|xf86-video-intel}} as it runs worse, the correct vaapi driver is {{Pkg|intel-media-driver}}. Very Linux friendly overall.<br />
|-<br />
| [[Dell Inspiron 5575|Inspiron 15 5000 Series (model 5575)]] || 2019-12-01 || AMD Vega 8 Gfx graphics. || AMD. || Yes. Untested. || Yes, Qualcomm Atheros (ath10k) || Yes. Works out of the box || Suspend to ram and hibernation works flawlessly. || No. || Synaptics touchpad work flawlessly. HDMI untested. || Webcam works,SD card reader untested, fn keys work. Overall, linux-friendly and everything I tested works out of the box.<br />
|-<br />
| [[Dell Inspiron 7586|Inspiron 15 7000 Series (model 7586)]] || 2019-07-01 || Intel UHD Graphics 620 (Whiskey Lake) and NVIDIA GeForce MX150 (1D10) || Intel HD Works out of box || N/A || Yes, Intel 9560 (iwlwifi) || Yes || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || N/A || Touchpad works fine, fingerprint works with a proprietary driver. || Touchscreen, autorotation of screen, work out of box. Active pen works out of box in Gnome but axis are flipped in i3wm, a script would solve this. SD card reader works, webcam untested. So far a great experience running Arch with this system.<br />
|-<br />
| [[Dell Inspiron 13 (5391)|Inspiron 13 5000 Series (model 5391)]] || 2020-09 || Intel UHD Graphics || Intel || No || Intel Corporation Wireless-AC 9462 || Unknown || No || No || No || No<br />
|-<br />
| Inspiron 13 7000 Series (model 7348) || 2021 || Intel UHD Graphics, works out of the box ({{pkg|mesa}} and {{pkg|vulkan-intel}}) || Intel, works out of the box with {{pkg|alsa-utils}} || N/A || Intel Corporation Wireless-AC 7265 works out of the box, succesfully upgraded to Intel AX 200 (both with iwlwifi module) || Intel, works out of the box both with AC 7265 and AX 200 || Suspend to RAM works fine. || N/A || Touchscreen, Microphone, Webcam work all fine out of the box. || No<br />
|}<br />
<br />
== Latitude ==<br />
<br />
{{Laptops table header}}<br />
| Latitude D620 || 2007-05-17 (Arch Linux 2007.05 Duke) || 3D with NVIDIA, native resolution with {{Pkg|xorg-server}} 1.2 (1440x900)<br> 3D with Intel 945GM, native resolution 1440x900 || Intel HD Audio with ALSA || Yes || Yes, bcm4311 PCI-E with bcm43xx. Yes for some models with iwl3945. || N/A || Suspend-to-RAM perfect, hibernate works fine. || Untested || not tested smart card reader || Everything else works without a hitch<br />
|-<br />
| Latitude D820 || 2007-05-17 (Arch Linux 2007.05 Duke) || 3D with NVIDIA drivers || Intel HD Audio with ALSA || Yes || Yes, IPW3945 || Yes || Suspending with [[KDE]] works || Untested || Everything works, even fingerprint reader with ''bioapi'' and ''pam_bioapi'' || Everything else works without a hitch<br />
|-<br />
| Latitude D830 || 2007-08-01 (Arch Linux 0.9 Don't Panic) || NVIDIA Quadro NVS 140M with proprietary NVIDIA drivers || ALSA with the {{ic|snd_hda_intel}} module || Yes, with {{ic|tg3}} module || Yes, with {{ic|iwl3965}} module || Yes || Yes || Untested || ||<br />
|-<br />
| Latitude E5400 || 2021-11-11 || Intel® GM45 Express Chipset || Works without any problem || Works || Yes, using ''broadcom-wl'' || Not tested || Suspend and hibernate works || Not tested || SD Card reader works. Replaced the Broadcom wireless with Intel Wireless 7260 and now, wireless and bluetooth both work without special firmware, as long as ''linux-firmware'' is installed, but bluetooth LED does not glow even when bluetooth is installed and working, TPM (not TPM 2) is detected and usable. || Works very well in general even for an old laptop<br />
|-<br />
| Latitude 5490 || 2022-02 || Intel UHD Graphics 620 || Works {{ic|snd_hda_intel}} [[Laptop#Audio_mute_LED|audio mute LED]] use '''model=mute-led-gpio''' || Yes || Yes || Yes || Suspend to RAM works, hibernate not tested, Kernel panic occasionally when dpms turned on/off and Suspend. Solved by adding kernel parameters '''acpi_enforce_resources=lax i915.enable_dc=0''' see [https://bbs.archlinux.org/viewtopic.php?pid=1902231#p1902231 forum post] || N/A || Random Screen flicker with ''i915 [drm] *ERROR* CPU pipe A FIFO underrun'' in kernel logs. Solved by adding kernel parameter '''intel_idle.max_cstate=4''' ||<br />
|-<br />
| Latitude E5500 || 2016-03-01 || Intel® HD Graphics 4000, use {{pkg|xf86-video-intel}} || Works well with {{Pkg|alsa-utils}} || Untested || Yes, b43 || Untested || Yes || Untested || The luminosity sensor works out of the box || Everything seems to work without problems<br />
|-<br />
| [[Dell Latitude E5430|Latitude E5430]] || 2016-02-01 || Intel® HD Graphics 4000, use {{pkg|xf86-video-intel}} || Intel HD Audio. Works out of the box. || Yes, Ethernet port, {{ic|tg3}} || Yes, with {{pkg|broadcom-wl}} or ''b43'' || Yes, with {{pkg|bluez}} || Suspend-to-RAM perfect, hibernate works fine. || No modem || webcam, card reader and fingerprint reader works fine || Everything seems to work without problems<br />
|-<br />
| [[Dell Latitude E5540|Latitude E5540]] || 2016-02-01 || Haswell-ULT Integrated + GeForce GT 720M using {{Pkg|nvidia}} || Haswell-ULT HD Audio || Yes, e1000e || Yes, Atheros AR9485 || Untested || Untested || No modem || Dock works fine (DisplayPort expander, ethernet, USB || Everything seems to work without problems<br />
|-<br />
| Latitude E5570 || 2017-02-01 || Skylake Integrated + AMD Radeon HD 8750M || Skylake Integrated. Works well with {{Pkg|alsa-utils}} || Yes, Intel I219-LM (rev 31) || Yes, Intel 8260 (rev 3a) || Untested || Untested || No modem || All Dock Ports function || BIOS Firmware bug may report incorrect RAM size. Booting UEFI does not have the issue.<br />
|-<br />
| [[Dell Latitude E5580]] || 2018-07-01 || Kaby Lake + GeForce 940MX (blacklist nouveau, run [[bumblebee]]/[[NVIDIA]] drivers) || Yes, Intel CM238 || Yes, (Intel I219-LM) || Yes, Intel 8265 / 8275 || Working || Working, Some complaints || No modem || All Dock Ports function (TB16 and WD15 both tested working) || UEFI working with NVMe drive via AHCPI, Backlit keys, Function keys<br />
|-<br />
| Latitude E5401 || 2019-10 || Intel Corporation UHD Graphics 630, use {{pkg|xf86-video-intel}},3D NVIDIA GP108M [GeForce MX150] - disabled || Intel HD Audio (ALC3204). Works. || Yes, Ethernet port, Intel I219-LM || Yes, Intel AC 9560 with iwlwifi } || Yes, with {{pkg|bluez}} || Suspend-to-RAM works, hibernate untested. || No modem || webcam untested, card reader works. Thunderbolt 3 ( JHL6340) - untested || Poor thermal design (i7 i7-9850H CPU @ 2.60GHz)<br />
|-<br />
| Latitude E6230 || 2018-12 || Intel HD4000 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes || Yes, Intel Centrino A-N 6205 with iwlwifi || No Bluetooth || Suspend-to-RAM perfect, hibernate untested || No modem || SD card reader works, smart card reader works, RFID reader works after enabling RFID radio, see [https://blog.g3rt.nl/enable-dell-nfc-contactless-reader.html this blog post], Touchpad (alps a10) shaky || Everything else works without a hitch<br />
|-<br />
| Latitude E6410 || 2018-06-01 || Nvidia Quatro NVS3100m W/ NVIDIA 340xx Drivers || Intel HD Audio with ALSA - PulseAudio Untested || Yes || Yes, Works after installation || Not Functioning - Working on it || Lid-Closed suspension not functioning right || N/A || Fingerprint Sensor not functioning, no drivers seem to exist || Everything but 1. Bluetooth 2. Fingerprint Sensor 3. Suspension on closing the lid works, and I am working actively on finding fixes<br />
|-<br />
| Latitude E6410 (BIOS A16)|| 2018-08-01 || Intel HD, use {{pkg|xf86-video-intel}} || Intel HD Audio, [[ALSA]] + [[PulseAudio]] || Yes || Yes (Centrino Advanced-N 6200) || Untested || Untested || N/A || For advanced touchpad functionality install {{pkg|xf86-input-synaptics}} and create {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}} (see [[Touchpad Synaptics]])|| [[EFISTUB]] bootmanager does not work for me, [[GRUB]] works. Latest BIOS A16 does not contain latest ucode, install {{pkg|intel-ucode}}. SD card reader works but is unreliable. Webcam works.<br />
|-<br />
| Latitude E6420 || 2011-08-19 || Intel HD3000 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes, e1000e || Yes, bcma-pci-bridge || Untested || Suspend-to-RAM perfect, hibernate perfect || No modem || SD card reader works out-of-the-box, smart card reader works with ccid, opensc, pcsc-tools. || Ethernet was not working in fresh installation, had to clone repositories to HDD and update<br />
|-<br />
| Latitude E6430 || 2018-12 || NVIDIA NVS5200M works flawlessly with either {{AUR|nvidia-390xx}} or {{Pkg|xf86-video-nouveau}} (1600x900). || Intel HD Audio with ALSA || Yes, e1000e || Yes, Intel Centrino A-N 6205 with iwlwifi || Untested || Suspend-to-RAM perfect, hibernate untested || untested || SD card reader untested, smart card reader untested, Touchpad (alps a10) shaky || Everything else works without a hitch<br />
|-<br />
| Latitude E6530 || 2014-10-01 || NVIDIA NVS5200M works flawlessly with either {{AUR|nvidia-390xx}} or {{Pkg|xf86-video-nouveau}} (1600x900). || Intel HD Audio with ALSA || Yes || Intel Centrino A-N (with iwlwifi) || Flawless. File transfer and Audio streaming works || Suspend-to-RAM perfect. Hibernate perfect. Disk spindown perfect. || Untested || SD card reader, ALPS touchpad with gestures, and Webcam work flawlessly. Integrated and external microphone ports work flawlessly. Backlit keyboard, monitor backlight, audio up/down/mute controls all work flawlessly. || HDMI video works but must disable Optimus in bios. HDMI audio out works. If Optimus enabled, Intel HD4000 will be used and optirun works. Prevents use of HDMI (VGA only) but otherwise works.<br />
|-<br />
| [[Dell Latitude E7270|Latitude E7270]] || 2017-01-01 || {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA and Pulseaudio || yes || yes (IWL 8260) || untested || suspend-to-RAM after UEFI Update, hibernate works || Yes, working without runtime pm || || High suspend usage with power share port active<br />
|-<br />
| [[Dell Latitude 7370|Latitude 7370]] || 2019-05-11 || || || || || || || || ||<br />
|-<br />
| Latitude 7390 ( 2-in-1 ) || 2019-02-01 || Intel UHD Graphics 620 ( works with and without {{pkg|xf86-video-intel}} ) || Intel HD Audio with ALSA and Pulseaudio || yes || yes || yes || yes || untested || || Touchscreen display works<br />
|-<br />
| [[Dell Latitude E7440|Latitude E7440]] || 2019-05-11 || Yes || Yes || Yes || Yes || Yes || Yes, some complaints || || ||<br />
|-<br />
| [https://www.dell.com/us/business/p/latitude-e7450-ultrabook/pd?oc=cal147w7pf2 Latitude E7450] || 2016-03-01 || Intel HD5500 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes || Intel Wireless 7265 || BT 4.0 LE, untested || Suspend-to-RAM perfect, Hibernate does not work. SSD drive (no spindown) || No. || SD card reader. Synaptics touchpad + stick. Webcam works without problems. Backlit keyboard. Integrated mic works. FN-keys works once you set them up (lock, volume, monitor, search, sleep, backlight). RFID reader. Fingerprint reader. Get about 9h batterylife. Intel i7 CPU, 16GB RAM. || Everything else works without a hitch<br />
|-<br />
| [[Dell Latitude E7470|Latitude E7470]] || 2017-01-01 || Yes || Yes || Yes || Yes || Yes || Suspend-to-RAM perfect, hibernate untested || N/A || [[EFISTUB]] bootmanager does not work because it seems impossible to pass kernel parameters. Not via [[efibootmgr]], nor [[UEFI]] shell bcfg, nor the built-in gui. All ports of the docking station (PR03X) work. ||<br />
|-<br />
| [[Dell Latitude 3500|Latitude 3500]] || 2020-10-28 || Intel UHD Graphics 620 (Whiskey Lake) || Intel HD Audio with Pulseaudio || Yes || Yes || Yes, with {{Pkg|bluez}} || Suspend-to-RAM perfect, hibernate perfect || N/A || Fingerprint reader works with proprietary driver. || See linked article for more details<br />
|-<br />
| Latitude 5580 || 2017-11-06 (±) || Intel Graphics work, NVIDIA (fails on first attempt, did not try harder) || Intel HD Audio with ALSA and Pulseaudio || Yes, ethernet port I219-LM (rev 31) || Yes, Intel 8265 / 8275 (rev 78) || Yes, audio streaming and file transfer || Works (needs BIOS update ([[fwupd]]) to not have black screen when resuming sometimes) || || Webcam works; Backlight changeable; BIOS, TPM and SanDisk SSD firmware updatable with [[fwupd]]; UEFI works || NVIDIA drivers work in Ubuntu, so it should be possible to get it working; I cannot remember the exact CD version I used.<br />
|-<br />
| Latitude 7420 || 2020-10 || Yes || Yes || || Yes || Yes || Yes || || CPU throttle to 400mhz after short power-intensive workloads. With [https://github.com/intel/thermal_daemon Thermald] CPU can reach 1800mhz(15w). This bug not fixed yet. Please see this thread to more info: https://github.com/intel/thermal_daemon/issues/293 ||<br />
|-<br />
<br />
|-<br />
| [[Dell Latitude 7480|Latitude 7480]] || 2019-11-07 || Yes || || || Yes || Yes || || || webcam Fingerprint reader not working ||<br />
|-<br />
| [[Dell Latitude 7490|Latitude 7490]] || 2019-05-11 || Yes || Yes || Yes || Yes || Yes || Yes || Yes || ||<br />
|-<br />
| Latitude 5511 || 2020-10 || Yes || Yes || || Yes || || || || '''Freezing.''' Probably issues with KINGSTON SA2000M81000G NVME HDD. Under investigation. See <https://tekbyte.net/2020/fixing-nvme-ssd-problems-on-linux/>. || WD19 Docking station OK<br />
|-<br />
| [[Dell Latitude 3420|Latitude 3420]] || 2022-02-04 || Intel TigerLake-LP GT2 [Iris Xe Graphics] with {{Pkg|xf86-video-intel}}, {{Pkg|mesa}}, {{Pkg|vulkan-intel}} || Intel Tiger Lake-LP Smart Sound Technology Audio Controller. Not working by default (no card/output device detected). Works with {{Pkg|sof-firmware}}. || Yes (Realtek RTL8111/8168/8411) || Yes (Intel Wi-Fi 6 AX201 || Untested || Untested || Untested || Webcam works. Microphone requires {{Pkg|sof-firmware}} to work. Backlight works.||<br />
|}<br />
<br />
== Precision ==<br />
<br />
{{Laptops table header}}<br />
| Precision M4800 || 2014-04-01 || System not usable if booted without kernel parameter {{ic|nomodeset}}. Nvidia Quadro K2100M works with {{Pkg|nvidia}}, but [[Nouveau]] does not work because it requires KMS. || Untested || Yes || Yes || Untested || Untested || No modem || N/A || {{ic|nomodeset}} is ''required'' to boot to a usable system, both with the Arch installation media and post-installation.<br />
|-<br />
| Precision M6700 || 2017-01-01 || [Nvidia] Quadro K3000M works with both [[Nouveau]] and {{Pkg|nvidia}}. || Intel Corporation 7 Series/C216 HD Audio with Pulse Audio works; HDMI audio device untested || yes || Intel Corporation Wireless 7260 output works || not tested || Suspend and Hibernate works. || N/A || Touchpad, trackpoint, special function keys work || KDE Plasma works perfectly; Occasional GPU freezes with "GPU has fallen off the bus" errors since January 2018 ( kernel 4.14.15-1 and NVIDIA Kernel Module 387.34)<br />
|-<br />
| Precision 7710 || 2017-11-01 || [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev 83) works without problems. || Intel Corporation Sunrise Point-H HD Audio (rev 31) with Pulse Audio works || yes || Intel Corporation Wireless 8260 (rev 3a) output works; microphone not detected by pulse audio; HDMI audio device untested || not tested || Suspend works if no BIOS hard drive password. Hibernate untested. || N/A || || Solid experience using XFCE; all defaults. Lots of errors when booting up about the video card, etc., but no noticeable problems. xcalib -a -i; is very slow -- not sure why.<br />
|-<br />
| Precision 7710 || 2016-11-01 || [Nvidia] NVIDIA Quadro M5000M works with nvidia-465.24.02-5 and Kernel 5.12.9 || Intel Corporation HD Audiowith Pulse Audio works || yes || Intel Corporation Wireless 8260 and 9260 output work fine; HDMI audio device untested || not tested || Suspend and Hibernate work. Hybrid sleep untested. || N/A ||SD Card reader, webcam, mic and function keys work out of the box. || KDE plasma works fine. Upgrading kernel or nividia above mentioned versions causes no dispay to be seen after X launches. DFP-2 shows as disconnected<br />
|-<br />
| Precision 5510 || 2020-04-01 || [Nvidia] Quadro M1000 Mobile and Intel HD 530 with [NVIDIA Optimus]. Quadro M1000 Mobile works well with optimus-manager || Works out of the box; Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31) || yes || Intel Corporation Wireless 8260 (rev 3a) || Works out of the box || Suspend works || N/A || SD Card reader, webcam, mic and function keys work out of the box.|| Essentially the same device as the [[Dell XPS 15 9550]]<br />
|-<br />
| Precision 3530 || 2020-07-01 || [Nvidia] Quadro P600 Mobile and Intel UHD 630 with [NVIDIA Optimus]. Quadro P600 Mobile works well with nvidia-prime || Works out of the box; Intel Corporation Cannon Lake PCH cAVS (rev 10)|| yes || Intel Corporation Wireless-AC 9560 (rev 10) || Works out of the box || Suspend works. You need to disable early microcode loading || No modem || SD Card reader, webcam, mic and function keys work out of the box. || Upgrade the Thunderbolt controller to latest available firmware from Windows and, if needed, disable Thunderbolt security within the BIOS (especially with TB16 docking station).<br />
|-<br />
| Precision 5520 || 2018-02-01 || [Nvidia] Quadro M1200 Mobile disabled for Energy consumption reasons. Quadro M1200 Mobile works well with {{Pkg|nvidia}} and [[bumblebee]] with {{Pkg|tlp}}. {{Pkg|bbswitch}} does work. Intel HD P630 works with {{Pkg|xf86-video-intel}} || Works out of the box || yes || Qualcomm QCA61x4A works flawless || Works out of the box || Suspend work|| N/A || SD Card reader, webcam, mic and function keys work out of the box.|| Everything works out of the box for Dell Precision developer edition<br />
|-<br />
| Precision 5530 || 2018-06-01 || [Nvidia] Quadro P2000 Mobile disabled for Energy consumption reasons. Quadro P1000 works well with {{Pkg|nvidia}} and [[bumblebee]] with {{Pkg|tlp}}. {{Pkg|bbswitch}} does not work. Intel HD630 works with {{Pkg|xf86-video-intel}}. || Works out of the box || yes || Intel Corporation Wireless-AC 9260 works flawless with Linux 4.18 || Works with occasional driver reloads {{ic|modprobe btusb}} || Suspend works. Need to change sleep state as per [[Dell XPS 15 9570]]. || N/A || SD Card reader, webcam, mic and function keys work out of the box.|| Besides occasional bluetooth issues a great experience so far.<br />
|}<br />
<br />
== Studio ==<br />
<br />
{{Laptops table header}}<br />
| Studio 1749 || 2013-01-04 || Radeon HD 5650M, {{ic|xf86-video-ati}} is almost flawless (just slower 3D), {{ic|catalyst}} is faster but has various issues. || HDA Intel MID, works with ALSA after adding {{ic|1=options snd-hda-intel index=0 model=dell-m6-dmic}} to {{ic|/etc/modprobe.d/alsa-base.conf}}. HDMI audio has some issues. || Yes || BCM43224, brcmsmac and {{pkg|broadcom-wl}} both work || N/A || Suspend works; hibernate untested. || N/A || SD card reader works, media keys work, web cam, and microphone both work. || Flawless except for poor 3D performance and battery life.<br />
|-<br />
| Studio XPS M1640 || 2009-08 || ATI HD4670 Mobile works with {{Pkg|xf86-video-ati}} (see the forums for 3D support); Catalyst drivers untested || Works with Intel HD Audio and ALSA. || Yes || Works with iwlagn || Bluetooth works || Works but when using {{Pkg|xf86-video-ati}}, there is video corruption upon boot || N/A || Web cam works, media keys work with the {{ic|dell_laptop}} kernel module, IR works, card reader works || Everything basically worked out-of-the-box<br />
|}<br />
<br />
== Vostro ==<br />
<br />
{{Laptops table header}}<br />
| Vostro 1710 || 2018-11-26 || {{-}} || {{-}} || Yes, RTL8111/8168B || Works (Broadcom BCM4328) || {{-}} || {{-}} ||{{-}} || {{-}} || AlpsPS/2 ALPS GlidePoint<br />
|-<br />
| Vostro 5481 || 2019-11-01 || Works out of the box, {{Pkg|xf86-video-intel}} recommended just in case. || Yes || Yes || Yes. {{Pkg|broadcom-wl}} may be needed. || Yes || Yes ||{{-}} || {{-}} || Disable secure boot, fast boot, and TPM in the BIOS. Also, enable AHCI SATA Operation in the BIOS instead of RAID or the disk may not be detected. Do note that you will get a BSOD on Windows after this, which can be fixed by following this [https://support.thinkcritical.com/kb/articles/switch-windows-10-from-raid-ide-to-ahci quick guide].<br />
|-<br />
| Vostro 3583 || 2019-12-21 || No need to install {{Pkg|xf86-video-intel}} and {{Pkg|xf86-video-amdgpu}} as modesetting drivers works perfectly. || Yes || Yes || Works || Yes || Yes ||{{-}} || Webcame works out of box || after resuming from sleep, wifi stops working for some unknown cause. work around is to reload kernel module ath10k_pci. AMD 520 Radeon performs less than Intel UHD 620 with both amdgpu and radeon module. same results under Windows<br />
|-<br />
| Vostro 3560 || 2020-02-01 || Works, use Radeon, installed {{Pkg|mesa}} and {{Pkg|mesa-vdpau}} for hardware acceleration. || Works || Works || Works (Atheros AR9485 - ath9k) || Works || Works || {{-}} || Fingerprint reader works. || Everything works.<br />
|-<br />
| Vostro 5590 || 2021-01-23 || Works out of the box. Followed [[Bumblebee#Installation]]. || Works with {{Pkg|sof-firmware}}. || Yes || Yes || Yes || {{-}} || {{-}} || {{ - }} ||<br />
<ul><br />
<li>Installing the package {{Pkg|sof-firmware}} solves all the audio problems.<li><br />
<li>Install package aur/pulseaudio-modules-bt, if device bluetooth-sound not working</li><br />
<li> execute: pactl load-module module-bluetooth-discover</li><br />
</ul><br />
|-<br />
| Vostro 7500 || 2020-10-16 || Works out of box using nouveau || Works with {{Pkg|sof-firmware}} || N/A || Works || {{-}} || {{-}} || {{-}} || Finger print scanner not yet supported. Webcam works out of box. ||<br />
<ul><br />
<li>No audio out of box, but {{Pkg|sof-firmware}} fixes this issue. </li><br />
<li>SSD was initially in RAID configuration in the Bios + not detected by the installer. Fixed by changing to AHCI. </li><br />
<li>Dell UEFI implementation does not pass kernel parameters on boot, so EFIStub does not work. Side-stepped the issue by installing Grub.</li><br />
</ul><br />
|}<br />
<br />
== XPS ==<br />
<br />
{{Laptops table header}}<br />
| XPS L322 || 2013-03 || Intel HD 4000, with {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || No Ethernet port || Yes || Untested || Yes || No modem || No SD card slot || ALPS Touchpad recognized only as PS/2 mouse, two-finger scroll, finger tap-to-click, etc... does not work. Some new mouse drivers suggest a fix but have not worked.<br />
|-<br />
| [[Dell XPS M1330|XPS M1330]] || 2021-01 || works with Nouveau or mode-setting || Works with Intel HD Audio and ALSA or Pulseaudio, but need to configure microphone || Yes || Works with iwl4965, b43 driver || Works with bluez || (''acpi_cpufreq'' problem: [https://bbs.archlinux.org/viewtopic.php?id=44500 see forums]) || No modem || 2.0 MP web cam works with ''uvcvideo'', IR remote works, SD card works || Everything basically worked out-of-the-box except the microphone.<br />
|-<br />
| [[Dell XPS 13 (9333)|XPS 13 (9333)]] || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9310)|XPS 13 (9310)]] || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9343)|XPS 13 (9343)]] || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9350)|XPS 13 (9350)]] || 2016-11-16 || Yes || Yes || Yes || Yes, after firmware update || Yes (Suspend and Hibernate) || {{-}} || {{-}} || All Dock Ports function (WD15 tested working, except Ethernet Realtek 8152/8153 not resuming from USB supend mode. Install WD15 firmware 1.0.4 to fix.) || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 (9360)|XPS 13 (9360)]] || 2016-11-16 || Yes || Yes || Yes || Yes, after firmware update || Yes (Suspend and Hibernate) || {{-}} || {{-}} || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 (9370)|XPS 13 (9370)]] || 2018-05-29 || Yes || Yes || Yes || Yes || Yes || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9380)|XPS 13 (9380)]] || 2019 || Yes || Yes || Yes || Yes || Yes || {{-}} || {{-}} || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 2-in-1 (9365)|XPS 13 2-in-1 (9365)]] || 2017-10-22 || Yes || Yes || No Ethernet Port || Yes || Yes (Suspend and Hibernate) || {{-}} || {{-}} || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 (7390)|XPS 13 (7390)]] || 2019-12-21 || Yes || Yes || No Ethernet Port || Yes || Yes || {{-}} || {{-}} || Fingerprint not tested as the developer version does not have one. || This is the regular XPS 13, not the 2-in-1. Only tested with Wayland (Sway WM) ecosystem.<br />
|-<br />
| [[Dell XPS 13 2-in-1 (7390)|XPS 13 2-in-1 (7390)]] || 2019-09-01 || Yes || Yes || No Ethernet Port || Yes || Yes (Requires Drivers) || {{-}} || No Modem || Camera, Fingerprint Sensor not working || System freezes on boot. See device page for fix.<br />
|-<br />
| [[Dell XPS 15]] || 2016-11-17 || Intel HD 530 works with {{Pkg|xf86-video-intel}} i915 and GTX 960M works with {{Pkg|nvidia}} || Yes || No Ethernet Port || Yes || Yes || Yes || No Modem || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 17 (9700)]] || 2020-09-18 || Intel UHD (CML GT2) works with {{Pkg|mesa}} or {{Pkg|xf86-video-intel}} and GTX 1650 Ti/RTX 2060 Max-Q works with {{Pkg|nvidia}} || Yes || No Ethernet Port || Yes || Yes || Yes || No Modem || Camera working, Fingerprint sensor workable. || Builtin audio can work, but is currently difficult to get working.<br />
|}<br />
<br />
== G3 ==<br />
<br />
{{Laptops table header}}<br />
| G3 15 3590 || 2020-19-10 || Intel UHD 630 and NVIDIA GTX 1050/1660 Mobile {{Pkg|nvidia}} and {{Pkg|nvidia-prime}} using [[PRIME#PRIME render offload|PRIME Render Offloading]]. Until now, [[GPGPU#CUDA|NVIDIA CUDA]] is not working with linux 5.9 || You must install {{Pkg|sof-firmware}} and any kernel after 5.6.3+ to get internal microphone/sound working. || Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller || Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter || Working || Working || {{-}} || {{-}} || Works well with {{AUR|optimus-manager-git}}, follow [https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options#configuration-1--built-in-power-management-inside-the-nvidia-driver their page on power managment]<br />
|}<br />
<br />
== G5 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G5 5590-9340|G5 5590-9340]] || 2020-08-20 || Yes (both integrated and dedicated) || Yes || Yes || Yes || Yes || Yes || {{-}} || Goodix fingerprint reader not working due to lack of drivers but probably can be extracted from Ubuntu image this laptop goes with. || Everything works OOB except FP.<br />
|}<br />
<br />
== G15 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G15 5515 AMD EDITION|G15 5515 AMD EDITION]] || 2022-02-12 || Yes (AMD and NVIDIA 3060). || Yes. Alsa + PulseAudio. || Not Tested || Yes || Not Tested || Yes || {{-}} || Kernel 5.16.5, NVIDIA 510.47.03. || HDMI works through "optimus-manager" in "hybrid" mode. [[PulseAudio/Examples#Manually configuring PulseAudio to detect the Nvidia HDMI|HDMI sound for PulseAudio]] can be enabled by adding the {{ic|1=load-module module-alsa-sink device=hw:1,3}} config line. Touchpad disables randomly on boot, can be fixed by creating the following file:<br />
{{hc|/etc/modprobe.d/i2c-touchpad.conf|softdep i2c_hid pre: pinctrl_amd}}<br />
|-<br />
| [[Dell G15 5511|G15 5511]] || 2022-04-11 || Yes (Nvidia GeForce RTX 3060 Mobile / Max-Q) with {{Pkg|nvidia}} and {{Pkg|nvidia-dkms}} || Yes for internal audio [https://askubuntu.com/questions/1220493/18-04-audio-realtek-alc3254-fails-on-new-dell-g3-15-3590?newreg=60fffc5843d74914a8d8de74e33c7114 but needs kernel parameter] : {{ic|1=snd_hda_intel.dmic_detect=0}} . Alsa + PulseAudio. Yes also for HDA Nvidia via HDMI/DisplayPort. || Yes || Yes || Not Tested || Not Tested || {{-}} || Kernel 5.17.1, NVIDIA 510.60.02-11 ||</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=726189Laptop/Dell2022-04-11T09:21:39Z<p>Bzhb: /* G15 */ G15 5511</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:ノートパソコン/Dell]]<br />
{{Laptops navigation}}<br />
<br />
== Inspiron ==<br />
<br />
{{Laptops table header}}<br />
| Inspiron 1420 || 2012-09 || 3D with {{Pkg|xf86-video-nouveau}} || Intel HD Audio with ALSA || Yes || Yes, {{pkg|broadcom-wl}} is needed || Untested || Untested || Untested || Untested || Everything that I have tested works great without any problems<br />
|-<br />
| Inspiron 1501 || 2007-05-17 (Arch Linux 2007.05 Duke) || 3D with proprietary ATI fglrx || Intel HD audio with ALSA || Yes || Yes, BCM4311 PCI-E with bcm43xx || N/A || Untested || Untested || Smart card reader works out-of-the-box || Everything else works without a hitch<br />
|-<br />
| Inspiron 1520 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || 3D with NVIDIA || SigmaTel audio with ALSA || ''b44'' module, out of the box || ''b43'', need firmware || Yes || || Untested || Hot keys work out-of-the-box || Everything else works without a hitch<br />
|-<br />
| [[Dell Inspiron 1525|Inspiron 1525]] || 2008-06-24 (Arch Linux 2008.06 Overlord) || 3D with {{Pkg|xf86-video-intel}} 2.4.3, native resolution with {{Pkg|xorg-server}} 1.5.3 (1280x800) || Intel HD Audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (''sky2'' module) || PRO/Wireless 3945ABG with ''iwlwifi-3945-ucode'' 15.28.2.8 || Untested (does not have) || Untested || Untested || SD card reader works out-of-the-box || {{ic|Fn+Up/Down}} (LCD brightness control) works independently of the OS. Everything else work out-of-the-box.<br />
|-<br />
| Inspiron 1525 || 2008-03-31 (Arch Linux 2008.03 Core Dump) || 3D with {{Pkg|xf86-video-intel}} 2.2, native resolution with {{Pkg|xorg-server}} 1.4 (1280x800)|| Intel HD Audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (''sky2'' module) || Broadcom BCM4310: Yes, [[ndiswrapper]] ({{pkg|broadcom-wl}} works, but must blacklist {{ic|ssb}} module) || Untested (does not have) || Untested || Untested || SD card reader (Ricoh) works out-of-the-box || {{ic|Fn+Up/Down}} (LCD brightness control) works independently of the OS. DVD-RW drive and everything else work out-of-the-box.<br />
|-<br />
| Inspiron 1764 || 2011-08-19 || 3D with {{Pkg|xf86-video-intel}} || Works well with ALSA || Realtek RTL8101E 10/100 Ethernet Controller || [[Broadcom wireless|Broadcom BCM43224]] 802.11a/b/g/n works well with [[Broadcom_wireless#brcm80211|brcmsmac]] || Untested || Untested || Does not have a modem || SD card reader and LCD brightness {{ic|Fn}} keys work out-of-the-box || Fan control/monitoring is completely broken with {{AUR|i8kutils}}<br />
|-<br />
| [[Dell Inspiron 14 3420|Inspiron 14 3000 Series (Model 3420)]] || 2016-09-03 || Intel® HD Graphics 4000. Works out of the box with {{Pkg|xf86-video-intel}}. || Works well with {{Pkg|alsa-utils}}. || Yes, works out of the box || Yes, with {{pkg|broadcom-wl}} || Untested || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || No || Synaptics touchpad work flawlessly. Wifi on/off and brightness ''Fn keys'' work flawlessly. Webcam and integrated microphone work. || Volume up / down and player control buttons need configuring through key bindings to work.<br />
|-<br />
| [[Dell Inspiron 15 3541|Inspiron 15 3000 Series (Model 3541)]] || 2016-01-01 || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || Suspend works. You need to disable early microcode loading || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell Inspiron 5547|Inspiron 15 5000 Series (Model 5547)]] || 2016-01-25 || Hybrid graphics/AMD Radeon R7 M260/M265, Please read [[Hybrid graphics#Dynamic switching]]. This has not be tested yet.|| Works with Intel HD Audio and [[PulseAudio]], but need to configure [[PulseAudio/Troubleshooting#Microphone_not_detected_by_PulseAudio|microphone]] || Yes || Yes, works out of the box || Yes, works out of the box || Suspend-to-RAM untested. Hibernate untested. Disk spindown untested. || No modem || HDMI work, need configuration to swith between monitor. The touchpad work properly, but just test the basics || Webcam works, SD card reader untested<br />
|-<br />
| [[Dell Inspiron 5566|Inspiron 15 5000 Series (Model 5566)]] || 2020-09-24 || Intel® HD Graphics 620. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio with ALSA. || Not tested. || Yes, with {{Pkg|networkmanager}} and {{Pkg|dhcpcd}} or {{AUR|networkmanager-iwd}} || Yes, works with {{Pkg|bluez-utils}}. || Suspend-to-RAM untested. Hibernate untested. Disk spindown untested. But good battery performance using [[TLP]]. || No modem || The touchpad work properly, but just test the basics. HDMI untested. || Webcam works, SD card reader untested.<br />
|-<br />
| [[Dell Inspiron 15 5559|Inspiron 15 5000 Series (Model 5559)]] || 2021-07-19 || Intel® HD Graphics 520. || Intel HD Audio with ALSA || Yes, out of the box. || Intel Corp. Wireless 3160 with iwlwifi and nmcli || Untested. || Untested. || Untested. || {{-}} || {{-}}<br />
|-<br />
| Inspiron 15 7000 Series (Model 7537) || 2016-06-01 || Intel® HD Graphics 4400. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || Yes RJ45 Ethernet || Intel 7260N or 7260AC, Works out of the box with iwlwifi. || Yes, works out of the box. || Suspend-to-RAM perfect. Hibernate perfect. Disk spindown untested. || No modem || HDMI perfect. The touchpad works with minimal configuration. || Volume up / down button needs some modifying to work all other buttons work with drivers that come with the kernel. ACPI battery is not detected on bootup and requires you to plug in and out the AC adapter.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7570) || 2021-10-27 || Intel® UHD Graphics 620 (KBL GT2). Works out of the box with both modesetting and {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || Yes RJ45 Ethernet || Intel 9260N or 9260AC, Works out of the box with iwlwifi. || Yes, works out of the box. || Suspend-to-RAM perfect. Hibernate perfect. || No modem || HDMI perfect. Touchpad perfect (gestures not tested). Webcam perfect (uvcvideo). USB-C DisplayPort alt-mode works reasonably well. || USB-C DisplayPort alt-mode tested with a Dell P2721Q monitor. 65W of power, USB hub and Video delivered over USB-C work well. Rare issues with the monitor sometimes losing the video connection when switching users or logging out (on resolution changes). The power and USB keep working though.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7548) || 2015-05 || AMD Radeon® R7 M270 || Untested || N/A || Yes, works out of the box || Yes, works out of the box || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || No modem || HDMI is currently untested. The touchpad (clickpad) needs some tweaking to work properly. If the kernel [https://bbs.archlinux.org/viewtopic.php?id=200763 panics] during bootup replace the 'keyboard'-hook with the specifc module.|| Webcam works, SD card reader untested<br />
|-<br />
| Inspiron 15 7000 Series (Model 7559) || 2016-08 || Hybrid graphics NVIDIA GM107M(GeForce GTX960M)({{Pkg|nvidia}}) + Intel HD Graphics 530 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] ([https://github.com/Bumblebee-Project/bbswitch/issues/140 see this issue]) || Intel HD Audio. Works out of the box. || Yes (you may need the [[Network_configuration/Ethernet#Realtek_RTL8111/8168B|r8168]] module). || Yes, works out of the box || Yes || Suspend-to-RAM and hibernate works. || No modem || HDMI tested only for presentation with projector via HDMI-VGA cable - works out of the box. || Webcam works, SD card reader works, ACPI battery detection works<br />
|-<br />
| Inspiron 15 7000 Series (Model 7566) || 2016-12 || Hybrid graphics NVIDIA GM107M(GeForce GTX960M)({{Pkg|nvidia}}) + Intel HD Graphics 530 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] || Intel HD Audio. Works out of the box. || Yes. || Yes, works out of the box || Yes || Suspend-to-RAM works. Otherwise untested. || No modem || HDMI has issues connecting monitor after turning laptop on. If monitor is connected before, there is no problem.(might be caused by bad config) || Webcam works, SD card reader works, ACPI battery detection works<br />
|-<br />
| [[Dell Inspiron 15 (7590)|Inspiron 15 7000 Series (Model 7590)]] || 2020-02 || Hybrid graphics NVIDIA GTX1650 ({{Pkg|nvidia}}) + Intel HD Graphics 620 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] || Intel HD Audio. May require `snd_hda_intel.dmic_detect=0` kernel option to work. Cannot get microphone working. || N/A, did not check thunderbolt yet. || Yes, works out of the box || Untested || Suspend-to-RAM works. About 10 hours of youtube watching if NVIDIA card is not powered || No modem || HDMI works out of the box. Did not check thunderbolt, but according to the link it works || Webcam works, ACPI battery detection works<br />
|-<br />
| Inspiron 13 7000 Series (7370) || 2017-12 || Intel® UHD-Graphics 620. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || N/A || Intel® Dual Band Wireless-AC 7265, works out of the box || Yes || Suspend-to-RAM works. Does not wake up after closing the screen lid. || N/A || HDMI works, SD card reader works, USB-C works with support for DisplayPort and charging, keyboard backlight brightness control works || Integrated [https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1641290 fingerprint reader is unsupported]. {{ic|Fn}} keys work except [https://bugzilla.kernel.org/show_bug.cgi?id=198393 Wireless toggle]<br />
|-<br />
| Inspiron M5030 || 2015-08-16 || [[ATI]] works fine, catalyst untested || Yes, works out of the box || Yes || Yes, works out of the box || N/A || Untested || N/A || Everything works alright, and out of the box. || {{AUR|i8kutils}} required for fan control<br />
|-<br />
| Inspiron Duo 1090 (hybrid touchscreen netbook/tablet) || 2014-10-01 || Intel Atom Integrated VGA graphics controller. Software 3D, works out-of-the-box (1366x768). || Intel HD Audio with ALSA || No. || Yes, Qualcomm Atheros (ath9k) || Untested || Suspend-to-RAM works flawlessly. Hibernate untested. || No. || eGalax touchscreen and Synaptics touchpad work flawlessly. All function keys (Power manager, Wifi on/off, touchpad on/off, brightness and audio up/down work flawlessly. Webcam and integrated microphone work. || Audio out works, no standard audio-in or video out ports. USB audio-in and USB video-out untested.<br />
|-<br />
| Dell Inspiron 5567|Inspiron 15 5000 Series (model 5567) - Intel i5, no AMD || 2020-04-01 || Intel HD Graphics, 3D with {{Pkg|mesa}}, modesetting driver. {{ic|<nowiki>export MESA_LOADER_DRIVER_OVERRIDE=i965</nowiki>}} if you do not want to use a compositor. || Intel HD audio || Yes || Yes || Yes || Yes || Yes || Everything else works || Make sure to not have {{Pkg|xf86-video-intel}} as it runs worse, the correct vaapi driver is {{Pkg|intel-media-driver}}. Very Linux friendly overall.<br />
|-<br />
| [[Dell Inspiron 5575|Inspiron 15 5000 Series (model 5575)]] || 2019-12-01 || AMD Vega 8 Gfx graphics. || AMD. || Yes. Untested. || Yes, Qualcomm Atheros (ath10k) || Yes. Works out of the box || Suspend to ram and hibernation works flawlessly. || No. || Synaptics touchpad work flawlessly. HDMI untested. || Webcam works,SD card reader untested, fn keys work. Overall, linux-friendly and everything I tested works out of the box.<br />
|-<br />
| [[Dell Inspiron 7586|Inspiron 15 7000 Series (model 7586)]] || 2019-07-01 || Intel UHD Graphics 620 (Whiskey Lake) and NVIDIA GeForce MX150 (1D10) || Intel HD Works out of box || N/A || Yes, Intel 9560 (iwlwifi) || Yes || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || N/A || Touchpad works fine, fingerprint works with a proprietary driver. || Touchscreen, autorotation of screen, work out of box. Active pen works out of box in Gnome but axis are flipped in i3wm, a script would solve this. SD card reader works, webcam untested. So far a great experience running Arch with this system.<br />
|-<br />
| [[Dell Inspiron 13 (5391)|Inspiron 13 5000 Series (model 5391)]] || 2020-09 || Intel UHD Graphics || Intel || No || Intel Corporation Wireless-AC 9462 || Unknown || No || No || No || No<br />
|-<br />
| Inspiron 13 7000 Series (model 7348) || 2021 || Intel UHD Graphics, works out of the box ({{pkg|mesa}} and {{pkg|vulkan-intel}}) || Intel, works out of the box with {{pkg|alsa-utils}} || N/A || Intel Corporation Wireless-AC 7265 works out of the box, succesfully upgraded to Intel AX 200 (both with iwlwifi module) || Intel, works out of the box both with AC 7265 and AX 200 || Suspend to RAM works fine. || N/A || Touchscreen, Microphone, Webcam work all fine out of the box. || No<br />
|}<br />
<br />
== Latitude ==<br />
<br />
{{Laptops table header}}<br />
| Latitude D620 || 2007-05-17 (Arch Linux 2007.05 Duke) || 3D with NVIDIA, native resolution with {{Pkg|xorg-server}} 1.2 (1440x900)<br> 3D with Intel 945GM, native resolution 1440x900 || Intel HD Audio with ALSA || Yes || Yes, bcm4311 PCI-E with bcm43xx. Yes for some models with iwl3945. || N/A || Suspend-to-RAM perfect, hibernate works fine. || Untested || not tested smart card reader || Everything else works without a hitch<br />
|-<br />
| Latitude D820 || 2007-05-17 (Arch Linux 2007.05 Duke) || 3D with NVIDIA drivers || Intel HD Audio with ALSA || Yes || Yes, IPW3945 || Yes || Suspending with [[KDE]] works || Untested || Everything works, even fingerprint reader with ''bioapi'' and ''pam_bioapi'' || Everything else works without a hitch<br />
|-<br />
| Latitude D830 || 2007-08-01 (Arch Linux 0.9 Don't Panic) || NVIDIA Quadro NVS 140M with proprietary NVIDIA drivers || ALSA with the {{ic|snd_hda_intel}} module || Yes, with {{ic|tg3}} module || Yes, with {{ic|iwl3965}} module || Yes || Yes || Untested || ||<br />
|-<br />
| Latitude E5400 || 2021-11-11 || Intel® GM45 Express Chipset || Works without any problem || Works || Yes, using ''broadcom-wl'' || Not tested || Suspend and hibernate works || Not tested || SD Card reader works. Replaced the Broadcom wireless with Intel Wireless 7260 and now, wireless and bluetooth both work without special firmware, as long as ''linux-firmware'' is installed, but bluetooth LED does not glow even when bluetooth is installed and working, TPM (not TPM 2) is detected and usable. || Works very well in general even for an old laptop<br />
|-<br />
| Latitude 5490 || 2022-02 || Intel UHD Graphics 620 || Works {{ic|snd_hda_intel}} [[Laptop#Audio_mute_LED|audio mute LED]] use '''model=mute-led-gpio''' || Yes || Yes || Yes || Suspend to RAM works, hibernate not tested, Kernel panic occasionally when dpms turned on/off and Suspend. Solved by adding kernel parameters '''acpi_enforce_resources=lax i915.enable_dc=0''' see [https://bbs.archlinux.org/viewtopic.php?pid=1902231#p1902231 forum post] || N/A || Random Screen flicker with ''i915 [drm] *ERROR* CPU pipe A FIFO underrun'' in kernel logs. Solved by adding kernel parameter '''intel_idle.max_cstate=4''' ||<br />
|-<br />
| Latitude E5500 || 2016-03-01 || Intel® HD Graphics 4000, use {{pkg|xf86-video-intel}} || Works well with {{Pkg|alsa-utils}} || Untested || Yes, b43 || Untested || Yes || Untested || The luminosity sensor works out of the box || Everything seems to work without problems<br />
|-<br />
| [[Dell Latitude E5430|Latitude E5430]] || 2016-02-01 || Intel® HD Graphics 4000, use {{pkg|xf86-video-intel}} || Intel HD Audio. Works out of the box. || Yes, Ethernet port, {{ic|tg3}} || Yes, with {{pkg|broadcom-wl}} or ''b43'' || Yes, with {{pkg|bluez}} || Suspend-to-RAM perfect, hibernate works fine. || No modem || webcam, card reader and fingerprint reader works fine || Everything seems to work without problems<br />
|-<br />
| [[Dell Latitude E5540|Latitude E5540]] || 2016-02-01 || Haswell-ULT Integrated + GeForce GT 720M using {{Pkg|nvidia}} || Haswell-ULT HD Audio || Yes, e1000e || Yes, Atheros AR9485 || Untested || Untested || No modem || Dock works fine (DisplayPort expander, ethernet, USB || Everything seems to work without problems<br />
|-<br />
| Latitude E5570 || 2017-02-01 || Skylake Integrated + AMD Radeon HD 8750M || Skylake Integrated. Works well with {{Pkg|alsa-utils}} || Yes, Intel I219-LM (rev 31) || Yes, Intel 8260 (rev 3a) || Untested || Untested || No modem || All Dock Ports function || BIOS Firmware bug may report incorrect RAM size. Booting UEFI does not have the issue.<br />
|-<br />
| [[Dell Latitude E5580]] || 2018-07-01 || Kaby Lake + GeForce 940MX (blacklist nouveau, run [[bumblebee]]/[[NVIDIA]] drivers) || Yes, Intel CM238 || Yes, (Intel I219-LM) || Yes, Intel 8265 / 8275 || Working || Working, Some complaints || No modem || All Dock Ports function (TB16 and WD15 both tested working) || UEFI working with NVMe drive via AHCPI, Backlit keys, Function keys<br />
|-<br />
| Latitude E5401 || 2019-10 || Intel Corporation UHD Graphics 630, use {{pkg|xf86-video-intel}},3D NVIDIA GP108M [GeForce MX150] - disabled || Intel HD Audio (ALC3204). Works. || Yes, Ethernet port, Intel I219-LM || Yes, Intel AC 9560 with iwlwifi } || Yes, with {{pkg|bluez}} || Suspend-to-RAM works, hibernate untested. || No modem || webcam untested, card reader works. Thunderbolt 3 ( JHL6340) - untested || Poor thermal design (i7 i7-9850H CPU @ 2.60GHz)<br />
|-<br />
| Latitude E6230 || 2018-12 || Intel HD4000 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes || Yes, Intel Centrino A-N 6205 with iwlwifi || No Bluetooth || Suspend-to-RAM perfect, hibernate untested || No modem || SD card reader works, smart card reader works, RFID reader works after enabling RFID radio, see [https://blog.g3rt.nl/enable-dell-nfc-contactless-reader.html this blog post], Touchpad (alps a10) shaky || Everything else works without a hitch<br />
|-<br />
| Latitude E6410 || 2018-06-01 || Nvidia Quatro NVS3100m W/ NVIDIA 340xx Drivers || Intel HD Audio with ALSA - PulseAudio Untested || Yes || Yes, Works after installation || Not Functioning - Working on it || Lid-Closed suspension not functioning right || N/A || Fingerprint Sensor not functioning, no drivers seem to exist || Everything but 1. Bluetooth 2. Fingerprint Sensor 3. Suspension on closing the lid works, and I am working actively on finding fixes<br />
|-<br />
| Latitude E6410 (BIOS A16)|| 2018-08-01 || Intel HD, use {{pkg|xf86-video-intel}} || Intel HD Audio, [[ALSA]] + [[PulseAudio]] || Yes || Yes (Centrino Advanced-N 6200) || Untested || Untested || N/A || For advanced touchpad functionality install {{pkg|xf86-input-synaptics}} and create {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}} (see [[Touchpad Synaptics]])|| [[EFISTUB]] bootmanager does not work for me, [[GRUB]] works. Latest BIOS A16 does not contain latest ucode, install {{pkg|intel-ucode}}. SD card reader works but is unreliable. Webcam works.<br />
|-<br />
| Latitude E6420 || 2011-08-19 || Intel HD3000 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes, e1000e || Yes, bcma-pci-bridge || Untested || Suspend-to-RAM perfect, hibernate perfect || No modem || SD card reader works out-of-the-box, smart card reader works with ccid, opensc, pcsc-tools. || Ethernet was not working in fresh installation, had to clone repositories to HDD and update<br />
|-<br />
| Latitude E6430 || 2018-12 || NVIDIA NVS5200M works flawlessly with either {{AUR|nvidia-390xx}} or {{Pkg|xf86-video-nouveau}} (1600x900). || Intel HD Audio with ALSA || Yes, e1000e || Yes, Intel Centrino A-N 6205 with iwlwifi || Untested || Suspend-to-RAM perfect, hibernate untested || untested || SD card reader untested, smart card reader untested, Touchpad (alps a10) shaky || Everything else works without a hitch<br />
|-<br />
| Latitude E6530 || 2014-10-01 || NVIDIA NVS5200M works flawlessly with either {{AUR|nvidia-390xx}} or {{Pkg|xf86-video-nouveau}} (1600x900). || Intel HD Audio with ALSA || Yes || Intel Centrino A-N (with iwlwifi) || Flawless. File transfer and Audio streaming works || Suspend-to-RAM perfect. Hibernate perfect. Disk spindown perfect. || Untested || SD card reader, ALPS touchpad with gestures, and Webcam work flawlessly. Integrated and external microphone ports work flawlessly. Backlit keyboard, monitor backlight, audio up/down/mute controls all work flawlessly. || HDMI video works but must disable Optimus in bios. HDMI audio out works. If Optimus enabled, Intel HD4000 will be used and optirun works. Prevents use of HDMI (VGA only) but otherwise works.<br />
|-<br />
| [[Dell Latitude E7270|Latitude E7270]] || 2017-01-01 || {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA and Pulseaudio || yes || yes (IWL 8260) || untested || suspend-to-RAM after UEFI Update, hibernate works || Yes, working without runtime pm || || High suspend usage with power share port active<br />
|-<br />
| [[Dell Latitude 7370|Latitude 7370]] || 2019-05-11 || || || || || || || || ||<br />
|-<br />
| Latitude 7390 ( 2-in-1 ) || 2019-02-01 || Intel UHD Graphics 620 ( works with and without {{pkg|xf86-video-intel}} ) || Intel HD Audio with ALSA and Pulseaudio || yes || yes || yes || yes || untested || || Touchscreen display works<br />
|-<br />
| [[Dell Latitude E7440|Latitude E7440]] || 2019-05-11 || Yes || Yes || Yes || Yes || Yes || Yes, some complaints || || ||<br />
|-<br />
| [https://www.dell.com/us/business/p/latitude-e7450-ultrabook/pd?oc=cal147w7pf2 Latitude E7450] || 2016-03-01 || Intel HD5500 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes || Intel Wireless 7265 || BT 4.0 LE, untested || Suspend-to-RAM perfect, Hibernate does not work. SSD drive (no spindown) || No. || SD card reader. Synaptics touchpad + stick. Webcam works without problems. Backlit keyboard. Integrated mic works. FN-keys works once you set them up (lock, volume, monitor, search, sleep, backlight). RFID reader. Fingerprint reader. Get about 9h batterylife. Intel i7 CPU, 16GB RAM. || Everything else works without a hitch<br />
|-<br />
| [[Dell Latitude E7470|Latitude E7470]] || 2017-01-01 || Yes || Yes || Yes || Yes || Yes || Suspend-to-RAM perfect, hibernate untested || N/A || [[EFISTUB]] bootmanager does not work because it seems impossible to pass kernel parameters. Not via [[efibootmgr]], nor [[UEFI]] shell bcfg, nor the built-in gui. All ports of the docking station (PR03X) work. ||<br />
|-<br />
| [[Dell Latitude 3500|Latitude 3500]] || 2020-10-28 || Intel UHD Graphics 620 (Whiskey Lake) || Intel HD Audio with Pulseaudio || Yes || Yes || Yes, with {{Pkg|bluez}} || Suspend-to-RAM perfect, hibernate perfect || N/A || Fingerprint reader works with proprietary driver. || See linked article for more details<br />
|-<br />
| Latitude 5580 || 2017-11-06 (±) || Intel Graphics work, NVIDIA (fails on first attempt, did not try harder) || Intel HD Audio with ALSA and Pulseaudio || Yes, ethernet port I219-LM (rev 31) || Yes, Intel 8265 / 8275 (rev 78) || Yes, audio streaming and file transfer || Works (needs BIOS update ([[fwupd]]) to not have black screen when resuming sometimes) || || Webcam works; Backlight changeable; BIOS, TPM and SanDisk SSD firmware updatable with [[fwupd]]; UEFI works || NVIDIA drivers work in Ubuntu, so it should be possible to get it working; I cannot remember the exact CD version I used.<br />
|-<br />
| Latitude 7420 || 2020-10 || Yes || Yes || || Yes || Yes || Yes || || CPU throttle to 400mhz after short power-intensive workloads. With [https://github.com/intel/thermal_daemon Thermald] CPU can reach 1800mhz(15w). This bug not fixed yet. Please see this thread to more info: https://github.com/intel/thermal_daemon/issues/293 ||<br />
|-<br />
<br />
|-<br />
| [[Dell Latitude 7480|Latitude 7480]] || 2019-11-07 || Yes || || || Yes || Yes || || || webcam Fingerprint reader not working ||<br />
|-<br />
| [[Dell Latitude 7490|Latitude 7490]] || 2019-05-11 || Yes || Yes || Yes || Yes || Yes || Yes || Yes || ||<br />
|-<br />
| Latitude 5511 || 2020-10 || Yes || Yes || || Yes || || || || '''Freezing.''' Probably issues with KINGSTON SA2000M81000G NVME HDD. Under investigation. See <https://tekbyte.net/2020/fixing-nvme-ssd-problems-on-linux/>. || WD19 Docking station OK<br />
|-<br />
| [[Dell Latitude 3420|Latitude 3420]] || 2022-02-04 || Intel TigerLake-LP GT2 [Iris Xe Graphics] with {{Pkg|xf86-video-intel}}, {{Pkg|mesa}}, {{Pkg|vulkan-intel}} || Intel Tiger Lake-LP Smart Sound Technology Audio Controller. Not working by default (no card/output device detected). Works with {{Pkg|sof-firmware}}. || Yes (Realtek RTL8111/8168/8411) || Yes (Intel Wi-Fi 6 AX201 || Untested || Untested || Untested || Webcam works. Microphone requires {{Pkg|sof-firmware}} to work. Backlight works.||<br />
|}<br />
<br />
== Precision ==<br />
<br />
{{Laptops table header}}<br />
| Precision M4800 || 2014-04-01 || System not usable if booted without kernel parameter {{ic|nomodeset}}. Nvidia Quadro K2100M works with {{Pkg|nvidia}}, but [[Nouveau]] does not work because it requires KMS. || Untested || Yes || Yes || Untested || Untested || No modem || N/A || {{ic|nomodeset}} is ''required'' to boot to a usable system, both with the Arch installation media and post-installation.<br />
|-<br />
| Precision M6700 || 2017-01-01 || [Nvidia] Quadro K3000M works with both [[Nouveau]] and {{Pkg|nvidia}}. || Intel Corporation 7 Series/C216 HD Audio with Pulse Audio works; HDMI audio device untested || yes || Intel Corporation Wireless 7260 output works || not tested || Suspend and Hibernate works. || N/A || Touchpad, trackpoint, special function keys work || KDE Plasma works perfectly; Occasional GPU freezes with "GPU has fallen off the bus" errors since January 2018 ( kernel 4.14.15-1 and NVIDIA Kernel Module 387.34)<br />
|-<br />
| Precision 7710 || 2017-11-01 || [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev 83) works without problems. || Intel Corporation Sunrise Point-H HD Audio (rev 31) with Pulse Audio works || yes || Intel Corporation Wireless 8260 (rev 3a) output works; microphone not detected by pulse audio; HDMI audio device untested || not tested || Suspend works if no BIOS hard drive password. Hibernate untested. || N/A || || Solid experience using XFCE; all defaults. Lots of errors when booting up about the video card, etc., but no noticeable problems. xcalib -a -i; is very slow -- not sure why.<br />
|-<br />
| Precision 7710 || 2016-11-01 || [Nvidia] NVIDIA Quadro M5000M works with nvidia-465.24.02-5 and Kernel 5.12.9 || Intel Corporation HD Audiowith Pulse Audio works || yes || Intel Corporation Wireless 8260 and 9260 output work fine; HDMI audio device untested || not tested || Suspend and Hibernate work. Hybrid sleep untested. || N/A ||SD Card reader, webcam, mic and function keys work out of the box. || KDE plasma works fine. Upgrading kernel or nividia above mentioned versions causes no dispay to be seen after X launches. DFP-2 shows as disconnected<br />
|-<br />
| Precision 5510 || 2020-04-01 || [Nvidia] Quadro M1000 Mobile and Intel HD 530 with [NVIDIA Optimus]. Quadro M1000 Mobile works well with optimus-manager || Works out of the box; Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31) || yes || Intel Corporation Wireless 8260 (rev 3a) || Works out of the box || Suspend works || N/A || SD Card reader, webcam, mic and function keys work out of the box.|| Essentially the same device as the [[Dell XPS 15 9550]]<br />
|-<br />
| Precision 3530 || 2020-07-01 || [Nvidia] Quadro P600 Mobile and Intel UHD 630 with [NVIDIA Optimus]. Quadro P600 Mobile works well with nvidia-prime || Works out of the box; Intel Corporation Cannon Lake PCH cAVS (rev 10)|| yes || Intel Corporation Wireless-AC 9560 (rev 10) || Works out of the box || Suspend works. You need to disable early microcode loading || No modem || SD Card reader, webcam, mic and function keys work out of the box. || Upgrade the Thunderbolt controller to latest available firmware from Windows and, if needed, disable Thunderbolt security within the BIOS (especially with TB16 docking station).<br />
|-<br />
| Precision 5520 || 2018-02-01 || [Nvidia] Quadro M1200 Mobile disabled for Energy consumption reasons. Quadro M1200 Mobile works well with {{Pkg|nvidia}} and [[bumblebee]] with {{Pkg|tlp}}. {{Pkg|bbswitch}} does work. Intel HD P630 works with {{Pkg|xf86-video-intel}} || Works out of the box || yes || Qualcomm QCA61x4A works flawless || Works out of the box || Suspend work|| N/A || SD Card reader, webcam, mic and function keys work out of the box.|| Everything works out of the box for Dell Precision developer edition<br />
|-<br />
| Precision 5530 || 2018-06-01 || [Nvidia] Quadro P2000 Mobile disabled for Energy consumption reasons. Quadro P1000 works well with {{Pkg|nvidia}} and [[bumblebee]] with {{Pkg|tlp}}. {{Pkg|bbswitch}} does not work. Intel HD630 works with {{Pkg|xf86-video-intel}}. || Works out of the box || yes || Intel Corporation Wireless-AC 9260 works flawless with Linux 4.18 || Works with occasional driver reloads {{ic|modprobe btusb}} || Suspend works. Need to change sleep state as per [[Dell XPS 15 9570]]. || N/A || SD Card reader, webcam, mic and function keys work out of the box.|| Besides occasional bluetooth issues a great experience so far.<br />
|}<br />
<br />
== Studio ==<br />
<br />
{{Laptops table header}}<br />
| Studio 1749 || 2013-01-04 || Radeon HD 5650M, {{ic|xf86-video-ati}} is almost flawless (just slower 3D), {{ic|catalyst}} is faster but has various issues. || HDA Intel MID, works with ALSA after adding {{ic|1=options snd-hda-intel index=0 model=dell-m6-dmic}} to {{ic|/etc/modprobe.d/alsa-base.conf}}. HDMI audio has some issues. || Yes || BCM43224, brcmsmac and {{pkg|broadcom-wl}} both work || N/A || Suspend works; hibernate untested. || N/A || SD card reader works, media keys work, web cam, and microphone both work. || Flawless except for poor 3D performance and battery life.<br />
|-<br />
| Studio XPS M1640 || 2009-08 || ATI HD4670 Mobile works with {{Pkg|xf86-video-ati}} (see the forums for 3D support); Catalyst drivers untested || Works with Intel HD Audio and ALSA. || Yes || Works with iwlagn || Bluetooth works || Works but when using {{Pkg|xf86-video-ati}}, there is video corruption upon boot || N/A || Web cam works, media keys work with the {{ic|dell_laptop}} kernel module, IR works, card reader works || Everything basically worked out-of-the-box<br />
|}<br />
<br />
== Vostro ==<br />
<br />
{{Laptops table header}}<br />
| Vostro 1710 || 2018-11-26 || {{-}} || {{-}} || Yes, RTL8111/8168B || Works (Broadcom BCM4328) || {{-}} || {{-}} ||{{-}} || {{-}} || AlpsPS/2 ALPS GlidePoint<br />
|-<br />
| Vostro 5481 || 2019-11-01 || Works out of the box, {{Pkg|xf86-video-intel}} recommended just in case. || Yes || Yes || Yes. {{Pkg|broadcom-wl}} may be needed. || Yes || Yes ||{{-}} || {{-}} || Disable secure boot, fast boot, and TPM in the BIOS. Also, enable AHCI SATA Operation in the BIOS instead of RAID or the disk may not be detected. Do note that you will get a BSOD on Windows after this, which can be fixed by following this [https://support.thinkcritical.com/kb/articles/switch-windows-10-from-raid-ide-to-ahci quick guide].<br />
|-<br />
| Vostro 3583 || 2019-12-21 || No need to install {{Pkg|xf86-video-intel}} and {{Pkg|xf86-video-amdgpu}} as modesetting drivers works perfectly. || Yes || Yes || Works || Yes || Yes ||{{-}} || Webcame works out of box || after resuming from sleep, wifi stops working for some unknown cause. work around is to reload kernel module ath10k_pci. AMD 520 Radeon performs less than Intel UHD 620 with both amdgpu and radeon module. same results under Windows<br />
|-<br />
| Vostro 3560 || 2020-02-01 || Works, use Radeon, installed {{Pkg|mesa}} and {{Pkg|mesa-vdpau}} for hardware acceleration. || Works || Works || Works (Atheros AR9485 - ath9k) || Works || Works || {{-}} || Fingerprint reader works. || Everything works.<br />
|-<br />
| Vostro 5590 || 2021-01-23 || Works out of the box. Followed [[Bumblebee#Installation]]. || Works with {{Pkg|sof-firmware}}. || Yes || Yes || Yes || {{-}} || {{-}} || {{ - }} ||<br />
<ul><br />
<li>Installing the package {{Pkg|sof-firmware}} solves all the audio problems.<li><br />
<li>Install package aur/pulseaudio-modules-bt, if device bluetooth-sound not working</li><br />
<li> execute: pactl load-module module-bluetooth-discover</li><br />
</ul><br />
|-<br />
| Vostro 7500 || 2020-10-16 || Works out of box using nouveau || Works with {{Pkg|sof-firmware}} || N/A || Works || {{-}} || {{-}} || {{-}} || Finger print scanner not yet supported. Webcam works out of box. ||<br />
<ul><br />
<li>No audio out of box, but {{Pkg|sof-firmware}} fixes this issue. </li><br />
<li>SSD was initially in RAID configuration in the Bios + not detected by the installer. Fixed by changing to AHCI. </li><br />
<li>Dell UEFI implementation does not pass kernel parameters on boot, so EFIStub does not work. Side-stepped the issue by installing Grub.</li><br />
</ul><br />
|}<br />
<br />
== XPS ==<br />
<br />
{{Laptops table header}}<br />
| XPS L322 || 2013-03 || Intel HD 4000, with {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || No Ethernet port || Yes || Untested || Yes || No modem || No SD card slot || ALPS Touchpad recognized only as PS/2 mouse, two-finger scroll, finger tap-to-click, etc... does not work. Some new mouse drivers suggest a fix but have not worked.<br />
|-<br />
| [[Dell XPS M1330|XPS M1330]] || 2021-01 || works with Nouveau or mode-setting || Works with Intel HD Audio and ALSA or Pulseaudio, but need to configure microphone || Yes || Works with iwl4965, b43 driver || Works with bluez || (''acpi_cpufreq'' problem: [https://bbs.archlinux.org/viewtopic.php?id=44500 see forums]) || No modem || 2.0 MP web cam works with ''uvcvideo'', IR remote works, SD card works || Everything basically worked out-of-the-box except the microphone.<br />
|-<br />
| [[Dell XPS 13 (9333)|XPS 13 (9333)]] || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9310)|XPS 13 (9310)]] || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9343)|XPS 13 (9343)]] || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9350)|XPS 13 (9350)]] || 2016-11-16 || Yes || Yes || Yes || Yes, after firmware update || Yes (Suspend and Hibernate) || {{-}} || {{-}} || All Dock Ports function (WD15 tested working, except Ethernet Realtek 8152/8153 not resuming from USB supend mode. Install WD15 firmware 1.0.4 to fix.) || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 (9360)|XPS 13 (9360)]] || 2016-11-16 || Yes || Yes || Yes || Yes, after firmware update || Yes (Suspend and Hibernate) || {{-}} || {{-}} || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 (9370)|XPS 13 (9370)]] || 2018-05-29 || Yes || Yes || Yes || Yes || Yes || {{-}} || {{-}} || {{-}} || {{-}}<br />
|-<br />
| [[Dell XPS 13 (9380)|XPS 13 (9380)]] || 2019 || Yes || Yes || Yes || Yes || Yes || {{-}} || {{-}} || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 2-in-1 (9365)|XPS 13 2-in-1 (9365)]] || 2017-10-22 || Yes || Yes || No Ethernet Port || Yes || Yes (Suspend and Hibernate) || {{-}} || {{-}} || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 13 (7390)|XPS 13 (7390)]] || 2019-12-21 || Yes || Yes || No Ethernet Port || Yes || Yes || {{-}} || {{-}} || Fingerprint not tested as the developer version does not have one. || This is the regular XPS 13, not the 2-in-1. Only tested with Wayland (Sway WM) ecosystem.<br />
|-<br />
| [[Dell XPS 13 2-in-1 (7390)|XPS 13 2-in-1 (7390)]] || 2019-09-01 || Yes || Yes || No Ethernet Port || Yes || Yes (Requires Drivers) || {{-}} || No Modem || Camera, Fingerprint Sensor not working || System freezes on boot. See device page for fix.<br />
|-<br />
| [[Dell XPS 15]] || 2016-11-17 || Intel HD 530 works with {{Pkg|xf86-video-intel}} i915 and GTX 960M works with {{Pkg|nvidia}} || Yes || No Ethernet Port || Yes || Yes || Yes || No Modem || {{-}} || Everything basically works out-of-the-box with a reasonably up-to-date kernel.<br />
|-<br />
| [[Dell XPS 17 (9700)]] || 2020-09-18 || Intel UHD (CML GT2) works with {{Pkg|mesa}} or {{Pkg|xf86-video-intel}} and GTX 1650 Ti/RTX 2060 Max-Q works with {{Pkg|nvidia}} || Yes || No Ethernet Port || Yes || Yes || Yes || No Modem || Camera working, Fingerprint sensor workable. || Builtin audio can work, but is currently difficult to get working.<br />
|}<br />
<br />
== G3 ==<br />
<br />
{{Laptops table header}}<br />
| G3 15 3590 || 2020-19-10 || Intel UHD 630 and NVIDIA GTX 1050/1660 Mobile {{Pkg|nvidia}} and {{Pkg|nvidia-prime}} using [[PRIME#PRIME render offload|PRIME Render Offloading]]. Until now, [[GPGPU#CUDA|NVIDIA CUDA]] is not working with linux 5.9 || You must install {{Pkg|sof-firmware}} and any kernel after 5.6.3+ to get internal microphone/sound working. || Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller || Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter || Working || Working || {{-}} || {{-}} || Works well with {{AUR|optimus-manager-git}}, follow [https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options#configuration-1--built-in-power-management-inside-the-nvidia-driver their page on power managment]<br />
|}<br />
<br />
== G5 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G5 5590-9340|G5 5590-9340]] || 2020-08-20 || Yes (both integrated and dedicated) || Yes || Yes || Yes || Yes || Yes || {{-}} || Goodix fingerprint reader not working due to lack of drivers but probably can be extracted from Ubuntu image this laptop goes with. || Everything works OOB except FP.<br />
|}<br />
<br />
== G15 ==<br />
<br />
{{Laptops table header}}<br />
| [[Dell G15 5515 AMD EDITION|G15 5515 AMD EDITION]] || 2022-02-12 || Yes (AMD and NVIDIA 3060). || Yes. Alsa + PulseAudio. || Not Tested || Yes || Not Tested || Yes || {{-}} || Kernel 5.16.5, NVIDIA 510.47.03. || HDMI works through "optimus-manager" in "hybrid" mode. [[PulseAudio/Examples#Manually configuring PulseAudio to detect the Nvidia HDMI|HDMI sound for PulseAudio]] can be enabled by adding the {{ic|1=load-module module-alsa-sink device=hw:1,3}} config line. Touchpad disables randomly on boot, can be fixed by creating the following file:<br />
{{hc|/etc/modprobe.d/i2c-touchpad.conf|softdep i2c_hid pre: pinctrl_amd}}<br />
|-<br />
| [[Dell G15 5511|G15 5511]] || 2022-04-11 || Yes (Nvidia GeForce RTX 3060 Mobile / Max-Q) with {{Pkg|nvidia}} and {{Pkg|nvidia-dkms}} || Yes for internal audio [https://askubuntu.com/questions/1220493/18-04-audio-realtek-alc3254-fails-on-new-dell-g3-15-3590?newreg=60fffc5843d74914a8d8de74e33c7114 but needs kernel parameter] : {{ic|1=snd_hda_intel.dmic_detect=0}} . Alsa + PulseAudio. HDA Nvidia for HDMI not tested. || Yes || Yes || Not Tested || Not Tested || {{-}} || Kernel 5.17.1, NVIDIA 510.60.02-11 ||</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Dm-crypt/Mounting_at_login&diff=585219Dm-crypt/Mounting at login2019-10-11T11:10:37Z<p>Bzhb: /* Mounting at login */ : add mount command in the script</p>
<hr />
<div>[[Category:Disk encryption]]<br />
[[es:Dm-crypt (Español)/Mounting at login]]<br />
[[ja:Dm-crypt/ログイン時にマウント]]<br />
{{Related articles start}}<br />
{{Related|pam_mount}}<br />
{{Related articles end}}<br />
<br />
It is possible to configure [[PAM]] and [[systemd]] to automatically mount a [[dm-crypt]] encrypted home partition when its owner logs in, and to unmount it when he logs out.<br />
<br />
This tutorial assumes you have already created your encrypted partition, as described in [[Dm-crypt/Encrypting a non-root file system]].<br />
<br />
{{Note|<br />
* You need to use the same password for your user account and for LUKS.<br />
* In all the examples, replace {{ic|''YOURNAME''}} with your username, {{ic|''1000''}} with your user ID and {{ic|''PARTITION''}} with the name of your encrypted partition's device.<br />
}}<br />
<br />
== Mounting at login ==<br />
<br />
''pam_exec'' can be used to unlock the device at login. Edit {{ic|/etc/pam.d/system-login}} and add the line below emphasized in bold after {{ic|auth include system-auth}}:<br />
<br />
{{Note|1=GDM, LightDM, and maybe other display managers might require {{ic|pam_exec}} for {{ic|session}} as well, see [[Talk:Dm-crypt/Mounting at login#pam_exec required for session & using script]].}}<br />
<br />
{{hc|/etc/pam.d/system-login|2=<br />
...<br />
<br />
auth include system-auth<br />
'''auth optional pam_exec.so expose_authtok /etc/pam_cryptsetup.sh<br />
<br />
...<br />
}}<br />
<br />
Then create the mentioned script.<br />
<br />
{{hc|/etc/pam_cryptsetup.sh|2=<br />
#!/bin/sh<br />
<br />
CRYPT_USER="''YOURNAME''"<br />
MAPPER="/dev/mapper/home-"$CRYPT_USER<br />
<br />
if [ "$PAM_USER" == "$CRYPT_USER" ] && [ ! -e $MAPPER ]<br />
then<br />
tr '\0' '\n' {{!}} /usr/bin/cryptsetup open /dev/''PARTITION'' home-$CRYPT_USER && mount $MAPPER<br />
fi<br />
}}<br />
<br />
Execute {{ic|chmod +x /etc/pam_cryptsetup.sh}} to make it executable.<br />
<br />
{{Out of date|Reconfirmation needed. See Talk.|section=Suggestion: Remove x-systemd.automount}}<br />
Now add your partition to {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
...<br />
<br />
/dev/mapper/home-''YOURNAME'' /home/''YOURNAME'' ext4 rw,noatime,noauto 0 2<br />
<br />
...<br />
}}<br />
<br />
Your home directory will be mounted automatically on the first access made by your desktop environment or shell.<br />
<br />
== Unmouting at logout ==<br />
After you log out of all your sessions, ''systemd-logind'' automatically shuts down {{ic|user@''1000''.service}}. Therefore, you can specify that your mountpoint requires it, and ''systemd'' will unmount it automatically:<br />
<br />
{{hc|/etc/systemd/system/home-''YOURNAME''.mount.d/logout.conf|2=<br />
[Unit]<br />
Requires=user@''1000''.service}}<br />
<br />
This will however create a circular dependency loop that cannot by resolved automatically by ''systemd'', so you need to describe the dependencies and ordering explicitly:<br />
<br />
{{hc|/etc/systemd/system/user@''1000''.service.d/homedir.conf|2=<br />
[Unit]<br />
Requires=home-''YOURNAME''.mount<br />
After=home-''YOURNAME''.mount}}<br />
<br />
{{Note|1=If your desktop environment or some other application does not kill all its processes on logout, you might need to set {{ic|1=KillUserProcesses=yes}} in {{ic|/etc/systemd/logind.conf}}.}}<br />
<br />
=== Locking ===<br />
<br />
After unmounting, the device will still be unlocked, and it will be possible to mount it without re-entering password. You can set up and [[enable]] a service that starts when the device gets unlocked ({{ic|1=BindsTo=dev-mapper-home\x2d''YOURNAME''.device}}) and dies after the device gets unmounted ({{ic|1=Requires,Before=home-''YOURNAME''.mount}}), locking the device in the process ({{ic|1=ExecStop=cryptsetup close}}):<br />
<br />
{{hc|/etc/systemd/system/cryptsetup-''YOURNAME''.service|2=<br />
[Unit]<br />
DefaultDependencies=no<br />
BindsTo=dev-''PARTITION''.device<br />
After=dev-''PARTITION''.device<br />
BindsTo=dev-mapper-home\x2d''YOURNAME''.device<br />
Requires=home-''YOURNAME''.mount<br />
Before=home-''YOURNAME''.mount<br />
Conflicts=umount.target<br />
Before=umount.target<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
TimeoutSec=0<br />
ExecStop=/usr/bin/cryptsetup close home-''YOURNAME''<br />
<br />
[Install]<br />
RequiredBy=dev-mapper-home\x2d''YOURNAME''.device<br />
}}<br />
{{Note|{{ic|dev-''PARTITION''}} is the result of {{ic|systemd-escape -p /dev/''PARTITION''}}}}</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Dell_XPS_13_(9370)&diff=553829Dell XPS 13 (9370)2018-11-09T12:22:03Z<p>Bzhb: /* Storage */ add warning about NVMe SSD and discard</p>
<hr />
<div>[[Category:Dell]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Video || {{G|Working}} || i915<br />
|-<br />
| Wireless || {{G|Working}} || ath10k<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || hid_multitouch<br />
|-<br />
| Webcam || {{G|Working}} ¹ || uvcvideo<br />
|-<br />
| USB-C / Thunderbolt 3 || {{G|Working}} || intel_wmi_thunderbolt<br />
|-<br />
| Wireless switch || {{G|Working}} || intel_hid<br />
|-<br />
| Function/Multimedia Keys || {{G|Working}} || ?<br />
|-<br />
| Fingerprint sensor || {{R|Not working}} || ?<br />
|}<br />
{{Related articles start}}<br />
{{Related|Dell XPS 13 (9333)}}<br />
{{Related|Dell XPS 13 (9343)}}<br />
{{Related|Dell XPS 13 (9350)}}<br />
{{Related|Dell XPS 13 (9360)}}<br />
{{Related|Dell XPS 13 2-in-1 (9365)}}<br />
{{Related articles end}}<br />
<br />
The Dell XPS 13 Early 2018 (9370) is the fifth-generation model of the XPS 13 line. The laptop was released in January 2018 in both a standard edition with Windows installed as well as a Developer Edition with Ubuntu 16.04 installed, featuring kernel 4.4 as of now. There are only minor hardware differences between them, mostly in regards to the mainboard microchip manufacturers. [https://www.dell.com/community/Linux-Developer-Systems/XPS-13-Fingerprint-reader-Linux-support/m-p/5090726/highlight/true#M7295 According to Dell] the fingerprint reader is not present on the Linux variant. Just like the older versions ([[Dell XPS 13 (9333)|9333]], [[Dell XPS 13 (9343)|9343]], [[Dell XPS 13 (9350)|9350]], and [[Dell XPS 13 (9360)|9360]]) it is available in different hardware configurations as well. These fifth gen models includes Intel's eighth generation Kaby Lake R processors, and can be configured with up to 16GB LPDDR3 2133 MHz RAM and a 1TB PCI SSD. Unlike previous iterations, the Wi-Fi/BT module is soldered and cannot be replaced, only the Killer 1435 (QCA6174A) is available for consumers, enterprise versions with the Intel 8265 modem also exist.<br />
<br />
The installation process for Arch on the XPS 13 does not differ from any other PC. Although you might need to consider upgrading the SSD Firmware first if you have a working Windows installation (see section [[#Storage]]). For installation help, please see the [[Installation guide]] and [[UEFI]]. This page covers the current status of hardware support on Arch, as well as post-installation recommendations.<br />
<br />
¹ The webcam works with kernel 4.17.4 or later. For earlier kernels this applies: Some users have experienced webcam firmware issues with recent models and there are [https://www.dell.com/community/Linux-General/Dell-xps-13-9370-Webcam-support/td-p/6032049 many reports of non-functional webcams on new laptops]. User reports indicate Dell support is responsive to replacing screens to install a webcam that uses linux-compatible UVC 1.0 rather than 1.5 firmware drivers.<br />
<br />
== UEFI ==<br />
<br />
Before installing it is necessary to modify some UEFI Settings. They can be accessed by pressing the F2 key repeatedly when booting.<br />
* Change the SATA Mode from the default "RAID" to "AHCI". This will allow Linux to detect the NVME SSD. If dual booting with an existing Windows installation, Windows will not boot after the change but [https://triplescomputers.com/blog/uncategorized/solution-switch-windows-10-from-raidide-to-ahci-operation/ this can be fixed without a reinstallation].<br />
* Disable secure boot to allow Linux to boot.<br />
* To boot from a USB device attached via the USB-C to USB-A adapter included in the box, you'll need to enable Thunderbolt boot. Once enabled, F12 on boot will enter the boot menu.<br />
It is also possible to use the right USB-C port directly without any UEFI adjustment.<br />
<br />
== Content Adaptive Brightness Control ==<br />
In the XPS 13 the display panels (both FHD and 4K UHD) come with Content Adaptive Brightness Control (usually referred to as CABC or DBC) enabled by default. While disabling required flashing the display firmware in previous generations, DBC can now be disabled in recent BIOS versions. To test if DBS is enabled, go to this [https://tylerwatt12.com/dc/ test page].<br />
<br />
== Video ==<br />
<br />
The video should work with the {{ic|i915}} driver of the current {{Pkg|linux}} kernel. Consult [[Intel graphics]] for a detailed installation and configuration guide as well as for [[Intel graphics#Troubleshooting]].<br />
<br />
If you have the 4K (3840x2160) model, also check out [[HiDPI]] for UI scaling configurations.<br />
<br />
Note that the {{ic|1=enable_psr=1}} kernel parameter appears not to work properly, at least on the touchscreen model.<br />
<br />
[https://www.dell.com/community/Linux-General/Dell-xps-13-9370-Webcam-support/td-p/6032049 Some user support requests indicate that currently-shipping 9370 models may bundle webcams that use UVC 1.5 firmware rather than 1.0], which was not supported [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/drivers/media/usb/uvc/uvc_video.c?id=v4.17.4&id2=v4.17.3 prior to kernel 4.17.4].<br />
<br />
For me the system seems to freeze sometime which is due to enable_psr=1, you can either disable enable_psr=0 where you will loose battery life but get no freezes, or enable_psr=2 where you save battery life like enable_psr=1 but without any freezes. enable_psr=1 maximizes batterylife but for me gives the system freezes, hopefully this will get fixed in the future.<br />
<br />
To do so with sudo create a file /etc/modprobe.d/1915.conf:<br />
<br />
options i915 enable_psr=2<br />
<br />
Some other options that save battery life are:<br />
<br />
options i915 enable_psr=2 enable_rc6=7 enable_fbc=1 semaphores=1 lvds_downclock=1 enable_guc_loading=1 enable_guc_submission=1<br />
<br />
== Storage ==<br />
<br />
The nvme SSD is a Toshiba KXG50ZNV256G, KXG50ZNV512G or KXG50ZNV1T02. The stock firmware version AADA4102 has severe problems when the ssd enters the lowest power state. This results in a unresponsive device (kernel complains about read-only filesystem) The problems can occur any time, but seem to have become way more common on Kernel 4.18 on battery power. [https://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverid=c0pf8 Firmware Version AADA4105] seems to fix the problem.<br />
<br />
As the upgrade is only possible under windows and as even with upgraded driver the disk may be completely undetected by the kernel because of the SSD not being responsive in the deepest sleep mode. The following kernel parameter works as a workaround, preventing the disk to enter the problematic sleep mode (see [[Solid state drive/NVMe]]):<br />
nvme_core.default_ps_max_latency_us=6000<br />
<br />
Note : NVMe SSD should not be issued discards :[[Solid_state_drive/NVMe#Discards]]<br />
<br />
== Wifi ==<br />
<br />
The Wifi adapter contains a Qualcomm Atheros QCA6174 module. It should work out of the box with the {{ic|ath10k_pci}} driver in recent {{Pkg|linux}} kernels.<br />
<br />
== Bluetooth ==<br />
<br />
The Bluetooth adapter sometimes becomes unavailable after waking up from suspend and can even stay deactivated and invisible after a warm reboot.<br />
<br />
== Keyboard ==<br />
<br />
The keyboard backlight has a feature that makes it automatically turn off after a given timeout. This timeout can be adjusted by writing into {{ic|1=/sys/class/leds/dell\:\:kbd_backlight/stop_timeout}}. For example,<br />
<br />
echo "5m" > /sys/class/leds/dell\:\:kbd_backlight/stop_timeout<br />
<br />
This would set the timeout to 5 minutes. Note that different timeouts are maintained when the machine is connected to AC and when it's running from battery. Before BIOS 1.4.0 [https://github.com/dell/libsmbios/issues/48 there was an issue] that prevented the user from changing the timeout on AC. A kernel workaround was added in 4.18 and it was eventually fixed by BIOS 1.4.0.<br />
<br />
== Power Management ==<br />
<br />
If the laptop seems to have an high drain when in sleep mode. As a possible workaround, you can set the machine to enter S3 deep sleep mode. Add {{ic|1=quiet mem_sleep_default=deep}} to the [[Kernel parameters]].<br />
<br />
According to the manufacturer (see [https://bugzilla.kernel.org/show_bug.cgi?id=199689 this upstream kernel bug]), the machine uses S2 intentionally instead of S3, and they are working towards fixing the power drain on S2.<br />
<br />
Note: on older BIOS and/or kernel versions [https://www.spinics.net/lists/platform-driver-x86/msg15644.html the power button cannot be used to wake the laptop from sleep]. In this case the Sleep button (Fn + End, or just End if you have Fn lock enabled) can still wake up the machine. This has been fixed by a BIOS update.<br />
<br />
== Firmware Updates ==<br />
<br />
Dell provides firmware updates via Linux Vendor Firmware Service (LVFS). Refer to [[Flashing BIOS from Linux#fwupd]] for additional information. A package is readily available at {{Pkg|fwupd}}. Updates are provided for the Thunderbolt controller as well. [https://github.com/dell/thunderbolt-nvm-linux/issues/10 There is an issue] where the Thunderbolt version number is detected as {{ic|1=00.00}} after reflashing (currently being investigated).<br />
<br />
Dell has also released updates to the SSD firmware, but these can only be updated from Windows, not from Linux.<br />
<br />
== Thermal Throttling ==<br />
By default thermal throttling activates around 80C resulting in maximum sustained CPU frequency around 2.4Ghz, much lower than in Dell's standard Windows installation. <br />
Package temperature above threshold, cpu clock throttled (total events = 971)<br />
<br />
This can be resolved using {{AUR|lenovo-throttling-fix-git}}. Despite originally conceived to resolve the same issue with Lenovo laptops, it works with the XPS 9370 (and should work well with other Skylake or newer laptops).<br />
<br />
== Thermal Modes / Fan profiles ==<br />
Just like in Windows by using Dell Power Manager you can set the thermal configuration and behaviour of the fans of your machine. This is done within a terminal with the following commands.<br />
<br />
To find out what thermal mode is set type:<br />
<br />
# smbios-thermal-ctl -g<br />
<br />
To find all available thermal modes type:<br />
<br />
# smbios-thermal-ctl -i<br />
<br />
And finally to set the desired thermal mode that you identified with the command before type:<br />
<br />
# smbios-thermal-ctl --set-thermal-mode=THERMAL_MODE<br />
<br />
== Power Saving ==<br />
To save more battery use [[tlp]] package<br />
AND/OR [[Powertop]].<br />
<br />
You can monitor the used power and also the temperature of your machine with the {{AUR|s-tui}} tool.<br />
<br />
== Touchpad ==<br />
<br />
=== Cursor Jump ===<br />
<br />
The touchpad can sometimes produce a "cursor jump". Sometimes this is detected and worked around by libinput, resulting in a similar journal entry:<br />
<br />
libinput error: event12 - DELL07E6:00 06CB:76AF Touchpad: kernel bug: Touch jump detected and discarded.<br />
<br />
There is a [https://gitlab.freedesktop.org/libinput/libinput/issues/36 libinput bug about this] where the conclusion was that this is probably a hardware issue or a bug in the kernel driver.<br />
<br />
=== Sensitivity ===<br />
<br />
By default, the [[libinput]] driver might not have the desired sensitivity. The acceleration can be changed via [[xinput]] as follows:<br />
<br />
xinput --set-prop $(xinput | grep 'DELL.*Touchpad' | awk '{print $6}' | sed 's/id=//g') 'libinput Accel Speed' 0.5<br />
<br />
== Audio ==<br />
<br />
Works correctly, but the audio controller cannot figure out what kind of device is plugged into the jack on its own. For this reason the desktop environment (eg. Gnome) will pop up a dialog where you can choose if it was a headset, or microphone, etc.<br />
<br />
== USB Type-C ports ==<br />
<br />
The 9370 has only three Type-C ports (and no other ports, just an audio jack). Two of these (on the left side) support Thunderbolt 3. There is no power jack. A 45 W USB Type-C charger is included in the box. Any of the three Type-C ports can be used for charging. Since the laptop has no USB-A ports, one Dell-branded Type-C to A adapter is included.<br />
<br />
Also all three Type-C ports support DisplayPort alternate mode. It is taken care of by the firmware, so it will work even with older kernels that do not otherwise support it. To the operating system it appears as if the laptop had two DisplayPort connectors (in addition to the embedded DP that the internal screen uses). So far I've tested the following adapters. All of these will appear to the operating system as if you plugged something into one of the DP connectors.<br />
<br />
* [https://www.club-3d.com/en/detail/2350/usb_3.1_type_c_to_displayport_1.2/ Club3D Type-C to DisplayPort 1.2 adapter] (tested with 1080p and 4K, both work at 60 Hz)<br />
* [https://www.dell.com/en-us/shop/dell-adapter-usb-c-to-vga/apd/470-abnc/pc-accessories Dell Type-C to VGA adapter] (tested with 1080p at 60 Hz)<br />
* [https://www.dell.com/en-us/work/shop/dell-adapter-usb-c-to-hdmi/apd/470-abmz/pc-accessories Dell Type-C to HDMI adapter] (tested with 1080p and 4K, both work at 60 Hz)<br />
* [https://www.moshi.com/en/product/usb-c-to-hdmi-adapter/silver Moshi USB-C to HDMI Adapter] (tested with 1080p and 4K, both work at 60 Hz)<br />
<br />
== Fingerprint reader ==<br />
<br />
The fingerprint reader is not supported. There is a [https://gitlab.freedesktop.org/libfprint/libfprint/issues/43 libfprint feature request].</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Dell_XPS_13_(9370)&diff=547186Dell XPS 13 (9370)2018-10-11T20:23:44Z<p>Bzhb: /* Storage */ adding the info that because of this bug the disk may be completely undetected</p>
<hr />
<div>[[Category:Dell]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Video || {{G|Working}} || i915<br />
|-<br />
| Wireless || {{G|Working}} || ath10k<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || hid_multitouch<br />
|-<br />
| Webcam || {{G|Working}} ¹ || uvcvideo<br />
|-<br />
| USB-C / Thunderbolt 3 || {{G|Working}} || intel_wmi_thunderbolt<br />
|-<br />
| Wireless switch || {{G|Working}} || intel_hid<br />
|-<br />
| Function/Multimedia Keys || {{G|Working}} || ?<br />
|-<br />
| Fingerprint sensor || {{R|Not working}} || ?<br />
|}<br />
{{Related articles start}}<br />
{{Related|Dell XPS 13 (9333)}}<br />
{{Related|Dell XPS 13 (9343)}}<br />
{{Related|Dell XPS 13 (9350)}}<br />
{{Related|Dell XPS 13 (9360)}}<br />
{{Related|Dell XPS 13 2-in-1 (9365)}}<br />
{{Related articles end}}<br />
<br />
The Dell XPS 13 Early 2018 (9370) is the fifth-generation model of the XPS 13 line. The laptop was released in January 2018 in both a standard edition with Windows installed as well as a Developer Edition with Ubuntu 16.04 installed, featuring kernel 4.4 as of now. There are only minor hardware differences between them, mostly in regards to the mainboard microchip manufacturers. [https://www.dell.com/community/Linux-Developer-Systems/XPS-13-Fingerprint-reader-Linux-support/m-p/5090726/highlight/true#M7295 According to Dell] the fingerprint reader is not present on the Linux variant. Just like the older versions ([[Dell XPS 13 (9333)|9333]], [[Dell XPS 13 (9343)|9343]], [[Dell XPS 13 (9350)|9350]], and [[Dell XPS 13 (9360)|9360]]) it is available in different hardware configurations as well. These fifth gen models includes Intel's eighth generation Kaby Lake R processors, and can be configured with up to 16GB LPDDR3 2133 MHz RAM and a 1TB PCI SSD. Unlike previous iterations, the Wi-Fi/BT module is soldered and cannot be replaced, only the Killer 1435 (QCA6174A) is available for consumers, enterprise versions with the Intel 8265 modem also exist.<br />
<br />
The installation process for Arch on the XPS 13 does not differ from any other PC. Although you might need to consider upgrading the SSD Firmware first if you have a working Windows installation (see section [[#Storage]]). For installation help, please see the [[Installation guide]] and [[UEFI]]. This page covers the current status of hardware support on Arch, as well as post-installation recommendations.<br />
<br />
¹ The webcam works with kernel 4.17.4 or later. For earlier kernels this applies: Some users have experienced webcam firmware issues with recent models and there are [https://www.dell.com/community/Linux-General/Dell-xps-13-9370-Webcam-support/td-p/6032049 many reports of non-functional webcams on new laptops]. User reports indicate Dell support is responsive to replacing screens to install a webcam that uses linux-compatible UVC 1.0 rather than 1.5 firmware drivers.<br />
<br />
== UEFI ==<br />
<br />
Before installing it is necessary to modify some UEFI Settings. They can be accessed by pressing the F2 key repeatedly when booting.<br />
* Change the SATA Mode from the default "RAID" to "AHCI". This will allow Linux to detect the NVME SSD. If dual booting with an existing Windows installation, Windows will not boot after the change but [https://triplescomputers.com/blog/uncategorized/solution-switch-windows-10-from-raidide-to-ahci-operation/ this can be fixed without a reinstallation].<br />
* Disable secure boot to allow Linux to boot.<br />
* To boot from a USB device attached via the USB-C to USB-A adapter included in the box, you'll need to enable Thunderbolt boot. Once enabled, F12 on boot will enter the boot menu.<br />
It is also possible to use the right USB-C port directly without any UEFI adjustment.<br />
<br />
== Content Adaptive Brightness Control ==<br />
In the XPS 13 the display panels (both FHD and 4K UHD) come with Content Adaptive Brightness Control (usually referred to as CABC or DBC) enabled by default. While disabling required flashing the display firmware in previous generations, DBC can now be disabled in recent BIOS versions. To test if DBS is enabled, go to this [https://tylerwatt12.com/dc/ test page].<br />
<br />
== Video ==<br />
<br />
The video should work with the {{ic|i915}} driver of the current {{Pkg|linux}} kernel. Consult [[Intel graphics]] for a detailed installation and configuration guide as well as for [[Intel graphics#Troubleshooting]].<br />
<br />
If you have the 4K (3840x2160) model, also check out [[HiDPI]] for UI scaling configurations.<br />
<br />
Note that the {{ic|1=enable_psr=1}} kernel parameter appears not to work properly, at least on the touchscreen model.<br />
<br />
[https://www.dell.com/community/Linux-General/Dell-xps-13-9370-Webcam-support/td-p/6032049 Some user support requests indicate that currently-shipping 9370 models may bundle webcams that use UVC 1.5 firmware rather than 1.0], which was not supported [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/drivers/media/usb/uvc/uvc_video.c?id=v4.17.4&id2=v4.17.3 prior to kernel 4.17.4].<br />
<br />
For me the system seems to freeze sometime which is due to enable_psr=1, you can either disable enable_psr=0 where you will loose battery life but get no freezes, or enable_psr=2 where you save battery life like enable_psr=1 but without any freezes. enable_psr=1 maximizes batterylife but for me gives the system freezes, hopefully this will get fixed in the future.<br />
<br />
To do so with sudo create a file /etc/modprobe.d/1915.conf:<br />
<br />
options i915 enable_psr=2<br />
<br />
Some other options that save battery life are:<br />
<br />
options i915 enable_psr=2 enable_rc6=7 enable_fbc=1 semaphores=1 lvds_downclock=1 enable_guc_loading=1 enable_guc_submission=1<br />
<br />
== Storage ==<br />
<br />
The nvme SSD is a Toshiba KXG50ZNV256G, KXG50ZNV512G or KXG50ZNV1T02. The stock firmware version AADA4102 has severe problems when the ssd enters the lowest power state. This results in a unresponsive device (kernel complains about read-only filesystem) The problems can occur any time, but seem to have become way more common on Kernel 4.18 on battery power. [https://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverid=c0pf8 Firmware Version AADA4105] seems to fix the problem.<br />
<br />
As the upgrade is only possible under windows and as even with upgraded driver the disk may be completely undected by the kernel because of the SSD not being responsive in the deepest sleep mode. The following kernel parameter works as a workaround, preventing the disk to enter the problematic sleep mode (see [[Solid state drive/NVMe]]):<br />
nvme_core.default_ps_max_latency_us=6000<br />
<br />
== Wifi ==<br />
<br />
The Wifi adapter contains a Qualcomm Atheros QCA6174 module. It should work out of the box with the {{ic|ath10k_pci}} driver in recent {{Pkg|linux}} kernels.<br />
<br />
== Bluetooth ==<br />
<br />
The Bluetooth adapter sometimes becomes unavailable after waking up from suspend and can even stay deactivated and invisible after a warm reboot.<br />
<br />
== Keyboard ==<br />
<br />
The keyboard backlight has a feature that makes it automatically turn off after a given timeout. This timeout can be adjusted by writing into {{ic|1=/sys/class/leds/dell\:\:kbd_backlight/stop_timeout}}. For example,<br />
<br />
echo "5m" > /sys/class/leds/dell\:\:kbd_backlight/stop_timeout<br />
<br />
This would set the timeout to 5 minutes. Note that different timeouts are maintained when the machine is connected to AC and when it's running from battery. Before BIOS 1.4.0 [https://github.com/dell/libsmbios/issues/48 there was an issue] that prevented the user from changing the timeout on AC. A kernel workaround was added in 4.18 and it was eventually fixed by BIOS 1.4.0.<br />
<br />
== Power Management ==<br />
<br />
If the laptop seems to have an high drain when in sleep mode. As a possible workaround, you can set the machine to enter S3 deep sleep mode. Add {{ic|1=quiet mem_sleep_default=deep}} to the [[Kernel parameters]].<br />
<br />
According to the manufacturer (see [https://bugzilla.kernel.org/show_bug.cgi?id=199689 this upstream kernel bug]), the machine uses S2 intentionally instead of S3, and they are working towards fixing the power drain on S2.<br />
<br />
Note: on older BIOS and/or kernel versions [https://www.spinics.net/lists/platform-driver-x86/msg15644.html the power button cannot be used to wake the laptop from sleep]. In this case the Sleep button (Fn + End, or just End if you have Fn lock enabled) can still wake up the machine. This has been fixed by a BIOS update.<br />
<br />
== Firmware Updates ==<br />
<br />
Dell provides firmware updates via Linux Vendor Firmware Service (LVFS). Refer to [[Flashing BIOS from Linux#fwupd]] for additional information. A package is readily available at {{Pkg|fwupd}}. Updates are provided for the Thunderbolt controller as well. [https://github.com/dell/thunderbolt-nvm-linux/issues/10 There is an issue] where the Thunderbolt version number is detected as {{ic|1=00.00}} after reflashing (currently being investigated).<br />
<br />
Dell has also released updates to the SSD firmware, but these can only be updated from Windows, not from Linux.<br />
<br />
== Thermal Throttling ==<br />
By default thermal throttling activates around 80C resulting in maximum sustained CPU frequency around 2.4Ghz, much lower than in Dell's standard Windows installation. <br />
Package temperature above threshold, cpu clock throttled (total events = 971)<br />
<br />
This can be resolved using {{AUR|lenovo-throttling-fix-git}}. Despite originally conceived to resolve the same issue with Lenovo laptops, it works with the XPS 9370 (and should work well with other Skylake or newer laptops).<br />
<br />
== Thermal Modes / Fan profiles ==<br />
Just like in Windows by using Dell Power Manager you can set the thermal configuration and behaviour of the fans of your machine. This is done within a terminal with the following commands.<br />
<br />
To find out what thermal mode is set type:<br />
<br />
# smbios-thermal-ctl -g<br />
<br />
To find all available thermal modes type:<br />
<br />
# smbios-thermal-ctl -i<br />
<br />
And finally to set the desired thermal mode that you identified with the command before type:<br />
<br />
# smbios-thermal-ctl --set-thermal-mode=THERMAL_MODE<br />
<br />
== Power Saving ==<br />
To save more battery use [[tlp]] package<br />
AND/OR [[Powertop]].<br />
<br />
You can monitor the used power and also the temperature of your machine with the {{AUR|s-tui}} tool.<br />
<br />
== Touchpad ==<br />
<br />
=== Cursor Jump ===<br />
<br />
The touchpad can sometimes produce a "cursor jump". Sometimes this is detected and worked around by libinput, resulting in a similar journal entry:<br />
<br />
libinput error: event12 - DELL07E6:00 06CB:76AF Touchpad: kernel bug: Touch jump detected and discarded.<br />
<br />
There is a [https://gitlab.freedesktop.org/libinput/libinput/issues/36 libinput bug about this] where the conclusion was that this is probably a hardware issue or a bug in the kernel driver.<br />
<br />
=== Sensitivity ===<br />
<br />
By default, the [[libinput]] driver might not have the desired sensitivity. The acceleration can be changed via [[xinput]] as follows:<br />
<br />
xinput --set-prop $(xinput | grep 'DELL.*Touchpad' | awk '{print $6}' | sed 's/id=//g') 'libinput Accel Speed' 0.5<br />
<br />
== Audio ==<br />
<br />
Works correctly, but the audio controller cannot figure out what kind of device is plugged into the jack on its own. For this reason the desktop environment (eg. Gnome) will pop up a dialog where you can choose if it was a headset, or microphone, etc.<br />
<br />
== USB Type-C ports ==<br />
<br />
The 9370 has only three Type-C ports (and no other ports, just an audio jack). Two of these (on the left side) support Thunderbolt 3. There is no power jack. A 45 W USB Type-C charger is included in the box. Any of the three Type-C ports can be used for charging. Since the laptop has no USB-A ports, one Dell-branded Type-C to A adapter is included.<br />
<br />
Also all three Type-C ports support DisplayPort alternate mode. It is taken care of by the firmware, so it will work even with older kernels that do not otherwise support it. To the operating system it appears as if the laptop had two DisplayPort connectors (in addition to the embedded DP that the internal screen uses). So far I've tested the following adapters. All of these will appear to the operating system as if you plugged something into one of the DP connectors.<br />
<br />
* [https://www.club-3d.com/en/detail/2350/usb_3.1_type_c_to_displayport_1.2/ Club3D Type-C to DisplayPort 1.2 adapter] (tested with 1080p and 4K, both work at 60 Hz)<br />
* [https://www.dell.com/en-us/shop/dell-adapter-usb-c-to-vga/apd/470-abnc/pc-accessories Dell Type-C to VGA adapter] (tested with 1080p at 60 Hz)<br />
* [https://www.dell.com/en-us/work/shop/dell-adapter-usb-c-to-hdmi/apd/470-abmz/pc-accessories Dell Type-C to HDMI adapter] (tested with 1080p and 4K, both work at 60 Hz)<br />
* [https://www.moshi.com/en/product/usb-c-to-hdmi-adapter/silver Moshi USB-C to HDMI Adapter] (tested with 1080p and 4K, both work at 60 Hz)<br />
<br />
== Fingerprint reader ==<br />
<br />
The fingerprint reader is not supported. There is a [https://gitlab.freedesktop.org/libfprint/libfprint/issues/43 libfprint feature request].</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=293564Install Arch Linux from existing Linux2014-01-19T10:50:57Z<p>Bzhb: /* Arch Linux-based chroot */</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[de:Schnellinstallation von einem bestehenden Linuxsystem]]<br />
[[es:Install from Existing Linux]]<br />
[[fr:Install chroot]]<br />
[[it:Install from Existing Linux]]<br />
[[pt:Install from Existing Linux]]<br />
[[ru:Install from Existing Linux]]<br />
[[uk:Install from Existing Linux]]<br />
[[zh-CN:Install from Existing Linux]]<br />
[[zh-TW:Install from Existing Linux]]<br />
This document describes the bootstrapping process required to install Arch Linux from a running Linux host system.<br />
After bootstrapping, the installation proceeds as described in the [[Installation Guide]].<br />
<br />
Installing Arch Linux from a running Linux is useful for:<br />
* remotely installing Arch Linux, e.g. a (virtual) root server<br />
* replacing an existing Linux without a LiveCD (see [[#Replacing the Existing System without a LiveCD]])<br />
* creating a new Linux distribution or LiveCD based on Arch Linux<br />
* creating an Arch Linux chroot environment, e.g. for a Docker base container<br />
* [[Diskless_network_boot_NFS_root|rootfs-over-NFS for diskless machines]]<br />
<br />
The goal of the bootstrapping procedure is to setup an environment from which {{Pkg|arch-install-scripts}} (such as {{ic|pacstrap}} and {{ic|arch-root}}) run.<br />
This goal is achieved by installing {{Pkg|arch-install-scripts}} natively on the host system, or setting up an Arch Linux-based chroot.<br />
<br />
If the host system runs Arch Linux, installing {{Pkg|arch-install-scripts}} is straightforward.<br />
<br />
On other distributions, the process is more complicated (described in [[#Alternative: Install arch-install-scripts natively on non Arch distro]]).<br />
For these distributions, it is recommended to set up a chroot instead.<br />
<br />
{{Note|This guide requires that the existing host system be able to execute the new target Arch Linux architecture programs. In the case of an x86_64 host, it is possible to use i686-pacman to build a 32-bit chroot environment. See [[Arch64 Install bundled 32bit system]]. However it is not so easy to build a 64-bit environment when the host only supports running 32-bit programs.}}<br />
<br />
==Arch Linux-based chroot==<br />
The idea is to run an Arch system inside the host system.<br />
The actual installation is then executed from this Arch system.<br />
This nested system is contained inside a chroot.<br />
Three methods to setup and enter this chroot are presented below, from the easiest to the most complicated.<br />
<br />
{{Note|Your host system must run Linux 2.6.32 or later.}}<br />
<br />
===Method 1: Using the Bootstrap Image===<br />
<br />
Download the bootstrap image from a [https://www.archlinux.org/download mirror]:<br />
curl -O http://mirrors.kernel.org/archlinux/iso/2014.01.05/archlinux-bootstrap-2014.01.05-x86_64.tar.gz<br />
or for i686:<br />
curl -O http://mirrors.kernel.org/archlinux/iso/2014.01.05/archlinux-bootstrap-2014.01.05-i686.tar.gz<br />
Or use wget if curl is not installed:<br />
wget http://mirrors.kernel.org/archlinux/iso/2013.12.01/archlinux-bootstrap-2014.01.05-x86_64.tar.gz<br />
Extract the tarball:<br />
# cd /tmp<br />
# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-2014.01.05-x86_64.tar.gz<br />
Select a repository server:<br />
# nano /tmp/root.x86_64/etc/pacman.d/mirrorlist<br />
Enter the chroot<br />
* If you have bash 4 or later installed:<br />
# /tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/<br />
* Else run the following commands:<br />
# cp /etc/resolv.conf /tmp/root.x86_64/etc<br />
# mount --rbind /proc /tmp/root.x86_64/proc<br />
# mount --rbind /sys /tmp/root.x86_64/sys<br />
# mount --rbind /dev /tmp/root.x86_64/dev<br />
# mount --rbind /run /tmp/root.x86_64/run<br />
(assuming /run exists on your system)<br />
# chroot /tmp/root.x86_64/<br />
<br />
===Method 2: Using the LiveCD Image===<br />
<br />
It is possible to mount the root image of the latest Arch Linux installation media and then chroot into it. This method has the advantage of providing you with a working Arch Linux installation right within your host system without the need to prepare it by installing specific packages.<br />
<br />
{{Note|Before proceeding, make sure the latest version of [http://squashfs.sourceforge.net/ squashfs] is installed on the host system. Otherwise you will get errors like: {{ic|FATAL ERROR aborting: uncompress_inode_table: failed to read block}}.}}<br />
<br />
* The root image can be found on one of the [https://www.archlinux.org/download mirrors] under either arch/x86_64/ or arch/i686/ depending on the desired architecture. The squashfs format is not editable so we unsquash the root image and then mount it.<br />
<br />
*To unsquash the root image, run<br />
{{bc|# unsquashfs -d /squashfs-root root-image.fs.sfs}}<br />
<br />
* Now you can loop mount the root image<br />
{{bc|<br />
# mkdir /arch<br />
# mount -o loop /squashfs-root/root-image.fs /arch<br />
}}<br />
<br />
* Before [[Change Root|chrooting]] to it, we need to set up some mount points and copy the resolv.conf for networking.<br />
{{bc|<br />
# mount -t proc none /arch/proc<br />
# mount -t sysfs none /arch/sys<br />
# mount -o bind /dev /arch/dev<br />
# mount -o bind /dev/pts /arch/dev/pts # important for pacman (for signature check)<br />
# cp -L /etc/resolv.conf /arch/etc #this is needed to use networking within the chroot<br />
}}<br />
<br />
* Now everything is prepared to chroot into your newly installed Arch environment<br />
{{bc|# chroot /arch bash}}<br />
<br />
===Method 3: Assembling the chroot Manually (with a script)===<br />
<br />
The script creates a directory called {{ic|archinstall-pkg}} and downloads the required packages in it. It then extracts them in the {{ic|archinstall-chroot}} directory. Finally, it prepares mount points, configures pacman and enters a chroot.<br />
<br />
{{hc|archinstall-bootstrap.sh|<nowiki><br />
#!/bin/bash<br />
# last edited 04. January 2014<br />
# This script is inspired on the archbootstrap script.<br />
<br />
# old PACKAGES=(acl attr bzip2 curl expat glibc gpgme gnupg libarchive libassuan libgcrypt libgpg-error libssh2 lzo2 openssl pacman xz zlib pacman-mirrorlist coreutils bash grep gawk file filesystem tar ncurses readline libcap util-linux pcre arch-install-scripts)<br />
FIRST_PACKAGE=(filesystem)<br />
BASH_PACKAGES=(glibc ncurses readline bash)<br />
PACMAN_PACKAGES=(acl archlinux-keyring attr bzip2 curl expat gnupg gpgme libarchive libassuan libgpg-error libgcrypt libssh2 lzo2 openssl pacman pacman-mirrorlist xz zlib)<br />
EXTRA_PACKAGES=(coreutils tar libcap arch-install-scripts util-linux systemd)<br />
PACKAGES=(${FIRST_PACKAGE[*]} ${BASH_PACKAGES[*]} ${PACMAN_PACKAGES[*]} ${EXTRA_PACKAGES[*]})<br />
<br />
# Enable the mirror which best fits for you<br />
# USA<br />
# MIRROR='http://mirrors.kernel.org/archlinux' <br />
# Germany<br />
# MIRROR='http://archlinux.limun.org'<br />
<br />
# You can set the ARCH variable to i686 or x86_64<br />
ARCH=`uname -m`<br />
LIST=`mktemp`<br />
CHROOT_DIR=archinstall-chroot<br />
DIR=archinstall-pkg<br />
mkdir -p "$DIR"<br />
mkdir -p "$CHROOT_DIR"<br />
# Create a list with urls for the arch packages<br />
for REPO in core community extra; do <br />
wget -q -O- "$MIRROR/$REPO/os/$ARCH/" |sed -n "s|.*href=\"\\([^\"]*\\).*|$MIRROR\\/$REPO\\/os\\/$ARCH\\/\\1|p"|grep -v 'sig$'|uniq >> $LIST <br />
done<br />
# Download and extract each package.<br />
for PACKAGE in ${PACKAGES[*]}; do<br />
URL=`grep "$PACKAGE-[0-9]" $LIST|head -n1`<br />
FILE=`echo $URL|sed 's/.*\/\([^\/][^\/]*\)$/\1/'`<br />
wget "$URL" -c -O "$DIR/$FILE" <br />
xz -dc "$DIR/$FILE" | tar x -k -C "$CHROOT_DIR"<br />
<br />
# No error if they exist already<br />
if [ -f "$CHROOT_DIR/.PKGINFO" ]<br />
then <br />
rm "$CHROOT_DIR/.PKGINFO" <br />
fi <br />
if [ -f "$CHROOT_DIR/.MTREE" ]<br />
then <br />
rm "$CHROOT_DIR/.MTREE" <br />
fi <br />
if [ -f "$CHROOT_DIR/.INSTALL" ]<br />
then <br />
rm "$CHROOT_DIR/.INSTALL" <br />
fi <br />
done<br />
# Create mount points<br />
mkdir -p "$CHROOT_DIR/dev" "$CHROOT_DIR/proc" "$CHROOT_DIR/sys" "$CHROOT_DIR/mnt"<br />
mount -t proc proc "$CHROOT_DIR/proc/"<br />
mount -t sysfs sys "$CHROOT_DIR/sys/"<br />
mount -o bind /dev "$CHROOT_DIR/dev/"<br />
mkdir -p "$CHROOT_DIR/dev/pts"<br />
mount -t devpts pts "$CHROOT_DIR/dev/pts/"<br />
<br />
# Hash for empty password Created by doing: openssl passwd -1 -salt ihlrowCo and entering an empty password (just press enter)<br />
echo 'root:$1$ihlrowCo$sF0HjA9E8up9DYs258uDQ0:10063:0:99999:7:::' > "$CHROOT_DIR/etc/shadow"<br />
echo "root:x:0:0:root:/root:/bin/bash" > "$CHROOT_DIR/etc/passwd" <br />
touch "$CHROOT_DIR/etc/group"<br />
echo "myhost" > "$CHROOT_DIR/etc/hostname"<br />
test -e "$CHROOT_DIR/etc/mtab" || echo "rootfs / rootfs rw 0 0" > "$CHROOT_DIR/etc/mtab"<br />
[ -f "/etc/resolv.conf" ] && cp "/etc/resolv.conf" "$CHROOT_DIR/etc/"<br />
<br />
# Do you really want to switch the tests off?<br />
#sed -ni '/^[ \t]*CheckSpace/ !p' "$CHROOT_DIR/etc/pacman.conf"<br />
#sed -i "s/^[ \t]*SigLevel[ \t].*/SigLevel = Never/" "$CHROOT_DIR/etc/pacman.conf"<br />
<br />
echo "Server = $MIRROR/\$repo/os/$ARCH" >> "$CHROOT_DIR/etc/pacman.d/mirrorlist"<br />
<br />
chroot $CHROOT_DIR /usr/bin/pacman -Sy <br />
chroot $CHROOT_DIR /bin/bash<br />
</nowiki>}}<br />
<br />
===Using the chroot Environment===<br />
<br />
====Initializing pacman keyring====<br />
Before starting the installation, pacman keys need to be setup. Before running the following two commands read [[pacman-key#Initializing the keyring]] to understand the entropy requirements:<br />
{{bc|<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
}}<br />
<br />
====Installation====<br />
Follow the [[Installation Guide#Mount the partitions|Mount the partitions]] and [[Installation Guide#Install the base system|Install the base system]] sections of the [[Installation Guide]].<br />
<br />
=====Debian-based host=====<br />
On Debian-based host systems, {{ic|pacstrap}} produces the following error:<br />
# pacstrap /mnt base<br />
# ==> Creating install root at /mnt<br />
# mount: mount point /mnt/dev/shm is a symbolic link to nowhere<br />
# ==> ERROR: failed to setup API filesystems in new root<br />
<br />
In Debian, /dev/shm points to /run/shm. However, in the Arch-based chroot, /run/shm does not exist and the link is broken. To correct this error, create a directory /run/shm:<br />
# mkdir /run/shm<br />
<br />
====Configure the system====<br />
<br />
From that point, simply follow the [[Installation Guide#Mount the partitions|Mount the partitions]] section of the [[Installation Guide]] and following sections.<br />
<br />
==Alternative: Install arch-install-scripts natively on non Arch distro==<br />
{{Deletion|This method is overkill after Arch provide Bootstrap image.}}<br />
{{Warning|This method is potentially difficult, your mileage may vary from distro to distro.}}<br />
<br />
==== Download pacman source code and pacman packages ====<br />
Visit the pacman homepage: https://www.archlinux.org/pacman/#_releases and download the latest release.<br />
<br />
Now, download the following packages:<br />
<br />
* pacman-mirrorlist: https://www.archlinux.org/packages/core/any/pacman-mirrorlist/download/<br />
* arch-install-scripts: https://www.archlinux.org/packages/extra/any/arch-install-scripts/download/<br />
* pacman (necessary for the config files): https://www.archlinux.org/packages/core/x86_64/pacman/download/ (change x86_64 as necessary)<br />
<br />
==== Install dependencies ====<br />
Using your distribution mechanisms, install the required packages for pacman and the arch install scripts. libcurl, libarchive, fakeroot, xz, asciidoc, wget, and sed are among them. Of course, gcc, make and maybe some other "devel" packages are necessary too.<br />
<br />
==== Compile pacman ====<br />
<br />
* Decompress the pacman source code and cd inside.<br />
* Execute configure, adapting the paths as necessary: {{bc|<nowiki> ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc</nowiki>}}<br />
If you get errors here, chances are you are missing dependencies, or your current libcurl, libarchive or others, are too old. Install the dependencies missing using your distro options, or if they are too old, compile them from source.<br />
* Compile {{bc|make}}<br />
* If there were no errors, install the files {{bc|make install}}<br />
* You may need to manually call {{ic|ldconfig}} to make your distro detect libalpm.<br />
==== Prepare configuration files ====<br />
Now is time to extract the configuration files. Change the x86_64 as necessary.<br />
* Extract the pacman.conf and makepkg.conf files from the pacman package, and disable signature checking: {{bc|<nowiki>tar xJvf pacman-*-x86_64.pkg.tar.xz etc -C / ; sed -i 's/SigLevel.*/SigLevel = Never/g' /etc/pacman.conf</nowiki>}}<br />
* Extract the mirror list: {{bc|tar xJvf pacman-mirrorlist-*-any.pkg.tar.xz -C /}}<br />
* Enable some mirrors on {{ic|/etc/pacman.d/mirrorlist}}<br />
* Extract the arch-install-scripts {{bc|tar xJvf arch-install-scripts-*-any.pkg.tar.xz -C /}}<br />
<br />
Another option is using the {{ic|alien}} tool to convert the {{ic|pacman-mirrorlist}} and {{ic|arch-install-scripts}} (but no {{ic|pacman}}) to native packages of your distro.<br />
<br />
==Replacing the Existing System without a LiveCD==<br />
Find ~500MB of free space somewhere on the disk, e.g. by partitioning a swap partition.<br />
Install the new Arch Linux system there, reboot into the newly created system, and [[Full_System_Backup_with_rsync#With_a_single_command|rsync the entire system]] to the primary partition.<br />
Fix the bootloader configuration before rebooting.</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=293563Install Arch Linux from existing Linux2014-01-19T10:49:51Z<p>Bzhb: /* Method 1: Using the Bootstrap Image */</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[de:Schnellinstallation von einem bestehenden Linuxsystem]]<br />
[[es:Install from Existing Linux]]<br />
[[fr:Install chroot]]<br />
[[it:Install from Existing Linux]]<br />
[[pt:Install from Existing Linux]]<br />
[[ru:Install from Existing Linux]]<br />
[[uk:Install from Existing Linux]]<br />
[[zh-CN:Install from Existing Linux]]<br />
[[zh-TW:Install from Existing Linux]]<br />
This document describes the bootstrapping process required to install Arch Linux from a running Linux host system.<br />
After bootstrapping, the installation proceeds as described in the [[Installation Guide]].<br />
<br />
Installing Arch Linux from a running Linux is useful for:<br />
* remotely installing Arch Linux, e.g. a (virtual) root server<br />
* replacing an existing Linux without a LiveCD (see [[#Replacing the Existing System without a LiveCD]])<br />
* creating a new Linux distribution or LiveCD based on Arch Linux<br />
* creating an Arch Linux chroot environment, e.g. for a Docker base container<br />
* [[Diskless_network_boot_NFS_root|rootfs-over-NFS for diskless machines]]<br />
<br />
The goal of the bootstrapping procedure is to setup an environment from which {{Pkg|arch-install-scripts}} (such as {{ic|pacstrap}} and {{ic|arch-root}}) run.<br />
This goal is achieved by installing {{Pkg|arch-install-scripts}} natively on the host system, or setting up an Arch Linux-based chroot.<br />
<br />
If the host system runs Arch Linux, installing {{Pkg|arch-install-scripts}} is straightforward.<br />
<br />
On other distributions, the process is more complicated (described in [[#Alternative: Install arch-install-scripts natively on non Arch distro]]).<br />
For these distributions, it is recommended to set up a chroot instead.<br />
<br />
{{Note|This guide requires that the existing host system be able to execute the new target Arch Linux architecture programs. In the case of an x86_64 host, it is possible to use i686-pacman to build a 32-bit chroot environment. See [[Arch64 Install bundled 32bit system]]. However it is not so easy to build a 64-bit environment when the host only supports running 32-bit programs.}}<br />
<br />
==Arch Linux-based chroot==<br />
The idea is to run an Arch system inside the host system.<br />
The actual installation is then executed from this Arch system.<br />
This nested system is contained inside a chroot.<br />
Three methods to setup and enter this chroot are presented below, from the easiest to the most complicated.<br />
<br />
{{Note|Your host system must run Linux 2.6.32 or later.}}<br />
<br />
===Method 1: Using the Bootstrap Image===<br />
<br />
Download the bootstrap image from a [https://www.archlinux.org/download mirror]:<br />
curl -O http://mirrors.kernel.org/archlinux/iso/2014.01.05/archlinux-bootstrap-2014.01.05-x86_64.tar.gz<br />
or for i686:<br />
curl -O http://mirrors.kernel.org/archlinux/iso/2014.01.05/archlinux-bootstrap-2014.01.05-i686.tar.gz<br />
Or use wget if curl is not installed:<br />
wget http://mirrors.kernel.org/archlinux/iso/2013.12.01/archlinux-bootstrap-2014.01.05-x86_64.tar.gz<br />
Extract the tarball:<br />
# cd /tmp<br />
# tar xzf <path-to-bootstrap-image>/archlinux-bootstrap-2013.2013.12.0112.01-x86_64.tar.gz<br />
Select a repository server:<br />
# nano /tmp/root.x86_64/etc/pacman.d/mirrorlist<br />
Enter the chroot<br />
* If you have bash 4 or later installed:<br />
# /tmp/root.x86_64/bin/arch-chroot /tmp/root.x86_64/<br />
* Else run the following commands:<br />
# cp /etc/resolv.conf /tmp/root.x86_64/etc<br />
# mount --rbind /proc /tmp/root.x86_64/proc<br />
# mount --rbind /sys /tmp/root.x86_64/sys<br />
# mount --rbind /dev /tmp/root.x86_64/dev<br />
# mount --rbind /run /tmp/root.x86_64/run<br />
(assuming /run exists on your system)<br />
# chroot /tmp/root.x86_64/<br />
<br />
===Method 2: Using the LiveCD Image===<br />
<br />
It is possible to mount the root image of the latest Arch Linux installation media and then chroot into it. This method has the advantage of providing you with a working Arch Linux installation right within your host system without the need to prepare it by installing specific packages.<br />
<br />
{{Note|Before proceeding, make sure the latest version of [http://squashfs.sourceforge.net/ squashfs] is installed on the host system. Otherwise you will get errors like: {{ic|FATAL ERROR aborting: uncompress_inode_table: failed to read block}}.}}<br />
<br />
* The root image can be found on one of the [https://www.archlinux.org/download mirrors] under either arch/x86_64/ or arch/i686/ depending on the desired architecture. The squashfs format is not editable so we unsquash the root image and then mount it.<br />
<br />
*To unsquash the root image, run<br />
{{bc|# unsquashfs -d /squashfs-root root-image.fs.sfs}}<br />
<br />
* Now you can loop mount the root image<br />
{{bc|<br />
# mkdir /arch<br />
# mount -o loop /squashfs-root/root-image.fs /arch<br />
}}<br />
<br />
* Before [[Change Root|chrooting]] to it, we need to set up some mount points and copy the resolv.conf for networking.<br />
{{bc|<br />
# mount -t proc none /arch/proc<br />
# mount -t sysfs none /arch/sys<br />
# mount -o bind /dev /arch/dev<br />
# mount -o bind /dev/pts /arch/dev/pts # important for pacman (for signature check)<br />
# cp -L /etc/resolv.conf /arch/etc #this is needed to use networking within the chroot<br />
}}<br />
<br />
* Now everything is prepared to chroot into your newly installed Arch environment<br />
{{bc|# chroot /arch bash}}<br />
<br />
===Method 3: Assembling the chroot Manually (with a script)===<br />
<br />
The script creates a directory called {{ic|archinstall-pkg}} and downloads the required packages in it. It then extracts them in the {{ic|archinstall-chroot}} directory. Finally, it prepares mount points, configures pacman and enters a chroot.<br />
<br />
{{hc|archinstall-bootstrap.sh|<nowiki><br />
#!/bin/bash<br />
# last edited 04. January 2014<br />
# This script is inspired on the archbootstrap script.<br />
<br />
# old PACKAGES=(acl attr bzip2 curl expat glibc gpgme gnupg libarchive libassuan libgcrypt libgpg-error libssh2 lzo2 openssl pacman xz zlib pacman-mirrorlist coreutils bash grep gawk file filesystem tar ncurses readline libcap util-linux pcre arch-install-scripts)<br />
FIRST_PACKAGE=(filesystem)<br />
BASH_PACKAGES=(glibc ncurses readline bash)<br />
PACMAN_PACKAGES=(acl archlinux-keyring attr bzip2 curl expat gnupg gpgme libarchive libassuan libgpg-error libgcrypt libssh2 lzo2 openssl pacman pacman-mirrorlist xz zlib)<br />
EXTRA_PACKAGES=(coreutils tar libcap arch-install-scripts util-linux systemd)<br />
PACKAGES=(${FIRST_PACKAGE[*]} ${BASH_PACKAGES[*]} ${PACMAN_PACKAGES[*]} ${EXTRA_PACKAGES[*]})<br />
<br />
# Enable the mirror which best fits for you<br />
# USA<br />
# MIRROR='http://mirrors.kernel.org/archlinux' <br />
# Germany<br />
# MIRROR='http://archlinux.limun.org'<br />
<br />
# You can set the ARCH variable to i686 or x86_64<br />
ARCH=`uname -m`<br />
LIST=`mktemp`<br />
CHROOT_DIR=archinstall-chroot<br />
DIR=archinstall-pkg<br />
mkdir -p "$DIR"<br />
mkdir -p "$CHROOT_DIR"<br />
# Create a list with urls for the arch packages<br />
for REPO in core community extra; do <br />
wget -q -O- "$MIRROR/$REPO/os/$ARCH/" |sed -n "s|.*href=\"\\([^\"]*\\).*|$MIRROR\\/$REPO\\/os\\/$ARCH\\/\\1|p"|grep -v 'sig$'|uniq >> $LIST <br />
done<br />
# Download and extract each package.<br />
for PACKAGE in ${PACKAGES[*]}; do<br />
URL=`grep "$PACKAGE-[0-9]" $LIST|head -n1`<br />
FILE=`echo $URL|sed 's/.*\/\([^\/][^\/]*\)$/\1/'`<br />
wget "$URL" -c -O "$DIR/$FILE" <br />
xz -dc "$DIR/$FILE" | tar x -k -C "$CHROOT_DIR"<br />
<br />
# No error if they exist already<br />
if [ -f "$CHROOT_DIR/.PKGINFO" ]<br />
then <br />
rm "$CHROOT_DIR/.PKGINFO" <br />
fi <br />
if [ -f "$CHROOT_DIR/.MTREE" ]<br />
then <br />
rm "$CHROOT_DIR/.MTREE" <br />
fi <br />
if [ -f "$CHROOT_DIR/.INSTALL" ]<br />
then <br />
rm "$CHROOT_DIR/.INSTALL" <br />
fi <br />
done<br />
# Create mount points<br />
mkdir -p "$CHROOT_DIR/dev" "$CHROOT_DIR/proc" "$CHROOT_DIR/sys" "$CHROOT_DIR/mnt"<br />
mount -t proc proc "$CHROOT_DIR/proc/"<br />
mount -t sysfs sys "$CHROOT_DIR/sys/"<br />
mount -o bind /dev "$CHROOT_DIR/dev/"<br />
mkdir -p "$CHROOT_DIR/dev/pts"<br />
mount -t devpts pts "$CHROOT_DIR/dev/pts/"<br />
<br />
# Hash for empty password Created by doing: openssl passwd -1 -salt ihlrowCo and entering an empty password (just press enter)<br />
echo 'root:$1$ihlrowCo$sF0HjA9E8up9DYs258uDQ0:10063:0:99999:7:::' > "$CHROOT_DIR/etc/shadow"<br />
echo "root:x:0:0:root:/root:/bin/bash" > "$CHROOT_DIR/etc/passwd" <br />
touch "$CHROOT_DIR/etc/group"<br />
echo "myhost" > "$CHROOT_DIR/etc/hostname"<br />
test -e "$CHROOT_DIR/etc/mtab" || echo "rootfs / rootfs rw 0 0" > "$CHROOT_DIR/etc/mtab"<br />
[ -f "/etc/resolv.conf" ] && cp "/etc/resolv.conf" "$CHROOT_DIR/etc/"<br />
<br />
# Do you really want to switch the tests off?<br />
#sed -ni '/^[ \t]*CheckSpace/ !p' "$CHROOT_DIR/etc/pacman.conf"<br />
#sed -i "s/^[ \t]*SigLevel[ \t].*/SigLevel = Never/" "$CHROOT_DIR/etc/pacman.conf"<br />
<br />
echo "Server = $MIRROR/\$repo/os/$ARCH" >> "$CHROOT_DIR/etc/pacman.d/mirrorlist"<br />
<br />
chroot $CHROOT_DIR /usr/bin/pacman -Sy <br />
chroot $CHROOT_DIR /bin/bash<br />
</nowiki>}}<br />
<br />
===Using the chroot Environment===<br />
<br />
====Initializing pacman keyring====<br />
Before starting the installation, pacman keys need to be setup. Before running the following two commands read [[pacman-key#Initializing the keyring]] to understand the entropy requirements:<br />
{{bc|<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
}}<br />
<br />
====Installation====<br />
Follow the [[Installation Guide#Mount the partitions|Mount the partitions]] and [[Installation Guide#Install the base system|Install the base system]] sections of the [[Installation Guide]].<br />
<br />
=====Debian-based host=====<br />
On Debian-based host systems, {{ic|pacstrap}} produces the following error:<br />
# pacstrap /mnt base<br />
# ==> Creating install root at /mnt<br />
# mount: mount point /mnt/dev/shm is a symbolic link to nowhere<br />
# ==> ERROR: failed to setup API filesystems in new root<br />
<br />
In Debian, /dev/shm points to /run/shm. However, in the Arch-based chroot, /run/shm does not exist and the link is broken. To correct this error, create a directory /run/shm:<br />
# mkdir /run/shm<br />
<br />
====Configure the system====<br />
<br />
From that point, simply follow the [[Installation Guide#Mount the partitions|Mount the partitions]] section of the [[Installation Guide]] and following sections.<br />
<br />
==Alternative: Install arch-install-scripts natively on non Arch distro==<br />
{{Deletion|This method is overkill after Arch provide Bootstrap image.}}<br />
{{Warning|This method is potentially difficult, your mileage may vary from distro to distro.}}<br />
<br />
==== Download pacman source code and pacman packages ====<br />
Visit the pacman homepage: https://www.archlinux.org/pacman/#_releases and download the latest release.<br />
<br />
Now, download the following packages:<br />
<br />
* pacman-mirrorlist: https://www.archlinux.org/packages/core/any/pacman-mirrorlist/download/<br />
* arch-install-scripts: https://www.archlinux.org/packages/extra/any/arch-install-scripts/download/<br />
* pacman (necessary for the config files): https://www.archlinux.org/packages/core/x86_64/pacman/download/ (change x86_64 as necessary)<br />
<br />
==== Install dependencies ====<br />
Using your distribution mechanisms, install the required packages for pacman and the arch install scripts. libcurl, libarchive, fakeroot, xz, asciidoc, wget, and sed are among them. Of course, gcc, make and maybe some other "devel" packages are necessary too.<br />
<br />
==== Compile pacman ====<br />
<br />
* Decompress the pacman source code and cd inside.<br />
* Execute configure, adapting the paths as necessary: {{bc|<nowiki> ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc</nowiki>}}<br />
If you get errors here, chances are you are missing dependencies, or your current libcurl, libarchive or others, are too old. Install the dependencies missing using your distro options, or if they are too old, compile them from source.<br />
* Compile {{bc|make}}<br />
* If there were no errors, install the files {{bc|make install}}<br />
* You may need to manually call {{ic|ldconfig}} to make your distro detect libalpm.<br />
==== Prepare configuration files ====<br />
Now is time to extract the configuration files. Change the x86_64 as necessary.<br />
* Extract the pacman.conf and makepkg.conf files from the pacman package, and disable signature checking: {{bc|<nowiki>tar xJvf pacman-*-x86_64.pkg.tar.xz etc -C / ; sed -i 's/SigLevel.*/SigLevel = Never/g' /etc/pacman.conf</nowiki>}}<br />
* Extract the mirror list: {{bc|tar xJvf pacman-mirrorlist-*-any.pkg.tar.xz -C /}}<br />
* Enable some mirrors on {{ic|/etc/pacman.d/mirrorlist}}<br />
* Extract the arch-install-scripts {{bc|tar xJvf arch-install-scripts-*-any.pkg.tar.xz -C /}}<br />
<br />
Another option is using the {{ic|alien}} tool to convert the {{ic|pacman-mirrorlist}} and {{ic|arch-install-scripts}} (but no {{ic|pacman}}) to native packages of your distro.<br />
<br />
==Replacing the Existing System without a LiveCD==<br />
Find ~500MB of free space somewhere on the disk, e.g. by partitioning a swap partition.<br />
Install the new Arch Linux system there, reboot into the newly created system, and [[Full_System_Backup_with_rsync#With_a_single_command|rsync the entire system]] to the primary partition.<br />
Fix the bootloader configuration before rebooting.</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=244812ASUS Zenbook Prime UX31A2013-01-22T13:38:06Z<p>Bzhb: /* Screen backlight */</p>
<hr />
<div>{{poor writing|reason=This should '''only''' have information specific to the hardware. Other content should not be duplicated here.}}<br />
[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
To install Arch Linux on UX31A, you can follow the official [[Installation_Guide]]. Since the UX31A uses UEFI and GPT, make sure to also read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages. It is recommended to use [[GRUB]] as a bootloader. To prepare an UEFI USB device, read [[UEFI#Create_UEFI_bootable_USB_from_ISO]].<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
== Kernel Parameters ==<br />
These kernel parameters offer some speed optimizations and longer battery life. It is recommended to enable them. To add kernel paramaters to GRUB2 you have to edit {{ic|/etc/default/grub}} and add them to the GRUB_CMDLINE_LINUX_DEFAULT line.<br />
<br />
{{ic|1=add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1}}<br />
<br />
== Function keys ==<br />
<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.}}<br />
<br />
This table shows the function keys, their intended function, what keycode (if any) X recognizes and whether the function key operates at the BIOS level or if it needs a shortcut.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Keys!! Function !! X sees !! shortcut needed <br />
|-<br />
| {{keypress|Fn+F1}} || Sleep || XF86Sleep || yes <br />
|-<br />
| {{keypress|Fn+F2}} || Turn off WLAN and Bluetooth || XF86WLAN & XF86Bluetooth || no<br />
|-<br />
| {{keypress|Fn+F3}} || Dim keyboard backlight || XF86KbdBrightnessDown || yes<br />
|-<br />
| {{keypress|Fn+F4}} || Brighten keyboard backlight || XF86KbdBrightnessUp || yes<br />
|-<br />
| {{keypress|Fn+F5}} || Dim LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F6}} || Brighten LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F7}} || Turn off LCD || No named key || no<br />
|-<br />
| {{keypress|Fn+F8}} || Toggle display || XF86Display || yes<br />
|-<br />
| {{keypress|Fn+F9}} || Toggle touchpad || XF86TouchpadToggle || yes<br />
|-<br />
| {{keypress|Fn+F10}} || Audio mute/unmute || XF86AudioMute|| yes<br />
|-<br />
| {{keypress|Fn+F11}} || Audio volume down || XF86AudioLowerVolume || yes<br />
|-<br />
| {{keypress|Fn+F12}} || Audio volume up || XF86AudioRaiseVolume || yes<br />
|-<br />
| {{keypress|Fn+a}} || Ambient light sensor || No recognized key ||N/A<br />
|-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes<br />
|-<br />
| {{keypress|Fn+v}} || Webcam || XF86WebCam || yes<br />
|-<br />
| {{keypress|Fn+space}} || Switch power profiles || XF86Launch6 || yes<br />
|}<br />
<br />
=== Screen backlight ===<br />
{{note | Since kernel 3.7.3 screen brightness keys are working out of the box, so this section is legacy and will soon be moved }}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018, UX31A BIOS 206 UGDM Base Address is 0xDA8CE018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
==== Automatic Backlight Control ====<br />
This C program will automatically turn off the backlight after a given idle time, and turn it on proportionally to the screen brightness. Written for Asus N56DP but will probably work here as well. Please email me if not. Note that you must run it as root, or if using some other user, give that user write permission to the backlight brightness file. This program works in plain tty mode as well as in X, but if you're using X you must start the X server first before starting this program, otherwise the X server will hang.<br />
[[User:Hyc|Hyc]] ([[User talk:Hyc|talk]]) 13:24, 16 January 2013 (UTC)<br />
/* Author: Howard Chu <hyc@symas.com> 2013-01-15<br />
*<br />
* monitor keyboard activity and toggle keyboard backlight<br />
* for Asus laptops. Tested on Asus N56DP.<br />
*/<br />
#include <sys/types.h><br />
#include <sys/stat.h><br />
#include <fcntl.h><br />
#include <poll.h><br />
<br />
static char dummybuf[8192];<br />
<br />
/** @brief How many milliseconds before turning off kbd light */<br />
#ifndef IDLE_MSEC<br />
#define IDLE_MSEC 7000<br />
#endif<br />
<br />
int main(int argc, char *argv[])<br />
{<br />
struct pollfd pfd;<br />
int rc, blfd, scfd;<br />
int brt, timeout, prev = -1;<br />
char bm[2] = "0\n";<br />
<br />
scfd = open("/sys/class/backlight/acpi_video0/brightness", O_RDONLY);<br />
blfd = open("/sys/class/leds/asus::kbd_backlight/brightness", O_WRONLY);<br />
pfd.fd = open("/dev/input/by-path/platform-i8042-serio-0-event-kbd", O_RDONLY);<br />
pfd.events = POLLIN;<br />
<br />
timeout = IDLE_MSEC;<br />
while (1) {<br />
rc = poll(&pfd, 1, timeout);<br />
/* Kbd brightness ranges from 0 to 3.<br />
* Screen brightness ranges from 1 to 10.<br />
* Make the keyboard brightness<br />
* depend on the screen brightness.<br />
*<br />
* Assume 10 means working in a bright room.<br />
* In that case, leave the kbd light off.<br />
* map screen 1-9 to kbd 1-3.<br />
*/<br />
if (rc) {<br />
/* got keyboard input, flush it all and<br />
* wait for the next event. Also check<br />
* the screen brightness and set the kbd<br />
* backlight accordingly.<br />
*/<br />
read(pfd.fd, dummybuf, sizeof(dummybuf));<br />
timeout = IDLE_MSEC;<br />
read(scfd, dummybuf, sizeof(dummybuf));<br />
lseek(scfd, 0, SEEK_SET);<br />
brt = atoi(dummybuf);<br />
if (brt == 10) {<br />
brt = 0;<br />
} else {<br />
brt = (brt + 2) / 3;<br />
}<br />
} else {<br />
/* once we've gotten a timeout, turn off<br />
* kbd backlight and wait forever for<br />
* the next keypress<br />
*/<br />
timeout = -1;<br />
brt = 0;<br />
}<br />
if (brt == prev)<br />
continue;<br />
bm[0] = brt + '0';<br />
write(blfd, bm, 2);<br />
lseek(blfd, 0, SEEK_SET);<br />
prev = brt;<br />
}<br />
}<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
== Touchpad ==<br />
[[Touchpad_Synaptics#Buttonless_TouchPads_.28aka_ClickPads.29| Instructions to activate the right button]].<br />
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).<br />
<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
=== Multitouch gestures ===<br />
To have multitouch gestures like on windows you have to install {{AUR|touchegg}} from the AUR. To make it work you have to disable some input handling by synaptics. Edit your {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}<br />
<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "0"<br />
Option "TapButton3" "0"<br />
Option "ClickFinger2" "0"<br />
Option "ClickFinger3" "0"<br />
Option "HorizTwoFingerScroll" "0"<br />
Option "VertTwoFingerScroll" "0"<br />
Option "ClickPad" "true"<br />
Option "EmulateMidButtonTime" "0"<br />
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"<br />
EndSection<br />
<br />
After that you can autostart touchegg by either putting {{ic|touchegg &}} into your .xinitrc or if you use a Desktop Environment you can add {{ic|touchegg}} to the Startup Applications. Then configure the {{ic|~/.config/touchegg/touchegg.conf}} to your liking.<br />
<br />
=== Disable Touchpad While Typing ===<br />
<br />
One of the criticisms this laptop gets (see reviews at Amazon) is that the placement of the touchpad results in frequent touchpad brushing during typing. You should use whatever touchpad disabling method you prefer. See [[ Touchpad_Synaptics#Disable_Trackpad_while_Typing ]].<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
For automatic powersaving when on battery configure [[Laptop_Mode_Tools]]. For manual power saving see [[Power saving]]<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". <br />
<br />
The MEI driver speaks to or through the "Local Manageability Service" or LMS. The LMS driver is available here. Note that with GCC 4.7.2-2, the driver will refuse to compile. I was able to convince it to compile by:<br />
*adding "#include <unistd.h>" to src/tools/ATVersion.cpp<br />
*adding "#include <stdio.h>" to src/tools/ATNetworkTool.cpp<br />
<br />
It then installs the driver file lms in /usr/local/sbin and the init.d-type daemon file lms in /etc/init.d/.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
==BIOS Version Issues==<br />
<br />
It seems that updating the BIOS to versions 215 and higher causes issues with ACPI handling of the battery charge levels. In particular it seems that one cannot charge the battery beyond 91%-93%. The issue does not seem to be present in Windows however. For further details please see the forum thread [https://bbs.archlinux.org/viewtopic.php?pid=1211033#p1211033 here]. The most up to date BIOS version without any issues is 212. Unless it's absolutely necessary, refrain from updating your BIOS.<br />
<br />
==See also==<br />
*[[Power saving]]<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime<br />
*http://ubuntuforums.org/showthread.php?t=2005999<br />
*[[ Wikipedia Zenbook#UX32.2C_UX42_and_UX52 ]]</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=232698ASUS Zenbook Prime UX31A2012-10-31T10:07:22Z<p>Bzhb: /* Screen backlight fix */ fix the script</p>
<hr />
<div>{{poor writing|reason=This should '''only''' have information specific to the hardware. Other content should not be duplicated here.}}<br />
[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader ===<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe efivars<br />
<br />
{{note | running `modprobe efivars' should display a few lines, confirming the success of the module addition. If such "efi variables" are not set up properly, errors will ensue and you won't be able to reboot on your partition correctly. One of the way to have such efi variables is to make a bootable UEFI device using [[UEFI#Create_UEFI_bootable_USB_from_ISO]] and to boot on it properly. }}<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.}}<br />
<br />
This table shows the function keys, their intended function, what keycode (if any) X recognizes and whether the function key operates at the BIOS level or if it needs a shortcut.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Keys!! Function !! X sees !! shortcut needed <br />
|-<br />
| {{keypress|Fn+F1}} || Sleep || XF86Sleep || yes <br />
|-<br />
| {{keypress|Fn+F2}} || Turn off WLAN and Bluetooth || XF86WLAN & XF86Bluetooth || no<br />
|-<br />
| {{keypress|Fn+F3}} || Dim keyboard backlight || XF86KbdBrightnessDown || yes<br />
|-<br />
| {{keypress|Fn+F4}} || Brighten keyboard backlight || XF86KbdBrightnessUp || yes<br />
|-<br />
| {{keypress|Fn+F5}} || Dim LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F6}} || Brighten LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F7}} || Turn off LCD || No named key || no<br />
|-<br />
| {{keypress|Fn+F8}} || Toggle display || XF86Display || yes<br />
|-<br />
| {{keypress|Fn+F9}} || Toggle touchpad || XF86TouchpadToggle || yes<br />
|-<br />
| {{keypress|Fn+F10}} || Audio mute/unmute || XF86AudioMute|| yes<br />
|-<br />
| {{keypress|Fn+F11}} || Audio volume down || XF86AudioLowerVolume || yes<br />
|-<br />
| {{keypress|Fn+F12}} || Audio volume up || XF86AudioRaiseVolume || yes<br />
|-<br />
| {{keypress|Fn+a}} || Ambient light sensor || No recognized key ||N/A<br />
|-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes<br />
|-<br />
| {{keypress|Fn+v}} || Webcam || XF86WebCam || yes<br />
|-<br />
| {{keypress|Fn+space}} || Switch power profiles || XF86Launch6 || yes<br />
|}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018, UX31A BIOS 206 UGDM Base Address is 0xDA8CE018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[[Touchpad_Synaptics#Buttonless_TouchPads_.28aka_ClickPads.29| Instructions to activate the right button]].<br />
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).<br />
<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
=== Disable Touchpad While Typing ===<br />
<br />
One of the criticisms this laptop gets (see reviews at Amazon) is that the placement of the touchpad results in frequent touchpad brushing during typing. You should use whatever touchpad disabling method you prefer. See [[ Touchpad_Synaptics#Disable_Trackpad_while_Typing ]].<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
See [[Power saving]]. Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a helper script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
7)<br />
$0 load<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
echo "7) load"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". <br />
<br />
The MEI driver speaks to or through the "Local Manageability Service" or LMS. The LMS driver is available here. Note that with GCC 4.7.2-2, the driver will refuse to compile. I was able to convince it to compile by:<br />
*adding "#include <unistd.h>" to src/tools/ATVersion.cpp<br />
*adding "#include <stdio.h>" to src/tools/ATNetworkTool.cpp<br />
<br />
It then installs the driver file lms in /usr/local/sbin and the init.d-type daemon file lms in /etc/init.d/.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==See also==<br />
*[[Power saving]]<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime<br />
*http://ubuntuforums.org/showthread.php?t=2005999<br />
*[[ Wikipedia Zenbook#UX32.2C_UX42_and_UX52 ]]</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=231431ASUS Zenbook Prime UX31A2012-10-25T14:14:01Z<p>Bzhb: /* Powersave management */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader ===<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe efivars<br />
<br />
{{note | running `modprobe efivars' should display a few lines, confirming the success of the module addition. If such "efi variables" are not set up properly, errors will ensue and you won't be able to reboot on your partition correctly. One of the way to have such efi variables is to make a bootable UEFI device using [[UEFI#Create_UEFI_bootable_USB_from_ISO]] and to boot on it properly. }}<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.}}<br />
<br />
This table shows the function keys, their intended function, what keycode (if any) X recognizes and whether the function key operates at the BIOS level or if it needs a shortcut.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Keys!! Function !! X sees !! shortcut needed <br />
|-<br />
| {{keypress|Fn+F1}} || Sleep || XF86Sleep || yes <br />
|-<br />
| {{keypress|Fn+F2}} || Turn off WLAN and Bluetooth || XF86WLAN & XF86Bluetooth || no<br />
|-<br />
| {{keypress|Fn+F3}} || Dim keyboard backlight || XF86KbdBrightnessDown || yes<br />
|-<br />
| {{keypress|Fn+F4}} || Brighten keyboard backlight || XF86KbdBrightnessUp || yes<br />
|-<br />
| {{keypress|Fn+F5}} || Dim LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F6}} || Brighten LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F7}} || Turn off LCD || No named key || no<br />
|-<br />
| {{keypress|Fn+F8}} || Toggle display || XF86Display || yes<br />
|-<br />
| {{keypress|Fn+F9}} || Toggle touchpad || XF86TouchpadToggle || yes<br />
|-<br />
| {{keypress|Fn+F10}} || Audio mute/unmute || XF86AudioMute|| yes<br />
|-<br />
| {{keypress|Fn+F11}} || Audio volume down || XF86AudioLowerVolume || yes<br />
|-<br />
| {{keypress|Fn+F12}} || Audio volume up || XF86AudioRaiseVolume || yes<br />
|-<br />
| {{keypress|Fn+a}} || Ambient light sensor || No recognized key ||N/A<br />
|-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes<br />
|-<br />
| {{keypress|Fn+v}} || Webcam || XF86WebCam || yes<br />
|-<br />
| {{keypress|Fn+space}} || Switch power profiles || XF86Launch6 || yes<br />
|}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018, UX31A BIOS 206 UGDM Base Address is 0xDA8CE018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram |-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[[Touchpad_Synaptics#Buttonless_TouchPads_.28aka_ClickPads.29| Instructions to activate the right boutton]].<br />
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).<br />
<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
See [[Power saving]]. Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a helper script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
7)<br />
$0 load<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
echo "7) load"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==See also==<br />
*[[Power saving]]<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Sudo&diff=230393Sudo2012-10-21T13:41:06Z<p>Bzhb: /* Example Entries */</p>
<hr />
<div>[[Category:Security]]<br />
[[cs:Sudo]]<br />
[[es:Sudo]]<br />
[[fr:Sudo]]<br />
[[it:Sudo]]<br />
[[ru:Sudo]]<br />
[[sr:Sudo]]<br />
[[tr:Sudo]]<br />
[[uk:Sudo]]<br />
[[zh-CN:Sudo]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of the popular privilege escalation utility.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Access control overview}}}}<br />
{{Article summary end}}<br />
<br />
{{ic|sudo}} ("substitute user do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.[http://www.gratisoft.us/sudo/]<br />
<br />
== Rationale ==<br />
<br />
Sudo is an alternative to [[su]] for running commands as root. Unlike [[su]], which launches a root shell that allows all further commands root access, sudo instead grants temporary privilege escalation to a single command. By enabling root privileges only when needed, sudo usage reduces the likelyhood that a typo or a bug in an invoked command will ruin the system.<br />
Sudo can also be used to run commands as other users; additionally, sudo logs all commands and failed access attempts for security auditing.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|sudo}} package, available in the [[Official Repositories|official repositories]]:<br />
<br />
# pacman -S sudo<br />
<br />
To begin using {{ic|sudo}} as a non-privileged user, it must be properly configured. So make sure you read the configuration section.<br />
<br />
== Usage ==<br />
<br />
With sudo, users can prefix commands with {{ic|sudo}} to run them with superuser (or other) privileges.<br />
<br />
For example, to use pacman:<br />
<br />
$ sudo pacman -Syu<br />
<br />
See the [http://www.gratisoft.us/sudo/man/sudo.html sudo manual] for more information.<br />
<br />
== Configuration ==<br />
<br />
=== View current settings ===<br />
<br />
Run {{ic|sudo -ll}} to print out the current sudo configuration.<br />
<br />
=== Using visudo ===<br />
<br />
The configuration file for sudo is {{ic|/etc/sudoers}}. It should '''always''' be edited with the {{ic|visudo}} command. {{ic|visudo}} locks the {{ic|sudoers}} file, saves edits to a temporary file, and checks that file's grammar before copying it to {{ic|/etc/sudoers}}.<br />
<br />
{{Warning|It is imperative that {{ic|sudoers}} be free of syntax errors! Any error makes sudo unusable. '''Always''' edit it with {{ic|visudo}} to prevent errors.}}<br />
<br />
The default editor for visudo is {{ic|vi}}. It will be used if you do not specify another editor, by setting one of the SUDO_EDITOR, VISUAL or EDITOR environment variables (used in that order) to the desired editor, e.g. {{ic|vim}}. The command is run as root:<br />
<br />
# SUDO_EDITOR="/usr/bin/vim -p -X" visudo<br />
<br />
You can permanently change the setting system-wide to e.g. {{ic|vim}} by appending:<br />
<br />
export SUDO_EDITOR="/usr/bin/vim -p -X"<br />
<br />
to your {{ic|~/.bashrc}} file. Note that this won't take effect for already-running shells.<br />
<br />
To change the editor of choice permanently only for {{ic|visudo}}, add the following line to {{ic|/etc/sudoers}} where {{ic|vim}} is your prefered editor:<br />
<br />
# Reset environment by default<br />
Defaults env_reset<br />
# Set default EDITOR to vim, and do not allow visudo to use EDITOR/VISUAL.<br />
Defaults editor="/usr/bin/vim -p -X", !env_editor<br />
<br />
=== Example Entries ===<br />
<br />
To allow a user to gain full root privileges when he/she precedes a command with {{ic|sudo}}, add the following line:<br />
<br />
USER_NAME ALL=(ALL) ALL<br />
<br />
To allow a user to run all commands as any user but only the machine with hostname HOST_NAME:<br />
<br />
USER_NAME HOST_NAME=(ALL) ALL<br />
<br />
To allow members of group {{ic|wheel}} sudo access:<br />
<br />
%wheel ALL=(ALL) ALL<br />
<br />
To disable asking for a password for user USER_NAME:<br />
<br />
Defaults:USER_NAME !authenticate<br />
<br />
Enable explicitly defined commands only for user USER_NAME on host HOST_NAME:<br />
<br />
USER_NAME HOST_NAME=/sbin/halt,/sbin/poweroff,/sbin/reboot,/usr/bin/pacman -Syu<br />
{{note| the most customized option should go at the end of the file, as the later lines overrides the previous ones. In particular such a line should be after the {{ic|%wheel}} line if your user is in this group.}}<br />
Enable explicitly defined commands only for user USER_NAME on host HOST_NAME without password:<br />
USER_NAME HOST_NAME= NOPASSWD: /sbin/halt,/sbin/poweroff,/sbin/reboot,/usr/bin/pacman -Syu<br />
<br />
A detailed sudoers example can be found [http://www.gratisoft.us/sudo/sample.sudoers here]. Otherwise, see the [http://www.gratisoft.us/sudo/man/sudoers.html sudoers manual] for detailed information.<br />
<br />
=== Sudoers default file permissions ===<br />
<br />
The owner and group for the sudoers file must both be 0. The file permissions must be set to 0440. These permissions are set by default, but if you accidentally change them, they should be changed back immediately or sudo will fail.<br />
<br />
# chown -c root:root /etc/sudoers<br />
# chmod -c 0440 /etc/sudoers<br />
<br />
=== Password cache timeout ===<br />
<br />
Users may wish to change the default timeout before the cached password expires. This is accomplished with the timestamp_timeout option in {{ic|/etc/sudoers}} which is in minutes.<br />
Set timeout to 20 minutes.<br />
<br />
Defaults:USER_NAME timestamp_timeout=20<br />
<br />
{{Tip|To ensure sudo always asks for a password, set the timeout to 0. To ensure the password never times out, set to less than 0.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== File example ===<br />
<br />
This example is especially helpful for those using terminal multiplexers like screen, tmux, or ratpoison, and those using sudo from scripts/cronjobs:<br />
<br />
{{hc|/etc/sudoers|<nowiki><br />
Cmnd_Alias WHEELER = /usr/sbin/lsof, /bin/nice, /bin/ps, /usr/bin/top, /usr/local/bin/nano, /bin/netstat, /usr/bin/locate, /usr/bin/find, /usr/bin/rsync<br />
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/kill, /usr/bin/killall, /usr/bin/ps, /usr/bin/pkill<br />
Cmnd_Alias EDITS = /usr/bin/vim, /usr/bin/nano, /usr/bin/cat, /usr/bin/vi<br />
Cmnd_Alias ARCHLINUX = /usr/sbin/gparted, /usr/bin/pacman, /usr/bin/pacman-color<br />
<br />
root ALL = (ALL) ALL<br />
USER_NAME ALL = (ALL) ALL, NOPASSWD: WHEELER, NOPASSWD: PROCESSES, NOPASSWD: ARCHLINUX, NOPASSWD: EDITS<br />
<br />
Defaults !requiretty, !tty_tickets, !umask<br />
Defaults visiblepw, path_info, insults, lecture=always<br />
Defaults loglinelen = 0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth<br />
Defaults mailto=webmaster@foobar.com, mail_badpass, mail_no_user, mail_no_perms<br />
Defaults passwd_tries = 8, passwd_timeout = 1<br />
Defaults env_reset, always_set_home, set_home, set_logname<br />
Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"<br />
Defaults timestamp_timeout=360<br />
Defaults passprompt="Sudo invoked by [%u] on [%H] - Cmd run as %U - Password for user %p:"<br />
</nowiki>}}<br />
<br />
=== Enabling Tab-completion in Bash ===<br />
<br />
{{keypress|Tab}}-completion, by default, will not work when a user is initially added to the sudoers file. For example, normally john only needs to type:<br />
<br />
$ fire<{{Keypress|Tab}}><br />
<br />
and the shell will complete the command for him as:<br />
<br />
$ firefox<br />
<br />
If, however, john is added to the sudoers file and he types:<br />
<br />
$ sudo fire<{{keypress|Tab}}><br />
<br />
the shell will do nothing.<br />
<br />
To enable {{keypress|Tab}}-completion with sudo, [[pacman|install]] the {{pkg|bash-completion}} package from the [[Official Repositories|official repositories]]. see [[bash#Auto-completion]] for more information.<br />
<br />
Alternatively, add the following to your {{ic|~/.bashrc}}:<br />
<br />
complete -cf sudo<br />
<br />
=== Run X11 apps using sudo ===<br />
<br />
To allow sudo to start graphical application in X11, you need to add:<br />
<br />
Defaults env_keep += "HOME"<br />
<br />
to visudo.<br />
<br />
=== Disable per-terminal sudo ===<br />
<br />
{{Warning|This will let any process use your sudo session.}}<br />
<br />
If you are annoyed by sudo's defaults that require you to enter your password every time you open a new terminal, disable '''tty_tickets''':<br />
<br />
Defaults !tty_tickets<br />
<br />
=== Environment variables (Outdated?) ===<br />
<br />
If you have a lot of environment variables, or you export your proxy settings via {{ic|1=export http_proxy="..."}}, when using sudo these variables do not get passed to the root account unless you run sudo with the {{ic|-E}} option.<br />
<br />
$ sudo -E pacman -Syu<br />
<br />
Because of this you may wish to add an alias in {{ic|~/.bashrc}}:<br />
<br />
alias sudo="sudo -E"<br />
<br />
Another way of fixing this would be to add in {{ic|/etc/sudoers}}:<br />
<br />
Defaults !env_reset<br />
<br />
If you want to just pass {{ic|*_proxy}} variables, add the following:<br />
<br />
Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"<br />
<br />
=== Add /sbin and /usr/sbin to root's PATH ===<br />
<br />
If you want to run administrative commands (those in {{ic|/sbin}} or {{ic|/usr/sbin}}) with sudo without using their full path, add:<br />
<br />
Defaults secure_path="/bin:/sbin:/usr/bin:/usr/sbin"<br />
<br />
in {{ic|/etc/sudoers}}.<br />
<br />
This allows you to do:<br />
<br />
$ sudo command<br />
<br />
instead of:<br />
<br />
$ sudo /sbin/command<br />
<br />
or:<br />
<br />
$ sudo /usr/sbin/command<br />
<br />
=== Passing aliases ===<br />
<br />
If you use a lot of aliases, you might have noticed that they do not carry over to the root account when using sudo. However, there is an easy way to make them work. Simply add the following to your {{ic|~/.bashrc}} or {{ic|/etc/bash.bashrc}}:<br />
<br />
alias sudo='sudo '<br />
<br />
=== Insults ===<br />
<br />
Users can configure sudo to display clever insults when an incorrect password is entered instead of printing the default "wrong password" message. Find the Defaults line in {{ic|/etc/sudoers}} and append "insults" after a comma to existing options. The final result might look like this:<br />
<br />
#Defaults specification<br />
Defaults insults<br />
<br />
To test, type {{ic|sudo -K}} to end the current session and let sudo ask for the password again.<br />
<br />
=== Root password ===<br />
<br />
Users can configure sudo to ask for the root password instead of the user password by adding "rootpw" to the Defaults line in {{ic|/etc/sudoers}}:<br />
<br />
Defaults timestamp_timeout=0,rootpw<br />
<br />
=== Disable root login ===<br />
<br />
{{Warning|Arch Linux is not fine-tuned to run with a disabled root account. Users may encounter problems with this method.}}<br />
<br />
With sudo installed and configured, users may wish to disable the root login. Without root, attackers must first guess a user name configured as a sudoer as well as the user password.<br />
<br />
{{Warning|Ensure a user is properly configured as a sudoer ''before'' disabling the root account!}}<br />
<br />
The account can be locked via {{ic|passwd}}:<br />
<br />
# passwd -l root<br />
<br />
A similar command unlocks root.<br />
<br />
$ sudo passwd -u root<br />
<br />
Alternatively, edit {{ic|/etc/shadow}} and replace the root's encrypted password with "!":<br />
<br />
root:!:12345::::::<br />
<br />
To enable root login again:<br />
<br />
$ sudo passwd root<br />
<br />
==== kdesu ====<br />
<br />
kdesu may be used under KDE to launch GUI applications with root privileges. It is possible that by default kdesu will try to use su even if the root account is disabled. Fortunately one can tell kdesu to use sudo instead of su. Create/edit the file {{ic|~/.kde4/share/config/kdesurc}}:<br />
<br />
[super-user-command]<br />
super-user-command=sudo<br />
<br />
==== PolicyKit ====<br />
<br />
When disabling the root account, it is necessary to change the [[PolicyKit]] configuration for local authorization to reflect that. The default is to ask for the root password, so that must be changed. With polkit-1, this can be achieved by editing {{ic|/etc/polkit-1/localauthority.conf.d/50-localauthority.conf}} so that {{ic|1=AdminIdentities=unix-user:0}} is replaced with something else, depending on the system configuration. It can be a list of users and groups, for example:<br />
<br />
AdminIdentities=unix-group:wheel<br />
<br />
or<br />
<br />
AdminIdentities=unix-user:me;unixuser:mom;unix-group:wheel<br />
<br />
For more information, see {{ic|man pklocalauthority}}.<br />
<br />
==== NetworkManager ====<br />
<br />
Even with the above PolicyKit configuration you still need to configure a policy for NetworkManager. This is documented on the [[NetworkManager#Can.27t_edit_connections_as_normal_user|NetworkManager]] page of this wiki.<br />
<br />
== Troubleshooting ==<br />
<br />
=== SSH TTY Issues ===<br />
<br />
SSH does not allocate a tty by default when running a remote command. Without a tty, sudo cannot disable echo when prompting for a password. You can use ssh's {{ic|-tt}} option to force it to allocate a tty. (use {{ic|-tt}} twice).<br />
<br />
The {{ic|Defaults}} option {{ic|requiretty}} only allows the user to run sudo if they have a tty.<br />
<br />
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear text. You have to run "ssh -t hostname sudo <cmd>".<br />
#<br />
#Defaults requiretty<br />
<br />
=== Display User Privileges ===<br />
<br />
You can find out what privileges a particular user has with the following command:<br />
<br />
$ sudo -lU yourusename<br />
<br />
Or view your own with:<br />
<br />
{{hc|$ sudo -l|<nowiki><br />
Matching Defaults entries for yourusename on this host:<br />
loglinelen=0, logfile=/var/log/sudo.log, log_year, syslog=auth, mailto=sqpt.webmaster@gmail.com, mail_badpass, mail_no_user, mail_no_perms, env_reset, always_set_home, tty_tickets, lecture=always, pwfeedback, rootpw, set_home<br />
<br />
User yourusename may run the following commands on this host:<br />
<br />
(ALL) ALL<br />
(ALL) NOPASSWD: /usr/sbin/lsof, /bin/nice, /bin/netstat, /usr/bin/su, /usr/bin/locate, /usr/bin/find, /usr/bin/rsync, /usr/bin/strace,<br />
(ALL) /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/kill, /usr/bin/killall, /usr/bin/ps, /usr/bin/pkill<br />
(ALL) /usr/sbin/gparted, /usr/bin/pacman<br />
(ALL) /usr/local/bin/synergyc, /usr/local/bin/synergys<br />
(ALL) /usr/bin/vim, /usr/bin/nano, /usr/bin/cat<br />
(root) NOPASSWD: /usr/local/bin/synergyc</nowiki>}}<br />
<br />
=== Permissive Umask ===<br />
<br />
Sudo will union the user's [[umask]] value with its own umask (which defaults to 0022). This prevents sudo from creating files with more open permissions than the user's umask allows. While this is a sane default if no custom umask is in use, this can lead to situations where a utility run by sudo may create files with different permissions than if run by root directly. If errors arise from this, sudo provides a means to fix the umask, even if the desired umask is more permissive than the umask that the user has specified. Adding this (using {{ic|visudo}}) will override sudo's default behavior:<br />
<br />
Defaults umask = 0022<br />
Defaults umask_override<br />
<br />
This sets sudo's umask to root's default umask (0022) and overrides the default behavior, always using the indicated umask regardless of what umask the user as set.<br />
<br />
<br />
=== Defaults Skeleton ===<br />
<br />
At [http://www.gratisoft.us/sudo/sudoers.man.html#sudoers_options this link] you can find a list of all the options available to use with the {{ic|Defaults}} command in {{ic|/etc/sudoers}}.<br />
<br />
{{Poor writing|the comments in the following block of code are truncated.}}<br />
The same list is reproduced right below in a format optimized for copying and pasting it in your sudoers files and then make changes.<br />
<br />
{{bc|<nowiki><br />
#Defaults always_set_home<br />
# always_set_home: If enabled, sudo will set the HOME environment variable to the home directory of the target user (which is root unless the -u option is used). This effectively means that the -H op<br />
# always_set_home is only effective for configurations where either env_reset is disabled or HOME is present in the env_keep list. This flag is off by default.<br />
<br />
#Defaults authenticate<br />
# authenticate: If set, users must authenticate themselves via a password (or other means of authentication) before they may run commands. This default may be overridden via the PASSWD and NOPASSWD t<br />
<br />
#Defaults closefrom_override<br />
# closefrom_override: If set, the user may use sudo's -C option which overrides the default starting point at which sudo begins closing open file descriptors. This flag is off by default.<br />
<br />
#Defaults compress_io<br />
# compress_io: If set, and sudo is configured to log a command's input or output, the I/O logs will be compressed using zlib. This flag is on by default when sudo is compiled with zlib support.<br />
<br />
#Defaults env_editor<br />
# env_editor: If set, visudo will use the value of the EDITOR or VISUAL environment variables before falling back on the default editor list. Note that this may create a security hole as it allows th<br />
# separated list of editors in the editor variable. visudo will then only use the EDITOR or VISUAL if they match a value specified in editor. This flag is on by default.<br />
<br />
#Defaults env_reset<br />
# env_reset: If set, sudo will run the command in a minimal environment containing the TERM, PATH, HOME, MAIL, SHELL, LOGNAME, USER, USERNAME and SUDO_* variables. Any variables in the caller's envir<br />
# in the file specified by the env_file option (if any). The default contents of the env_keep and env_check lists are displayed when sudo is run by root with the -V option. If the secure_path opti<br />
# default.<br />
<br />
#Defaults fast_glob<br />
# fast_glob: Normally, sudo uses the glob(3) function to do shell-style globbing when matching path names. However, since it accesses the file system, glob(3) can take a long time to complete for som<br />
# (automounted). The fast_glob option causes sudo to use the fnmatch(3) function, which does not access the file system to do its matching. The disadvantage of fast_glob is that it is unable to ma<br />
# names that include globbing characters are used with the negation operator, '!', as such rules can be trivially bypassed. As such, this option should not be used when sudoers contains rules that<br />
<br />
#Defaults fqdn<br />
# fqdn: Set this flag if you want to put fully qualified host names in the sudoers file. I.e., instead of myhost you would use myhost.mydomain.edu. You may still use the short form if you wish (and<br />
# sudo unusable if DNS stops working (for example if the machine is not plugged into the network). Also note that you must use the host's official name as DNS knows it. That is, you may not use a<br />
# all aliases from DNS. If your machine's host name (as returned by the hostname command) is already fully qualified you shouldn't need to set fqdn. This flag is off by default.<br />
<br />
#Defaults ignore_dot<br />
# ignore_dot: If set, sudo will ignore '.' or '' (current dir) in the PATH environment variable; the PATH itself is not modified. This flag is off by default.<br />
<br />
#Defaults ignore_local_sudoers<br />
# ignore_local_sudoers: If set via LDAP, parsing of /etc/sudoers will be skipped. This is intended for Enterprises that wish to prevent the usage of local sudoers files so that only LDAP is used. Th<br />
# present, /etc/sudoers does not even need to exist. Since this option tells sudo how to behave when no specific LDAP entries have been matched, this sudoOption is only meaningful for the cn=default<br />
<br />
#Defaults insults<br />
# insults: If set, sudo will insult users when they enter an incorrect password. This flag is off by default.<br />
<br />
#Defaults log_host<br />
# log_host: If set, the host name will be logged in the (non-syslog) sudo log file. This flag is off by default.<br />
<br />
#Defaults log_input<br />
# log_input: If set, sudo will run the command in a pseudo tty and log all user input. If the standard input is not connected to the user's tty, due to I/O redirection or because the command is part<br />
# Input is logged to the directory specified by the iolog_dir option (/var/log/sudo-io by default) using a unique session ID that is included in the normal sudo log line, prefixed with TSID=. The i<br />
# Note that user input may contain sensitive information such as passwords (even if they are not echoed to the screen), which will be stored in the log file unencrypted. In most cases, logging the<br />
<br />
#Defaults log_output<br />
# log_output: If set, sudo will run the command in a pseudo tty and log all output that is sent to the screen, similar to the script(1) command. If the standard output or standard error is not connec<br />
# is also captured and stored in separate log files.<br />
# Output is logged to the directory specified by the iolog_dir option (/var/log/sudo-io by default) using a unique session ID that is included in the normal sudo log line, prefixed with TSID=. The<br />
# Output logs may be viewed with the sudoreplay(8) utility, which can also be used to list or search the available logs.<br />
<br />
#Defaults log_year<br />
# log_year: If set, the four-digit year will be logged in the (non-syslog) sudo log file. This flag is off by default.<br />
<br />
#Defaults long_otp_prompt<br />
# long_otp_prompt: When validating with a One Time Password (OTP) scheme such as S/Key or OPIE, a two-line prompt is used to make it easier to cut and paste the challenge to a local window. It's not<br />
<br />
#Defaults mail_always<br />
# mail_always: Send mail to the mailto user every time a users runs sudo. This flag is off by default.<br />
<br />
#Defaults mail_badpass<br />
# mail_badpass: Send mail to the mailto user if the user running sudo does not enter the correct password. This flag is off by default.<br />
<br />
#Defaults mail_no_host<br />
# mail_no_host: If set, mail will be sent to the mailto user if the invoking user exists in the sudoers file, but is not allowed to run commands on the current host. This flag is off by default.<br />
<br />
#Defaults mail_no_perms<br />
# mail_no_perms: If set, mail will be sent to the mailto user if the invoking user is allowed to use sudo but the command they are trying is not listed in their sudoers file entry or is explicitly den<br />
<br />
#Defaults mail_no_user<br />
# mail_no_user: If set, mail will be sent to the mailto user if the invoking user is not in the sudoers file. This flag is on by default.<br />
<br />
#Defaults noexec<br />
# noexec: If set, all commands run via sudo will behave as if the NOEXEC tag has been set, unless overridden by a EXEC tag. See the description of NOEXEC and EXEC below as well as the "PREVENTING SHE<br />
<br />
#Defaults path_info<br />
# path_info: Normally, sudo will tell the user when a command could not be found in their PATH environment variable. Some sites may wish to disable this as it could be used to gather information on t<br />
# the executable is simply not in the user's PATH, sudo will tell the user that they are not allowed to run it, which can be confusing. This flag is on by default.<br />
<br />
#Defaults passprompt_override<br />
# passprompt_override: The password prompt specified by passprompt will normally only be used if the password prompt provided by systems such as PAM matches the string "Password:". If passprompt_over<br />
<br />
#Defaults preserve_groups<br />
# preserve_groups: By default, sudo will initialize the group vector to the list of groups the target user is in. When preserve_groups is set, the user's existing group vector is left unaltered. The<br />
# default.<br />
<br />
#Defaults pwfeedback<br />
# pwfeedback: By default, sudo reads the password like most other Unix programs, by turning off echo until the user hits the return (or enter) key. Some users become confused by this as it appears to<br />
# the user presses a key. Note that this does have a security impact as an onlooker may be able to determine the length of the password being entered. This flag is off by default.<br />
<br />
#Defaults requiretty<br />
# requiretty: If set, sudo will only run when the user is logged in to a real tty. When this flag is set, sudo can only be run from a login session and not via other means such as cron(8) or cgi-bin<br />
<br />
#Defaults root_sudo<br />
# root_sudo: If set, root is allowed to run sudo too. Disabling this prevents users from "chaining" sudo commands to get a root shell by doing something like "sudo sudo /bin/sh". Note, however, that<br />
# real additional security; it exists purely for historical reasons. This flag is on by default.<br />
<br />
#Defaults rootpw<br />
# rootpw: If set, sudo will prompt for the root password instead of the password of the invoking user. This flag is off by default.<br />
<br />
#Defaults runaspw<br />
# runaspw: If set, sudo will prompt for the password of the user defined by the runas_default option (defaults to root) instead of the password of the invoking user. This flag is off by default.<br />
<br />
#Defaults set_home<br />
# set_home: If enabled and sudo is invoked with the -s option the HOME environment variable will be set to the home directory of the target user (which is root unless the -u option is used). This eff<br />
# is enabled, so set_home is only effective for configurations where either env_reset is disabled or HOME is present in the env_keep list. This flag is off by default.<br />
<br />
#Defaults set_logname<br />
# set_logname: Normally, sudo will set the LOGNAME, USER and USERNAME environment variables to the name of the target user (usually root unless the -u option is given). However, since some programs (<br />
# may be desirable to change this behavior. This can be done by negating the set_logname option. Note that if the env_reset option has not been disabled, entries in the env_keep list will override<br />
<br />
#Defaults set_utmp<br />
# set_utmp: When enabled, sudo will create an entry in the utmp (or utmpx) file when a pseudo-tty is allocated. A pseudo-tty is allocated by sudo when the log_input, log_output or use_pty flags are e<br />
# the tty, time, type and pid fields updated. This flag is on by default.<br />
<br />
#Defaults setenv<br />
# setenv: Allow the user to disable the env_reset option from the command line via the -E option. Additionally, environment variables set via the command line are not subject to the restrictions impo<br />
# variables in this manner. This flag is off by default.<br />
<br />
#Defaults shell_noargs<br />
# shell_noargs: If set and sudo is invoked with no arguments it acts as if the -s option had been given. That is, it runs a shell as root (the shell is determined by the SHELL environment variable if<br />
# is off by default.<br />
<br />
#Defaults stay_setuid<br />
# stay_setuid: Normally, when sudo executes a command the real and effective UIDs are set to the target user (root by default). This option changes that behavior such that the real UID is left as the<br />
# systems that disable some potentially dangerous functionality when a program is run setuid. This option is only effective on systems with either the setreuid() or setresuid() function. This flag<br />
<br />
#Defaults targetpw<br />
# targetpw: If set, sudo will prompt for the password of the user specified by the -u option (defaults to root) instead of the password of the invoking user. In addition, the timestamp file name will<br />
# passwd database as an argument to the -u option. This flag is off by default.<br />
<br />
#Defaults tty_tickets<br />
# tty_tickets: If set, users must authenticate on a per-tty basis. With this flag enabled, sudo will use a file named for the tty the user is logged in on in the user's time stamp directory. If disa<br />
<br />
#Defaults umask_override<br />
# umask_override: If set, sudo will set the umask as specified by sudoers without modification. This makes it possible to specify a more permissive umask in sudoers than the user's own umask and matc<br />
# user's umask and what is specified in sudoers. This flag is off by default.<br />
<br />
#Defaults use_pty<br />
# use_pty: If set, sudo will run the command in a pseudo-pty even if no I/O logging is being gone. A malicious program run under sudo could conceivably fork a background process that retains to the u<br />
# that impossible. This flag is off by default.<br />
<br />
#Defaults utmp_runas<br />
# utmp_runas: If set, sudo will store the name of the runas user when updating the utmp (or utmpx) file. By default, sudo stores the name of the invoking user. This flag is off by default.<br />
<br />
#Defaults visiblepw<br />
# visiblepw: By default, sudo will refuse to run if the user must enter a password but it is not possible to disable echo on the terminal. If the visiblepw flag is set, sudo will prompt for a passwor<br />
# somehost sudo ls" since rsh(1) does not allocate a tty. This flag is off by default.<br />
<br />
#Defaults closefrom<br />
# closefrom: Before it executes a command, sudo will close all open file descriptors other than standard input, standard output and standard error (ie: file descriptors 0-2). The closefrom option can<br />
<br />
#Defaults passwd_tries<br />
# passwd_tries: The number of tries a user gets to enter his/her password before sudo logs the failure and exits. The default is 3.<br />
<br />
#Defaults loglinelen<br />
# loglinelen: Number of characters per line for the file log. This value is used to decide when to wrap lines for nicer log files. This has no effect on the syslog log file, only the file log. The<br />
<br />
#Defaults passwd_timeout<br />
# passwd_timeout: Number of minutes before the sudo password prompt times out, or 0 for no timeout. The timeout may include a fractional component if minute granularity is insufficient, for example 2<br />
<br />
#Defaults timestamp_timeout<br />
# timestamp_timeout: Number of minutes that can elapse before sudo will ask for a passwd again. The timeout may include a fractional component if minute granularity is insufficient, for example 2.5.<br />
# timestamp will never expire. This can be used to allow users to create or delete their own timestamps via sudo -v and sudo -k respectively.<br />
<br />
#Defaults umask<br />
# umask: Umask to use when running the command. Negate this option or set it to 0777 to preserve the user's umask. The actual umask that is used will be the union of the user's umask and the value o<br />
# running a command. Note on systems that use PAM, the default PAM configuration may specify its own umask which will override the value set in sudoers.<br />
<br />
#Defaults badpass_message<br />
# badpass_message: Message that is displayed if a user enters an incorrect password. The default is Sorry, try again. unless insults are enabled.<br />
<br />
#Defaults editor<br />
# editor: A colon (':') separated list of editors allowed to be used with visudo. visudo will choose the editor that matches the user's EDITOR environment variable if possible, or the first editor in<br />
<br />
#Defaults iolog_dir<br />
# iolog_dir: The top-level directory to use when constructing the path name for the input/output log directory. Only used if the log_input or log_output options are enabled or when the LOG_INPUT or L<br />
# directory. The default is "/var/log/sudo-io".<br />
# The following percent (`%') escape sequences are supported:<br />
# %{seq} - expanded to a monotonically increasing base-36 sequence number, such as 0100A5, where every two digits are used to form a new directory, e.g. 01/00/A5<br />
# %{user} - expanded to the invoking user's login name<br />
# %{group} - expanded to the name of the invoking user's real group ID<br />
# %{runas_user} - expanded to the login name of the user the command will be run as (e.g. root)<br />
# %{runas_group} - expanded to the group name of the user the command will be run as (e.g. wheel)<br />
# %{hostname} - expanded to the local host name without the domain name<br />
# %{command} - expanded to the base name of the command being run<br />
# In addition, any escape sequences supported by the system's strftime() function will be expanded.<br />
# To include a literal `%' character, the string `%%' should be used.<br />
<br />
#Defaults iolog_file<br />
# iolog_file: The path name, relative to iolog_dir, in which to store input/output logs when the log_input or log_output options are enabled or when the LOG_INPUT or LOG_OUTPUT tags are present for a<br />
# See the iolog_dir option above for a list of supported percent (`%') escape sequences.<br />
# In addition to the escape sequences, path names that end in six or more Xs will have the Xs replaced with a unique combination of digits and letters, similar to the mktemp() function.<br />
<br />
#Defaults mailsub<br />
# mailsub: Subject of the mail sent to the mailto user. The escape %h will expand to the host name of the machine. Default is *** SECURITY information for %h ***.<br />
<br />
#Defaults noexec_file<br />
# noexec_file: This option is no longer supported. The path to the noexec file should now be set in the /etc/sudo.conf file.<br />
<br />
#Defaults passprompt<br />
# passprompt: The default prompt to use when asking for a password; can be overridden via the -p option or the SUDO_PROMPT environment variable. The following percent (`%') escape sequences are suppo<br />
# %H expanded to the local host name including the domain name (only if the machine's host name is fully qualified or the fqdn option is set)<br />
# %h expanded to the local host name without the domain name<br />
# %p expanded to the user whose password is being asked for (respects the rootpw, targetpw and runaspw flags in sudoers)<br />
# %U expanded to the login name of the user the command will be run as (defaults to root)<br />
# %u expanded to the invoking user's login name<br />
# %% two consecutive % characters are collapsed into a single % character<br />
# The default value is Password:.<br />
<br />
#Defaults runas_default<br />
# runas_default: The default user to run commands as if the -u option is not specified on the command line. This defaults to root.<br />
<br />
#Defaults syslog_badpri<br />
# syslog_badpri: Syslog priority to use when user authenticates unsuccessfully. Defaults to alert.<br />
# The following syslog priorities are supported: alert, crit, debug, emerg, err, info, notice, and warning.<br />
<br />
#Defaults syslog_goodpri<br />
# syslog_goodpri: Syslog priority to use when user authenticates successfully. Defaults to notice.<br />
# See syslog_badpri for the list of supported syslog priorities.<br />
<br />
#Defaults sudoers_locale<br />
# sudoers_locale: Locale to use when parsing the sudoers file, logging commands, and sending email. Note that changing the locale may affect how sudoers is interpreted. Defaults to "C".<br />
<br />
#Defaults timestampdir<br />
# timestampdir: The directory in which sudo stores its timestamp files. The default is /var/db/sudo.<br />
<br />
#Defaults timestampowner<br />
# timestampowner: The owner of the timestamp directory and the timestamps stored therein. The default is root.<br />
<br />
#Defaults env_file<br />
# env_file: The env_file option specifies the fully qualified path to a file containing variables to be set in the environment of the program being run. Entries in this file should either be of the f<br />
# quotes. Variables in this file are subject to other sudo environment settings such as env_keep and env_check.<br />
<br />
#Defaults exempt_group<br />
# exempt_group: Users in this group are exempt from password and PATH requirements. The group name specified should not include a % prefix. This is not set by default.<br />
<br />
#Defaults group_plugin<br />
# group_plugin: A string containing a sudoers group plugin with optional arguments. This can be used to implement support for the nonunix_group syntax described earlier. The string should consist of<br />
# configuration arguments the plugin requires. These arguments (if any) will be passed to the plugin's initialization function. If arguments are present, the string must be enclosed in double quot<br />
# For example, given /etc/sudo-group, a group file in Unix group format, the sample group plugin can be used:<br />
# Defaults group_plugin="sample_group.so /etc/sudo-group"<br />
# For more information see sudo_plugin(5).<br />
<br />
#Defaults lecture<br />
# lecture: This option controls when a short lecture will be printed along with the password prompt. It has the following possible values:<br />
# always Always lecture the user.<br />
# never Never lecture the user.<br />
# once Only lecture the user the first time they run sudo.<br />
# If no value is specified, a value of once is implied. Negating the option results in a value of never being used. The default value is once.<br />
<br />
#Defaults lecture_file<br />
# lecture_file: Path to a file containing an alternate sudo lecture that will be used in place of the standard lecture if the named file exists. By default, sudo uses a built-in lecture.<br />
<br />
#Defaults listpw<br />
# listpw: This option controls when a password will be required when a user runs sudo with the -l option. It has the following possible values:<br />
# all All the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# always The user must always enter a password to use the -l option.<br />
# any At least one of the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# never The user need never enter a password to use the -l option.<br />
# If no value is specified, a value of any is implied. Negating the option results in a value of never being used. The default value is any.<br />
<br />
#Defaults logfile<br />
# logfile: Path to the sudo log file (not the syslog log file). Setting a path turns on logging to a file; negating this option turns it off. By default, sudo logs via syslog.<br />
<br />
#Defaults mailerflags<br />
# mailerflags: Flags to use when invoking mailer. Defaults to -t.<br />
<br />
#Defaults mailerpath<br />
# mailerpath: Path to mail program used to send warning mail. Defaults to the path to sendmail found at configure time.<br />
<br />
#Defaults mailfrom<br />
# mailfrom: Address to use for the "from" address when sending warning and error mail. The address should be enclosed in double quotes (") to protect against sudo interpreting the @ sign. Defaults t<br />
<br />
#Defaults mailto<br />
# mailto: Address to send warning and error mail to. The address should be enclosed in double quotes (") to protect against sudo interpreting the @ sign. Defaults to root.<br />
<br />
#Defaults secure_path<br />
# secure_path: Path used for every command run from sudo. If you don't trust the people running sudo to have a sane PATH environment variable you may want to use this. Another use is if you want to<br />
# option are not affected by secure_path. This option is not set by default.<br />
<br />
#Defaults syslog<br />
# syslog: Syslog facility if syslog is being used for logging (negate to disable syslog logging). Defaults to auth.<br />
# The following syslog facilities are supported: authpriv (if your OS supports it), auth, daemon, user, local0, local1, local2, local3, local4, local5, local6, and local7.<br />
<br />
#Defaults verifypw<br />
# verifypw: This option controls when a password will be required when a user runs sudo with the -v option. It has the following possible values:<br />
# all All the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# always The user must always enter a password to use the -v option.<br />
# any At least one of the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# never The user need never enter a password to use the -v option.<br />
# If no value is specified, a value of all is implied. Negating the option results in a value of never being used. The default value is all.<br />
<br />
#Defaults env_check<br />
# env_check: Environment variables to be removed from the user's environment if the variable's value contains % or / characters. This can be used to guard against printf-style format vulnerabilities<br />
# value without double-quotes. The list can be replaced, added to, deleted from, or disabled by using the =, +=, -=, and ! operators respectively. Regardless of whether the env_reset option is ena<br />
# they pass the aforementioned check. The default list of environment variables to check is displayed when sudo is run by root with the -V option.<br />
<br />
#Defaults env_delete<br />
# env_delete: Environment variables to be removed from the user's environment when the env_reset option is not in effect. The argument may be a double-quoted, space-separated list or a single value w<br />
# +=, -=, and ! operators respectively. The default list of environment variables to remove is displayed when sudo is run by root with the -V option. Note that many operating systems will remove p<br />
<br />
#Defaults env_keep<br />
# env_keep: Environment variables to be preserved in the user's environment when the env_reset option is in effect. This allows fine-grained control over the environment sudo-spawned processes will r<br />
# quotes. The list can be replaced, added to, deleted from, or disabled by using the =, +=, -=, and ! operators respectively. The default list of variables to keep is displayed when sudo is run by<br />
</nowiki>}}</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Sudo&diff=230392Sudo2012-10-21T13:37:04Z<p>Bzhb: /* Example Entries */</p>
<hr />
<div>[[Category:Security]]<br />
[[cs:Sudo]]<br />
[[es:Sudo]]<br />
[[fr:Sudo]]<br />
[[it:Sudo]]<br />
[[ru:Sudo]]<br />
[[sr:Sudo]]<br />
[[tr:Sudo]]<br />
[[uk:Sudo]]<br />
[[zh-CN:Sudo]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of the popular privilege escalation utility.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Access control overview}}}}<br />
{{Article summary end}}<br />
<br />
{{ic|sudo}} ("substitute user do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.[http://www.gratisoft.us/sudo/]<br />
<br />
== Rationale ==<br />
<br />
Sudo is an alternative to [[su]] for running commands as root. Unlike [[su]], which launches a root shell that allows all further commands root access, sudo instead grants temporary privilege escalation to a single command. By enabling root privileges only when needed, sudo usage reduces the likelyhood that a typo or a bug in an invoked command will ruin the system.<br />
Sudo can also be used to run commands as other users; additionally, sudo logs all commands and failed access attempts for security auditing.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|sudo}} package, available in the [[Official Repositories|official repositories]]:<br />
<br />
# pacman -S sudo<br />
<br />
To begin using {{ic|sudo}} as a non-privileged user, it must be properly configured. So make sure you read the configuration section.<br />
<br />
== Usage ==<br />
<br />
With sudo, users can prefix commands with {{ic|sudo}} to run them with superuser (or other) privileges.<br />
<br />
For example, to use pacman:<br />
<br />
$ sudo pacman -Syu<br />
<br />
See the [http://www.gratisoft.us/sudo/man/sudo.html sudo manual] for more information.<br />
<br />
== Configuration ==<br />
<br />
=== View current settings ===<br />
<br />
Run {{ic|sudo -ll}} to print out the current sudo configuration.<br />
<br />
=== Using visudo ===<br />
<br />
The configuration file for sudo is {{ic|/etc/sudoers}}. It should '''always''' be edited with the {{ic|visudo}} command. {{ic|visudo}} locks the {{ic|sudoers}} file, saves edits to a temporary file, and checks that file's grammar before copying it to {{ic|/etc/sudoers}}.<br />
<br />
{{Warning|It is imperative that {{ic|sudoers}} be free of syntax errors! Any error makes sudo unusable. '''Always''' edit it with {{ic|visudo}} to prevent errors.}}<br />
<br />
The default editor for visudo is {{ic|vi}}. It will be used if you do not specify another editor, by setting one of the SUDO_EDITOR, VISUAL or EDITOR environment variables (used in that order) to the desired editor, e.g. {{ic|vim}}. The command is run as root:<br />
<br />
# SUDO_EDITOR="/usr/bin/vim -p -X" visudo<br />
<br />
You can permanently change the setting system-wide to e.g. {{ic|vim}} by appending:<br />
<br />
export SUDO_EDITOR="/usr/bin/vim -p -X"<br />
<br />
to your {{ic|~/.bashrc}} file. Note that this won't take effect for already-running shells.<br />
<br />
To change the editor of choice permanently only for {{ic|visudo}}, add the following line to {{ic|/etc/sudoers}} where {{ic|vim}} is your prefered editor:<br />
<br />
# Reset environment by default<br />
Defaults env_reset<br />
# Set default EDITOR to vim, and do not allow visudo to use EDITOR/VISUAL.<br />
Defaults editor="/usr/bin/vim -p -X", !env_editor<br />
<br />
=== Example Entries ===<br />
<br />
To allow a user to gain full root privileges when he/she precedes a command with {{ic|sudo}}, add the following line:<br />
<br />
USER_NAME ALL=(ALL) ALL<br />
<br />
To allow a user to run all commands as any user but only the machine with hostname HOST_NAME:<br />
<br />
USER_NAME HOST_NAME=(ALL) ALL<br />
<br />
To allow members of group {{ic|wheel}} sudo access:<br />
<br />
%wheel ALL=(ALL) ALL<br />
<br />
To disable asking for a password for user USER_NAME:<br />
<br />
Defaults:USER_NAME !authenticate<br />
<br />
Enable explicitly defined commands only for user USER_NAME on host HOST_NAME:<br />
<br />
USER_NAME HOST_NAME=/sbin/halt,/sbin/poweroff,/sbin/reboot,/usr/bin/pacman -Syu<br />
{{note| the most customized option should go at the end of the file, as the later lines overrides the previous ones. In particular such a line should be after the {{ic|%wheel}} line if your user is in this group.}}<br />
<br />
A detailed sudoers example can be found [http://www.gratisoft.us/sudo/sample.sudoers here]. Otherwise, see the [http://www.gratisoft.us/sudo/man/sudoers.html sudoers manual] for detailed information.<br />
<br />
=== Sudoers default file permissions ===<br />
<br />
The owner and group for the sudoers file must both be 0. The file permissions must be set to 0440. These permissions are set by default, but if you accidentally change them, they should be changed back immediately or sudo will fail.<br />
<br />
# chown -c root:root /etc/sudoers<br />
# chmod -c 0440 /etc/sudoers<br />
<br />
=== Password cache timeout ===<br />
<br />
Users may wish to change the default timeout before the cached password expires. This is accomplished with the timestamp_timeout option in {{ic|/etc/sudoers}} which is in minutes.<br />
Set timeout to 20 minutes.<br />
<br />
Defaults:USER_NAME timestamp_timeout=20<br />
<br />
{{Tip|To ensure sudo always asks for a password, set the timeout to 0. To ensure the password never times out, set to less than 0.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== File example ===<br />
<br />
This example is especially helpful for those using terminal multiplexers like screen, tmux, or ratpoison, and those using sudo from scripts/cronjobs:<br />
<br />
{{hc|/etc/sudoers|<nowiki><br />
Cmnd_Alias WHEELER = /usr/sbin/lsof, /bin/nice, /bin/ps, /usr/bin/top, /usr/local/bin/nano, /bin/netstat, /usr/bin/locate, /usr/bin/find, /usr/bin/rsync<br />
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/kill, /usr/bin/killall, /usr/bin/ps, /usr/bin/pkill<br />
Cmnd_Alias EDITS = /usr/bin/vim, /usr/bin/nano, /usr/bin/cat, /usr/bin/vi<br />
Cmnd_Alias ARCHLINUX = /usr/sbin/gparted, /usr/bin/pacman, /usr/bin/pacman-color<br />
<br />
root ALL = (ALL) ALL<br />
USER_NAME ALL = (ALL) ALL, NOPASSWD: WHEELER, NOPASSWD: PROCESSES, NOPASSWD: ARCHLINUX, NOPASSWD: EDITS<br />
<br />
Defaults !requiretty, !tty_tickets, !umask<br />
Defaults visiblepw, path_info, insults, lecture=always<br />
Defaults loglinelen = 0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth<br />
Defaults mailto=webmaster@foobar.com, mail_badpass, mail_no_user, mail_no_perms<br />
Defaults passwd_tries = 8, passwd_timeout = 1<br />
Defaults env_reset, always_set_home, set_home, set_logname<br />
Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"<br />
Defaults timestamp_timeout=360<br />
Defaults passprompt="Sudo invoked by [%u] on [%H] - Cmd run as %U - Password for user %p:"<br />
</nowiki>}}<br />
<br />
=== Enabling Tab-completion in Bash ===<br />
<br />
{{keypress|Tab}}-completion, by default, will not work when a user is initially added to the sudoers file. For example, normally john only needs to type:<br />
<br />
$ fire<{{Keypress|Tab}}><br />
<br />
and the shell will complete the command for him as:<br />
<br />
$ firefox<br />
<br />
If, however, john is added to the sudoers file and he types:<br />
<br />
$ sudo fire<{{keypress|Tab}}><br />
<br />
the shell will do nothing.<br />
<br />
To enable {{keypress|Tab}}-completion with sudo, [[pacman|install]] the {{pkg|bash-completion}} package from the [[Official Repositories|official repositories]]. see [[bash#Auto-completion]] for more information.<br />
<br />
Alternatively, add the following to your {{ic|~/.bashrc}}:<br />
<br />
complete -cf sudo<br />
<br />
=== Run X11 apps using sudo ===<br />
<br />
To allow sudo to start graphical application in X11, you need to add:<br />
<br />
Defaults env_keep += "HOME"<br />
<br />
to visudo.<br />
<br />
=== Disable per-terminal sudo ===<br />
<br />
{{Warning|This will let any process use your sudo session.}}<br />
<br />
If you are annoyed by sudo's defaults that require you to enter your password every time you open a new terminal, disable '''tty_tickets''':<br />
<br />
Defaults !tty_tickets<br />
<br />
=== Environment variables (Outdated?) ===<br />
<br />
If you have a lot of environment variables, or you export your proxy settings via {{ic|1=export http_proxy="..."}}, when using sudo these variables do not get passed to the root account unless you run sudo with the {{ic|-E}} option.<br />
<br />
$ sudo -E pacman -Syu<br />
<br />
Because of this you may wish to add an alias in {{ic|~/.bashrc}}:<br />
<br />
alias sudo="sudo -E"<br />
<br />
Another way of fixing this would be to add in {{ic|/etc/sudoers}}:<br />
<br />
Defaults !env_reset<br />
<br />
If you want to just pass {{ic|*_proxy}} variables, add the following:<br />
<br />
Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"<br />
<br />
=== Add /sbin and /usr/sbin to root's PATH ===<br />
<br />
If you want to run administrative commands (those in {{ic|/sbin}} or {{ic|/usr/sbin}}) with sudo without using their full path, add:<br />
<br />
Defaults secure_path="/bin:/sbin:/usr/bin:/usr/sbin"<br />
<br />
in {{ic|/etc/sudoers}}.<br />
<br />
This allows you to do:<br />
<br />
$ sudo command<br />
<br />
instead of:<br />
<br />
$ sudo /sbin/command<br />
<br />
or:<br />
<br />
$ sudo /usr/sbin/command<br />
<br />
=== Passing aliases ===<br />
<br />
If you use a lot of aliases, you might have noticed that they do not carry over to the root account when using sudo. However, there is an easy way to make them work. Simply add the following to your {{ic|~/.bashrc}} or {{ic|/etc/bash.bashrc}}:<br />
<br />
alias sudo='sudo '<br />
<br />
=== Insults ===<br />
<br />
Users can configure sudo to display clever insults when an incorrect password is entered instead of printing the default "wrong password" message. Find the Defaults line in {{ic|/etc/sudoers}} and append "insults" after a comma to existing options. The final result might look like this:<br />
<br />
#Defaults specification<br />
Defaults insults<br />
<br />
To test, type {{ic|sudo -K}} to end the current session and let sudo ask for the password again.<br />
<br />
=== Root password ===<br />
<br />
Users can configure sudo to ask for the root password instead of the user password by adding "rootpw" to the Defaults line in {{ic|/etc/sudoers}}:<br />
<br />
Defaults timestamp_timeout=0,rootpw<br />
<br />
=== Disable root login ===<br />
<br />
{{Warning|Arch Linux is not fine-tuned to run with a disabled root account. Users may encounter problems with this method.}}<br />
<br />
With sudo installed and configured, users may wish to disable the root login. Without root, attackers must first guess a user name configured as a sudoer as well as the user password.<br />
<br />
{{Warning|Ensure a user is properly configured as a sudoer ''before'' disabling the root account!}}<br />
<br />
The account can be locked via {{ic|passwd}}:<br />
<br />
# passwd -l root<br />
<br />
A similar command unlocks root.<br />
<br />
$ sudo passwd -u root<br />
<br />
Alternatively, edit {{ic|/etc/shadow}} and replace the root's encrypted password with "!":<br />
<br />
root:!:12345::::::<br />
<br />
To enable root login again:<br />
<br />
$ sudo passwd root<br />
<br />
==== kdesu ====<br />
<br />
kdesu may be used under KDE to launch GUI applications with root privileges. It is possible that by default kdesu will try to use su even if the root account is disabled. Fortunately one can tell kdesu to use sudo instead of su. Create/edit the file {{ic|~/.kde4/share/config/kdesurc}}:<br />
<br />
[super-user-command]<br />
super-user-command=sudo<br />
<br />
==== PolicyKit ====<br />
<br />
When disabling the root account, it is necessary to change the [[PolicyKit]] configuration for local authorization to reflect that. The default is to ask for the root password, so that must be changed. With polkit-1, this can be achieved by editing {{ic|/etc/polkit-1/localauthority.conf.d/50-localauthority.conf}} so that {{ic|1=AdminIdentities=unix-user:0}} is replaced with something else, depending on the system configuration. It can be a list of users and groups, for example:<br />
<br />
AdminIdentities=unix-group:wheel<br />
<br />
or<br />
<br />
AdminIdentities=unix-user:me;unixuser:mom;unix-group:wheel<br />
<br />
For more information, see {{ic|man pklocalauthority}}.<br />
<br />
==== NetworkManager ====<br />
<br />
Even with the above PolicyKit configuration you still need to configure a policy for NetworkManager. This is documented on the [[NetworkManager#Can.27t_edit_connections_as_normal_user|NetworkManager]] page of this wiki.<br />
<br />
== Troubleshooting ==<br />
<br />
=== SSH TTY Issues ===<br />
<br />
SSH does not allocate a tty by default when running a remote command. Without a tty, sudo cannot disable echo when prompting for a password. You can use ssh's {{ic|-tt}} option to force it to allocate a tty. (use {{ic|-tt}} twice).<br />
<br />
The {{ic|Defaults}} option {{ic|requiretty}} only allows the user to run sudo if they have a tty.<br />
<br />
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear text. You have to run "ssh -t hostname sudo <cmd>".<br />
#<br />
#Defaults requiretty<br />
<br />
=== Display User Privileges ===<br />
<br />
You can find out what privileges a particular user has with the following command:<br />
<br />
$ sudo -lU yourusename<br />
<br />
Or view your own with:<br />
<br />
{{hc|$ sudo -l|<nowiki><br />
Matching Defaults entries for yourusename on this host:<br />
loglinelen=0, logfile=/var/log/sudo.log, log_year, syslog=auth, mailto=sqpt.webmaster@gmail.com, mail_badpass, mail_no_user, mail_no_perms, env_reset, always_set_home, tty_tickets, lecture=always, pwfeedback, rootpw, set_home<br />
<br />
User yourusename may run the following commands on this host:<br />
<br />
(ALL) ALL<br />
(ALL) NOPASSWD: /usr/sbin/lsof, /bin/nice, /bin/netstat, /usr/bin/su, /usr/bin/locate, /usr/bin/find, /usr/bin/rsync, /usr/bin/strace,<br />
(ALL) /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/kill, /usr/bin/killall, /usr/bin/ps, /usr/bin/pkill<br />
(ALL) /usr/sbin/gparted, /usr/bin/pacman<br />
(ALL) /usr/local/bin/synergyc, /usr/local/bin/synergys<br />
(ALL) /usr/bin/vim, /usr/bin/nano, /usr/bin/cat<br />
(root) NOPASSWD: /usr/local/bin/synergyc</nowiki>}}<br />
<br />
=== Permissive Umask ===<br />
<br />
Sudo will union the user's [[umask]] value with its own umask (which defaults to 0022). This prevents sudo from creating files with more open permissions than the user's umask allows. While this is a sane default if no custom umask is in use, this can lead to situations where a utility run by sudo may create files with different permissions than if run by root directly. If errors arise from this, sudo provides a means to fix the umask, even if the desired umask is more permissive than the umask that the user has specified. Adding this (using {{ic|visudo}}) will override sudo's default behavior:<br />
<br />
Defaults umask = 0022<br />
Defaults umask_override<br />
<br />
This sets sudo's umask to root's default umask (0022) and overrides the default behavior, always using the indicated umask regardless of what umask the user as set.<br />
<br />
<br />
=== Defaults Skeleton ===<br />
<br />
At [http://www.gratisoft.us/sudo/sudoers.man.html#sudoers_options this link] you can find a list of all the options available to use with the {{ic|Defaults}} command in {{ic|/etc/sudoers}}.<br />
<br />
{{Poor writing|the comments in the following block of code are truncated.}}<br />
The same list is reproduced right below in a format optimized for copying and pasting it in your sudoers files and then make changes.<br />
<br />
{{bc|<nowiki><br />
#Defaults always_set_home<br />
# always_set_home: If enabled, sudo will set the HOME environment variable to the home directory of the target user (which is root unless the -u option is used). This effectively means that the -H op<br />
# always_set_home is only effective for configurations where either env_reset is disabled or HOME is present in the env_keep list. This flag is off by default.<br />
<br />
#Defaults authenticate<br />
# authenticate: If set, users must authenticate themselves via a password (or other means of authentication) before they may run commands. This default may be overridden via the PASSWD and NOPASSWD t<br />
<br />
#Defaults closefrom_override<br />
# closefrom_override: If set, the user may use sudo's -C option which overrides the default starting point at which sudo begins closing open file descriptors. This flag is off by default.<br />
<br />
#Defaults compress_io<br />
# compress_io: If set, and sudo is configured to log a command's input or output, the I/O logs will be compressed using zlib. This flag is on by default when sudo is compiled with zlib support.<br />
<br />
#Defaults env_editor<br />
# env_editor: If set, visudo will use the value of the EDITOR or VISUAL environment variables before falling back on the default editor list. Note that this may create a security hole as it allows th<br />
# separated list of editors in the editor variable. visudo will then only use the EDITOR or VISUAL if they match a value specified in editor. This flag is on by default.<br />
<br />
#Defaults env_reset<br />
# env_reset: If set, sudo will run the command in a minimal environment containing the TERM, PATH, HOME, MAIL, SHELL, LOGNAME, USER, USERNAME and SUDO_* variables. Any variables in the caller's envir<br />
# in the file specified by the env_file option (if any). The default contents of the env_keep and env_check lists are displayed when sudo is run by root with the -V option. If the secure_path opti<br />
# default.<br />
<br />
#Defaults fast_glob<br />
# fast_glob: Normally, sudo uses the glob(3) function to do shell-style globbing when matching path names. However, since it accesses the file system, glob(3) can take a long time to complete for som<br />
# (automounted). The fast_glob option causes sudo to use the fnmatch(3) function, which does not access the file system to do its matching. The disadvantage of fast_glob is that it is unable to ma<br />
# names that include globbing characters are used with the negation operator, '!', as such rules can be trivially bypassed. As such, this option should not be used when sudoers contains rules that<br />
<br />
#Defaults fqdn<br />
# fqdn: Set this flag if you want to put fully qualified host names in the sudoers file. I.e., instead of myhost you would use myhost.mydomain.edu. You may still use the short form if you wish (and<br />
# sudo unusable if DNS stops working (for example if the machine is not plugged into the network). Also note that you must use the host's official name as DNS knows it. That is, you may not use a<br />
# all aliases from DNS. If your machine's host name (as returned by the hostname command) is already fully qualified you shouldn't need to set fqdn. This flag is off by default.<br />
<br />
#Defaults ignore_dot<br />
# ignore_dot: If set, sudo will ignore '.' or '' (current dir) in the PATH environment variable; the PATH itself is not modified. This flag is off by default.<br />
<br />
#Defaults ignore_local_sudoers<br />
# ignore_local_sudoers: If set via LDAP, parsing of /etc/sudoers will be skipped. This is intended for Enterprises that wish to prevent the usage of local sudoers files so that only LDAP is used. Th<br />
# present, /etc/sudoers does not even need to exist. Since this option tells sudo how to behave when no specific LDAP entries have been matched, this sudoOption is only meaningful for the cn=default<br />
<br />
#Defaults insults<br />
# insults: If set, sudo will insult users when they enter an incorrect password. This flag is off by default.<br />
<br />
#Defaults log_host<br />
# log_host: If set, the host name will be logged in the (non-syslog) sudo log file. This flag is off by default.<br />
<br />
#Defaults log_input<br />
# log_input: If set, sudo will run the command in a pseudo tty and log all user input. If the standard input is not connected to the user's tty, due to I/O redirection or because the command is part<br />
# Input is logged to the directory specified by the iolog_dir option (/var/log/sudo-io by default) using a unique session ID that is included in the normal sudo log line, prefixed with TSID=. The i<br />
# Note that user input may contain sensitive information such as passwords (even if they are not echoed to the screen), which will be stored in the log file unencrypted. In most cases, logging the<br />
<br />
#Defaults log_output<br />
# log_output: If set, sudo will run the command in a pseudo tty and log all output that is sent to the screen, similar to the script(1) command. If the standard output or standard error is not connec<br />
# is also captured and stored in separate log files.<br />
# Output is logged to the directory specified by the iolog_dir option (/var/log/sudo-io by default) using a unique session ID that is included in the normal sudo log line, prefixed with TSID=. The<br />
# Output logs may be viewed with the sudoreplay(8) utility, which can also be used to list or search the available logs.<br />
<br />
#Defaults log_year<br />
# log_year: If set, the four-digit year will be logged in the (non-syslog) sudo log file. This flag is off by default.<br />
<br />
#Defaults long_otp_prompt<br />
# long_otp_prompt: When validating with a One Time Password (OTP) scheme such as S/Key or OPIE, a two-line prompt is used to make it easier to cut and paste the challenge to a local window. It's not<br />
<br />
#Defaults mail_always<br />
# mail_always: Send mail to the mailto user every time a users runs sudo. This flag is off by default.<br />
<br />
#Defaults mail_badpass<br />
# mail_badpass: Send mail to the mailto user if the user running sudo does not enter the correct password. This flag is off by default.<br />
<br />
#Defaults mail_no_host<br />
# mail_no_host: If set, mail will be sent to the mailto user if the invoking user exists in the sudoers file, but is not allowed to run commands on the current host. This flag is off by default.<br />
<br />
#Defaults mail_no_perms<br />
# mail_no_perms: If set, mail will be sent to the mailto user if the invoking user is allowed to use sudo but the command they are trying is not listed in their sudoers file entry or is explicitly den<br />
<br />
#Defaults mail_no_user<br />
# mail_no_user: If set, mail will be sent to the mailto user if the invoking user is not in the sudoers file. This flag is on by default.<br />
<br />
#Defaults noexec<br />
# noexec: If set, all commands run via sudo will behave as if the NOEXEC tag has been set, unless overridden by a EXEC tag. See the description of NOEXEC and EXEC below as well as the "PREVENTING SHE<br />
<br />
#Defaults path_info<br />
# path_info: Normally, sudo will tell the user when a command could not be found in their PATH environment variable. Some sites may wish to disable this as it could be used to gather information on t<br />
# the executable is simply not in the user's PATH, sudo will tell the user that they are not allowed to run it, which can be confusing. This flag is on by default.<br />
<br />
#Defaults passprompt_override<br />
# passprompt_override: The password prompt specified by passprompt will normally only be used if the password prompt provided by systems such as PAM matches the string "Password:". If passprompt_over<br />
<br />
#Defaults preserve_groups<br />
# preserve_groups: By default, sudo will initialize the group vector to the list of groups the target user is in. When preserve_groups is set, the user's existing group vector is left unaltered. The<br />
# default.<br />
<br />
#Defaults pwfeedback<br />
# pwfeedback: By default, sudo reads the password like most other Unix programs, by turning off echo until the user hits the return (or enter) key. Some users become confused by this as it appears to<br />
# the user presses a key. Note that this does have a security impact as an onlooker may be able to determine the length of the password being entered. This flag is off by default.<br />
<br />
#Defaults requiretty<br />
# requiretty: If set, sudo will only run when the user is logged in to a real tty. When this flag is set, sudo can only be run from a login session and not via other means such as cron(8) or cgi-bin<br />
<br />
#Defaults root_sudo<br />
# root_sudo: If set, root is allowed to run sudo too. Disabling this prevents users from "chaining" sudo commands to get a root shell by doing something like "sudo sudo /bin/sh". Note, however, that<br />
# real additional security; it exists purely for historical reasons. This flag is on by default.<br />
<br />
#Defaults rootpw<br />
# rootpw: If set, sudo will prompt for the root password instead of the password of the invoking user. This flag is off by default.<br />
<br />
#Defaults runaspw<br />
# runaspw: If set, sudo will prompt for the password of the user defined by the runas_default option (defaults to root) instead of the password of the invoking user. This flag is off by default.<br />
<br />
#Defaults set_home<br />
# set_home: If enabled and sudo is invoked with the -s option the HOME environment variable will be set to the home directory of the target user (which is root unless the -u option is used). This eff<br />
# is enabled, so set_home is only effective for configurations where either env_reset is disabled or HOME is present in the env_keep list. This flag is off by default.<br />
<br />
#Defaults set_logname<br />
# set_logname: Normally, sudo will set the LOGNAME, USER and USERNAME environment variables to the name of the target user (usually root unless the -u option is given). However, since some programs (<br />
# may be desirable to change this behavior. This can be done by negating the set_logname option. Note that if the env_reset option has not been disabled, entries in the env_keep list will override<br />
<br />
#Defaults set_utmp<br />
# set_utmp: When enabled, sudo will create an entry in the utmp (or utmpx) file when a pseudo-tty is allocated. A pseudo-tty is allocated by sudo when the log_input, log_output or use_pty flags are e<br />
# the tty, time, type and pid fields updated. This flag is on by default.<br />
<br />
#Defaults setenv<br />
# setenv: Allow the user to disable the env_reset option from the command line via the -E option. Additionally, environment variables set via the command line are not subject to the restrictions impo<br />
# variables in this manner. This flag is off by default.<br />
<br />
#Defaults shell_noargs<br />
# shell_noargs: If set and sudo is invoked with no arguments it acts as if the -s option had been given. That is, it runs a shell as root (the shell is determined by the SHELL environment variable if<br />
# is off by default.<br />
<br />
#Defaults stay_setuid<br />
# stay_setuid: Normally, when sudo executes a command the real and effective UIDs are set to the target user (root by default). This option changes that behavior such that the real UID is left as the<br />
# systems that disable some potentially dangerous functionality when a program is run setuid. This option is only effective on systems with either the setreuid() or setresuid() function. This flag<br />
<br />
#Defaults targetpw<br />
# targetpw: If set, sudo will prompt for the password of the user specified by the -u option (defaults to root) instead of the password of the invoking user. In addition, the timestamp file name will<br />
# passwd database as an argument to the -u option. This flag is off by default.<br />
<br />
#Defaults tty_tickets<br />
# tty_tickets: If set, users must authenticate on a per-tty basis. With this flag enabled, sudo will use a file named for the tty the user is logged in on in the user's time stamp directory. If disa<br />
<br />
#Defaults umask_override<br />
# umask_override: If set, sudo will set the umask as specified by sudoers without modification. This makes it possible to specify a more permissive umask in sudoers than the user's own umask and matc<br />
# user's umask and what is specified in sudoers. This flag is off by default.<br />
<br />
#Defaults use_pty<br />
# use_pty: If set, sudo will run the command in a pseudo-pty even if no I/O logging is being gone. A malicious program run under sudo could conceivably fork a background process that retains to the u<br />
# that impossible. This flag is off by default.<br />
<br />
#Defaults utmp_runas<br />
# utmp_runas: If set, sudo will store the name of the runas user when updating the utmp (or utmpx) file. By default, sudo stores the name of the invoking user. This flag is off by default.<br />
<br />
#Defaults visiblepw<br />
# visiblepw: By default, sudo will refuse to run if the user must enter a password but it is not possible to disable echo on the terminal. If the visiblepw flag is set, sudo will prompt for a passwor<br />
# somehost sudo ls" since rsh(1) does not allocate a tty. This flag is off by default.<br />
<br />
#Defaults closefrom<br />
# closefrom: Before it executes a command, sudo will close all open file descriptors other than standard input, standard output and standard error (ie: file descriptors 0-2). The closefrom option can<br />
<br />
#Defaults passwd_tries<br />
# passwd_tries: The number of tries a user gets to enter his/her password before sudo logs the failure and exits. The default is 3.<br />
<br />
#Defaults loglinelen<br />
# loglinelen: Number of characters per line for the file log. This value is used to decide when to wrap lines for nicer log files. This has no effect on the syslog log file, only the file log. The<br />
<br />
#Defaults passwd_timeout<br />
# passwd_timeout: Number of minutes before the sudo password prompt times out, or 0 for no timeout. The timeout may include a fractional component if minute granularity is insufficient, for example 2<br />
<br />
#Defaults timestamp_timeout<br />
# timestamp_timeout: Number of minutes that can elapse before sudo will ask for a passwd again. The timeout may include a fractional component if minute granularity is insufficient, for example 2.5.<br />
# timestamp will never expire. This can be used to allow users to create or delete their own timestamps via sudo -v and sudo -k respectively.<br />
<br />
#Defaults umask<br />
# umask: Umask to use when running the command. Negate this option or set it to 0777 to preserve the user's umask. The actual umask that is used will be the union of the user's umask and the value o<br />
# running a command. Note on systems that use PAM, the default PAM configuration may specify its own umask which will override the value set in sudoers.<br />
<br />
#Defaults badpass_message<br />
# badpass_message: Message that is displayed if a user enters an incorrect password. The default is Sorry, try again. unless insults are enabled.<br />
<br />
#Defaults editor<br />
# editor: A colon (':') separated list of editors allowed to be used with visudo. visudo will choose the editor that matches the user's EDITOR environment variable if possible, or the first editor in<br />
<br />
#Defaults iolog_dir<br />
# iolog_dir: The top-level directory to use when constructing the path name for the input/output log directory. Only used if the log_input or log_output options are enabled or when the LOG_INPUT or L<br />
# directory. The default is "/var/log/sudo-io".<br />
# The following percent (`%') escape sequences are supported:<br />
# %{seq} - expanded to a monotonically increasing base-36 sequence number, such as 0100A5, where every two digits are used to form a new directory, e.g. 01/00/A5<br />
# %{user} - expanded to the invoking user's login name<br />
# %{group} - expanded to the name of the invoking user's real group ID<br />
# %{runas_user} - expanded to the login name of the user the command will be run as (e.g. root)<br />
# %{runas_group} - expanded to the group name of the user the command will be run as (e.g. wheel)<br />
# %{hostname} - expanded to the local host name without the domain name<br />
# %{command} - expanded to the base name of the command being run<br />
# In addition, any escape sequences supported by the system's strftime() function will be expanded.<br />
# To include a literal `%' character, the string `%%' should be used.<br />
<br />
#Defaults iolog_file<br />
# iolog_file: The path name, relative to iolog_dir, in which to store input/output logs when the log_input or log_output options are enabled or when the LOG_INPUT or LOG_OUTPUT tags are present for a<br />
# See the iolog_dir option above for a list of supported percent (`%') escape sequences.<br />
# In addition to the escape sequences, path names that end in six or more Xs will have the Xs replaced with a unique combination of digits and letters, similar to the mktemp() function.<br />
<br />
#Defaults mailsub<br />
# mailsub: Subject of the mail sent to the mailto user. The escape %h will expand to the host name of the machine. Default is *** SECURITY information for %h ***.<br />
<br />
#Defaults noexec_file<br />
# noexec_file: This option is no longer supported. The path to the noexec file should now be set in the /etc/sudo.conf file.<br />
<br />
#Defaults passprompt<br />
# passprompt: The default prompt to use when asking for a password; can be overridden via the -p option or the SUDO_PROMPT environment variable. The following percent (`%') escape sequences are suppo<br />
# %H expanded to the local host name including the domain name (only if the machine's host name is fully qualified or the fqdn option is set)<br />
# %h expanded to the local host name without the domain name<br />
# %p expanded to the user whose password is being asked for (respects the rootpw, targetpw and runaspw flags in sudoers)<br />
# %U expanded to the login name of the user the command will be run as (defaults to root)<br />
# %u expanded to the invoking user's login name<br />
# %% two consecutive % characters are collapsed into a single % character<br />
# The default value is Password:.<br />
<br />
#Defaults runas_default<br />
# runas_default: The default user to run commands as if the -u option is not specified on the command line. This defaults to root.<br />
<br />
#Defaults syslog_badpri<br />
# syslog_badpri: Syslog priority to use when user authenticates unsuccessfully. Defaults to alert.<br />
# The following syslog priorities are supported: alert, crit, debug, emerg, err, info, notice, and warning.<br />
<br />
#Defaults syslog_goodpri<br />
# syslog_goodpri: Syslog priority to use when user authenticates successfully. Defaults to notice.<br />
# See syslog_badpri for the list of supported syslog priorities.<br />
<br />
#Defaults sudoers_locale<br />
# sudoers_locale: Locale to use when parsing the sudoers file, logging commands, and sending email. Note that changing the locale may affect how sudoers is interpreted. Defaults to "C".<br />
<br />
#Defaults timestampdir<br />
# timestampdir: The directory in which sudo stores its timestamp files. The default is /var/db/sudo.<br />
<br />
#Defaults timestampowner<br />
# timestampowner: The owner of the timestamp directory and the timestamps stored therein. The default is root.<br />
<br />
#Defaults env_file<br />
# env_file: The env_file option specifies the fully qualified path to a file containing variables to be set in the environment of the program being run. Entries in this file should either be of the f<br />
# quotes. Variables in this file are subject to other sudo environment settings such as env_keep and env_check.<br />
<br />
#Defaults exempt_group<br />
# exempt_group: Users in this group are exempt from password and PATH requirements. The group name specified should not include a % prefix. This is not set by default.<br />
<br />
#Defaults group_plugin<br />
# group_plugin: A string containing a sudoers group plugin with optional arguments. This can be used to implement support for the nonunix_group syntax described earlier. The string should consist of<br />
# configuration arguments the plugin requires. These arguments (if any) will be passed to the plugin's initialization function. If arguments are present, the string must be enclosed in double quot<br />
# For example, given /etc/sudo-group, a group file in Unix group format, the sample group plugin can be used:<br />
# Defaults group_plugin="sample_group.so /etc/sudo-group"<br />
# For more information see sudo_plugin(5).<br />
<br />
#Defaults lecture<br />
# lecture: This option controls when a short lecture will be printed along with the password prompt. It has the following possible values:<br />
# always Always lecture the user.<br />
# never Never lecture the user.<br />
# once Only lecture the user the first time they run sudo.<br />
# If no value is specified, a value of once is implied. Negating the option results in a value of never being used. The default value is once.<br />
<br />
#Defaults lecture_file<br />
# lecture_file: Path to a file containing an alternate sudo lecture that will be used in place of the standard lecture if the named file exists. By default, sudo uses a built-in lecture.<br />
<br />
#Defaults listpw<br />
# listpw: This option controls when a password will be required when a user runs sudo with the -l option. It has the following possible values:<br />
# all All the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# always The user must always enter a password to use the -l option.<br />
# any At least one of the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# never The user need never enter a password to use the -l option.<br />
# If no value is specified, a value of any is implied. Negating the option results in a value of never being used. The default value is any.<br />
<br />
#Defaults logfile<br />
# logfile: Path to the sudo log file (not the syslog log file). Setting a path turns on logging to a file; negating this option turns it off. By default, sudo logs via syslog.<br />
<br />
#Defaults mailerflags<br />
# mailerflags: Flags to use when invoking mailer. Defaults to -t.<br />
<br />
#Defaults mailerpath<br />
# mailerpath: Path to mail program used to send warning mail. Defaults to the path to sendmail found at configure time.<br />
<br />
#Defaults mailfrom<br />
# mailfrom: Address to use for the "from" address when sending warning and error mail. The address should be enclosed in double quotes (") to protect against sudo interpreting the @ sign. Defaults t<br />
<br />
#Defaults mailto<br />
# mailto: Address to send warning and error mail to. The address should be enclosed in double quotes (") to protect against sudo interpreting the @ sign. Defaults to root.<br />
<br />
#Defaults secure_path<br />
# secure_path: Path used for every command run from sudo. If you don't trust the people running sudo to have a sane PATH environment variable you may want to use this. Another use is if you want to<br />
# option are not affected by secure_path. This option is not set by default.<br />
<br />
#Defaults syslog<br />
# syslog: Syslog facility if syslog is being used for logging (negate to disable syslog logging). Defaults to auth.<br />
# The following syslog facilities are supported: authpriv (if your OS supports it), auth, daemon, user, local0, local1, local2, local3, local4, local5, local6, and local7.<br />
<br />
#Defaults verifypw<br />
# verifypw: This option controls when a password will be required when a user runs sudo with the -v option. It has the following possible values:<br />
# all All the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# always The user must always enter a password to use the -v option.<br />
# any At least one of the user's sudoers entries for the current host must have the NOPASSWD flag set to avoid entering a password.<br />
# never The user need never enter a password to use the -v option.<br />
# If no value is specified, a value of all is implied. Negating the option results in a value of never being used. The default value is all.<br />
<br />
#Defaults env_check<br />
# env_check: Environment variables to be removed from the user's environment if the variable's value contains % or / characters. This can be used to guard against printf-style format vulnerabilities<br />
# value without double-quotes. The list can be replaced, added to, deleted from, or disabled by using the =, +=, -=, and ! operators respectively. Regardless of whether the env_reset option is ena<br />
# they pass the aforementioned check. The default list of environment variables to check is displayed when sudo is run by root with the -V option.<br />
<br />
#Defaults env_delete<br />
# env_delete: Environment variables to be removed from the user's environment when the env_reset option is not in effect. The argument may be a double-quoted, space-separated list or a single value w<br />
# +=, -=, and ! operators respectively. The default list of environment variables to remove is displayed when sudo is run by root with the -V option. Note that many operating systems will remove p<br />
<br />
#Defaults env_keep<br />
# env_keep: Environment variables to be preserved in the user's environment when the env_reset option is in effect. This allows fine-grained control over the environment sudo-spawned processes will r<br />
# quotes. The list can be replaced, added to, deleted from, or disabled by using the =, +=, -=, and ! operators respectively. The default list of variables to keep is displayed when sudo is run by<br />
</nowiki>}}</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=229850ASUS Zenbook Prime UX31A2012-10-20T08:00:34Z<p>Bzhb: /* Touchpad */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader ===<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe efivars<br />
<br />
{{note | running `modprobe efivars' should display a few lines, confirming the success of the module addition. If such "efi variables" are not set up properly, errors will ensue and you won't be able to reboot on your partition correctly. One of the way to have such efi variables is to make a bootable UEFI device using [[UEFI#Create_UEFI_bootable_USB_from_ISO]] and to boot on it properly. }}<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.}}<br />
<br />
This table shows the function keys, their intended function, what keycode (if any) X recognizes and whether the function key operates at the BIOS level or if it needs a shortcut.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Keys!! Function !! X sees !! shortcut needed <br />
|-<br />
| {{keypress|Fn+F1}} || Sleep || XF86Sleep || yes <br />
|-<br />
| {{keypress|Fn+F2}} || Turn off WLAN and Bluetooth || XF86WLAN & XF86Bluetooth || no<br />
|-<br />
| {{keypress|Fn+F3}} || Dim keyboard backlight || XF86KbdBrightnessDown || yes<br />
|-<br />
| {{keypress|Fn+F4}} || Brighten keyboard backlight || XF86KbdBrightnessUp || yes<br />
|-<br />
| {{keypress|Fn+F5}} || Dim LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F6}} || Brighten LCD backlight || No recognized key || no<br />
|-<br />
| {{keypress|Fn+F7}} || Turn off LCD || No named key || no<br />
|-<br />
| {{keypress|Fn+F8}} || Toggle display || XF86Display || yes<br />
|-<br />
| {{keypress|Fn+F9}} || Toggle touchpad || XF86TouchpadToggle || yes<br />
|-<br />
| {{keypress|Fn+F10}} || Audio mute/unmute || XF86AudioMute|| yes<br />
|-<br />
| {{keypress|Fn+F11}} || Audio volume down || XF86AudioLowerVolume || yes<br />
|-<br />
| {{keypress|Fn+F12}} || Audio volume up || XF86AudioRaiseVolume || yes<br />
|-<br />
| {{keypress|Fn+a}} || Ambient light sensor || No recognized key ||N/A<br />
|-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes<br />
|-<br />
| {{keypress|Fn+v}} || Webcam || XF86WebCam || yes<br />
|-<br />
| {{keypress|Fn+space}} || Switch power profiles || XF86Launch6 || yes<br />
|}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018, UX31A BIOS 206 UGDM Base Address is 0xDA8CE018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram |-<br />
| {{keypress|Fn+c}} || Switch display profiles || XF86Launch1 || yes <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[[Touchpad_Synaptics#Buttonless_TouchPads_.28aka_ClickPads.29| Instructions to activate the right boutton]].<br />
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).<br />
<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a helper script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
7)<br />
$0 load<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
echo "7) load"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228789ASUS Zenbook Prime UX31A2012-10-14T21:06:22Z<p>Bzhb: /* Install the base system */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader ===<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a helper script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
7)<br />
$0 load<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
echo "7) load"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228773ASUS Zenbook Prime UX31A2012-10-14T20:38:32Z<p>Bzhb: /* Powersave management */ : update script</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a helper script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
7)<br />
$0 load<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
echo "7) load"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228754ASUS Zenbook Prime UX31A2012-10-14T20:31:22Z<p>Bzhb: /* Powersave management */ fix script indentation</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228749ASUS Zenbook Prime UX31A2012-10-14T20:27:40Z<p>Bzhb: /* Powersave management */ : update script</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
# -*- coding: UTF8 -*-<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpupower -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpupower -c 0 frequency-set -g ondemand <br />
for i in 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpupower -c $i frequency-set -f 800Mhz; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
echo "#########################"<br />
echo "# cpupower frequency-info"<br />
for i in 0 1 2 3; do cpupower -c $i frequency-info; done<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
sudo modprobe cpufreq_userspace<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpupower<br />
;;<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
if [[ $choice = [0-9]* ]]<br />
then<br />
$0 $choice<br />
else<br />
$0 0<br />
fi<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228714ASUS Zenbook Prime UX31A2012-10-14T18:00:09Z<p>Bzhb: fix small error /* Keyboard backlight */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-kbd-backlight.service<br />
# systemctl enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower}}<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228713ASUS Zenbook Prime UX31A2012-10-14T17:50:54Z<p>Bzhb: /* Method 2 */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Install {{AUR|asus-screen-brightness}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-screen-brightness allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-screen-brightness allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemctl start asus-screen-brightness.service<br />
# systemctl enable asus-screen-brightness.service<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/bin/asus-screen-brightness"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower}}<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228712ASUS Zenbook Prime UX31A2012-10-14T17:43:50Z<p>Bzhb: /* Keyboard backlight */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
{{warning|The following won't work with systemd}}<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
Now you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower}}<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228706ASUS Zenbook Prime UX31A2012-10-14T17:28:43Z<p>Bzhb: cleaning in /* Function keys */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
<br />
=== Screen backlight ===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. It means the system does not get any keymap when the key combination is pressed. You get two options here :<br />
* try to fix the problem<br />
* work around the problem and just use a different key combination<br />
<br />
The lazy option first:<br />
==== Screen backlight workarounds ====<br />
===== Method 1 =====<br />
Install <code>xorg-xbacklight</code> <br />
<br />
You can add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
===== Method 2 =====<br />
Use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
{{warning|The following won't work with systemd}}<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== Screen backlight fix ====<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{warning | This is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
===== Getting the DIDL and CADL offsets =====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
=== Keyboard backlight ===<br />
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
No you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
==== UPower Script ====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower}}<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228703ASUS Zenbook Prime UX31A2012-10-14T17:05:00Z<p>Bzhb: moving function keys fix to legacy section</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. You can either install <code>xorg-xbacklight</code> or use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Screen Backlight Method 2 ===<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{note | Warning, this is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
==== Getting the DIDL and CADL offsets ====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
<br />
==== Keyboard backlight ====<br />
<br />
There was a script on this page, which I have packaged for your convenience. Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
No you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=====UPower Script=====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower}}<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
=== function keys (other than screen backlight) ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228702ASUS Zenbook Prime UX31A2012-10-14T16:59:35Z<p>Bzhb: /* Powersave management */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. You can either install <code>xorg-xbacklight</code> or use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Screen Backlight Method 2 ===<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{note | Warning, this is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
==== Getting the DIDL and CADL offsets ====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== Keyboard backlight ====<br />
<br />
There was a script on this page, which I have packaged for your convenience. Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
No you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=====UPower Script=====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower}}<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228701ASUS Zenbook Prime UX31A2012-10-14T16:59:12Z<p>Bzhb: /* Powersave management */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. You can either install <code>xorg-xbacklight</code> or use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Screen Backlight Method 2 ===<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{note | Warning, this is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
==== Getting the DIDL and CADL offsets ====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== Keyboard backlight ====<br />
<br />
There was a script on this page, which I have packaged for your convenience. Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
No you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=====UPower Script=====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
{{Warning|This is not up to date since cpufrequtils has been deprecated in favor of cpupower]]<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228700ASUS Zenbook Prime UX31A2012-10-14T16:56:53Z<p>Bzhb: creating legacy section</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. You can either install <code>xorg-xbacklight</code> or use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Screen Backlight Method 2 ===<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{note | Warning, this is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
==== Getting the DIDL and CADL offsets ====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== Keyboard backlight ====<br />
<br />
There was a script on this page, which I have packaged for your convenience. Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
No you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=====UPower Script=====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Legacy information ==<br />
Here is legacy information from earlier fix that are no longer required.<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=228699ASUS Zenbook Prime UX31A2012-10-14T16:47:43Z<p>Bzhb: /* hdmi plugged at boot */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See previous generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.gen}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. You can either install <code>xorg-xbacklight</code> or use the hack here:<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Screen Backlight Method 2 ===<br />
{{note | UX31A BIOS 211 IGDM Base Address is 0xDA8A9018 and UX31A BIOS 204 IGDM Base Address is 0xDA8CF018, everything else is the same. }}<br />
<br />
{{note | Warning, this is highly experimental. It works for the UX32VD with bios 2.06, no guarantee that it works for different configurations. }}<br />
First off, this method requires that you know what you are doing (although there are good tutorials anyway), and needs a little bit patience. It also requires that you have the hexidecimal dump and undump package xxd available in the AUR: https://aur.archlinux.org/packages.php?ID=35311 .<br />
<br />
This method is based on a proposed fix posted on https://bugs.freedesktop.org/show_bug.cgi?id=45452, which apparently works for the UX31A/UX32VD too. <br />
The cause why the brightness buttons don't work is exactly the same as in the bugreport.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlightfix}}:<br />
This script is posted here: https://bbs.archlinux.org/viewtopic.php?pid=1156051#p1156051<br />
#!/bin/bash <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# <br />
# Copyright(C) 2012 Eugen Dahm <eugen.dahm@gmail.com>. <br />
# <br />
# fix is based on a proposed bugfix posted on <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> <br />
# <br />
# This program is free software; you can redistribute it and/or modify <br />
# it under the terms of the GNU General Public License as published by <br />
# the Free Software Foundation; either version 2 of the License, or <br />
# (at your option) any later version. <br />
# <br />
# This program is distributed in the hope that it will be useful, <br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of <br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br />
# GNU General Public License for more details. <br />
# <br />
# You should have received a copy of the GNU General Public License <br />
# along with this program; if not, write to the Free Software <br />
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA <br />
# <br />
# Asus UX32VD acpi backlight fix <br />
# Disclaimer!!!! not recommended to use if laptop is not the Asus UX32VD\ <br />
# probably works with other models too, but the didl and cadl offset needs to be extracted <br />
# from the dsdt <br />
# Tested with bios 2.06 <br />
# IGDM_BASE has to be determined for each notebook <br />
# IGDM is the operation region (\_SB_.PCI0.GFX0.IGDM) containing the CADL/DIDL fields <br />
# \aslb is a named field containing the base-address of the IGDM region <br />
# this address depends on the installed ram <br />
# how to get the address: <br />
# - git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# - make <br />
# - load module with insmod or copy to /lib/modules/.... and modprobe <br />
# - echo '\aslb' > /proc/acpi/call <br />
# - cat /proc/acpi/call <br />
# - this is the IGDM base address - fill in below <br />
IGDM_BASE=0xBE8B7018<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
# this basically copies the values of the initialized fields DIDL-DDL8 in the IGDM opregion and initializes CADL-CAL8 with it <br />
# CADL-CAL8 are fields, telling the bios that a screen or something is connected (this is a bit speculation - check <br />
# <[url]https://bugs.freedesktop.org/show_bug.cgi?id=45452[/url]> for more <br />
# if interested, disasselbe the dsdt to understand, why no notifyevent gets thrown, when CADL isn't initialized <br />
# (hint: _Q0E/_Q0F are the backlight methods on the UX32VD) <br />
dd if=/dev/mem skip=$(( $IGDM_BASE + $DIDL_OFFSET )) count=32 bs=1 | xxd | xxd -r | dd of=/dev/mem bs=1 seek=$(( $IGDM_BASE + $CADL_OFFSET )) count=32 <br />
<br />
This script still needs to be adjusted to your notebook configuration (it uses a memory address which strongly depends on the amount of installed system memory.<br />
<br />
The exact address can be determined with following steps:<br />
<br />
# git clone git://github.com/Bumblebee-Project/acpi_call.git <br />
# cd acpi_call <br />
# make <br />
# gzip acpi_call.ko <br />
# load module acpi_call.ko.gz with insmod or copy to /lib/modules/.... and modprobe <br />
# echo '\aslb' > /proc/acpi/call <br />
# cat /proc/acpi/call <br />
# this is the IGDM base address - initialize the IGDM_BASE variable with this value in the script<br />
<br />
Initialize your bios with this script on boot :<br />
# echo "/usr/local/share/backlightfix" >> /etc/rc.local<br />
<br />
Execute the script and hope the backlight buttons work afterwards. If they don't you probably have to disasselbe the dsdt for yourself, because you have to adjust the following 2 variables in the script:<br />
DIDL_OFFSET=0x120<br />
CADL_OFFSET=0x160<br />
<br />
These are the offsets on the Asus UX32VD bios version 2.06. Try google to find a tutorial how to disassemble the dsdt.<br />
<br />
==== Getting the DIDL and CADL offsets ====<br />
<br />
Now comes the funny part: <br />
<br />
# open your disassembled dsdt. The should have the filename dsdt.dsl.<br />
# find the operationregion IGBM. It should have a Field statement below, and probably looks something like this:<br />
OperationRegion (IGDM, SystemMemory, ASLB, 0x2000)<br />
Field (IGDM, AnyAcc, NoLock, Preserve)<br />
{<br />
SIGN, 128, <br />
SIZE, 32, <br />
OVER, 32, <br />
...<br />
This specifies some variables in this IGDM field (for me, they look similar to a c struct, except that you don't need to give the size of each element in a struct).<br />
The numbers are the size for each element in bit. <br />
<br />
You must add those field sizes until you reach the DIDL variable. With the UX32VD the DIDL offset is easy, because of this statement:<br />
..<br />
Offset (0x120), <br />
DIDL, 32,<br />
..<br />
Don't know exactly why they use the Offset statement, since this is somewhat redundant. It tells you that the following element has the offset 0x120.<br />
<br />
Since I thought it is obvious what this statement does, I didn't bother to look it up in the dsl language specification. I thought it tells the bios that the following<br />
variable starts with an offset of 0x120 bytes relative to the previous element, but I was wrong. It basically tells you/bios that the following variable starts with an <br />
offset of 0x120 relative to the beginning of the opregion (in this case its completely unnecessary).<br />
<br />
Now the only thing left is the CADL offset. Add the numbers starting from DIDL until you reach CADL and add it to your previous offset. This should be the 2nd needed offset.<br />
<br />
After updating both offset variables in the script and executing it again, the backlight should now work (no guarantee).<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== Keyboard backlight ====<br />
<br />
There was a script on this page, which I have packaged for your convenience. Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:<br />
<br />
# asus-kbd-backlight allowusers<br />
<br />
If you use [[initscripts]], put this into your {{ic|/etc/rc.local}}:<br />
<br />
# echo "asus-kbd-backlight allowusers" >> /etc/rc.local<br />
<br />
Users of [[systemd]] can use the unit file included in the package.<br />
<br />
# systemctl daemon-reload<br />
# systemd start asus-kbd-backlight.service<br />
# systemd enable asus-kbd-backlight.service<br />
<br />
No you can easily change keyboard backlight in terminal:<br />
<br />
$ asus-kbd-backlight up<br />
$ asus-kbd-backlight down<br />
$ asus-kbd-backlight max<br />
$ asus-kbd-backlight off<br />
$ asus-kbd-backlight night<br />
$ asus-kbd-backlight 2<br />
$ asus-kbd-backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=====UPower Script=====<br />
<br />
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of dbus, upower and if you want the OSD notifications, libnotify.<br />
<br />
This script increases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
# get maximum keyboard brightness from UPower<br />
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)<br />
# strip leading 9 characters " int32 "<br />
max_brightness=${max_brightness:9}<br />
# if the current keyboard brightness is less than max, increment brightness by one<br />
if [ $current_state -lt $max_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state+1))<br />
notify-send "Keyboard brightness reset to $((current_state+1))"<br />
else<br />
# if the keyboard brightness is already at maximum, complain<br />
notify-send "Keyboard brightness already at maximum"<br />
fi<br />
<br />
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:<br />
<br />
#! /bin/bash<br />
# get current keyboard brightness from UPower<br />
current_state=$(dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)<br />
# strip leading 9 characters " int32 "<br />
current_state=${current_state:9}<br />
min_brightness=0<br />
# if the current keyboard brightness is greater than zero, decrement brightness by one<br />
if [ $current_state -gt $min_brightness ] ; then <br />
dbus-send --type=method_call --print-reply=literal --system \<br />
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \<br />
int32:$((current_state-1))<br />
notify-send "Keyboard brightness reset to $((current_state-1))"<br />
else<br />
# if the keyboard brightness is already at zero, complain<br />
notify-send "Keyboard brightness already at zero"<br />
fi<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== HDMI plugged at boot ==<br />
<br />
There seems to be an issue whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:<br />
<br />
<br />
<br />
Add the following script as root:<br />
{{hc|/usr/local/share/hdmi-plugged-startup|#!/bin/bash<br />
<br />
export XAUTHORITY&#61;/home/$USER/.Xauthority<br />
export DISPLAY&#61;:0<br />
<br />
/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1}}<br />
<br />
then make it executable<br />
# chmod +x /usr/local/share/hdmi-plugged-startup<br />
<br />
And add the following udev rule:<br />
# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
==Hardware and Modules==<br />
<br />
====PCI====<br />
<br />
This is output of lscpci -nnn -k<br />
<br />
{| class="wikitable" border="1" cellpadding="5" cellspacing="0"<br />
! Description !! PCI Id !! Module<br />
|-<br />
| Intel Corporation 3rd Gen Core processor DRAM Controller || 8086:0154 || none<br />
|-<br />
| Intel Corporation 3rd Gen Core processor Graphics Controller || 8086:0166 || i915 <br />
|-<br />
| Intel Corporation Device || 8086:0153 || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller || 8086:1e31 || xhci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 || 8086:1e3a || mei<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 || 8086:1e2d || ehci_hcd<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller || 8086:1e20 || snd_hda_intel<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 || 8086:1e10 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 || 8086:1e12 || pcieport<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1|| 8086:1e26 || ehci_hcd<br />
|-<br />
| Intel Corporation HM76 Express Chipset LPC Controller || 8086:1e59 || lpc_ich<br />
|-<br />
| Intel Corporation 7 Series Chipset Family 6-port SATA Controller || 8086:1e03 || ahci<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller || 8086:1e22] || none<br />
|-<br />
| Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller || 8086:1e24 || none<br />
|-<br />
| Intel Corporation Centrino Advanced-N 6235 || 8086:088e || iwlwifi<br />
|}<br />
<br />
====Other Devices and Drivers====<br />
<br />
=====mei=====<br />
<br />
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology". Intel has a downloadable configuration tool: [http://software.intel.com/file/38014 AMT Tool]. The tool requires libcrypto and libssl. It was coded to look for libcrypto.so.0.9.8 and libssl.so.0.9.8. This can be fixed with a symlink:<br />
<br />
$sudo ln -s /usr/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8<br />
$sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.0.9.8<br />
<br />
Some of the rest of the package requires compiling, but it fails for me.<br />
<br />
=====rdrand=====<br />
<br />
The i7 Core CPU has an on-chip random number generator, rdrand, code named "Bull Mountain". It appears that since 3.2, this is used as a source for /dev/urandom. It is also used as a randomness source by rng-tools version 4.<br />
<br />
In contrast to other hardware random number generators, rdrand does not create a character device in /dev. However, rngd version 4 does appear to detect and use it.<br />
<br />
First, make sure rngd sees it:<br />
<br />
[root@asarum system]# rngd -v --no-tpm=1<br />
Available entropy sources:<br />
DRNG<br />
<br />
Second, start rngd:<br />
<br />
[root@asarum log]# rngd -f --no-tpm=1<br />
<br />
The options for rngd.service are found in /etc/conf.d/rngd. I modified the file as follows:<br />
<br />
# RNGD_OPTS="-o /dev/random -r /dev/urandom"<br />
RNGD_OPTS=" -o /dev/random --no-tpm=1"<br />
<br />
Test:<br />
<br />
[root@asarum system]# cat /dev/random | rngtest -c 1000<br />
rngtest 4<br />
Copyright (c) 2004 by Henrique de Moraes Holschuh<br />
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
<br />
rngtest: starting FIPS tests...<br />
rngtest: bits received from input: 20000032<br />
rngtest: FIPS 140-2 successes: 1000<br />
rngtest: FIPS 140-2 failures: 0<br />
rngtest: FIPS 140-2(2001-10-10) Monobit: 0<br />
rngtest: FIPS 140-2(2001-10-10) Poker: 0<br />
rngtest: FIPS 140-2(2001-10-10) Runs: 0<br />
rngtest: FIPS 140-2(2001-10-10) Long run: 0<br />
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0<br />
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s<br />
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s<br />
rngtest: Program run time: 9434482 microseconds<br />
<br />
=====watchdog=====<br />
<br />
The chipset also has an hardware watchdog:<br />
<br />
root@asarum chris]# wdctl<br />
Device: /dev/watchdog<br />
Identity: iTCO_wdt [version 0]<br />
Timeout: 30 seconds<br />
Timeleft: 2 seconds<br />
FLAG DESCRIPTION STATUS BOOT-STATUS<br />
KEEPALIVEPING Keep alive ping reply 0 0<br />
MAGICCLOSE Supports magic close char 0 0<br />
SETTIMEOUT Set timeout (in seconds) 0 0<br />
<br />
Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in [http://0pointer.de/blog/projects/watchdog.html this blog post].<br />
<br />
All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.<br />
<br />
#RuntimeWatchdogSec=0<br />
RuntimeWatchdogSec=30<br />
<br />
Check after next boot:<br />
<br />
[root@asarum chris]# journalctl | grep -i watchdog<br />
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10<br />
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0<br />
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.<br />
<br />
====Issue with ACPI and gpio_ich====<br />
<br />
The gpio_ich module causes the following error:<br />
<br />
ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)<br />
lpc_ich: Resource conflict(s) found affecting gpio_ich<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)<br />
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)<br />
<br />
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded <br />
<br />
# lsmod | grep gpio<br />
# <br />
<br />
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
0428-042f : gpio_ich<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
0500-053f : gpio_ich<br />
<br />
In contrast, here's the same lines without acpi_enforce_resources=lax:<br />
<br />
0420-042f : ACPI GPE0_BLK<br />
<br />
and<br />
<br />
0500-057f : pnp 00:05<br />
<br />
So, net/net, there's no real issue.<br />
<br />
== Random kernel panics on boot ==<br />
<br />
If Archlinux boots without any issues sometimes, but locks up with a kernel panic other times, the cause (as described by Whef in this thread: https://bbs.archlinux.org/viewtopic.php?pid=1169781#p1169781) is likely the 'btusb' module.<br />
<br />
To fix the issue, blacklist the 'btusb' module on the next boot by running:<br />
<br />
sudo echo "blacklist btusb" > /etc/modprobe.d/disable_btusb.conf<br />
<br />
Then use rc.local to load it at the end of the boot process by running:<br />
<br />
sudo echo "modprobe btusb" >> /etc/rc.local<br />
<br />
This appears to avoid whatever race condition conflict that causes the kernel to panic on boot, but if you're still having the same issue, try removing 'modprobe btusb' from /etc/rc.local to avoid the module completely.<br />
<br />
== Additional resources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220946ASUS Zenbook Prime UX31A2012-09-01T10:19:51Z<p>Bzhb: /* Configure bootloader */ less personal formulation</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| Kernel parameter {{ic| pcie_aspm&#61;force}} status is unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. There is no noticeable problem when it is added to the list, so it is probably safe.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220945ASUS Zenbook Prime UX31A2012-09-01T10:16:30Z<p>Bzhb: /* Configure bootloader */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1 nmi_watchdog=0"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. I have been using it for over a month without noticeable problem, so it is probably safe to add it to the list.}}<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Talk:ASUS_Zenbook_Prime_UX31A&diff=220943Talk:ASUS Zenbook Prime UX31A2012-09-01T10:12:23Z<p>Bzhb: </p>
<hr />
<div>@'''Other function keys''': I am writing from an UX31A with kernel 3.5.3-1-ARCH, and my function keys are '''not''' working out-of-the-box (except volume and display out). Is there any kernel module which is not mentioned in the text or is this information simply wrong?<br />
<br />
Additionally the following info box says that since a ''newer'' kernel version a patch is no longer needed. A version that I don't need anyhow, because everything is supposed to work out-of-the-box. Seems a little bit contradictious...<br />
<br />
*"Working" means that you can see keycodes with xev when function keys are pressed. It does not means that — for example — when you press fn+f3 it will diminish keyboard luminosity : for that you must link the keycode to the functionality. I have the same kernel version than you and I can confirm you no longer needs the fix : All the keys except screen backlight are working. [[User:Bzhb|Bzhb]] ([[User talk:Bzhb|talk]]) 21:26, 31 August 2012 (UTC)<br />
<br />
* Ah, I see! Thanks for the explanation. [[User:Mqt|Mqt]] ([[User talk:Mqt|talk]]) 21:42, 31 August 2012 (UTC)<br />
<br />
== Installation section ==<br />
<br />
The additional information about encrypted partition is nice, but I think installation instructions should be more modular and better accomodate the different installation scenarios : standalone arch without encryption, arch with encryption, dual boot install keeping the original windows install...<br />
<br />
So I think that all the additional steps about encryption should be clearly flagged at optional. [[User:Bzhb|Bzhb]] ([[User talk:Bzhb|talk]]) 10:12, 1 September 2012 (UTC)</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220941ASUS Zenbook Prime UX31A2012-09-01T10:03:56Z<p>Bzhb: /* Partition the disk */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
{{Note|You can also keep the first two partitions in the default setup, especially if you want to dual boot windows. Those are [[UEFI]] boot partition and [[GPT]] partition.}}<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220940ASUS Zenbook Prime UX31A2012-09-01T09:52:32Z<p>Bzhb: /* Function keys */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]] or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220939ASUS Zenbook Prime UX31A2012-09-01T09:51:30Z<p>Bzhb: /* Function keys */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220938ASUS Zenbook Prime UX31A2012-09-01T09:51:03Z<p>Bzhb: /* Function keys */ additional note</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
{{note | A working keymap means that there is some output in xev when the key combination is pressed. It does not means that the keymap is linked to the functionality. For that it is necessary to add a keyboard shortcut or to use a desktop shell with built-in support the keycode in question.}}<br />
<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220936ASUS Zenbook Prime UX31A2012-09-01T09:42:43Z<p>Bzhb: cleaning titles</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Function keys ==<br />
=== Screen backlight ===<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
=== Other function keys ===<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
==== Method 1 ====<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
==== Method 2 ====<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
==== keyboard backlight script ====<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=220935ASUS Zenbook Prime UX31A2012-09-01T09:38:33Z<p>Bzhb: /* Other function keys */ cleaning</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Installation ==<br />
The following instructions cover a complete installation of a setup with [[dm-crypt with LUKS]] and [[LVM]] on the ASUS Zenbook UX31a.<br />
<br />
=== Notes ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
=== Prepare installation medium ===<br />
* Download the new Arch Linux ISO from the [https://www.archlinux.org/download/ Arch Linux download page].<br />
* Install it to your USB device (/dev/sdX) by running<br />
dd bs=5M if=archlinux-XXXX.YY.ZZ-dual.iso of=/dev/sdX<br />
<br />
=== Boot from USB medium ===<br />
Press {{keypress|Escape}} to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot: This time the USB bootable device should appear in the menu.<br />
<br />
Select 'Boot Arch Linux (x86_64)" and press {{keypress|Enter}}. The installation system will be booted and you will end up with a terminal.<br />
<br />
=== Partition the disk ===<br />
As earlier mentioned this installation covers a setup with an [[dm-crypt with LUKS|encrypted hard drive]] and [[LUKS]] on top of it. Therefore we need at least three partitions:<br />
<br />
* [[UEFI]] boot partition<br />
* system boot partition<br />
* encrypted system partition<br />
<br />
We run {{ic|gdisk /dev/sda}} to start the partition manager. By typing {{ic|d}} we are capable of deleting all existing partitions and start with a fresh configuration.<br />
<br />
Now use {{ic|n}} to create new partitions:<br />
<br />
* UEFI boot partition:<br />
ID: 1<br />
Start (sector): <empty><br />
End (sector): +512M<br />
Code: EF00<br />
<br />
* System boot partition<br />
ID: 2<br />
Start (sector): <empty><br />
End (sector): +200M<br />
Code: <empty><br />
<br />
* Encrypted system partition<br />
ID: 3<br />
Start (sector): <empty><br />
End (sector): <empty><br />
Code: <empty><br />
<br />
The {{ic|<empty>}} command means that you leave the field in the prompt empty and just hit {{keypress|Enter}} directly. After creating those partitions enter {{ic|p}} to print the partition table which should like the following:<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 1050623 512.0 MiB EF00 EFI System<br />
2 1050624 1460223 200.0 MiB 8300 Linux filesystem<br />
3 1460224 250069646 118.5 GiB 8300 Linux filesystem<br />
<br />
Finally write the partition table with {{ic|w}} and confirm with {{ic|Y}}.<br />
<br />
=== Setup dm-crypt with LUKS ===<br />
In this section we setup [[dm-crypt with LUKS]] by preparing our encrypted system disk (/dev/sda3) and creating our logical volumes for the system, home and swap partition.<br />
<br />
modprobe dm-crypt<br />
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda3<br />
cryptsetup luksOpen /dev/sda3 lvm<br />
<br />
lvm pvcreate /dev/mapper/lvm<br />
lvm vgcreate vgroup /dev/mapper/lvm<br />
lvm lvcreate -L 20GB -n root vgroup<br />
lvm lvcreate -C -y -L 8GB -n swap vgroup<br />
lvm lvcreate -l 100%Free -n home vgroup<br />
<br />
=== Format partitions ===<br />
<br />
mkfs.vfat -F32 /dev/sda1<br />
mkfs.ext4 /dev/sda2<br />
mkfs.ext4 /dev/mapper/vgroup-root<br />
mkfs.ext4 /dev/mapper/vgroup-home<br />
mkswap /dev/mapper/vgroup-swap<br />
<br />
=== Mount partitions ===<br />
<br />
mount /dev/mapper/vgroup-root<br />
mkdir -p /mnt/boot<br />
mount /dev/sda2 /mnt/boot<br />
mkdir -p /mnt/boot/efi<br />
mount /dev/sda1 /mnt/boot/efi<br />
mkdir -p /mnt/home<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
swapon -va<br />
<br />
=== Connect to the internet ===<br />
<br />
Follow [[Installation_Guide#Connect_to_the_internet]] to establish an internet connection.<br />
<br />
=== Install the base system ===<br />
<br />
pacstrap /mnt base base-devel<br />
<br />
=== Install a bootloader<br />
<br />
pacstrap /mnt grub-efi-x86_64<br />
<br />
=== Configure system ===<br />
<br />
==== Generate fstab ====<br />
<br />
genfstab -p -U /mnt >> /mnt/etc/fstab<br />
<br />
==== Chroot in the newly installed system ====<br />
<br />
arch-chroot /mnt<br />
<br />
==== Set hostname ====<br />
<br />
echo UX31A > /etc/hostname<br />
<br />
==== Set timezone ====<br />
<br />
ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime<br />
<br />
==== Set locale preferences ====<br />
<br />
Append the following lines to {{ic|/etc/locale.conf}}<br />
<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
and uncomment the following line in {{ic|/etc/locale.conf}}<br />
<br />
en_US.UTF-8<br />
<br />
Then execute {{ic|locale-gen}}.<br />
<br />
==== Configure mkinitcpio.conf and create initial RAM disk ====<br />
Edit {{ic|/etc/mkinitcpio.conf}}<br />
<br />
HOOKS=(... sata encrypt lvm2 filesystems ...)<br />
<br />
and run {{ic|mkinitcpio -p linux}},.<br />
<br />
==== Configure rc.conf ====<br />
Edit {{ic|/etc/rc.conf}} and set:<br />
<br />
USELVM="yes"<br />
<br />
=== Configure bootloader ===<br />
Load the required modules:<br />
<br />
modprobe dm-mod<br />
modprobe dmefivars<br />
<br />
Edit {{ic|/etc/default/grub}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:vgroup:allow-discards"<br />
<br />
Install the bootloader:<br />
<br />
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
Copy necessary files and reconfigure grub:<br />
<br />
mkdir -p /boot/grub/locale<br />
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
==== Reboot and launch EFI shell ====<br />
Type {{ic|reboot}} and press F2 and choose "Launch EFI shell from filesystem device" from the "Save and exit" tab. grub2 should be launched and you should be able to boot into your system.<br />
<br />
==== Create GRUB2 entry in the FBM ====<br />
<br />
modprobe efivars<br />
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Arch Linux (GRUB2)" --loader '\EFI\arch_grub\grubx64.efi'<br />
reboot<br />
<br />
=== Additional steps ===<br />
It might happen that the parameters of the /boot/efi entry in /etc/fstab are a bit messed up. You are safe to remove the whole line or reduce its parameters to "rw,relatime 0 2"<br />
<br />
=== Mount installed system from installation medium ===<br />
If any error occured or you forgot any necessary steps you are able to mount the installed system from the installation medium with the following commands:<br />
<br />
cryptsetup luksOpen /dev/sda3 lvm <br />
vgscan<br />
vgchange -ay<br />
<br />
mount /dev/mapper/vgroup-root /mnt<br />
mount /dev/sda2 /mnt/boot<br />
mount /dev/sda1 /mnt/boot/efi<br />
mount /dev/mapper/vgroup-home /mnt/home<br />
<br />
arch-chroot /mnt<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
<br />
{{note | Since Kernel 3.4.9-1 the instructions below concerning the kernel patch/dkms are no longer required.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== Touchpad ==<br />
[http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This] makes the right click button work and activates palm detection.<br />
Multifinger taps work out of the box.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Talk:ASUS_Zenbook_Prime_UX31A&diff=220833Talk:ASUS Zenbook Prime UX31A2012-08-31T21:27:17Z<p>Bzhb: </p>
<hr />
<div>@'''Other function keys''': I am writing from an UX31A with kernel 3.5.3-1-ARCH, and my function keys are '''not''' working out-of-the-box (except volume and display out). Is there any kernel module which is not mentioned in the text or is this information simply wrong?<br />
<br />
Additionally the following info box says that since a ''newer'' kernel version a patch is no longer needed. A version that I don't need anyhow, because everything is supposed to work out-of-the-box. Seems a little bit contradictious...<br />
<br />
*"Working" means that you can see keycodes with xev when function keys are pressed. It does not means that — for example — when you press fn+f3 it will diminish keyboard luminosity : for that you must link the keycode to the functionality. I have the same kernel version than you and I can confirm you no longer needs the fix : All the keys except screen backlight are working. [[User:Bzhb|Bzhb]] ([[User talk:Bzhb|talk]]) 21:26, 31 August 2012 (UTC)</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Talk:ASUS_Zenbook_Prime_UX31A&diff=220832Talk:ASUS Zenbook Prime UX31A2012-08-31T21:26:57Z<p>Bzhb: </p>
<hr />
<div>@'''Other function keys''': I am writing from an UX31A with kernel 3.5.3-1-ARCH, and my function keys are '''not''' working out-of-the-box (except volume and display out). Is there any kernel module which is not mentioned in the text or is this information simply wrong?<br />
<br />
Additionally the following info box says that since a ''newer'' kernel version a patch is no longer needed. A version that I don't need anyhow, because everything is supposed to work out-of-the-box. Seems a little bit contradictious...<br />
<br />
"Working" means that you can see keycodes with xev when function keys are pressed. It does not means that — for example — when you press fn+f3 it will diminish keyboard luminosity : for that you must link the keycode to the functionality. I have the same kernel version than you and I can confirm you no longer needs the fix : All the keys except screen backlight are working. [[User:Bzhb|Bzhb]] ([[User talk:Bzhb|talk]]) 21:26, 31 August 2012 (UTC)</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=218184ASUS Zenbook Prime UX31A2012-08-16T16:01:18Z<p>Bzhb: /* touchpad */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. I have been using it for over a month without noticeable problem, so it is probably safe to add it to the list.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
<br />
{{note | It seems that since Kernel 3.4.4-2 everything (except the display brightness keys, but you won't get them working with the following procedures anyway) works out-of-the-box.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
Right click button doesn't work, but you can use three fingers tap instead.<br />
{{Tip|Multifinger taps: Two finger for middle click; three fingers for right click.}}<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=218183ASUS Zenbook Prime UX31A2012-08-16T15:57:46Z<p>Bzhb: </p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. I have been using it for over a month without noticeable problem, so it is probably safe to add it to the list.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
<br />
{{note | It seems that since Kernel 3.4.4-2 everything (except the display brightness keys, but you won't get them working with the following procedures anyway) works out-of-the-box.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=218182ASUS Zenbook Prime UX31A2012-08-16T15:54:44Z<p>Bzhb: adding reference to UX32VD</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that is more complete for now (instructions may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. I have been using it for over a month without noticeable problem, so it is probably safe to add it to the list.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
<br />
{{note | It seems that since Kernel 3.4.4-2 everything (except the display brightness keys, but you won't get them working with the following procedures anyway) works out-of-the-box.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=218178ASUS Zenbook Prime UX31A2012-08-16T15:35:00Z<p>Bzhb: /* Set up UEFI boot */ : info on kernel parameter pcie_aspm</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that is more complete for now (instructions may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used. I have been using it for over a month without noticeable problem, so it is probably safe to add it to the list.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
<br />
{{note | It seems that since Kernel 3.4.4-2 everything (except the display brightness keys, but you won't get them working with the following procedures anyway) works out-of-the-box.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.7-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.7-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.7-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=214698ASUS Zenbook Prime UX31A2012-07-25T13:42:45Z<p>Bzhb: /* Powersave management */ adding custom script</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that is more complete for now (instructions may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
<br />
{{note | It seems that since Kernel 3.4.4-2 everything (except the display brightness keys, but you won't get them working with the following procedures anyway) works out-of-the-box.}}<br />
<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636 (ubuntu forums account + minimum of 50 posts required) or http://markmail.org/message/idvl6s27r26xzorb (no account required)<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.6-1-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.6-1-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.6-1-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.6-1-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
Here is a custom script for easy power management (feel free to improve)<br />
<br />
#!/bin/bash<br />
<br />
case "$1" in<br />
ac)<br />
sudo pm-powersave ac<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g ondemand; done<br />
;;<br />
battery)<br />
sudo pm-powersave battery<br />
sudo cpufreq-set -c 0 -g conservative <br />
for i in 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
aggressive)<br />
sudo pm-powersave battery<br />
for i in 0 1 2 3; do sudo cpufreq-set -c $i -g powersave; done<br />
;;<br />
info)<br />
echo "#########################"<br />
echo "# acpi"<br />
acpi<br />
read<br />
echo "#########################"<br />
echo "# cpufreq-info"<br />
cpufreq-info<br />
read<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
read<br />
<br />
;;<br />
powertop)<br />
sudo powertop<br />
;;<br />
suspend)<br />
sudo pm-suspend<br />
;;<br />
<br />
load)<br />
sudo modprobe cpufreq_powersave<br />
sudo modprobe cpufreq_conservative<br />
echo "#########################"<br />
echo "Available energy governators"<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
;;<br />
<br />
install)<br />
sudo pacman -S pm-utils acpi powertop laptop-mode-tools cpufrequtils<br />
echo "You should add DAEMONS=(...cpufreq_powersave cpufreq_conservative laptop-mode...) in /etc/rc.conf"<br />
;;<br />
*)<br />
echo "#########################"<br />
echo "Choose an option:"<br />
echo "0) info"<br />
echo "1) battery"<br />
echo "2) ac"<br />
echo "3) aggressive powersave"<br />
echo "4) suspend"<br />
echo "5) powertop"<br />
echo "6) install"<br />
read choice<br />
#echo $choice<br />
case $choice in<br />
0)<br />
$0 info<br />
;;<br />
1)<br />
$0 battery<br />
;;<br />
2)<br />
$0 ac<br />
;;<br />
3)<br />
$0 aggressive<br />
;;<br />
4)<br />
$0 suspend<br />
;;<br />
5)<br />
$0 powertop<br />
;;<br />
6)<br />
$0 install<br />
;;<br />
*)<br />
exit 0<br />
;;<br />
esac<br />
esac<br />
<br />
exit 0<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=Extra_keyboard_keys/Xorg&diff=212506Extra keyboard keys/Xorg2012-07-09T23:01:32Z<p>Bzhb: /* Openbox */</p>
<hr />
<div>[[Category:Keyboards]]<br />
[[Category:X Server]]<br />
[[ru:Extra Keyboard Keys in Xorg]]<br />
[[tr:X_sunucusunda_ek_klavye_tuşları]]<br />
{{Article summary start}}<br />
{{Article summary text|A general overview of how to assign actions to extra keyboard keys in [[Xorg]].}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary wiki|Xmodmap}}<br />
{{Article summary wiki|Extra Keyboard Keys}}<br />
{{Article summary wiki|Extra Keyboard Keys in Console}}<br />
{{Article summary end}}<br />
<br />
When we are in a graphical environment we may want a key to print a special character or execute a command. There are some ways of doing that and they are covered in this HOWTO.<br />
<br />
{{Box Note |This article assumes that your keys already have keycodes and that you know these codes, if not, see the [[Extra Keyboard Keys]] article where it is explained.}}<br />
<br />
=Map keycodes to symbols=<br />
==Introduction==<br />
The most traditional and proficient way to make a key output a character when you are in X is to use xmodmap. Xmodmap is roughly the X equivalent of ''loadkeys'': it reads a file containing some directives. As ''loadkeys'', it can be used to modify many aspects of the behaviour of your keyboard (such as modifiers, etc.), but I will not cover these aspects in this article. The only kind of directive I am interested in here associates an X keycode to a keysym. ''xmodmap'' is included in the ''xorg-server-utils'' package.<br />
# pacman -S xorg-server-utils<br />
<br />
==Step 1: Create the xmodmap file==<br />
In this file, you have to list the keycode directives, with the following syntax:<br />
keycode <Xkeycode> = <keysym><br />
The list of X keysyms can be read in {{ic|/usr/include/X11/keysymdef.h}}. Anyway, most of them are intuitive. Let us say that the X keycode of my hotkey is 239. If I want it to output a literal 'e', I will write the following directive:<br />
keycode 239 = e<br />
If I want it to output the symbol of the American currency, I will write the following directive:<br />
keycode 239 = dollar<br />
<br />
This can also be used to assign functions to multimedia keys. Special functions can be found in {{ic|/usr/include/X11/XF86keysym.h}}.<br />
<br />
An example {{ic|~/.Xmodmap}}:<br />
keycode 160 = XF86AudioMute<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
<br />
Multimedia programs such as Rhythmbox and Exaile are designed to work with keys assigned to XF86 Symbols out-of-the-box, without the need to configure a third-party application.<br />
<br />
==Step 2: Testing==<br />
Finally I have to source the file with xmodmap:<br />
$ xmodmap ~/.Xmodmap<br />
<br />
==Step 3: Making it permanent==<br />
Obviously, this will work only for the current X session, use [[xprofile]] to make it permanent.<br />
<br />
=Map keycodes to actions=<br />
<br />
==Using your Desktop Environment tools==<br />
===Gnome===<br />
Gnome Control Center is quite complete for the extra keyboard keys management. In fact it can directly detect scancodes which means that it can map any key seen by the kernel.<br />
<br />
===KDE===<br />
Keyboard shortcuts can be configured in '''System Settings''' -> '''Shortcuts and Gestures'''.<br />
<br />
===Xfce4===<br />
You can change the keyboard shortcuts in Keyboard Settings, which can be run using {{Ic|xfce4-keyboard-settings}}.<br />
<br />
===Openbox===<br />
You can set keyboard shortcuts and actions in the keyboard section of your {{ic|~/.config/openbox/rc.xml}} file. For example, the following will lower the volume with a media key:<br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<execute>amixer set Master 5- unmute</execute><br />
</action><br />
</keybind><br />
For more information, please visit [http://urukrama.wordpress.com/openbox-guide/#Key_mouse urukrama's Openbox Guide] or the [http://openbox.org/wiki/Help:Actions Openbox Wiki].<br />
<br />
You can use obkey utility from [[AUR]] for easy configuration.<br />
<br />
===PekWM===<br />
Setting keys in PekWM is accomplished by editing your {{ic|~/.pekwm/keys}} file. For example, adding the following at the bottom of the Global section will lower the volume with a media key:<br />
KeyPress = "XF86AudioLowerVolume" { Actions = "exec amixer set Master 5%- unmute &" }<br />
<br />
===Xmonad===<br />
If you use Xmonad as a stand alone window manager, you can edit the xmonad.hs to add unbinded keyboard keys. You just need to find the Xf86 name of the key (such as XF86PowerDown) and look it up in {{Ic|/usr/include/X11/XF86keysym.h}} it will give you a keycode like 0x1008FF2A. Then using that keycode you can just add a line like the following in the keybindings section of your xmonad.hs<br />
((0, 0x1008FF2A), spawn "sudo pm-suspend")<br />
<br />
===i3===<br />
Open your ~/.i3/config and just bind the key (keysym or keycode) to a command:<br />
bindsym XF86MonBrightnessDown exec xbacklight -dec 10<br />
bindsym Print exec scrot<br />
<br />
==Using third-party programs==<br />
===keytouch===<br />
KeyTouch is a program which allows you to easily configure the extra function keys of your keyboard. This means that you can define, for every individual function key, what to do if it is pressed.<br />
<br />
''See the detailed article: [[keytouch]].''<br />
<br />
===Using actkbd===<br />
From [http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/ actkbd home page]:<br />
<blockquote><br />
'''actkbd''' (available [https://aur.archlinux.org/packages.php?ID=8056 in AUR]) is a simple daemon that binds actions to keyboard events. It recognises key combinations and can handle press, repeat and release events. Currently it only supports the linux-2.6 evdev interface. It uses a plain-text configuration file which contains all the bindings.<br />
</blockquote><br />
<br />
A sample configuration and guide is available [http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/latest/README here].<br />
<br />
<br />
===Using xbindkeys===<br />
''[[xbindkeys]]'' (available in the extra repository) allows advanced mapping of keycodes to actions independently of the Desktop Environment.<br />
<br />
A GUI called ''xbindkeys_config'' is available in [[AUR]].</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=212505ASUS Zenbook Prime UX31A2012-07-09T22:30:08Z<p>Bzhb: add /* keyboard backlight script */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that is more complete for now (instructions may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.4-2-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.4-2-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.4-2-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.4-2-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
In the same style that for screen backlight. As root, create the file {{ic|/usr/local/share/kbd_backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/leds/asus::kbd_backlight"<br />
#path="/sys/class/leds/asus\:\:kbd_backlight"<br />
<br />
# max should be 3<br />
max=$(cat ${path}/max_brightness)<br />
# step: represent the difference between previous and next brightness<br />
step=1<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
on)<br />
$0 max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit 1 <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/kbd_backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/kbd_backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "kbd_backlight"="/bin/bash /usr/local/share/kbd_backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ kbd_backlight up<br />
$ kbd_backlight down<br />
$ kbd_backlight max<br />
$ kbd_backlight off<br />
$ kbd_backlight night<br />
$ kbd_backlight 2<br />
$ kbd_backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
<br />
pm-utils<br />
powertop<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=212504ASUS Zenbook Prime UX31A2012-07-09T22:14:55Z<p>Bzhb: /* Method 2keyboard backlight script */</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that is more complete for now (instructions may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.4-2-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.4-2-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.4-2-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.4-2-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
=== keyboard backlight script ===<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
<br />
pm-utils<br />
powertop<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhbhttps://wiki.archlinux.org/index.php?title=ASUS_Zenbook_Prime_UX31A&diff=212503ASUS Zenbook Prime UX31A2012-07-09T22:10:35Z<p>Bzhb: /* Screen backlight */ an small improvement to the script for low intensity</p>
<hr />
<div>[[Category:ASUS]]<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks.<br />
<br />
See precedent generation [[ASUS Zenbook UX31E]] page that is more complete for now (instructions may be only partially applicable to UX31A)<br />
<br />
== Bootloader ==<br />
=== Boot on usb ===<br />
Press {{keypress|Escape}} to get the boot menu. If usb bootable device is not listed, enter configuration menu and directly press {{keypress|F10}} to save. Press {{keypress|Escape}} again on reboot : this time USB bootable device should appears in the menu.<br />
<br />
=== Set up UEFI boot ===<br />
{{Note|It is recommended to read the [[UEFI]], [[GPT]] and [[UEFI_Bootloaders]] pages before following those instructions.}}<br />
<br />
<br />
It is possible to use [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]] in-kernel bootloader, if you wish. We present here the [[GRUB2]] way. We assume {{ic|x86_64}} version of Arch Linux.<br />
{{warning| UX31A firmware is {{ic|x86_64}}, so it makes it compulsory to use {{ic|x86_64}} kernel to be able to dual boot with Windows in UEFI mode }}<br />
<br />
In the original partition setup:<br />
<br />
first partition: UEFI boot fat32 partition, should be mounted on {{ic|/boot/efi}} in Arch.<br />
<br />
second partition: [[GUID Partition Table]]<br />
<br />
<br />
Step 0 (optional): install [https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi x86_64 UEFI Shell 2.0 (Beta)]:<br />
<br />
See [[UEFI#UEFI_Shell]]. Can be useful during install, especially it allows to manually boot using [[UEFI_Bootloaders#Setting_up_EFISTUB|UEFISTUB]].<br />
<br />
Step 1: granted you can boot into your install through install disk, grub1 or via a liveusb and a chroot:<br />
# pacman -S grub-efi-x86_64<br />
Follow [[GRUB2#UEFI_systems_2]].<br />
<br />
Optional: add some power optimisation kernel parameters. In {{ic|/etc/default/grub}} file:<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap i915.i915_enable_rc6=1 drm.vblankoffdelay=1 i915.semaphores=1"<br />
{{Note| concerning kernel parameter {{ic| pcie_aspm&#61;force}}, I'm unsure: Ubuntu wiki recommends it, but UX31E Arch wiki says it should not be used.}}<br />
<br />
Reinstall grub2 :<br />
grub-mkconfig -o /path/to/grub.cfg<br />
<br />
Step 2: it is not yet possible to finish install by [[UEFI#Create_GRUB2_entry_in_the_Firmware_Boot_Manager| creating GRUB2 entry in the Firmware Boot Manager]] since it is required to boot in UEFI mode to be able to use [[Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]. The tricks is to do:<br />
<br />
# cp /boot/efi/EFI/arch_grub/grubx64.efi /boot/efi/shellx64.efi<br />
<br />
{{Note| temporary move {{ic|shellx64.efi}} if necessary }}<br />
<br />
# reboot<br />
<br />
Press {{keypress|F2}} on reboot and choose "Launch EFI shell from filesystem device". It should trigger grub2 and boot into arch if grub2 is correctly set up. You should now be able to [[Unified_Extensible_Firmware_Interface#efibootmgr|use efibootmgr to add grub entry to firmware]].<br />
<br />
== Screen backlight ==<br />
<br />
Screen Brightness keymaps ({{keypress|Fn+F5}}, {{keypress|Fn+F6}}) does not work. Here is a hack around.<br />
<br />
As root, create the file {{ic|/usr/local/share/backlight}}:<br />
#!/bin/bash<br />
<br />
path="/sys/class/backlight/intel_backlight"<br />
# alternative interface (0 < x < 10)<br />
#path="/sys/class/backlight/acpi_video0/"<br />
<br />
# max should be 4296<br />
max=$(cat ${path}/max_brightness)<br />
<br />
step=$(($max/10))<br />
# for a value smaller than treshold, the steps are smaller for a more accurate setting at low intensity<br />
treshold=$((2*$step))<br />
previous=$(cat ${path}/brightness)<br />
<br />
function commit {<br />
if [[ $1 = [0-9]* ]]<br />
then <br />
if <nowiki>[[ $1 -gt $max ]]</nowiki><br />
then <br />
next=$max<br />
elif <nowiki>[[ $1 -lt 0 ]]</nowiki><br />
then <br />
next=0<br />
else <br />
next=$1<br />
fi<br />
echo $next >> ${path}/brightness<br />
exit 0<br />
else <br />
exit 1<br />
fi<br />
}<br />
<br />
case "$1" in<br />
up)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous + $step))<br />
;;<br />
down)<br />
if <nowiki>[[ $previous -le $treshold ]]</nowiki><br />
then <br />
step=$(($step/4))<br />
fi<br />
commit $(($previous - $step))<br />
;;<br />
max)<br />
commit $max<br />
;;<br />
off)<br />
commit 0<br />
;;<br />
show)<br />
echo $previous<br />
;;<br />
night)<br />
commit $(($max/4)) <br />
;;<br />
allowusers)<br />
# Allow members of users group to change brightness<br />
sudo chgrp users ${path}/brightness<br />
sudo chmod g+w ${path}/brightness<br />
;;<br />
disallowusers)<br />
# Disallow members of users group to change brightness<br />
sudo chgrp root ${path}/brightness<br />
sudo chmod g-w ${path}/brightness<br />
;;<br />
*)<br />
commit $1<br />
esac<br />
<br />
exit 0<br />
<br />
Allow file to be executed :<br />
# chmod +x /usr/local/share/backlight<br />
<br />
Allow users to change brightness at each boot :<br />
# echo "/bin/bash /usr/local/share/backlight allowusers" >> /etc/rc.local<br />
<br />
Adding to {{ic|.zshrc}} or {{ic|.bashrc}} :<br />
alias -g "backlight"="/bin/bash /usr/local/share/backlight"<br />
allows to easy toggle backlight in terminal :<br />
$ backlight up<br />
$ backlight down<br />
$ backlight max<br />
$ backlight off<br />
$ backlight night<br />
$ backlight 2000<br />
$ backlight show<br />
<br />
And finally, add some convenient keyboard shortcuts [[Extra_Keyboard_Keys_in_Xorg|by the method of your choice]].<br />
<br />
== Other function keys ==<br />
There is a fix for Ubuntu :<br />
http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
<br />
=== Method 1 ===<br />
You can apply the following patch (semi-)manually and rebuild the kernel (you may want to read [[Custom_Kernel_Compilation_with_ABS]]). <br />
<br />
Signed-off-by: Alex Hung <alex.hung <at> canonical.com><br />
---<br />
drivers/platform/x86/asus-wmi.c | 7 +------<br />
1 files changed, 1 insertions(+), 6 deletions(-)<br />
<br />
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c<br />
index 25e3093..0f69a97 100644<br />
--- a/drivers/platform/x86/asus-wmi.c<br />
+++ b/drivers/platform/x86/asus-wmi.c<br />
@@ -1461,14 +1461,9 @@ static int asus_wmi_platform_init(struct asus_wmi *asus)<br />
*/<br />
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, 0, 0, NULL))<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS;<br />
- else if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL))<br />
+ else<br />
asus->dsts_id = ASUS_WMI_METHODID_DSTS2;<br />
<br />
- if (!asus->dsts_id) {<br />
- pr_err("Can't find DSTS");<br />
- return -ENODEV;<br />
- }<br />
-<br />
/* CWAP allow to define the behavior of the Fn+F2 key,<br />
* this method doesn't seems to be present on Eee PCs */<br />
<br />
This will make most keys useable (you have to bind them to functions yourself), except the screen brightness keys.<br />
<br />
It worked with kernel 3.4.4-2.<br />
<br />
=== Method 2 ===<br />
<br />
It is also possible to use [[Dynamic Kernel Module Support]] (DKMS) (package in community), to avoid compiling the whole kernel:<br />
<br />
1 get the archive at http://ubuntuforums.org/showthread.php?p=12054636#post12054636<br />
{{note | there is perhaps more suitable place to get the asus-wmi kernel module sources, the patch and the dkms conf file}}<br />
2 extract the archive, and then extract the .deb and get the sources inside (asus-wmi.c is already patched with above patch):<br />
# cp -a usr/src/asus-wmi-0.2 /usr/src/<br />
# cd /usr/src/<br />
# dkms add -m asus-wmi -v 0.2<br />
# dkms built -m asus-wmi -v 0.2 -k 3.4.4-2-ARCH<br />
# dkms status<br />
# dkms install -m asus-wmi -v 0.2 -k 3.4.4-2-ARCH<br />
# dkms status<br />
<br />
replace {{ic|3.4.4-2-ARCH}} by your output for {{ic|uname -r}}<br />
<br />
3 There is still a problem since dkms doesn't gzip the kernel module and archlinux does (see {{ic|$ modinfo asus-wmi}}):<br />
# cd /lib/modules/3.4.4-2-ARCH/kernel/drivers/platform/x86/<br />
# mv asus-wmi.ko.gz asus-wmi.ko.gz.save<br />
# gzip asus-wmi.ko<br />
{{note | there is probably a cleaner way to do that with dkms}}<br />
4 After reboot, {{ic|xev}} should display events for {{keypress|Fn}} keys. And keyboard backlight can be trigger by:<br />
# echo 0 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
# echo 3 >> /sys/class/leds/asus\:\:kbd_backlight/brightness<br />
<br />
== Solid State Drive ==<br />
Check [[Solid_State_Drives]]<br />
<br />
<br />
== touchpad ==<br />
<br />
works out of the box with<br />
<br />
1 finger tap : left click<br />
<br />
2 fingers tap : middle click<br />
<br />
3 fingers tap : right click<br />
<br />
== Powersave management ==<br />
Configure [[Laptop_Mode_Tools]] and do not forget to check [[CPU_Frequency_Scaling]].<br />
<br />
<br />
pm-utils<br />
powertop<br />
<br />
== Additional ressources ==<br />
*https://help.ubuntu.com/community/AsusZenbookPrime</div>Bzhb