https://wiki.archlinux.org/api.php?action=feedcontributions&user=Bepvte&feedformat=atomArchWiki - User contributions [en]2024-03-29T00:53:15ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Intel_graphics&diff=591608Intel graphics2019-12-11T18:55:04Z<p>Bepvte: Information on GuC submission</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:Intel graphics]]<br />
[[de:Intel]]<br />
[[es:Intel graphics]]<br />
[[fr:Intel]]<br />
[[hu:Intel graphics]]<br />
[[it:Intel graphics]]<br />
[[ja:Intel Graphics]]<br />
[[pl:Intel graphics]]<br />
[[pt:Intel graphics]]<br />
[[ru:Intel graphics]]<br />
[[zh-hans:Intel graphics]]<br />
[[zh-hant:Intel graphics]]<br />
{{Related articles start}}<br />
{{Related|Intel GMA 3600}}<br />
{{Related|Xorg}}<br />
{{Related|Kernel mode setting}}<br />
{{Related|Xrandr}}<br />
{{Related|Hybrid graphics}}<br />
{{Related|Vulkan}}<br />
{{Related|GPGPU}}<br />
{{Related articles end}}<br />
<br />
Since Intel provides and supports open source drivers, Intel graphics are essentially plug-and-play.<br />
<br />
For a comprehensive list of Intel GPU models and corresponding chipsets and CPUs, see [[Wikipedia:List of Intel graphics processing units]].<br />
<br />
{{Note|PowerVR-based graphics ([[Intel GMA 3600|GMA 3600]] series) are not supported by open source drivers.}}<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|mesa}} package, which provides the [[wikipedia:Direct_Rendering_Infrastructure|DRI]] driver for 3D acceleration.<br />
<br />
* For 32-bit application support, also install the {{Pkg|lib32-mesa}} package from the [[multilib]] repository.<br />
* For the [[wikipedia:X.Org_Server#DDX|DDX]] driver (which provides 2D acceleration in [[Xorg]]), [[install]] the {{Pkg|xf86-video-intel}} package. (Often not recommended, see note below.)<br />
* For [[Vulkan]] support (''Ivy Bridge'' and newer), install the {{Pkg|vulkan-intel}} package.<br />
<br />
Also see [[Hardware video acceleration]].<br />
<br />
{{Note|1=Some ([http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Debian-Abandon-Intel-DDX Debian & Ubuntu], [http://www.phoronix.com/scan.php?page=news_item&px=Fedora-Xorg-Intel-DDX-Switch Fedora], [https://community.kde.org/Plasma/5.9_Errata#Intel_GPUs KDE]) recommend not installing the {{Pkg|xf86-video-intel}} driver, and instead falling back on the modesetting driver for Gen4 and newer GPUs (GMA 3000 from 2006 and newer). See [https://www.reddit.com/r/archlinux/comments/4cojj9/it_is_probably_time_to_ditch_xf86videointel/], [http://www.phoronix.com/scan.php?page=article&item=intel-modesetting-2017&num=1], [[Xorg#Installation]], and {{man|4|modesetting}}. However, the modesetting driver can cause problems such as [https://bugs.chromium.org/p/chromium/issues/detail?id=370022 Chromium Issue 370022].}}<br />
<br />
== Loading ==<br />
<br />
The Intel kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since Intel requires kernel mode-setting.<br />
* Also, check that you have not disabled Intel by using any modprobe blacklisting within {{ic|/etc/modprobe.d/}} or {{ic|/usr/lib/modprobe.d/}}.<br />
<br />
=== Enable early KMS ===<br />
<br />
[[Kernel mode setting]] (KMS) is supported by Intel chipsets that use the i915 DRM driver and is mandatory and enabled by default.<br />
<br />
Refer to [[Kernel mode setting#Early KMS start]] for instructions on how to enable KMS as soon as possible at the boot process.<br />
<br />
=== Enable GuC / HuC firmware loading ===<br />
<br />
For Skylake and newer processors, some video features (e.g. CBR rate control on SKL low-power encoding mode) may require the use of an updated GPU firmware, which is currently (as of 4.16) not enabled by default. Enabling GuC/HuC firmware loading can cause issues on some systems; disable it if you experience freezing (for example, after resuming from hibernation).<br />
<br />
{{Note|See [[Gentoo:Intel#Feature support]] for an overview of Intel processor generations.}}<br />
<br />
For those processors it is necessary to add {{ic|1=i915.enable_guc=2}} to the [[kernel parameters]] to enable both GuC and HuC firmware loading. Alternatively, if the [[initramfs]] already includes the {{ic|i915}} module (see [[Kernel mode setting#Early KMS start]]), you can set these options through a file in {{ic|/etc/modprobe.d/}}, e.g.:<br />
<br />
{{hc|/etc/modprobe.d/i915.conf|2=<br />
options i915 enable_guc=2<br />
}}<br />
<br />
{{Note|It is possible to enable both GuC/HuC firmware loading and GuC submission by using the {{ic|1=enable_guc=3}} module parameter, although this is generally discouraged and may even negatively affect your system stability.<br><br />
Update: GuC submission has been [https://patchwork.kernel.org/patch/10904591 completely disabled] in the kernel, due to it reducing performance and causing bugs. Setting {{ic|1=enable_guc=3}} has no effect.}}<br />
<br />
You can verify both are enabled by using [[dmesg]]:<br />
<br />
{{hc|$ dmesg|2=<br />
[drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin (version 2.0)<br />
[drm] GuC: Loaded firmware i915/kbl_guc_ver9_39.bin (version 9.39)<br />
i915 0000:00:02.0: GuC firmware version 9.39<br />
i915 0000:00:02.0: GuC submission enabled<br />
i915 0000:00:02.0: HuC enabled<br />
}}<br />
<br />
Alternatively, check using:<br />
<br />
# cat /sys/kernel/debug/dri/0/i915_huc_load_status<br />
# cat /sys/kernel/debug/dri/0/i915_guc_load_status<br />
<br />
{{Warning|1=Using [[Intel GVT-g|GVT-g graphics virtualization]] by setting {{ic|1=enable_gvt=1}} is not supported as of linux 4.20.11 when GuC/HuC is also enabled. The i915 module would fail to initialize as shown in system journal.<br />
{{hc|$ journalctl|<br />
... kernel: [drm:intel_gvt_init [i915]] *ERROR* i915 GVT-g loading failed due to Graphics virtualization is not yet supported with GuC submission<br />
... kernel: i915 0000:00:02.0: [drm:i915_driver_load [i915]] Device initialization failed (-5)<br />
... kernel: i915: probe of 0000:00:02.0 failed with error -5<br />
... kernel: snd_hda_intel 0000:00:1f.3: failed to add i915 component master (-19)<br />
}}<br />
}}<br />
<br />
== Xorg configuration ==<br />
<br />
There may be no need for any configuration to run [[Xorg]].<br />
<br />
However, if [[Xorg]] does not start, and to take advantage of some driver options, you can create an Xorg configuration file similar to the one below:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|<br />
Section "Device"<br />
Identifier "Intel Graphics"<br />
Driver "intel"<br />
EndSection}}<br />
<br />
Additional options are added by the user on new lines below {{ic|Driver}}.<br />
For the full list of options, see the {{man|4|intel}} man page.<br />
<br />
{{Note|<br />
*You may need to indicate {{ic|Option "AccelMethod"}} when creating a configuration file, even just to set it to the default method (currently {{ic|"sna"}}); otherwise, X may crash.<br />
*You might need to add more device sections than the one listed above. This will be indicated where necessary.<br />
}}<br />
<br />
== Module-based options ==<br />
<br />
The {{ic|i915}} kernel module allows for configuration via [[Kernel modules#Setting module options|module options]]. Some of the module options impact power saving.<br />
<br />
A list of all options along with short descriptions and default values can be generated with the following command:<br />
<br />
$ modinfo -p i915<br />
<br />
To check which options are currently enabled, run<br />
<br />
# systool -m i915 -av<br />
<br />
You will note that many options default to -1, resulting in per-chip powersaving defaults. It is however possible to configure more aggressive powersaving by using [[Kernel modules#Setting module options|module options]].<br />
<br />
{{Warning|1=Diverting from the defaults will mark the kernel as [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fc9740cebc3ab7c65f3c5f6ce0caf3e4969013ca tainted] from Linux 3.18 onwards. This basically implies using other options than the per-chip defaults is considered experimental and not supported by the developers. }}<br />
<br />
=== Framebuffer compression (enable_fbc) ===<br />
<br />
Making use of Framebuffer compression (FBC) can reduce power consumption while reducing memory bandwidth needed for screen refreshes.<br />
<br />
To enable FBC, use {{ic|1=i915.enable_fbc=1}} as [[kernel parameter]] or set in {{ic|/etc/modprobe.d/i915.conf}}:<br />
<br />
{{hc|/etc/modprobe.d/i915.conf|2=<br />
options i915 enable_fbc=1<br />
}}<br />
<br />
{{Note|Framebuffer compression may be unreliable or unavailable on Intel GPU generations before Sandy Bridge (generation 6). This results in messages logged to the system journal similar to this one:<br />
<br />
kernel: drm: not enough stolen space for compressed buffer, disabling.<br />
<br />
Enabling frame buffer compression on pre-Sandy Bridge CPUs results in endless error messages:<br />
<br />
{{hc|$ dmesg|<br />
[ 2360.475430] [drm] not enough stolen space for compressed buffer (need 4325376 bytes), disabling<br />
[ 2360.475437] [drm] hint: you may be able to increase stolen memory size in the BIOS to avoid this<br />
}}<br />
<br />
The solution is to disable frame buffer compression which will imperceptibly increase power consumption (around 0.06 W). In order to disable it add {{ic|1=i915.enable_fbc=0}} to the kernel line parameters. More information on the results of disabled compression can be found [http://kernel.ubuntu.com/~cking/power-benchmarking/background-colour-and-framebuffer-compression/ here].}}<br />
<br />
=== Fastboot ===<br />
<br />
The goal of Intel Fastboot is to preserve the frame-buffer as setup by the BIOS or [[bootloader]] to avoid any flickering until [[Xorg]] has started [https://www.phoronix.com/scan.php?page=news_item&px=MTEwNzc].<br />
<br />
To enable fastboot, set {{ic|1=i915.fastboot=1}} as [[kernel parameter]] or set in {{ic|/etc/modprobe.d/i915.conf}}:<br />
<br />
{{hc|/etc/modprobe.d/i915.conf|2=<br />
options i915 fastboot=1<br />
}}<br />
<br />
{{Warning|1=This parameter is not enabled by default and may cause issues on some older (pre-Skylake) systems.[https://www.phoronix.com/scan.php?page=news_item&px=Intel-Fastboot-Default-2019-Try]}}<br />
<br />
=== Intel GVT-g graphics virtualization support ===<br />
<br />
See [[Intel GVT-g]] for details.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Setting scaling mode ===<br />
<br />
This can be useful for some full screen applications:<br />
<br />
$ xrandr --output LVDS1 --set PANEL_FITTING ''param''<br />
<br />
where {{ic|''param''}} can be:<br />
<br />
* {{ic|center}}: resolution will be kept exactly as defined, no scaling will be made,<br />
* {{ic|full}}: scale the resolution so it uses the entire screen or<br />
* {{ic|full_aspect}}: scale the resolution to the maximum possible but keep the aspect ratio.<br />
<br />
If it does not work, try:<br />
<br />
$ xrandr --output LVDS1 --set "scaling mode" ''param''<br />
<br />
where {{ic|''param''}} is one of {{ic|"Full"}}, {{ic|"Center"}} or {{ic|"Full aspect"}}.<br />
<br />
{{Note|1=This option currently does not work for external displays (e.g. VGA, DVI, HDMI, DP). [https://bugs.freedesktop.org/show_bug.cgi?id=90989]}}<br />
<br />
=== Hardware accelerated H.264 decoding on GMA 4500 ===<br />
<br />
The {{Pkg|libva-intel-driver}} package only provides hardware accelerated MPEG-2 decoding for GMA 4500 series GPUs. The H.264 decoding support is maintained in a separated g45-h264 branch, which can be used by installing {{AUR|libva-intel-driver-g45-h264}} package. Note however that this support is experimental and its development has been abandoned. Using the VA-API with this driver on a GMA 4500 series GPU will offload the CPU but may not result in as smooth a playback as non-accelerated playback. Tests using mplayer showed that using vaapi to play back an H.264 encoded 1080p video halved the CPU load (compared to the XV overlay) but resulted in very choppy playback, while 720p worked reasonably well [https://bbs.archlinux.org/viewtopic.php?id=150550]. This is echoed by other experiences [http://www.emmolution.org/?p=192&cpage=1#comment-12292].<br />
Setting the preallocated video ram size higher in bios results in much better hardware decoded playback. Even 1080p h264 works well if this is done.<br />
Smooth playback (1080p/720p) works also with {{AUR|mpv-git}} in combination with {{AUR|ffmpeg-git}} and {{AUR|libva-intel-driver-g45-h264}}. With MPV and the Firefox plugin "Watch with MPV"[https://addons.mozilla.org/de/firefox/addon/watch-with-mpv/] it is possible to watch hardware accelerated YouTube videos.<br />
<br />
=== Alternative OpenGL Driver (Iris) ===<br />
<br />
As of Mesa 19.2, a new OpenGL driver, Iris, is available for testing. Certain applications run faster with it. You may experimentally enable it by setting the {{ic|1=MESA_LOADER_DRIVER_OVERRIDE=iris}} [[environment variable]] before starting any OpenGL application. This setting does not affect Vulkan applications.<br />
<br />
{{Warning|1=Iris is still experimental - applications might crash or render incorrectly. Use with care and [https://gitlab.freedesktop.org/groups/mesa/-/issues report found bugs/regressions].}}<br />
<br />
=== Overriding reported OpenGL version ===<br />
<br />
The {{ic|MESA_GL_VERSION_OVERRIDE}} [[environment variable]] can be used to override the reported OpenGL version to any application. For example, setting {{ic|1=MESA_GL_VERSION_OVERRIDE=4.5}} will report OpenGL 4.5.<br />
<br />
{{Warning|You can use this variable to report any known OpenGL version, even if it is not supported by the GPU. Some applications might no longer crash, some may start crashing - you probably do not want to set this variable globally.}}<br />
<br />
=== Setting brightness and gamma ===<br />
<br />
See [[Backlight]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Tearing ===<br />
<br />
The SNA acceleration method causes tearing on some machines. To fix this, enable the {{ic|"TearFree"}} option in the driver by adding the following line to your [[#Xorg configuration|configuration file]]:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|<br />
Section "Device"<br />
Identifier "Intel Graphics"<br />
Driver "intel"<br />
<br />
Option "TearFree" "true"<br />
EndSection}}<br />
<br />
See the [https://bugs.freedesktop.org/show_bug.cgi?id=37686 original bug report] for more info.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* This option may not work when {{ic|SwapbuffersWait}} is {{ic|false}}.<br />
* This option may increase memory allocation considerably and reduce performance. [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c123]<br />
* This option is problematic for applications that are very picky about vsync timing, like [[Wikipedia:Super Meat Boy|Super Meat Boy]].<br />
* This option does not work with UXA acceleration method, only with SNA.<br />
}}<br />
<br />
=== Disable Vertical Synchronization (VSYNC) ===<br />
<br />
Useful when:<br />
<br />
* Chomium/Chrome has lags and slow performance due to GPU and runs smoothly with --disable-gpu switch<br />
* glxgears test does not show desired performance<br />
<br />
The intel-driver uses [http://www.intel.com/support/graphics/sb/CS-004527.htm Triple Buffering] for vertical synchronization, this allows for full performance and avoids tearing. To turn vertical synchronization off (e.g. for benchmarking) use this {{ic|.drirc}} in your home directory:<br />
<br />
{{hc|~/.drirc|<br />
<device screen&#61;"0" driver&#61;"dri2"><br />
<application name&#61;"Default"><br />
<option name&#61;"vblank_mode" value&#61;"0"/><br />
</application><br />
</device><br />
}}<br />
<br />
{{Note|Do not use {{AUR|driconf}} to create this file. It is buggy and will set the wrong driver.}}<br />
<br />
=== SNA issues ===<br />
<br />
''SNA'' is the default acceleration method in {{Pkg|xf86-video-intel}}. If you experience issues with ''SNA'' (e.g. pixelated graphics, corrupt text, etc.), try using ''UXA'' instead, which can be done by adding the following line to your [[#Xorg configuration|configuration file]]:<br />
<br />
Option "AccelMethod" "uxa"<br />
<br />
See {{man|4|intel}} under {{ic|Option "AccelMethod"}}.<br />
<br />
=== DRI3 issues ===<br />
<br />
''DRI3'' is the default DRI version in {{Pkg|xf86-video-intel}}. On some systems this can cause issues such as [https://bugs.chromium.org/p/chromium/issues/detail?id=370022 this]. To switch back to ''DRI2'' add the following line to your [[#Xorg configuration|configuration file]]:<br />
<br />
Option "DRI" "2"<br />
<br />
For the {{ic|modesetting}} driver, this method of disabling DRI3 does not work. Instead, one can set the environment variable {{ic|1=LIBGL_DRI3_DISABLE=1}}.<br />
<br />
=== Font and screen corruption in GTK applications (missing glyphs after suspend/resume) ===<br />
<br />
Should you experience missing font glyphs in GTK applications, the following workaround might help. [[textedit|Edit]] {{ic|/etc/environment}} to add the following line:<br />
<br />
{{hc|/etc/environment|output=<br />
COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer<br />
}}<br />
<br />
See also [https://bugs.freedesktop.org/show_bug.cgi?id=88584 FreeDesktop bug 88584].<br />
<br />
=== Blank screen during boot, when "Loading modules" ===<br />
<br />
If using "late start" KMS and the screen goes blank when "Loading modules", it may help to add {{ic|i915}} and {{ic|intel_agp}} to the initramfs. See [[Kernel mode setting#Early KMS start]] section.<br />
<br />
Alternatively, appending the following [[kernel parameter]] seems to work as well:<br />
<br />
video=SVIDEO-1:d<br />
<br />
If you need to output to VGA then try this:<br />
<br />
video=VGA-1:1280x800<br />
<br />
=== X freeze/crash with intel driver ===<br />
<br />
Some issues with X crashing, GPU hanging, or problems with X freezing, can be fixed by disabling the GPU usage with the {{ic|NoAccel}} option - add the following lines to your [[#Xorg configuration|configuration file]]:<br />
<br />
Option "NoAccel" "True"<br />
<br />
Alternatively, try to disable the 3D acceleration only with the {{ic|DRI}} option:<br />
<br />
Option "DRI" "False"<br />
<br />
=== Baytrail complete freeze ===<br />
<br />
If you are using kernel > 3.16 on Baytrail architecture and randomly encounter total system freezes, the following kernel option is a workaround until [https://bugzilla.kernel.org/show_bug.cgi?id=109051 this bug] is fixed in the linux kernel.<br />
<br />
intel_idle.max_cstate=1<br />
<br />
This is originally an Intel CPU bug that can be triggered by certain c-state transitions. It can also happen with Linux kernel 3.16 or Windows, though apparently much more rarely.<br />
The kernel option will prevent the freeze by avoiding c-state transitions but will also increase power consumption.<br />
<br />
=== Adding undetected resolutions ===<br />
<br />
This issue is covered on the [[Xrandr#Adding undetected resolutions|Xrandr page]].<br />
<br />
=== Backlight is not adjustable===<br />
<br />
If after resuming from suspend, the hotkeys for changing the screen brightness do not take effect, check your configuration against the [[Backlight]] article.<br />
<br />
If the problem persists, try one of the following [[kernel parameters]]:<br />
<br />
acpi_osi=Linux<br />
acpi_osi="!Windows 2012"<br />
acpi_osi=<br />
<br />
Also make sure you are not using fastboot mode (i915.fastboot kernel parameter), it is [https://www.phoronix.com/forums/forum/software/mobile-linux/1066447-arch-linux-users-with-intel-graphics-can-begin-enjoying-a-flicker-free-boot known] for breaking backlight controls.<br />
<br />
=== Corruption/Unresponsiveness in Chromium and Firefox ===<br />
<br />
If you experience corruption, unresponsiveness, lags or slow performance in Chromium and/or Firefox: <br />
<br />
* [[#SNA issues|Set the AccelMethod to "uxa"]]<br />
* [[#Disable Vertical Synchronization (VSYNC)|Disable VSYNC]]<br />
<br />
=== Kernel crashing w/kernels 4.0+ on Broadwell/Core-M chips ===<br />
<br />
A few seconds after X/Wayland loads the machine will freeze and journalctl will log a kernel crash referencing the Intel graphics as below:<br />
<br />
Jun 16 17:54:03 hostname kernel: BUG: unable to handle kernel NULL pointer dereference at (null)<br />
Jun 16 17:54:03 hostname kernel: IP: [< (null)>] (null)<br />
...<br />
Jun 16 17:54:03 hostname kernel: CPU: 0 PID: 733 Comm: gnome-shell Tainted: G U O 4.0.5-1-ARCH #1<br />
...<br />
Jun 16 17:54:03 hostname kernel: Call Trace:<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa055cc27>] ? i915_gem_object_sync+0xe7/0x190 [i915]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa0579634>] intel_execlists_submission+0x294/0x4c0 [i915]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa05539fc>] i915_gem_do_execbuffer.isra.12+0xabc/0x1230 [i915]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa055d349>] ? i915_gem_object_set_to_cpu_domain+0xa9/0x1f0 [i915]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffff811ba2ae>] ? __kmalloc+0x2e/0x2a0<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa0555471>] i915_gem_execbuffer2+0x141/0x2b0 [i915]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa042fcab>] drm_ioctl+0x1db/0x640 [drm]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffffa0555330>] ? i915_gem_execbuffer+0x450/0x450 [i915]<br />
Jun 16 17:54:03 hostname kernel: [<ffffffff8122339b>] ? eventfd_ctx_read+0x16b/0x200<br />
Jun 16 17:54:03 hostname kernel: [<ffffffff811ebc36>] do_vfs_ioctl+0x2c6/0x4d0<br />
Jun 16 17:54:03 hostname kernel: [<ffffffff811f6452>] ? __fget+0x72/0xb0<br />
Jun 16 17:54:03 hostname kernel: [<ffffffff811ebec1>] SyS_ioctl+0x81/0xa0<br />
Jun 16 17:54:03 hostname kernel: [<ffffffff8157a589>] system_call_fastpath+0x12/0x17<br />
Jun 16 17:54:03 hostname kernel: Code: Bad RIP value.<br />
Jun 16 17:54:03 hostname kernel: RIP [< (null)>] (null)<br />
<br />
This can be fixed by disabling execlist support which was changed to default on with kernel 4.0. Add the following [[kernel parameter]]:<br />
<br />
i915.enable_execlists=0<br />
<br />
This is known to be broken to at least kernel 4.0.5.<br />
<br />
=== Lag in Windows guests ===<br />
<br />
The video output of a Windows guest in VirtualBox sometimes hangs until the host forces a screen update (e.g. by moving the mouse cursor). Removing the {{ic|1=enable_fbc=1}} option fixes this issue.<br />
<br />
=== Screen flickering ===<br />
<br />
Panel Self Refresh (PSR), a power saving feature used by Intel iGPUs is known to cause flickering in some instances {{Bug|49628}} {{Bug|49371}} {{Bug|50605}}. A temporary solution is to disable this feature using the [[kernel parameter]] {{ic|1=i915.enable_psr=0}}.<br />
<br />
=== OpenGL 2.1 with i915 driver ===<br />
<br />
The update of {{Pkg|mesa}} from version 13.x to 17 may break support for OpenGL 2.1 on third gen Intel GPUs (GMA3100, see [[wikipedia:List_of_Intel_graphics_processing_units#Third_generation|here]]), as described in this [http://www.phoronix.com/scan.php?page=news_item&px=Mesa-i915-OpenGL-2-Drop article], reverting it back to OpenGL 1.4. However this could be restored manually by setting {{ic|/etc/drirc}} or {{ic|~/.drirc}} options like:<br />
<br />
{{hc|/etc/drirc|output=<br />
<driconf><br />
...<br />
<device driver="i915"><br />
<application name="Default"><br />
<option name="'''stub_occlusion_query'''" value="'''true'''" /><br />
<option name="'''fragment_shader'''" value="'''true'''" /><br />
</application><br />
</device><br />
...<br />
</driconf><br />
}}<br />
<br />
{{Note|the reason of this step back was Chromium and other apps bad experience. If needed, you might edit the drirc file in a "app-specific" style, see [https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/ here], to disable gl2.1 on executable chromium for instance.}}<br />
<br />
=== KMS Issue: console is limited to small area ===<br />
<br />
One of the low-resolution video ports may be enabled on boot which is causing the terminal to utilize a small area of the screen. To fix, explicitly disable the port with an i915 module setting with {{ic|1=video=SVIDEO-1:d}} in the kernel command line parameter in the bootloader. See [[Kernel parameters]] for more info.<br />
<br />
If that does not work, try disabling TV1 or VGA1 instead of SVIDEO-1. Video port names can be listed with [[xrandr]].<br />
<br />
=== Weathered colors (color range problems) ===<br />
<br />
The "Broadcast RGB" property in the Intel driver defines the color range which can be used by the display - either "Limited 16:235" (which limits the color range for some displays that can't properly display all colors) and "Full". Since kernel 3.9, the new default property "Automatic" tries to determine whenever the display supports the full color range, and if it doesn't/detection fails, color range falls back to "Limited 16:235". This results in weathered colors and grey blacks. On some displays/connectors, despite the full color range being supported properly, automatic detection fails and falls back to the limited color range ([https://bugs.freedesktop.org/show_bug.cgi?id=108821 upstream bug report, kernels 4.18-4.20]).<br />
<br />
You can forcefully set the desired color range by running {{ic|xrandr --output <OUT> --set "Broadcast RGB" "Full"}} (replace {{ic|<OUT>}} with the appropriate output device, listed by running {{ic|xrandr}}). There is no way to persist this setting in {{ic|xorg.conf}}.<br />
<br />
== See also ==<br />
<br />
* https://01.org/linuxgraphics/documentation (includes a list of supported hardware)</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Intel_GVT-g&diff=575347Intel GVT-g2019-06-13T12:54:35Z<p>Bepvte: add a link to my blog tutorial on gvt with libvirt</p>
<hr />
<div>[[Category:Virtualization]]<br />
[[ja:Intel GVT-g]]<br />
{{Related articles start}}<br />
{{Related|PCI passthrough via OVMF}}<br />
{{Related|QEMU}}<br />
{{Related|Intel graphics}}<br />
{{Related articles end}}<br />
<br />
[https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide Intel GVT-g] is a technology that provides mediated device passthrough for Intel GPUs (Broadwell and newer). It can be used to virtualize the GPU for multiple guest VMs, effectively providing near-native graphics performance in the VM and still letting your host use the virtualized GPU normally. This is useful if you want accelerated graphics in Windows VMs running on ultrabooks without dedicated GPUs for [[PCI_passthrough_via_OVMF|full device passthrough]]. (Similar technologies exist for NVIDIA and AMD GPUs, but they're available only in the "professional" GPU lines like Quadro, Radeon Pro and so on.)<br />
<br />
There is also a variant of this technology called GVT-d - it is essentially Intel's name for full device passthrough with the vfio-pci driver. With GVT-d, the host cannot use the virtualized GPU.<br />
<br />
== Configuration ==<br />
<br />
You'll have to create a virtual GPU (vGPU) first, then assign it to your VM. The guest with a vGPU sees it as a "regular" GPU - just install the latest native drivers. (The vGPU actually does need specialized drivers to work correctly, but all the required changes are present in the latest upstream Linux/Windows drivers.)<br />
<br />
You'll need to:<br />
<br />
* Use at least Linux 4.16 and [[QEMU]] 2.12.<br />
* Enable kernel modules {{ic|kvmgt vfio-iommu-type1 vfio-mdev}}.<br />
* Add {{ic|1=i915.enable_gvt=1}} to your [[kernel parameters]] to enable GPU virtualization.<br />
* Find the PCI address and domain number of your GPU ({{ic|$GVT_PCI}} and {{ic|$GVT_DOM}} in commands below), as it resides in {{ic|/sys/bus/pci/devices}}. It looks like this: {{ic|0000:00:02.0}} - you can look it up by running {{ic|lspci -D -nn}}, looking for {{ic|VGA compatible controller: Intel Corporation HD Graphics ...}} and noting down the address on the left.<br />
* Generate the vGPU GUID ({{ic|$GVT_GUID}} in commands below) which you'll use to create and assign the vGPU. A single virtual GPU can be assigned only to a single VM - create as many GUIDs as you want vGPUs. (You can do so by running {{ic|uuidgen}}.)<br />
<br />
After rebooting with the {{ic|1=i915.enable_gvt=1}} flag, you should be able to create vGPUs - there are multiple vGPU types you can create, which mainly differ in the amount of resources dedicated to that vGPU. You can look up what types are available in your system (and {{ic|cat description}} inside of each type to discover what it's capable of) like this:<br />
<br />
# ls /sys/devices/pci${GVT_DOM}/$GVT_PCI/mdev_supported_types<br />
i915-GVTg_V5_1 # Video memory: <512MB, 2048MB>, resolution: up to 1920x1200<br />
i915-GVTg_V5_2 # Video memory: <256MB, 1024MB>, resolution: up to 1920x1200<br />
i915-GVTg_V5_4 # Video memory: <128MB, 512MB>, resolution: up to 1920x1200<br />
i915-GVTg_V5_8 # Video memory: <64MB, 384MB>, resolution: up to 1024x768<br />
<br />
Pick a type you want to use - we'll refer to it as {{ic|$GVT_TYPE}} below. Use the GUID you've created to create a vGPU with a chosen type:<br />
<br />
# echo "$GVT_GUID" > "/sys/devices/pci${GVT_DOM}/$GVT_PCI/mdev_supported_types/$GVT_TYPE/create"<br />
<br />
You can repeat this as many times as you want with different GUIDs. All created vGPUs will land in {{ic|/sys/bus/pci/devices/$GVT_PCI/}} - if you'd like to remove a vGPU, you can do:<br />
<br />
# echo 1 > /sys/bus/pci/devices/$GVT_PCI/$GVT_GUID/remove<br />
<br />
=== Using QEMU CLI ===<br />
<br />
To create a VM with the virtualized GPU, add this parameter to the QEMU command line:<br />
<br />
-device vfio-pci,sysfsdev=/sys/bus/pci/devices/$GVT_PCI/$GVT_GUID,rombar=0<br />
<br />
=== Using libvirt ===<br />
<br />
First it is needed to add the following device inside the VM <devices> tag.<br />
{{hc|$ virsh edit [vmname]|2=<br />
...<br />
<hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='off'><br />
<source><br />
<address uuid=''''GVT_GUID''''/><br />
</source><br />
</hostdev><br />
...<br />
}}<br />
Replacing GVT_GUID with the above generated UUID.<br />
<br />
==== Getting vGPU display contents ====<br />
<br />
In order to retrieve the contents from the vGPU there are 2 possible ways<br />
<br />
===== Using DMA-BUF display =====<br />
<br />
{{Warning|Acording to this [https://github.com/intel/gvt-linux/issues/20 issue], this method will not work using OVMF for now.}}<br />
<br />
First, modify the libvirt configuration<br />
<br />
{{hc|$ virsh edit [vmname]|<br />
<domain type<nowiki>=</nowiki>'kvm'><br />
}}<br />
<br />
to<br />
<br />
{{hc|$ virsh edit [vmname]|<br />
<domain type<nowiki>=</nowiki>'kvm' xmlns:qemu<nowiki>='http://libvirt.org/schemas/domain/qemu/1.0'</nowiki>><br />
}}<br />
<br />
Now we add those lines to your configuration right before the closing </domain> tag:<br />
<br />
{{hc|$ virsh edit [vmname]|<nowiki><br />
...<br />
<qemu:commandline><br />
<qemu:arg value='-set'/><br />
<qemu:arg value='device.hostdev0.x-igd-opregion=on'/><br />
</qemu:commandline><br />
...<br />
</nowiki>}}<br />
<br />
===== Using RAMFB display =====<br />
<br />
This can be combined with the above DMA-BUF in order to also display initial VGA initialization.<br />
<br />
First, modify the libvirt configuration<br />
<br />
{{hc|$ virsh edit [vmname]|<br />
<domain type<nowiki>=</nowiki>'kvm'><br />
}}<br />
<br />
to<br />
<br />
{{hc|$ virsh edit [vmname]|<br />
<domain type<nowiki>=</nowiki>'kvm' xmlns:qemu<nowiki>='http://libvirt.org/schemas/domain/qemu/1.0'</nowiki>><br />
}}<br />
<br />
Now we add those lines to your configuration right before the closing </domain> tag:<br />
<br />
{{hc|$ virsh edit [vmname]|<nowiki><br />
...<br />
<qemu:commandline><br />
<qemu:arg value='-set'/><br />
<qemu:arg value='device.hostdev0.ramfb=on'/><br />
<qemu:arg value='-set'/><br />
<qemu:arg value='device.hostdev0.driver=vfio-pci-nohotplug'/><br />
</qemu:commandline><br />
...<br />
</nowiki>}}<br />
<br />
==== Display vGPU output ====<br />
<br />
Due to an [https://gitlab.freedesktop.org/spice/spice-gtk/issues/100 issue] with spice-gtk the configuration is different depending of the SPICE client EGL implementation.<br />
<br />
===== Output using SPICE with MESA EGL =====<br />
<br />
$ virsh edit [vmname]<br />
<br />
# Ensure the above added <hostdev> device have the display attribute set to 'on'.<br />
# Remove all <graphics> and <video> devices.<br />
# Add the following devices:<br />
<br />
{{hc|$ virsh edit [vmname]|<nowiki><br />
...<br />
<graphics type='spice'><br />
<listen type='none'/><br />
<gl enable='yes'/><br />
</graphics><br />
<video><br />
<model type='none'/><br />
</video><br />
...<br />
</nowiki>}}<br />
The are an optional attribute rendernode in gl tag to allow specify the renderer, example:<br />
<gl enable='yes' rendernode='/dev/dri/by-path/pci-0000:00:02.0-render'/><br />
<br />
===== Output using SPICE with NVIDIA EGL or VNC =====<br />
<br />
$ virsh edit [vmname]<br />
<br />
# Ensure the above added <hostdev> device have the display attribute set to 'on'.<br />
# Remove all <graphics> and <video> devices.<br />
# Add the following devices:<br />
<br />
{{hc|$ virsh edit [vmname]|<nowiki><br />
...<br />
<graphics type='spice' autoport='yes'><br />
<listen type='address'/><br />
</graphics><br />
<graphics type='egl-headless'/><br />
<video><br />
<model type='none'/><br />
</video><br />
...<br />
</nowiki>}}<br />
The <graphics type='spice'> type can be changed to 'vnc' to use VNC instead.<br />
<br />
Also there are an ''optional'' tag <gl> inside <graphics type='egl-headless'> tag to force a specific renderer, do not put inside the 'spice' graphics due the mentioned bug, example:<br />
<graphics type='egl-headless'><br />
<gl rendernode='/dev/dri/by-path/pci-0000:00:02.0-render'/><br />
</graphics><br />
<br />
===== Disable all output =====<br />
<br />
To ensure no emulated GPU is added one can edit the VM configuration and do the following changes:<br />
<br />
$ virsh edit [vmname]<br />
<br />
# Remove all <graphics> devices.<br />
# Change the <video> device to be type 'none'.<br />
# Ensure the above added <hostdev> device have the display attribute set to 'off'.<br />
<br />
Then the only way to see the display output would be using a software server like RDP, VNC or Looking Glass.<br />
To see more details in [[PCI_passthrough_via_OVMF#Using_Looking_Glass_to_stream_guest_screen_to_the_host|using Looking Glass to stream guest screen to the host]].<br />
<br />
== Troubleshooting ==<br />
=== Missing mdev_supported_types directory ===<br />
If you have followed instructions and added {{ic|1=i915.enable_gvt=1}} kernel parameter, but there is still no {{ic|/sys/bus/pci/devices/0000:02:00.0/mdev_supported_types}} directory, probably your hardware is not supported. Check dmesg log for this message:<br />
{{hc|$ dmesg {{!}} grep -i gvt |2=<br />
[ 4.227468] [drm] Unsupported device. GVT-g is disabled<br />
}}<br />
<br />
If that is the case, you may want to check upstream for support plans.<br />
For example, for the "Coffee Lake" (CFL) platform support, see https://github.com/intel/gvt-linux/issues/53<br />
<br />
== See also ==<br />
<br />
* [https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide Official GVT-g Setup Guide]<br />
* [https://github.com/intel/gvt-linux/wiki/Dma_Buf_User_Guide Official GVT-g DMA-BUF User Guide].<br />
* [https://www.reddit.com/r/VFIO/comments/8h352p/guide_running_windows_via_qemukvm_and_intel_gvtg/ Running Windows via QEMU/KVM and Intel GVT-g]<br />
* [https://blog.bepbep.co/posts/gvt/ A guide on using GVT]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=List_of_applications/Other&diff=563790List of applications/Other2019-01-18T18:10:07Z<p>Bepvte: Add ulauncher to launchers list</p>
<hr />
<div><noinclude><br />
[[Category:Applications]]<br />
[[Category:Lists of software]]<br />
[[es:List of applications/Other]]<br />
[[it:List of applications/Other]]<br />
[[ja:アプリケーション一覧/その他]]<br />
[[ru:List of applications/Other]]<br />
[[zh-hans:List of applications/Other]]<br />
[[zh-hant:List of applications/Other]]<br />
{{List of applications navigation}}<br />
</noinclude><br />
== Others ==<br />
<br />
=== Organization ===<br />
<br />
==== Personal information managers ====<br />
<br />
These applications support time, task and contacts management.<br />
<br />
* {{App|[[Evolution]]|Personal information management application that provides integrated mail, calendaring and address book functionality. Part of {{Grp|gnome-extra}}.|https://wiki.gnome.org/Apps/Evolution|{{Pkg|evolution}}}}<br />
* {{App|[[Wikipedia:Kontact|Kontact]]|Integrated solution to your personal information management.|http://www.kontact.org/|{{Pkg|kontact}}}}<br />
* {{App|Osmo|GTK+ personal organizer, which includes calendar, tasks manager and address book modules.|http://clayo.org/osmo/|{{Pkg|osmo}}}}<br />
* {{App|[[Wikipedia:SeaMonkey#Mail|SeaMonkey Mail & Newsgroups]] with [[Wikipedia:Lightning (software)|Lightning]]|Extension to SeaMonkey that provides calendar and task support.|http://www.seamonkey-project.org/|{{Pkg|seamonkey}}}}<br />
* {{App|[[Thunderbird]] with [[Wikipedia:Lightning (software)|Lightning]]|Extension to Mozilla Thunderbird that provides calendar and task support.|http://www.mozilla.org/projects/calendar/lightning/|{{Pkg|thunderbird}}}}<br />
<br />
==== Time management ====<br />
<br />
===== Console =====<br />
<br />
* {{App|Calcurse|Text-based ncurses calendar and scheduling system (supports CalDAV)|http://calcurse.org/|{{Pkg|calcurse}}}}<br />
* {{App|khal|Command-line (non-interactive) and ncurses (interactive) calendar system (supports CalDAV)|https://github.com/pimutils/khal|{{Pkg|khal}}}}<br />
* {{App|mail2rem|Small script for importing *.ics calendars from Maildir to Remind calendar.|https://github.com/esovetkin/mail2rem|{{AUR|mail2rem-git}}}}<br />
* {{App|Pal|Very lightweight calendar with both interactive and non-interactive interfaces.|http://palcal.sourceforge.net/|{{AUR|pal}}}}<br />
* {{App|pcal|A tool to create pdf calendars from pcal input which can be exported by some calendar programs.|https://sourceforge.net/projects/pcal/|{{AUR|pcal}}}}<br />
* {{App|[[Remind]]|Highly sophisticated text-based calendaring and notification system.|http://roaringpenguin.com/products/remind|{{Pkg|remind}}}}<br />
* {{App|When|Simple personal calendar program.|http://lightandmatter.com/when/when.html|{{Pkg|when}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|chinese-calendar|Chinese traditional calendar for Ubuntu Kylin.|https://launchpad.net/chinese-calendar/|{{Pkg|chinese-calendar}}}}<br />
* {{App|Day Planner|Program designed to help you easily plan and manage your time. It can manage appointments, birthdays and more.|http://www.day-planner.org/|{{AUR|dayplanner}}}}<br />
* {{App|Deepin Calendar|Calendar application for Deepin.|https://www.deepin.org/en/original/dde-calendar/|{{Pkg|deepin-calendar}}}}<br />
* {{App|etmtk (Event and Task Manager)|Simple application with a "Getting Things Done!" approach to handling events, tasks, activities, reminders and projects.|http://duke.edu/~dgraham/ETMtk/|{{AUR|etmtk}}}}<br />
* {{App|GNOME Calendar|Calendar application for GNOME.|https://wiki.gnome.org/Apps/Calendar|{{Pkg|gnome-calendar}}}}<br />
* {{App|[[Wikipedia:KAlarm|KAlarm]]|Personal alarm message, command and email scheduler, part of {{Grp|kdepim}}.|https://www.kde.org/applications/utilities/kalarm/|{{Pkg|kalarm}}}}<br />
* {{App|[[Wikipedia:Kontact#Organizer|KOrganizer]]|Calendar and scheduling program, part of {{Grp|kdepim}}.|https://www.kde.org/applications/office/korganizer/|{{Pkg|korganizer}}}}<br />
* {{App|[[Nextcloud]] Calendar|Calendar app for Nextcloud.|https://github.com/nextcloud/calendar|{{Pkg|nextcloud-app-calendar}}}}<br />
* {{App|Orage|GTK+ calendar and task manager often seen integrated with Xfce.|http://www.xfce.org/projects|{{Pkg|orage}}}}<br />
* {{App|Outspline|Extensible outliner with advanced time management features, supporting events with complex recurrence schemes.|https://kynikos.github.io/outspline/|{{AUR|outspline}}}}<br />
* {{App|Pantheon Calendar|Desktop calendar app designed for elementary OS.|https://github.com/elementary/calendar|{{AUR|pantheon-calendar}}}}<br />
* {{App|TkRemind|Sophisticated calendar and alarm program.|http://www.roaringpenguin.com/products/remind|{{Pkg|remind}}}}<br />
<br />
==== Time trackers ====<br />
<br />
* {{App|flow|Pomodoro app that blocks distractions while you work.|https://github.com/iamsergio/flow-pomodoro|{{AUR|flow-pomodoro}}}}<br />
* {{App|Gnomato|Timer for the [[Wikipedia:Pomodoro Technique|Pomodoro Technique]].|https://github.com/diegorubin/gnomato|{{AUR|gnomato}}}}<br />
* {{App|GNOME Break Timer|Keeps track of how much you are using the computer, and it reminds you to take regular breaks.|https://wiki.gnome.org/Apps/GnomeBreakTimer|{{Pkg|gnome-break-timer}}}}<br />
* {{App|GNOME Clocks|Clocks application for GNOME, including alarm, stopwatch and timer functionality.|https://wiki.gnome.org/Apps/Clocks|{{Pkg|gnome-clocks}}}}<br />
* {{App|GNOME Pomodoro|Time management utility for GNOME based on the [[Wikipedia:Pomodoro Technique|Pomodoro Technique]].|http://gnomepomodoro.org/|{{AUR|gnome-shell-pomodoro}}}}<br />
* {{App|Hamster|Time tracking application that helps you to keep track on how much time you have spent during the day on activities you choose to track.|http://projecthamster.org/|{{Pkg|hamster-time-tracker}}}}<br />
* {{App|Kapow|Punch clock to track time spent on projects.|https://gottcode.org/kapow/|{{AUR|kapow}}}}<br />
* {{App|Kronometer|Stopwatch application for KDE.|https://www.kde.org/applications/utilities/kronometer/|{{Pkg|kronometer}}}}<br />
* {{App|KTeaTime|Handy timer for steeping tea.|https://www.kde.org/applications/games/kteatime/|{{Pkg|kteatime}}}}<br />
* {{App|Orage Globaltime|Show clocks from different countries.|https://xfce.org/projects|{{Pkg|orage}}}}<br />
* {{App|RSIBreak|Takes care of your health and regularly breaks your work to avoid repetitive strain injury (RSI).|https://userbase.kde.org/RSIBreak|{{Pkg|rsibreak}}}}<br />
* {{App|Safe Eyes|Tool to reduce and prevent repetitive strain injury (RSI).|https://slgobinath.github.io/SafeEyes/|{{AUR|safeeyes}}}}<br />
* {{App|Tider|Lightweight time tracking application (GTK+)|http://pusto.org/en/tider/|{{AUR|tider-git}}}}<br />
* {{App|Tomate|Timer for the [[Wikipedia:Pomodoro Technique|Pomodoro Technique]].|https://github.com/eliostvs/tomate-gtk|{{AUR|tomate-gtk}}}}<br />
* {{App|Tomato|Simple, usable and efficient pomodoro app designed for elementaryOS.|https://github.com/luizaugustomm/tomato|{{AUR|tomatoapp-bzr}}}}<br />
* {{App|Tomighty|Desktop timer for the [[Wikipedia:Pomodoro Technique|Pomodoro Technique]].|http://tomighty.org/|{{AUR|tomighty}}}}<br />
* {{App|[[Wikipedia:Workrave|Workrave]]|Program that assists in the recovery and prevention of RSI.|http://www.workrave.org/|{{Pkg|workrave}}}}<br />
<br />
==== Task management ====<br />
<br />
===== Console =====<br />
<br />
* {{App|DevTodo|Small command line application for maintaining lists of tasks.|http://swapoff.org/devtodo1.html|{{AUR|devtodo}}}}<br />
* {{App|Taskbook|Tasks, boards & notes for the command-line habitat.|https://github.com/klauscfhq/taskbook|{{AUR|taskbook}}}}<br />
* {{App|[[Wikipedia:Taskwarrior|Taskwarrior]]|Command-line To-do list application with support for lua customization and more.|http://taskwarrior.org/|{{Pkg|task}}}}<br />
* {{App|todoman|Command-line To-do list manager (supports CalDAV)|https://github.com/pimutils/todoman|{{Pkg|todoman}}}}<br />
* {{App|Todo.txt|Small command-line To-do manager.|https://github.com/todotxt/todo.txt-cli/|{{AUR|todotxt}}}}<br />
* {{App|TuDu|Ncurses-based hierarchical To-do list manager with vim-like keybindings.|http://code.meskio.net/tudu/|{{AUR|tudu}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Effitask|Graphical task manager, based on the [http://todotxt.com/ Todo.txt] format.|https://github.com/sanpii/effitask|{{AUR|effitask}}}}<br />
* {{App|Getting Things GNOME!|Personal tasks and TODO list items organizer for GNOME inspired by the [[Wikipedia:Getting Things Done|Getting Things Done (GTD)]] methodology.|https://github.com/getting-things-gnome/gtg|{{AUR|gtg-git}}}}<br />
* {{App|Go For It!|Simple and stylish productivity app, featuring a to-do list, merged with a timer that keeps your focus on the current task. To-do lists are stored in the [http://todotxt.com/ Todo.txt] format.|http://manuel-kehl.de/projects/go-for-it/|{{AUR|go-for-it-git}}}}<br />
* {{App|GNOME To Do|Personal task manager for GNOME.|https://wiki.gnome.org/Apps/Todo|{{Pkg|gnome-todo}}}}<br />
* {{App|[[Nextcloud]] Tasks|Tasks app for Nextcloud.|https://github.com/nextcloud/tasks|{{Pkg|nextcloud-app-tasks}}}}<br />
* {{App|ptask|GTK+ task manager based on [[Wikipedia:Taskwarrior|Taskwarrior]].|https://wpitchoune.net/ptask/|{{AUR|ptask}}}}<br />
* {{App|QTodoTxt|UI client for [http://todotxt.com/ todo.txt] files.|https://github.com/mNantern/QTodoTxt|{{AUR|qtodotxt}}}}<br />
* {{App|Task Coach|Simple todo manager to manage personal tasks and todo lists.|http://www.taskcoach.org/|{{AUR|taskcoach}}}}<br />
* {{App|TaskUnifier|Task management application which enables you to create and organize your tasks.|http://taskunifier.sourceforge.net/|{{AUR|taskunifier}}}}<br />
* {{App|[[Wikipedia:Tasque (software)|Tasque]]|Easy quick task management app written in C#.|https://wiki.gnome.org/Apps/Tasque|{{Pkg|tasque}}}}<br />
* {{App|Zanshin|To-do management application based on Akonadi.|https://zanshin.kde.org/|{{Pkg|zanshin}}}}<br />
<br />
==== Contacts management ====<br />
<br />
* {{App|GNOME Contacts|Contacts manager for GNOME.|https://wiki.gnome.org/Apps/Contacts|{{Pkg|gnome-contacts}}}}<br />
* {{App|KAddressBook|Address book manager for KDE.|https://www.kde.org/applications/office/kaddressbook/|{{Pkg|kaddressbook}}}}<br />
* {{App|LDAP Administration Tool|Browse LDAP-based directories and add/edit/delete entries contained within.|https://sourceforge.net/projects/ldap-at/|{{Pkg|lat}}}}<br />
* {{App|[[Nextcloud]] Contacts|Contacts app for Nextcloud.|https://github.com/nextcloud/contacts|{{Pkg|nextcloud-app-contacts}}}}<br />
* {{App|[[phpLDAPadmin]]|LDAP client webapp. Its hierarchical tree-viewer and advanced search functionality make it intuitive to browse and administer your LDAP directory.|http://phpldapadmin.sourceforge.net/|{{Pkg|phpldapadmin}}}}<br />
<br />
==== Financial management ====<br />
<br />
See also [[Wikipedia:Comparison of accounting software]].<br />
<br />
* {{App|Beancount|A double-entry bookkeeping computer language that lets you define financial transaction records in a text file, read them in memory, generate a variety of reports from them, and provides a web interface.|http://furius.ca/beancount/|{{AUR|beancount-hg}}}}<br />
* {{App|BillReminder|Small and quick accounting application designed to allow for easy tracking of bills.|https://gitlab.gnome.org/Archive/billreminder|{{Pkg|billreminder}}}}<br />
* {{App|Eqonomize!|Cross-platform personal accounting software, with focus on efficiency and ease of use for the small household economy.|https://eqonomize.github.io/|{{AUR|eqonomize-bin}}}}<br />
* {{App|esniper|Simple, lightweight tool for [[Wikipedia:Auction_sniping|sniping]] eBay auctions.|http://esniper.sourceforge.net/|{{AUR|esniper}}}}<br />
* {{App|[[Wikipedia:GnuCash|GnuCash]]|Financial application that implements a double-entry book-keeping system with features for small business accounting.|http://www.gnucash.org/|{{Pkg|gnucash}}}}<br />
* {{App|Grisbi|Personal finance system which manages third party, expenditure and receipt categories, as well as budgetary lines, financial years, and other information that makes it suitable for associations.|http://www.grisbi.org/|{{AUR|grisbi}}}}<br />
* {{App|[[Wikipedia:HomeBank|HomeBank]]|Easy to use finance manager that can analyse your personal finance in detail using powerful filtering tools and graphs.|http://homebank.free.fr/|{{Pkg|homebank}}}}<br />
* {{App|[[Wikipedia:KMyMoney|KMyMoney]]|Personal finance manager that operates in a similar way to [[Wikipedia:Microsoft Money|Microsoft Money]]. It supports different account types, categorisation of expenses and incomes, reconciliation of bank accounts and import/export to the “QIF” file format.|http://kmymoney2.sourceforge.net/index-home.html|{{Pkg|kmymoney}}}}<br />
* {{App|[[Ledger]]|Ledger is a powerful, double-entry accounting system that is accessed from the UNIX command-line.|http://ledger-cli.org/|{{Pkg|ledger}}}}<br />
* {{App|hledger|An accounting program for tracking money, time, or any other commodity, using double-entry accounting and a simple, editable file format. hledger is inspired by and largely compatible with ledger.|http://hledger.org/|{{AUR|hledger-git}}}}<br />
* {{App|Manager Accounting|Manager is free accounting software for small business.|http://www.manager.io/|{{AUR|manager-accounting}}}}<br />
* {{App|Money Manager EX|An easy-to-use personal finance suite|http://www.moneymanagerex.org/|{{Pkg|moneymanagerex}}}}<br />
* {{App|Skrooge|Personal finances manager for the KDE desktop.|http://skrooge.org/|{{Pkg|skrooge}}}}<br />
* {{App|[[Odoo]]|Open source ERP system purely in Python. Previously known as OpenERP.|https://www.odoo.com/|{{AUR|odoo}}}}<br />
<br />
==== Cryptocurrency ====<br />
<br />
* {{App|ARK Desktop Wallet|Wallet for ARK.|https://github.com/ArkEcosystem/desktop-wallet|{{AUR|ark-desktop}}}}<br />
* {{App|Bitcoin Core|Connect to the [[Bitcoin]] P2P Network.|https://bitcoincore.org/|{{Pkg|bitcoin-qt}}}}<br />
* {{App|Cointop|Terminal based application for tracking cryptocurrencies.|https://cointop.sh/|{{AUR|cointop}}}}<br />
* {{App|Electrum|Lightweight [[Bitcoin]] client.|https://electrum.org/|{{Pkg|electrum}}}}<br />
* {{App|Etherwall|[[Ethereum]] wallet.|https://www.etherwall.com/|{{Pkg|etherwall}}}}<br />
* {{App|Exodus|All-in-one proprietary application to secure, manage, and exchange blockchain assets. Based on the [https://electronjs.org/ Electron] platform.|https://www.exodus.io/|{{AUR|exodus}}}}<br />
* {{App|Mist|[[Ethereum]] Dapp browser.|https://github.com/ethereum/mist|{{AUR|mist}}}}<br />
<br />
==== Project management ====<br />
<br />
See also [[Wikipedia:Comparison of project management software]].<br />
<br />
* {{App|[[Wikipedia:Calligra Plan|Calligra Plan]]|Project management application, which is intended for managing moderately large projects with multiple resources.|https://www.calligra.org/plan/|{{Pkg|calligra-plan}}}}<br />
* {{App|[[Wikipedia:GanttProject|GanttProject]]|Project scheduling application featuring gantt chart, resource management, calendaring.|https://www.ganttproject.biz/|{{AUR|ganttproject}}}}<br />
* {{App|Planner|Project management application for GNOME.|https://www.calligra.org/plan/|{{Pkg|planner}}}}<br />
* {{App|[[Wikipedia:ProjectLibre|ProjectLibre]]|Project management software alternative to [[Wikipedia:Microsoft Project|Microsoft Project]].|https://www.projectlibre.com/product/projectlibre-open-source|{{AUR|projectlibre}}}}<br />
* {{App|[[Wikipedia:TaskJuggler|TaskJuggler]]|Modern and powerful project management tool. Its new approach to project planning and tracking is more flexible and superior to the commonly used Gantt chart editing tools.|http://taskjuggler.org/|{{AUR|taskjuggler}}}}<br />
<br />
=== Education ===<br />
<br />
See also [[List of games#Education]].<br />
<br />
* {{App|[[Moodle]]|Open-source software learning management system.|https://moodle.org/|{{AUR|moodle}}}}<br />
* {{App|[[Wikipedia:OpenBoard|OpenBoard]]|Interactive whiteboard software for schools and universities.|http://openboard.ch/index.en.html|{{AUR|openboard}}}}<br />
<br />
==== Flashcards ====<br />
<br />
See also [[Wikipedia:List of flashcard software]].<br />
<br />
* {{App|[[Anki]]|Intelligent spaced-repetition memory training program.|https://apps.ankiweb.net/|{{Pkg|anki}}}}<br />
* {{App|iGNUit|Memorization aid based on the [[Wikipedia:Leitner system|Leitner flashcard system]].|http://homepages.ihug.co.nz/~trmusson/programs.html#ignuit|{{AUR|ignuit}}}}<br />
* {{App|jVLT|Vocabulary learning tool.|https://www.linuxlinks.com/jVLT/|{{AUR|jvlt}}}}<br />
* {{App|KWordQuiz|Tool that gives you a powerful way to master new vocabularies. Part of {{Grp|kdeedu}}.|https://www.kde.org/applications/education/kwordquiz/|{{Pkg|kwordquiz}}}}<br />
* {{App|[[Mnemosyne]]|Flash-card tool which optimizes your learning process.|https://mnemosyne-proj.org/|{{AUR|mnemosyne}}}}<br />
* {{App|Parley|Program to help you memorize things. It uses the spaced repetition learning method, also known as flash cards. Part of {{Grp|kdeedu}}.|https://www.kde.org/applications/education/parley/|{{Pkg|parley}}}}<br />
* {{App|Pauker|Flash card based learning tool using shortterm and longterm memory training.|http://pauker.sourceforge.net/|{{AUR|pauker}}}}<br />
<br />
==== Touch typing ====<br />
<br />
===== Console =====<br />
<br />
* {{App|Dvorak 7min|Simple ncurses-based typing tutor for those trying to become fluent with the Dvorak keyboard layout.|https://github.com/yaychris/dvorak7min|{{AUR|dvorak7min}}}}<br />
* {{App|DvorakNG|Dvorak typing tutor. It's heavily based on Dvorak7min, but adds many improvements.|https://gitlab.com/atsb/dvorakng|{{AUR|dvorakng}}}}<br />
* {{App|GNU Typist|Universal typing tutor.|https://www.gnu.org/software/gtypist/|{{Pkg|gtypist}}}}<br />
* {{App|psani-profi|Program that will teach you touchtyping (Czech).|https://www.sallyx.org/sally/psani-vsemi-deseti/|{{AUR|psani-profi}}}}<br />
* {{App|Typing Trainer|ncurses-based typing trainer program that knows the English and Hungarian languages.|https://szit.hu/tpgt/|{{AUR|tpgt}}}}<br />
* {{App|Typespeed|Test your typing speed, and get your fingers' CPS.|http://typespeed.sourceforge.net/|{{Pkg|typespeed}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Amphetype|Layout-agnostic typing program aimed at people who don't need an on-screen keyboard, but would still like to improve their speed and accuracy.|https://code.google.com/p/amphetype/|{{AUR|amphetype-svn}}}}<br />
* {{App|Klavaro|Teaching touch typing that intends to be keyboard and language independent.|http://klavaro.sourceforge.net/|{{Pkg|klavaro}}}}<br />
* {{App|[[Wikipedia:KTouch|KTouch]]|Program to learn and practice touch typing. Part of {{Grp|kdeedu}}.|https://www.kde.org/applications/education/ktouch/|{{Pkg|ktouch}}}}<br />
* {{App|TIPP10|Intelligent touch typing tutor.|https://www.tipp10.com/|{{Pkg|tipp10}}}}<br />
* {{App|TypingTest|Typing test desktop program with a large amount of customization.|https://github.com/laelath/typingtest|{{AUR|typingtest-git}}}}<br />
<br />
==== Recipe management ====<br />
<br />
* {{App|GNOME Recipes|Recipe management application for GNOME.|https://wiki.gnome.org/Apps/Recipes|{{Pkg|gnome-recipes}}}}<br />
* {{App|Gourmet|Simple but powerful recipe-managing application.|http://thinkle.github.io/gourmet/|{{Pkg|gourmet}}}}<br />
* {{App|KRecipes|KDE application designed to make organizing your personal recipes collection fast and easy.|https://www.kde.org/applications/utilities/krecipes/|{{AUR|krecipes}}}}<br />
<br />
=== Accessibility ===<br />
<br />
See [[Accessibility]] for tips on operating the desktop and [[:Category:Accessibility]] for all available articles. See also [[List of applications/Utilities#On-screen keyboards|On-screen keyboards]].<br />
<br />
==== Speech synthesizers ====<br />
<br />
See also [[Wikipedia:Comparison of speech synthesizers]] and [https://tools.wmflabs.org/tts-comparison/ listening comparison of the different engines].<br />
<br />
* {{App|Ekho|Chinese text-to-speech (TTS) software for Cantonese, Mandarin, Zhaoan Hakka, Tibetan, Ngangien and Korean.|https://eguidedog.net/ekho.php|{{AUR|ekho}}}}<br />
* {{App|eSpeak|Compact speech synthesizer for more than 50 languages.|http://espeak.sourceforge.net/|{{Pkg|espeak}}}}<br />
* {{App|[[Wikipedia:eSpeakNG|eSpeak NG]]|Fork of eSpeak (due to inactivity of original maintainer).|https://github.com/espeak-ng/espeak-ng|{{Pkg|espeak-ng}}}}<br />
* {{App|[[Festival]]|General framework for building speech synthesis systems as well as including examples of various modules. As a whole it offers full text to speech.|http://www.cstr.ed.ac.uk/projects/festival/|{{Pkg|festival}}}}<br />
* {{App|Flite|Lightweight speech synthesis engine.|http://festvox.org/flite/|{{Pkg|flite}}}}<br />
* {{App|Gespeaker|GTK+ frontend for espeak. It allows you to play a text in many languages with settings for voice, pitch, volume and speed.|https://muflone.com/jekyll/gespeaker/english/|{{Pkg|gespeaker}}}}<br />
* {{App|KMouth|Speech synthesizer frontend which enables persons that cannot speak to let their computer speak.|https://www.kde.org/applications/utilities/kmouth/|{{Pkg|kmouth}}}}<br />
* {{App|MaryTTS|Multilingual text-to-speech synthesis platform written in Java.|http://mary.dfki.de/|{{AUR|marytts}}}}<br />
* {{App|[[Mbrola|MBROLA]]|Proprietary phonemes-to-audio program which supports more than 70 languages. Mbrola-voices can also be used with eSpeak.|http://tcts.fpms.ac.be/synthesis/mbrola.html|{{AUR|mbrola}}}}<br />
* {{App|Mimic|Text-to-speech voice synthesis from the Mycroft project (based on Flite).|https://mimic.mycroft.ai/|{{AUR|mimic}}}}<br />
* {{App|Open JTalk|Japanese text-to-speech synthesis system.|https://sourceforge.net/projects/open-jtalk/|{{AUR|open-jtalk}}}}<br />
* {{App|Orca|Screen reader for individuals who are blind or visually impaired, using eSpeak (via Speech Dispatcher).|https://wiki.gnome.org/Projects/Orca|{{Pkg|orca}}}}<br />
* {{App|[[Simple Orca Plugin System|SOPS]]|Provides a simple way to write custom plugins for screen reader Orca.|https://stormdragon.tk/orca-plugins/index.php|{{AUR|simpleorcapluginsystem}}}}<br />
* {{App|Speech Dispatcher|Common interface to speech synthesis. It has backends for eSpeak, Festival, and a few other speech synthesizers.|https://freebsoft.org/speechd|{{Pkg|speech-dispatcher}}}}<br />
* {{App|SVOX Pico|The text-to-speech engine used on Android phones. (Available languages are en-US, en-GB, de-DE, es-ES, fr-FR and it-IT)|https://android.googlesource.com/platform/external/svox/+/master|{{AUR|svox-pico-bin}}}}<br />
<br />
==== Speech recognition ====<br />
<br />
See also [[Wikipedia:Speech recognition software for Linux]].<br />
<br />
* {{App|Blather|Speech recognizer that will run commands when a user speaks preset commands, uses PocketSphinx.|https://gitlab.com/jezra/blather|{{AUR|blather-git}}}}<br />
* {{App|FreeSpeech|Desktop application front-end for PocketSphinx dictation, voice transcription, and realtime speech recognition.|https://thenerdshow.com/freespeech.html|{{AUR|freespeech-vr}}}}<br />
* {{App|[[Wikipedia:Julius (software)|Julius]]|Large vocabulary continuous speech recognition engine.|https://github.com/julius-speech/julius|{{Pkg|julius}}}}<br />
* {{App|[[Wikipedia:Kaldi (software)|Kaldi]]|Speech recognition toolkit.|https://github.com/kaldi-asr/kaldi|{{AUR|kaldi}}}}<br />
* {{App|Kalliope|Modular always-on voice controlled personal assistant designed for home automation.|https://kalliope-project.github.io/|{{AUR|kalliope}}}}<br />
* {{App|Kaylee|Somewhat fancy voice command recognition program that performs actions when a user speaks loosely preset sentences.|https://git.clayhobbs.com/clay/kaylee|{{AUR|kayleevc}}}}<br />
* {{App|[[Wikipedia:Mycroft (software)|Mycroft]]|Hackable voice assistant.|https://github.com/MycroftAI/mycroft-core|{{AUR|mycroft-core}}}}<br />
* {{App|Simon|Speech recognition program that can replace your mouse and keyboard.|https://simon.kde.org/|{{AUR|simon}}}}<br />
<br />
==== Screen magnifiers ====<br />
<br />
* {{App|KMag|Small KDE utility to magnify a part of the screen.|https://www.kde.org/applications/utilities/kmag/|{{Pkg|kmag}}}}<br />
* {{App|Virtual Magnifying Glass|Simple, customizable and easy-to-use screen magnification tool.|http://magnifier.sourceforge.net/|{{AUR|vmg}}}}<br />
* {{App|xzoom|Zoom, rotate and mirror area of X display.|https://www.ibiblio.org/pub/Linux/X11/libs/!INDEX.short.html|{{AUR|xzoom}}}}<br />
<br />
==== Mouse ====<br />
<br />
* {{App|Easystroke|Use mouse gestures to initiate commands and hotkeys.|https://github.com/thjaeger/easystroke/wiki|{{Pkg|easystroke}}}}<br />
* {{App|KMouseTool|Clicks the mouse whenever the mouse cursor pauses briefly. It was designed to help those with repetitive strain injuries, for whom pressing buttons hurts.|https://userbase.kde.org/KMouseTool|{{Pkg|kmousetool}}}}<br />
* {{App|Mousetweaks|Accessibility enhancements for pointing devices.|https://wiki.gnome.org/Projects/Mousetweaks|{{Pkg|mousetweaks}}}}<br />
<br />
=== Display managers ===<br />
<br />
See the main article: [[Display manager#List of display managers]].<br />
<br />
=== Desktop environments ===<br />
<br />
See the main article: [[Desktop environment#List of desktop environments]].<br />
<br />
==== Window managers ====<br />
<br />
===== Console =====<br />
<br />
See also [[List of applications/Utilities#Terminal multiplexers]], which offer some of the functions of window managers for the console.<br />
<br />
* {{App|twin|Text-mode window manager.|https://sourceforge.net/projects/twin/|{{Pkg|twin}}}}<br />
* {{App|Wmutils|A set of tools for X windows manipulation.|https://github.com/wmutils/core|{{AUR|wmutils-git}}}}<br />
<br />
===== Graphical =====<br />
<br />
See the main article: [[Window manager#List of window managers]].<br />
<br />
===== Composite managers =====<br />
<br />
See the main article: [[Xorg#List of composite managers]].<br />
<br />
==== Window tilers ====<br />
<br />
* {{App|PyWO|Allows you to easily organize windows on the desktop using keyboard shortcuts.|https://code.google.com/archive/p/pywo/}}<br />
* {{App|QuickTile|Lightweight standalone alternative to Compiz Grid plugin.|http://ssokolow.com/quicktile/|{{AUR|quicktile-git}}}}<br />
* {{App|wumwum|The Window Manager manager. It can turn emwh compliant window managers into a tiling window manager while retaining all initial functionalities.|http://wumwum.sourceforge.net/|{{AUR|wumwum}}}}<br />
<br />
==== Taskbars ====<br />
<br />
See also [[Wikipedia:Taskbar]].<br />
<br />
* {{App|[[Avant Window Navigator]]|Lightweight dock which sits at the bottom of the screen.|http://launchpad.net/awn|{{AUR|avant-window-navigator}}}}<br />
* {{App|[[Bmpanel]]|Lightweight, NETWM compliant panel.|https://github.com/nsf/bmpanel2|{{AUR|bmpanel2}}}}<br />
* {{App|[[Cairo-Dock]]|Highly customizable dock and launcher application.|http://www.glx-dock.org/|{{Pkg|cairo-dock}}}}<br />
* {{App|[[Wikipedia:Docky|Docky]]|Full fledged dock application that makes opening common applications and managing windows easier and quicker.|http://www.go-docky.com/|{{Pkg|docky}}}}<br />
* {{App|[[fbpanel]]|Lightweight, NETWM compliant desktop panel.|https://aanatoly.github.io/fbpanel/|{{AUR|fbpanel}}}}<br />
* {{App|[[Wikipedia:GNOME Panel|GNOME Panel]]|Panel included in the [[GNOME Flashback]] desktop.|https://wiki.gnome.org/Projects/GnomePanel|{{Pkg|gnome-panel}}}}<br />
* {{App|Latte|Dock based on Plasma frameworks that provides an elegant and intuitive experience for your tasks and plasmoids.|https://github.com/psifidotos/Latte-Dock|{{Pkg|latte-dock}}}}<br />
* {{App|LXPanel|Lightweight X11 desktop panel and part of the LXDE desktop.|http://lxde.org/lxpanel|{{Pkg|lxpanel}}}}<br />
* {{App|MATE Panel|Panel included in the [[MATE]] desktop.|https://github.com/mate-desktop/mate-panel/|{{Pkg|mate-panel}}}}<br />
* {{App|PerlPanel|The ideal accompaniment to a light-weight Window Manager such as OpenBox, or a desktop-drawing program like iDesk.|http://savannah.nongnu.org/projects/perlpanel|{{AUR|perlpanel-git}}}}<br />
* {{app|[[Plank]]|Elegant, simple, clean dock from [[pantheon]] desktop environment.|https://launchpad.net/plank|{{pkg|plank}}}}<br />
* {{App|[[PyPanel]]|Lightweight panel/taskbar written in Python and C.|http://pypanel.sourceforge.net/|{{Pkg|pypanel}}}}<br />
* {{App|[[Tint2]]|Simple panel/taskbar developed specifically for Openbox.|https://gitlab.com/o9000/tint2|{{Pkg|tint2}}}}<br />
* {{App|Vala Panel|Gtk3 panel for compositing window managers|https://github.com/rilian-la-te/vala-panel|{{AUR|vala-panel-git}}}}<br />
* {{App|Xfce Panel|Panel included in the [[Xfce]] desktop.|http://docs.xfce.org/xfce/xfce4-panel/start|{{Pkg|xfce4-panel}}}}<br />
* {{App|[[xmobar]]|A lightweight, text-based, status bar written in Haskell.|http://projects.haskell.org/xmobar/|{{Pkg|xmobar}}, {{AUR|xmobar-git}}}}<br />
<br />
==== System tray ====<br />
<br />
* {{App|AllTray|Dock other applications into the system tray (notification area).|https://github.com/mbt/alltray|{{Pkg|alltray}}}}<br />
* {{App|Docker|Docking application which acts as a system tray.|http://icculus.org/openbox/2/docker/|{{AUR|docker-tray}}}}<br />
* {{App|KDocker|Dock any application in the system tray (notification area).|https://github.com/user-none/KDocker|{{AUR|kdocker}}}}<br />
* {{App|[[Stalonetray]]|Stand-alone freedesktop.org and KDE system tray (notification area) for [[Xorg]]. It has full XEMBED support and minimal dependencies: an X11 lib only. Stalonetray works with virtually any EWMH-compliant window manager.|http://stalonetray.sourceforge.net/|{{Pkg|stalonetray}}}}<br />
* {{App|Trayer|Lightweight GTK+-based system tray (notification area).|https://gna.org/projects/fvwm-crystal/|{{Pkg|trayer}}}}<br />
<br />
==== Application launchers ====<br />
<br />
See also [[Wikipedia:Comparison of desktop application launchers]].<br />
<br />
* {{App|Albert|Sophisticated, plugin based standalone keyboard launcher.|https://github.com/manuelschneid3r/albert|{{AUR|albert}}}}<br />
* {{App|Application Finder|Easy-to-use application launcher from Xfce.|https://docs.xfce.org/xfce/xfce4-appfinder/start|{{pkg|xfce4-appfinder}}}}<br />
* {{App|Bashrun2|Provides a different, barebones approach to a run dialog, using a specialized Bash session within a small xterm window.|http://henning-bekel.de/bashrun2/|{{AUR|bashrun2}}}}<br />
* {{App|[[dmenu]]|Fast and lightweight dynamic menu for X which is also useful as an application launcher.|https://tools.suckless.org/dmenu/|{{Pkg|dmenu}}}}<br />
* {{App|dmenu-extended|Extension to ''dmenu'' for quickly opening files and folders.|https://github.com/markjones112358/dmenu-extended|{{AUR|dmenu-extended-git}}}}<br />
* {{App|dmenu-launch|Simple ''dmenu''-based application launcher. Launches binaries and XDG shortcuts.|https://github.com/Wintervenom/Scripts/blob/master/file/launch/dmenu-launch|{{AUR|dmenu-launch}}}}<br />
* {{App|dmenu2|Fork of dmenu with many useful patches applied and additional options like screen select, dim or opacity change.|https://bitbucket.org/melek/dmenu2|{{AUR|dmenu2}}}}<br />
* {{App|dswitcher|''dmenu''-based window switcher that works regardless of workspace or minimization.|https://github.com/Antithesisx/dswitcher|{{AUR|dswitcher-git}}}}<br />
* {{App|Fehlstart|Small GTK+-based application launcher.|https://gitlab.com/fehlstart/fehlstart|{{AUR|fehlstart-git}}}}<br />
* {{App|[[Gmrun]]|Lightweight GTK+-based application launcher, with the ability to run programs inside a terminal and other handy features.|https://sourceforge.net/projects/gmrun/|{{Pkg|gmrun}}}}<br />
* {{App|[[Wikipedia:GNOME Do|GNOME Do]]|Application launcher inspired by [[Wikipedia:Quicksilver_(software)|Quicksilver]] with many plugins, originally developed for the GNOME desktop.|http://do.cooperteam.net/|{{Pkg|gnome-do}}}}<br />
* {{App|Gnome-Pie|Circular application launcher (pie menu) for Linux. It is made of several pies, each consisting of multiple slices.|https://simmesimme.github.io/gnome-pie.html|{{Pkg|gnome-pie}}}}<br />
* {{App|j4-dmenu-desktop|Very fast dmenu application launcher.|https://github.com/enkore/j4-dmenu-desktop|{{AUR|j4-dmenu-desktop}}}}<br />
* {{App|higgins|Desktop agnostic application launcher, file finder, calculator and more. Plugin based and freely and easily extendable via user-written plugins|https://github.com/kokoko3k/higgins|{{AUR|higgins-git}}}}<br />
* {{App|Kupfer|Convenient command and access tool for the GNOME desktop that can launch applications, open documents and access different types of objects and act on them.|https://kupferlauncher.github.io/|{{Pkg|kupfer}}}}<br />
* {{App|launch|Simple command for launching applications from a terminal emulator.|https://github.com/silverhammermba/launch|{{AUR|launch-cmd}}}}<br />
* {{App|[[Wikipedia:Launchy|Launchy]]|Very popular cross-platform application launcher with a plugin-based system used to provide extra functionality.|http://www.launchy.net/|{{Pkg|launchy}}}}<br />
* {{App|Lighthouse|Simple scriptable popup dialog to run on X.|https://github.com/emgram769/lighthouse|{{AUR|lighthouse-git}}}}<br />
* {{App|[[rofi]]|Popup window switcher roughly based on superswitcher, requiring only xlib and pango.|http://davedavenport.github.io/rofi/|{{Pkg|rofi}}}}<br />
* {{app|slingshot|Application launcher has a clear look, part of [[pantheon]] desktop environment.|https://launchpad.net/slingshot|{{AUR|slingshot-launcher}}}}<br />
* {{App|Runa|Fast and light dmenu-driven desktop application launcher, suitable for use standalone, integrated into file manager context menus, or as an 'xdg-open' replacement. Favourite applications can also be configured.|http://appstogo.mcfadzean.org.uk/linux.html#runa|{{aur|runa}}}}<br />
* {{App|Synapse|Semantic launcher written in Vala that you can use to start applications as well as find and access relevant documents and files by making use of the Zeitgeist engine.|https://launchpad.net/synapse-project|{{Pkg|synapse}}}}<br />
* {{App|Ulauncher|Modern and shiny launcher that provides fuzzy search, extensions, and themes|https://ulauncher.io/|{{AUR|ulauncher}}}}<br />
* {{App|Whippet|Launcher and xdg-open replacement for control freaks. Opens files and URLs with applications associated by name and/or mimetype. Applications and associations may be customized using an SQLite database. Uses dmenu to manage its menus.|http://appstogo.mcfadzean.org.uk/linux.html#whippet|{{aur|whippet}}}}<br />
<br />
==== Application menu editors ====<br />
<br />
* {{App|[[Wikipedia:Alacarte|Alacarte]]|Add or remove applications from the main menu.|https://gitlab.gnome.org/GNOME/alacarte|{{Pkg|alacarte}}}}<br />
* {{App|AppEditor|Edit application entries in the application menu.|https://github.com/donadigo/appeditor|{{AUR|appeditor-git}}}}<br />
* {{App|Ezame|Desktop and menu file editor.|https://github.com/linux-man/ezame|{{AUR|ezame}}}}<br />
* {{App|KMenuEdit|Edit one of the KDE application launchers.|https://docs.kde.org/trunk5/en/kde-workspace/kmenuedit/index.html|{{Pkg|kmenuedit}}}}<br />
* {{App|lxmed|Application menu editor written in Java.|https://sourceforge.net/projects/lxmed/|{{AUR|lxmed}}}}<br />
* {{App|MenuLibre|Advanced menu editor that provides modern features in a clean, easy-to-use interface.|https://launchpad.net/menulibre|{{AUR|menulibre}}}}<br />
* {{App|Meow|Application menu editor written in Java.|https://pnmougel.github.io/meow/|{{AUR|meow-bin}}}}<br />
* {{App|Mozo|Change which applications are shown on the main menu.|https://github.com/mate-desktop/mozo|{{Pkg|mozo}}}}<br />
<br />
==== Wallpaper setters ====<br />
<br />
See also [[Wikipedia:Wallpaper (computing)]].<br />
<br />
* {{App|bgs|An extremely fast and small background setter for X based on imlib2.|https://github.com/Gottox/bgs/|{{AUR|bgs-git}}}}<br />
* {{App|esetroot|Eterm's root background setter, packaged separately.|http://www.eterm.org/|{{AUR|esetroot}}}}<br />
* {{App|[[feh]]|A lightweight and powerful image viewer that can also be used to manage the desktop wallpaper.|https://feh.finalrewind.org/|{{Pkg|feh}}}}<br />
* {{App|habak|A background changing app.|http://fvwm-crystal.sourceforge.net/|{{Pkg|habak}}}}<br />
* {{App|hsetroot|A tool to create compose wallpapers.|https://packages.debian.org/sid/hsetroot|{{Pkg|hsetroot}}}}<br />
* {{App|HydraPaper|Gtk utility to set two different backgrounds for each monitor on GNOME.|https://github.com/gabmus/hydrapaper|{{AUR|hydrapaper-git}}}}<br />
* {{App|[[Nitrogen]]|A fast and lightweight desktop background browser and setter for X windows.|http://projects.l3ib.org/nitrogen/|{{Pkg|nitrogen}}}}<br />
* {{App|pybgsetter|Multi-backend (hsetroot, Esetroot, habak, feh) to set desktop wallpaper.|3=https://bbs.archlinux.org/viewtopic.php?id=88997|4={{AUR|pybgsetter}}}}<br />
* {{App|pywal|Changes the wallpaper and creates matching colorschemes for various applications (rofi, i3, terminals)|https://github.com/dylanaraps/pywal|{{Pkg|python-pywal}}}}<br />
* {{App|Variety|Changes the wallpaper on a regular interval using user-specified or automatically downloaded images.|http://peterlevi.com/variety/|{{Pkg|variety}}}}<br />
* {{App|xli|An image display program for X.|https://packages.debian.org/sid/xli|{{AUR|xli}}}}<br />
<br />
{{Tip|In order to avoid installing one more package, you may find convenient to use the {{ic|display}} utility from {{Pkg|imagemagick}} or {{ic|gm display}} from {{Pkg|graphicsmagick}}. E.g.: {{ic|display -backdrop -background '#3f3f3f' -flatten -window root ''image''}}.}}<br />
<br />
==== Virtual desktop pagers ====<br />
<br />
See also [[Wikipedia:Pager (GUI)]].<br />
<br />
* {{App|bbpager|Dockable pager for [[blackbox]] and other window managers.|3=http://bbtools.sourceforge.net/download.php?file=6|4={{Pkg|bbpager}}}}<br />
* {{App|fbpager|Virtual desktop pager for fluxbox.|http://www.fluxbox.org/fbpager|{{AUR|fbpager-git}}}}<br />
* {{App|IPager|A configurable pager with transparency, originally developed for Fluxbox.|http://useperl.ru/ipager/index.en.html|{{AUR|ipager}}}}<br />
* {{App|Neap|An non-intrusive and light pager that runs in the notification area of your panel.|https://github.com/vzxwco/neap|{{AUR|neap-hotkey}}}}<br />
* {{App|Netwmpager|A NetWM/EWMH compatible pager.|https://sourceforge.net/projects/sf-xpaint/files/netwmpager/|{{AUR|netwmpager}}}}<br />
<br />
==== Desktop widgets ====<br />
<br />
* {{App|[[Wikipedia:gDesklets|gDesklets]]|System for bringing mini programs (desklets) onto your desktop.|https://launchpad.net/gdesklets|{{Pkg|gdesklets}}}}<br />
* {{App|GPhotoFrame|Photo frame gadget for the GNOME Desktop.|https://github.com/iblis17/gphotoframe|{{AUR|gphotoframe}}}}<br />
* {{App|KRuler|Displays on screen a ruler measuring pixels. Part of {{Grp|kdegraphics}}.|https://www.kde.org/applications/graphics/kruler/|{{Pkg|kruler}}}}<br />
* {{App|[[Wikipedia:Screenlets|Screenlets]]|Widget framework that consists of small owner-drawn applications.|https://launchpad.net/screenlets|{{Pkg|screenlets-pack-basic}}}}<br />
<br />
==== Desktop notifications ====<br />
<br />
See: [[Desktop notifications#Notification servers|Notification servers]].<br />
<br />
==== Clipboard managers ====<br />
<br />
See [[Clipboard#Managers]].</div>Bepvtehttps://wiki.archlinux.org/index.php?title=QEMU/Guest_graphics_acceleration&diff=562691QEMU/Guest graphics acceleration2019-01-11T00:01:44Z<p>Bepvte: add a link to my blog tutorial on gvt with libvirt</p>
<hr />
<div>[[Category:Virtualization]]<br />
[[Category:Emulation]]<br />
{{Related articles start}}<br />
{{Related|PCI passthrough via OVMF}}<br />
{{Related|QEMU}}<br />
{{Related|KVM}}<br />
{{Related articles end}}<br />
There are multiple methods for virtual machine (VM) graphics display which yield greatly accelerated or near-bare metal performance.<br />
<br />
== Methods for QEMU guest graphics acceleration ==<br />
=== QXL video driver and SPICE client for display ===<br />
[[QEMU#qxl|QXL/SPICE]] is a high-performance display method. However, it is not designed to offer near-bare metal performance.<br />
=== PCI GPU passthrough ===<br />
==== PCI VGA/GPU passthrough via OVMF ====<br />
[[PCI_passthrough_via_OVMF|PCI passthrough]] currently seems to be the most popular method for optimal performance. [https://bbs.archlinux.org/viewtopic.php?id=162768&p=1 This forum thread] (now closed) may be of interest for problem solving.<br />
==== Looking Glass ====<br />
There is a fairly recent passthrough method called [https://looking-glass.hostfission.com/ Looking Glass]. See [https://forum.level1techs.com/t/looking-glass-guides-help-and-support/122387 this guide to getting started] which provides some problem solving and user support. Looking Glass uses DXGI (MS DirectX Graphics Infrastructure) to pass complete frames captured from the VM's passed-through video card via shared memory to the host system where they are read (scraped) by a display client running on the bare-metal host.<br />
=== Fully virtualized GPU support via Intel-specific iGVT-g extension ===<br />
[[intel_graphics#Intel_GVT-g_Graphics_Virtualization_Support|iGVT-g]] is limited to Intel graphics on [https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide recent Intel CPUs] (starting with 5th generation Intel Core(TM) processors). For more information, see [https://www.reddit.com/r/VFIO/comments/8h352p/guide_running_windows_via_qemukvm_and_intel_gvtg/ this Reddit thread for use on an Arch host system]. If you use [[Libvirt]], you might want to check out [https://blog.bepbep.co/posts/gvt/ this blog.]<br />
<br />
=== Virgil3d virtio-gpu paravirtualized device driver ===<br />
[https://virgil3d.github.io/ Virgil3d] virtio-gpu is a paravirtualized 3d accelerated graphics driver, similar to [[QEMU#Installing virtio drivers|non-graphics virtio drivers]] (see [https://www.linux-kvm.org/page/Virtio virtio driver information] and [https://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers virtio Windows guest drivers]). <br />
For Linux guests, [[QEMU#virtio|virtio-gpu]] is fairly mature, having been available since Linux kernel version 4.4 and QEMU version 2.6. See [https://www.reddit.com/r/archlinux/comments/7nmceg/kvmqemu_with_virtiogpu_virgl_support_enabled/ this Reddit Arch thread] and [https://www.kraxel.org/blog/2016/09/using-virtio-gpu-with-libvirt-and-spice/ Gerd Hoffmann's blog for using this with libvirt and spice].<br />
<br />
For Windows guests, there is very little information on [https://studiopixl.com/2017-08-27/3d-acceleration-using-virtio.html VirtIO-gpu OpenGL drivers]. [https://gist.github.com/Keenuts/199184f9a6d7a68d9a62cf0011147c0b A project summary], [https://gitlab.com/spice/win32/virtio-gpu-wddm-dod the DOD (Windows kernel) driver] and [https://github.com/Keenuts/virtio-gpu-win-icd the ICD (Windows userland) driver] are available. In addition, see [https://www.phoronix.com/scan.php?page=news_item&px=QEMU-3D-Windows-Guests this Phoronix article] and its comments.</div>Bepvtehttps://wiki.archlinux.org/index.php?title=CUPS/Troubleshooting&diff=558898CUPS/Troubleshooting2018-12-11T18:30:06Z<p>Bepvte: locate ppd file error information</p>
<hr />
<div>[[Category:Printers]]<br />
[[ja:CUPS/トラブルシューティング]]<br />
[[ru:CUPS (Русский)/Troubleshooting]]<br />
{{Related articles start}}<br />
{{Related|CUPS}}<br />
{{Related|CUPS/Printer-specific problems}}<br />
{{Related articles end}}<br />
<br />
This article covers all non-specific (ie, not related to any one printer) troubleshooting of CUPS and printing drivers (but not problems related to printer sharing), including methods of determining the exact nature of the problem, and of solving the identified problem. <br />
<br />
== Introduction ==<br />
<br />
The best way to get printing working is to set 'LogLevel' in {{ic|/etc/cups/cupsd.conf}} to:<br />
LogLevel debug<br />
<br />
And then viewing the output from {{ic|/var/log/cups/error_log}} like this:<br />
# tail -n 100 -f /var/log/cups/error_log<br />
<br />
The characters at the left of the output stand for:<br />
*D=Debug<br />
*E=Error<br />
*I=Information<br />
*And so on<br />
<br />
These files may also prove useful:<br />
*{{ic|/var/log/cups/page_log}} - Echoes a new entry each time a print is successful<br />
*{{ic|/var/log/cups/access_log}} - Lists all cupsd http1.1 server activity<br />
<br />
Of course, it is important to know how CUPS works if wanting to solve related issues:<br />
# An application sends a .ps file (PostScript, a script language that details how the page will look) to CUPS when 'print' has been selected (this is the case with most programs).<br />
# CUPS then looks at the printer's PPD file (printer description file) and figures out what filters it needs to use to convert the .ps file to a language that the printer understands (like PJL, PCL), usually GhostScript.<br />
# GhostScript takes the input and figures out which filters it should use, then applies them and converts the .ps file to a format understood by the printer.<br />
# Then it is sent to the back-end. For example, if the printer is connected to a USB port, it uses the USB back-end.<br />
<br />
Print a document and watch {{ic|error_log}} to get a more detailed and correct image of the printing process.<br />
<br />
== Problems resulting from upgrades ==<br />
<br />
''Issues that appeared after CUPS and related program packages underwent a version increment''<br />
<br />
=== CUPS stops working ===<br />
<br />
The chances are that a new configuration file is needed for the new version to work properly. Messages such as "404 - page not found" may result from trying to manage CUPS via localhost:631, for example.<br />
<br />
To use the new configuration, copy {{ic|/etc/cups/cupsd.conf.default}} to {{ic|/etc/cups/cupsd.conf}} (backup the old configuration if needed) and restart CUPS to employ the new settings.<br />
<br />
=== All jobs are "stopped" ===<br />
<br />
{{Accuracy|This seems a rather brute-force way of fixing this; maybe the printer is simply disabled?}}<br />
<br />
If all jobs sent to the printer become "stopped", delete the printer and add it again.<br />
Using the [http://localhost:631 CUPS web interface], go to Printers > Delete Printer.<br />
<br />
To check the printer's settings go to ''Printers'', then ''Modify Printer''. Copy down the information displayed, click 'Modify Printer' to proceed to the next page(s), and so on.<br />
<br />
=== All jobs are "The printer is not responding" ===<br />
<br />
On networked printers, you should check that the hostname in the printer's URI resolves to the printer's IP address via DNS, e.g. if your printer's connection looks like this:<br />
<br />
lpd://BRN_020554/BINARY_P1<br />
<br />
then the hostname 'BRN_020554' needs to resolve to the printer's IP from the server running CUPS. If [[Avahi]] is being used, ensure that [[Avahi#Hostname_resolution|Avahi's hostname resolution]] is working.<br />
<br />
Alternatively, replace the hostname used in the URI with the printer's IP address.<br />
<br />
=== The PPD version is not compatible with gutenprint ===<br />
<br />
Run:<br />
# /usr/bin/cups-genppdupdate<br />
<br />
And restart CUPS (as pointed out in gutenprint's post-install message).<br />
<br />
== Networking issues ==<br />
<br />
=== Unable to locate printer ===<br />
<br />
Even if CUPS can detect networked printers, you may still end up with an "Unable to locate printer" error when trying to print something. The solution to this problem is to enable Avahi's [[Avahi#Hostname_resolution|.local hostname resolution]]. See [[CUPS#Network]] for details.<br />
<br />
This problem may also arise when you have a firewall. You may need to disable your firewall or set the right rules. Using system-config-printer to detect network printers will do that automatically.<br />
<br />
=== Old CUPS server ===<br />
<br />
As of CUPS version 1.6, the client defaults to IPP 2.0. If the server uses CUPS <= 1.5 / IPP <= 1.1, the client does not downgrade the protocol automatically and thus cannot communicate with the server. A workaround is to append the {{ic|1=version=1.1}} option documented at [https://www.cups.org/doc/network.html#TABLE2] to the URI.<br />
<br />
=== Shared printer works locally but remote machine fails to print ===<br />
<br />
This is caused by a print job being sent through a filter twice, once on the local machine and once on the remote. See also the warning on the main [[CUPS#Network_2|CUPS]] page.<br />
<br />
=== Unable to locate PPD file ===<br />
<br />
{{hc|/var/log/cups/error_log|Cannot connect to remote printer ipp://HP079676.local<br />
copy_model: empty PPD file}}<br />
<br />
Make sure [[Avahi]] is set up correctly. In particular, make sure {{Pkg|nss-mdns}} is installed and set up in {{ic|/etc/nsswitch.conf}}.<br />
<br />
== USB printers ==<br />
<br />
=== Conflict with SANE ===<br />
<br />
If you are also running [[SANE]], it's possible that it is conflicting with CUPS. To fix this create a [[Udev]] rule marking the device as matched by libsane:<br />
{{hc|/etc/udev/rules.d/99-printer.rules|output=<br />
ATTRS{idVendor}=="''vendor id''", ATTRS{idProduct}=="''product id''", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"}}<br />
<br />
=== Conflict with usblp ===<br />
<br />
USB printers can be accessed using two methods: The usblp kernel module and libusb. The former is the classic way. It is simple: data is sent to the printer by writing it to a device file as a simple serial data stream. Reading the same device file allows bi-di access, at least for things like reading out ink levels, status, or printer capability information (PJL). It works very well for simple printers, but for multi-function devices (printer/scanner) it is not suitable and manufacturers like HP supply their own backends. Source: [http://lists.linuxfoundation.org/pipermail/printing-architecture/2012/002412.html here].<br />
<br />
{{Warning|As of {{Pkg|cups}} version 1.6.0, it should no longer be necessary to blacklist the {{ic|usblp}} kernel module.<br />
<br />
If you find out this is the only way to fix a remaining issue please report this upstream to the CUPS bug tracker and maybe also get in contact with Till Kamppeter (Debian CUPS maintainer). See [http://cups.org/str.php?L4128 upstream bug] for more info.}}<br />
<br />
If you have problems getting your USB printer to work, you can try [[blacklisting]] the {{ic|usblp}} [[kernel module]]:<br />
<br />
{{hc|/etc/modprobe.d/blacklistusblp.conf|<br />
blacklist usblp<br />
}}<br />
<br />
Custom kernel users may need to manually load the {{ic|usbcore}} [[kernel module]] before proceeding.<br />
<br />
Once the modules are installed, plug in the printer and check if the kernel detected it by running the following:<br />
# journalctl -e<br />
or<br />
# dmesg<br />
<br />
If you are using {{ic|usblp}}, the output should indicate that the printer has been detected like so:<br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
<br />
If you blacklisted {{ic|usblp}}, you will see something like:<br />
usb 3-2: new full speed USB device using uhci_hcd and address 3<br />
usb 3-2: configuration #1 chosen from 1 choice<br />
<br />
=== USB autosuspend ===<br />
<br />
The Linux kernel automatically suspends USB devices when there is driver support and the devices are not in use. This can save power, but some USB printers think that they are disconnected when the kernel suspends the USB port, preventing printing. This can be fixed by deactivating autosuspend for the specific device, see [[Power management#USB autosuspend]].<br />
<br />
=== Bad permissions ===<br />
<br />
Check the permissions of the printer USB device. Get the bus and device number from {{ic|lsusb}}:<br />
<br />
{{hc| lsusb |<br />
Bus <BUSID> Device <DEVID>: ID <PRINTERID>:<VENDOR> Hewlett-Packard DeskJet D1360}}<br />
<br />
Check the ownership by looking in devfs:<br />
<br />
# ls -l /dev/bus/usb/<BUSID>/<DEVID><br />
<br />
The cups daemon runs as user "cups" and belongs to group "lp", so either this user or group needs read & write access to the USB device. If you think the permissions look wrong, you can change the group and permission temporarily:<br />
<br />
# chgrp lp /dev/bus/usb/<BUSID>/<DEVID><br />
# chmod 664 /dev/bus/usb/<BUSID>/<DEVID><br />
<br />
Then check if cups can now see the USB device correctly.<br />
<br />
To make a persistent permission change that will be triggered automatically each time the USB device is attached, add the following line:<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|2=<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="<VENDOR>", ATTRS{idProduct}=="<PRINTERID>", GROUP:="lp", MODE:="0664"<br />
}}<br />
<br />
After editing, reload the udev rules with this command:<br />
<br />
# udevadm control --reload-rules<br />
<br />
Each system may vary, so consult [[udev#List the attributes of a device]] wiki page.<br />
<br />
== HP issues ==<br />
<br />
See also [[CUPS/Printer-specific problems#HP]].<br />
<br />
=== CUPS: "/usr/lib/cups/backend/hp failed" ===<br />
<br />
{{Accuracy|Backend failures can be caused by many issues, and [[Avahi]] should not be required}}<br />
<br />
Make sure dbus is installed and running. If the error persists, try starting avahi-daemon.<br />
<br />
Try adding the printer as a Network Printer using the http:// protocol.<br />
<br />
{{Note|There might need to set permissions issues right.}}<br />
<br />
=== CUPS: Job is shown as complete but the printer does nothing ===<br />
<br />
This happens on HP printers when you select the (old) hpijs driver (e.g. the Deskjet D1600 series). Use the hpcups driver instead.<br />
<br />
Some HP printers require their firmware to be downloaded from the computer every time the printer is switched on. If there is an issue with udev (or equivalent) and the firmware download rule is never fired, you may experience this issue.<br />
As a workaround, you can manually download the firmware to the printer. Ensure the printer is plugged in and switched on, then run<br />
hp-firmware -n<br />
<br />
=== CUPS: '"foomatic-rip" not available/stopped with status 3' ===<br />
<br />
If receiving any of the following error messages in {{ic|/var/log/cups/error_log}} while using a HP printer, with jobs appearing to be processed while they all end up not being completed with their status set to 'stopped':<br />
Filter "foomatic-rip" for printer ''printer_name'' not available: No such file or director<br />
or:<br />
PID ''pid'' (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!<br />
make sure {{pkg|hplip}} has been [[install]]ed.<br />
<br />
=== CUPS: "Filter failed" ===<br />
<br />
A "filter failed" error can be caused by any number of issues. The CUPS error log (by default {{ic|/var/log/cups/error_log}}) should record which filter failed and why.<br />
<br />
==== Missing ghostscript ====<br />
<br />
Install {{pkg|ghostscript}} ({{ic|/usr/lib/cups/filter/gstoraster}} needs it to run).<br />
<br />
==== Missing foomatic-db ====<br />
<br />
Install {{pkg|foomatic-db}} and {{pkg|foomatic-db-ppds}}. This fixes it in some cases.<br />
<br />
==== Avahi not enabled ====<br />
<br />
[[Start]], and [[enable]] the {{ic|avahi-daemon}} service.<br />
<br />
==== Out-of-date plugin ====<br />
<br />
This error can also indicate that the plugin is out of date (version is mismatched) and may occur after a system upgrade, possibly showing up as a {{ic|Plugin error}} message in the logs.<br />
If you have installed {{AUR|hplip-plugin}} you will need to update the package, otherwise re-run {{ic|hp-setup -i}} to install the latest version of the plugin.<br />
<br />
==== Outdated printer configuration ====<br />
<br />
As of {{AUR|hplip-plugin}} v3.17.11 hpijs is not longer available. If you have printers using hpijs they will fail to print. You must modify them and select the new hpcups driver instead.<br />
<br />
You can check if this is your case looking at cups error_log:<br />
<br />
{{hc| $ grep hpijs /var/log/cups/error_log |<br />
...<br />
D [09/Jan/2018:14:32:58 +0000] [Job 97] '''sh: hpijs: command not found'''<br />
...}}<br />
<br />
=== CUPS: prints only an empty and an error-message page on HP LaserJet ===<br />
<br />
{{Out of date|The bug was reported in 2012; is this still an issue?}}<br />
<br />
There is a bug that causes CUPS to fail when printing images on HP LaserJet (in my case 3380). The bug has been reported and fixed by [https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/998087 Ubuntu].<br />
The first page is empty, the second page contains the following error message:<br />
ERROR:<br />
invalidaccess<br />
OFFENDING COMMAND:<br />
filter<br />
STACK:<br />
/SubFileDecode<br />
endstream<br />
...<br />
<br />
In order to fix the issue, run the following command as root:<br />
# lpadmin -p ''printer'' -o pdftops-renderer-default=pdftops<br />
<br />
=== HPLIP 3.13: Plugin is installed, but HP Device Manager complains it is not ===<br />
<br />
The issue might have to do with the file permission change that had been made to {{ic|/var/lib/hp/hplip.state}}. To correct the issue, a simple {{ic|chmod 644 /var/lib/hp/hplip.state}} and {{ic|chmod 755 /var/lib/hp}} should be sufficient. For further information, please read this [https://bugs.launchpad.net/hplip/+bug/1131596 link].<br />
<br />
=== hp-toolbox: "Unable to communicate with device" ===<br />
<br />
# hp-toolbox<br />
# error: Unable to communicate with device (code=12): hp:/usb/''printer id''<br />
<br />
==== Permission problem ====<br />
<br />
{{Accuracy|Presumably, hp-toolbox tries to access /dev/usb/* or /dev/lp, so it needs to be in the {{ic|lp}} group. But why {{ic|sys}}? And I can't seem to reproduce this...}}<br />
<br />
It may be needed to add the user to the {{ic|lp}} and {{ic|sys}} [[user group]]s.<br />
<br />
==== Virtual CDROM printers ====<br />
<br />
This can also be caused by printers such as the P1102 that provide a virtual CD-ROM drive for MS Windows drivers. The lp dev appears and then disappears. In that case, try the '''usb-modeswitch''' and '''usb-modeswitch-data''' packages, that lets one switch off the "Smart Drive" (udev rules included in said packages).<br />
<br />
==== Networked printers ====<br />
<br />
This can also occur with network attached printers using dynamic hostnames if the [[Avahi|avahi-daemon]] is not running. Another possibility is that ''hp-setup'' failed to locate the printer because the IP address of the the printer changed due to DHCP. If this is the case, consider adding a DHCP reservation for the printer in the DHCP server's configuration.<br />
<br />
=== hp-setup asks to specify the PPD file for the discovered printer ===<br />
<br />
Furthermore, when selecting a PPD file in hp-setup's graphical mode, the field does not update and no error message is shown.<br />
<br />
Or, if in interactive (console) mode, you may encounter something similar to this even when providing a correct path to a valid ppd file:<br />
<br />
Please enter the full filesystem path to the PPD file to use (q=quit) :/usr/share/ppd/HP/hp-deskjet_2050_j510_series.ppd.gz<br />
Traceback (most recent call last):<br />
File "/usr/bin/hp-setup", line 536, in <module><br />
desc = nickname_pat.search(nickname).group(1)<br />
TypeError: cannot use a string pattern on a bytes-like object<br />
<br />
The solution is to install and start {{pkg|cups}} before running {{ic|hp-setup}}.<br />
<br />
=== hp-setup: "Qt/PyQt 4 initialization failed" ===<br />
<br />
[[Install]] {{AUR|python-pyqt4}}, which is an optdepend of {{Pkg|hplip}}. Alternatively, to run hp-setup with the command line interface, use the {{ic|-i}} flag.<br />
<br />
=== hp-setup: finds the printer automatically but reports "Unable to communicate with device" when printing test page immediately afterwards ===<br />
<br />
This at least happens to hplip 3.13.5-2 for HP Officejet 6500A through local network connection. To solve the problem, specify the IP address of the HP printer for hp-setup to locate the printer.<br />
<br />
=== hp-setup: "KeyError: 'family-class'" ===<br />
<br />
If adding a printer fails silently in the UI or you receive a {{ic|KeyError: 'family-class'}} traceback from {{ic|hp-setup}}, the {{ic|/usr/share/hplip/data/models/models.dat}} may need to be manually updated.<br />
Check if {{ic|1=family-class=Undefined}} is defined the section for your printer, if not add it:<br />
{{hc|head=/usr/share/hplip/data/models/models.dat|output=<br />
[hp_laserjet_pro_mfp_m225dw]<br />
...<br />
family-class=Undefined<br />
}}<br />
<br />
== Other ==<br />
<br />
=== Printer "Paused" or "Stopped" with Status "Rendering completed" ===<br />
<br />
==== Low ink ====<br />
<br />
When low on ink, some printers will get stuck in "Rendering completed" status and, if it is a network printer, the printer may even become unreachable from CUPS' perspective despite being properly connected to the network. Replacing the low/depleted ink cartridge(s) in this setting will return the printer to "Ready" status and, if it is a network printer, will make the printer available to CUPS again.<br />
<br />
{{Note|If you use third-party ink cartridges, the ink levels reported by the printer may be inaccurate. If you use third-party ink and your printer used to work fine but is now getting stuck on "Rendering completed" status, replace the ink cartridges regardless of the reported ink levels before trying other fixes.}}<br />
<br />
=== Printing fails with unauthorised error ===<br />
<br />
If a remote printer requests authentication CUPS will automatically add an {{ic|AuthInfoRequired}} directive to the printer in {{ic|/etc/cups/printers.conf}}. However, some graphical applications (for instance, some versions of [[LibreOffice]] [https://bugs.documentfoundation.org/show_bug.cgi?id=53029]) have no way to prompt for credentials, so printing fails.<br />
To fix this include the required username and password in the URI.<br />
See [https://bugs.launchpad.net/ubuntu/+source/cups/+bug/283811], [https://bbs.archlinux.org/viewtopic.php?id=61826].<br />
<br />
=== Unknown supported format: application/postscript ===<br />
<br />
Comment the lines:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
from {{ic|/etc/cups/mime.convs}}, and:<br />
application/octet-stream<br />
in {{ic|/etc/cups/mime.types}}.<br />
<br />
=== Print-Job client-error-document-format-not-supported ===<br />
<br />
Try installing the foomatic packages and use a foomatic driver.<br />
<br />
=== Unable to get list of printer drivers ===<br />
(Also applicable to error "-1 not supported!")<br />
<br />
Try to remove Foomatic drivers or refer to [[CUPS/Printer-specific problems#HPLIP]] for a workaround.<br />
<br />
=== lp: Error - Scheduler Not Responding ===<br />
<br />
If you get this error, ensure [[CUPS]] is running, the environmental variable {{ic|CUPS_SERVER}} is unset, and that {{ic|/etc/cups/client.conf}} is correct.<br />
<br />
=== "Using invalid Host" error message ===<br />
<br />
Try adding {{ic|ServerAlias *}} into {{ic|/etc/cups/cupsd.conf}}.<br />
<br />
=== Cannot print from LibreOffice ===<br />
<br />
If you can print a test page from the [[CUPS]] web interface, but not from [[LibreOffice]], try to [[install]] the {{Pkg|a2ps}} package.<br />
<br />
=== Printer output shifted ===<br />
<br />
This seems to be caused by the wrong page size being set in [[CUPS]].<br />
<br />
=== Printer becomes stuck after a problem ===<br />
<br />
When an issue arises during printing, the printer in CUPS may become unresponsive. {{ic|lpq}} reports that the printer {{ic|is not ready}}, and it can be reactivated using {{ic|cupsenable}}. In the CUPS web interface, the printer is shown as ''Paused'', and can be reactivated by ''resuming'' the printer.<br />
<br />
To automatically have CUPS reactivate the printer, change [https://www.cups.org/doc/man-cupsd.conf.html?TOPIC=Man+Pages#ErrorPolicy ErrorPolicy] from the default {{ic|stop-printer}} to {{ic|retry-this-job}}.<br />
<br />
=== Samsung: URF ERROR - Incomplete Session by time out ===<br />
<br />
This error is usually encountered when printing files over the network through IPP to a Samsung printer, and is solved by using the {{aur|samsung-unified-driver}} package.<br />
<br />
{{Note|The corresponding error code 11-1112 corresponds to an internal wiring problem with the printer, so contacting Samsung's tech support is futile.}}<br />
<br />
=== Brother: Printer prints multiple copies ===<br />
<br />
Sometimes the printer will print multiple copies of a document (for instance a MFC-9330CDW printed 10 copies). The solution is to [[CUPS/Printer-specific problems#Updating the firmware|update the printer firmware]].<br />
<br />
=== Regular user cannot change properties of the printer or remove certain jobs ===<br />
<br />
If a regular user needs to be able to change the printers properties or manage the printer queue, the user may need to be added to the {{ic|sys}} group.</div>Bepvtehttps://wiki.archlinux.org/index.php?title=RetroArch&diff=558822RetroArch2018-12-10T18:37:01Z<p>Bepvte: updater disabled by default</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Emulation]]<br />
[[es:RetroArch]]<br />
[[ja:RetroArch]]<br />
{{Note|RetroArch is not affiliated with [[Arch Linux]].}}<br />
<br />
[http://www.retroarch.com/ RetroArch] is the reference implementation of the libretro API. It is a modular front-end for video game system emulators, game engines, video games, media players and other applications that offers several uncommon technical features such as multi-pass shader support, real-time rewinding and video recording (using [[FFmpeg]]), it also features a gamepad-driven UI on top of a full-featured command-line interface.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|retroarch}} or alternatively {{AUR|retroarch-git}} for the development version.<br />
{{Tip|[[Install]] {{Pkg|retroarch-assets-xmb}} to get the fonts and icons for the RetroArch GUI. You need to edit RetroArch's [[#Configuration]] to load them.}}<br />
<br />
== Usage ==<br />
<br />
RetroArch relies on separate libraries, called "cores", for most of its functionality. These can be downloaded per-user within RetroArch itself (via the [https://buildbot.libretro.com/ libretro Buildbot]) or you can [[install]] them system-wide via [https://www.archlinux.org/groups/x86_64/libretro/ Community] or [https://aur.archlinux.org/packages/?O=0&K=libretro AUR].<br />
<br />
By default RetroArch is configured to load the per-user cores that it downloads. Change your [[#Configuration]] if you install them elsewhere.<br />
<br />
The command to run a particular core is<br />
<br />
$ retroarch --libretro ''/path/to/some_core_libretro.so'' ''/path/to/rom''<br />
<br />
== Configuration ==<br />
<br />
When you first run RetroArch it will create the user configuration file {{ic|~/.config/retroarch/retroarch.cfg}}. If you install any RetroArch components system-wide with [[pacman]], you should specify these in the global configuration file and include them in your user file. For example,<br />
<br />
{{hc|/etc/retroarch.cfg|2=# for retroarch-assets-xmb<br />
assets_directory = "/usr/share/retroarch/assets"<br />
# for libretro-core-info<br />
libretro_info_path = "/usr/share/libretro/info"<br />
# for libretro cores<br />
libretro_directory = "/usr/lib/libretro"}}<br />
<br />
{{hc|~/.config/retroarch/retroarch.cfg|2=#include "/etc/retroarch.cfg"}}<br />
<br />
{{Note|RetroArch does not support multiple search paths for these components. For example, if you install cores with [[pacman]] '''and''' download cores using RetroArch's GUI, you cannot configure RetroArch to show all of them at once since they are installed in different directories.}}<br />
<br />
If you want to override your configuration (for example when running certain cores) you can use the {{ic|--appendconfig ''/path/to/config''}} command line option.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling the ''Online Updater'' ===<br />
<br />
If you prefer to install all RetroArch components with the built in updater instead of pacman, you can enable it with a configuration file:<br />
<br />
{{hc|~/.config/retroarch/retroarch.cfg|2=menu_show_core_updater = "true"}}<br />
<br />
=== Enabling ''SaveRAM Autosave Interval'' ===<br />
<br />
By default, RetroArch only writes SRAM onto disk when it exits without error, which means that there's a risk of losing save data when using crash-prone cores. To change this behavior, open {{ic|~/.config/retroarch/retroarch.cfg}} and set {{ic|autosave_interval}} to ''n''.<br />
<br />
{{hc|~/.config/retroarch/retroarch.cfg|2=<br />
autosave_interval = "600"<br />
}}<br />
<br />
With the example above, RetroArch will write SRAM changes onto disk every 600 seconds.<br />
<br />
{{Warning|Setting this value too low will cause all sorts of issue, most notably hardware degradation. See [https://github.com/libretro/RetroArch/issues/4901#issuecomment-300888019]}}<br />
<br />
=== Filters and shaders ===<br />
<br />
RetroArch can load [https://gitorious.org/bsnes/xml-shaders BSNES XML filters] and [https://github.com/libretro/common-shaders CG shaders]. These are set in {{ic|retroarch.cfg}} with {{ic|video_bsnes_shader}} and {{ic|video_cg_shader}} respectively. The shaders can also be obtained and updated directly inside RetroArch using the Online Updater.<br />
<br />
{{Note|{{AUR|retroarch-git}} requires {{pkg|nvidia-cg-toolkit}} in order to use the ''cg shaders''.}}<br />
<br />
=== Reset settings to their default value ===<br />
<br />
To reset a setting or keybind to its default value through the GUI, highlight it and press {{ic|Start}}. To remove a button from a keybind, highlight the keybind and press {{ic|Y}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== No cores found ===<br />
<br />
By default RetroArch searches for cores in {{ic|~/.config/retroarch/cores}}, which is where the Online Updater installs them. Cores installed with [[pacman]] are placed in {{ic|/usr/lib/libretro}} and thus will not appear in RetroArch's GUI. You should choose one method of installing cores (pacman or the Online Updater) and change your [[#Configuration]] to match.<br />
<br />
=== Input devices do not operate ===<br />
<br />
You may encounter problems if running on a CLI or a display server other than [[Xorg]] or if you use the [[udev]] input driver, because {{ic|/dev/input}} nodes are limited to root-only access. Try adding your user to the {{ic|input}} [[user group]] then logging in again.<br />
<br />
Alternatively, manually add a rule in {{ic|/etc/udev/rules.d/99-evdev.rules}}, with {{ic|1=KERNEL=="event*", NAME="input/%k", MODE="666"}} as its contents. Reload [[udev rules]] by running:<br />
<br />
# udevadm control --reload-rules<br />
<br />
If rebooting the system or replugging the devices are not options, permissions may be forced using:<br />
<br />
# chmod 666 /dev/input/event*<br />
<br />
=== Poor video performance ===<br />
<br />
If poor video performance is met, RetroArch may be run on a separate thread by setting {{ic|1=video_threaded = true}} in {{ic|~/.config/retroarch/retroarch.cfg}}.<br />
<br />
This is, however, a solution that should be not be used if tweaking RetroArch's video resolution/refresh rate fixes the problem, as it makes perfect V-Sync impossible, and slightly increases latency.<br />
<br />
=== Audio issues with ALSA ===<br />
<br />
When using [[ALSA]] the {{ic|audio_out_rate}} must match the system's default output rate, usually {{ic|48000}}.<br />
<br />
=== Save data is lost whenever RetroArch crashes ===<br />
<br />
See [[#Enabling SaveRAM Autosave Interval]].<br />
<br />
== See also ==<br />
<br />
* [http://www.retroarch.com/ Official Website]<br />
* [https://github.com/libretro/RetroArch/wiki RetroArch wiki on GitHub]<br />
* [https://github.com/libretro/libretro.github.com/wiki/Documentation-devs Documentation for developers]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Power_management&diff=551966Power management2018-10-29T16:44:41Z<p>Bepvte: newline</p>
<hr />
<div>[[Category:Power management]]<br />
[[es:Power management]]<br />
[[it:Shutdown Pressing Power Button]]<br />
[[ja:電源管理]]<br />
[[zh-hans:Power management]]<br />
{{Related articles start}}<br />
{{Related|Power management/Suspend and hibernate}}<br />
{{Related|Display Power Management Signaling}}<br />
{{Related|CPU frequency scaling}}<br />
{{Related|Hybrid graphics}}<br />
{{Related|Kernel modules}}<br />
{{Related|sysctl}}<br />
{{Related|udev}}<br />
{{Related articles end}}<br />
[[Wikipedia:Power management|Power management]] is a feature that turns off the power or switches system's components to a low-power state when inactive.<br />
<br />
In Arch Linux, power management consists of two main parts:<br />
<br />
# Configuration of the Linux kernel, which interacts with the hardware.<br />
#* [[Kernel parameters]]<br />
#* [[Kernel modules]]<br />
#* [[udev]] rules<br />
# Configuration of userspace tools, which interact with the kernel and react to its events. Many userspace tools also allow to modify kernel configuration in a "user-friendly" way. See [[#Userspace tools]] for the options.<br />
<br />
== Userspace tools ==<br />
<br />
Using these tools can replace setting a lot of settings by hand. Only run '''one''' of these tools to avoid possible conflicts as they all work more or less similarly. Have a look at the [[:Category:Power management|power management category]] to get an overview on what power management options exist in Arch Linux.<br />
<br />
These are the more popular scripts and tools designed to help power saving:<br />
<br />
=== Console ===<br />
<br />
* {{App|[[acpid]]| A daemon for delivering ACPI power management events with netlink support.|http://sourceforge.net/projects/acpid2/|{{Pkg|acpid}}}}<br />
* {{App|[[Laptop Mode Tools]]|Utility to configure laptop power saving settings, considered by many to be the de facto utility for power saving though may take a bit of configuration.|https://github.com/rickysarraf/laptop-mode-tools|{{AUR|laptop-mode-tools}}}}<br />
* {{App|[[powertop]]|A tool to diagnose issues with power consumption and power management to help set power saving settings.|https://01.org/powertop/|{{Pkg|powertop}}}}<br />
* [[systemd]]<br />
* {{App|[[TLP]]|Advanced power management for Linux.|http://linrunner.de/tlp|{{Pkg|tlp}}}}<br />
<br />
=== Graphical ===<br />
<br />
* {{App|batterymon-clone|Simple battery monitor tray icon.|https://github.com/jareksed/batterymon-clone|{{AUR|batterymon-clone}}}}<br />
* {{App|cbatticon|Lightweight and fast battery icon that sits in your system tray.|https://github.com/valr/cbatticon|{{Pkg|cbatticon}}}}<br />
* {{App|GNOME Power Statistics|System power information and statistics for GNOME.|https://gitlab.gnome.org/GNOME/gnome-power-manager|{{Pkg|gnome-power-manager}}}}<br />
* {{App|LXQt Power Management|Power management module for LXQt.|https://github.com/lxqt/lxqt-powermanagement|{{Pkg|lxqt-powermanagement}}}}<br />
* {{App|MATE Power Management|Power management tool for MATE.|https://github.com/mate-desktop/mate-power-manager|{{Pkg|mate-power-manager}}}}<br />
* {{App|MATE Power Statistics|System power information and statistics for MATE.|https://github.com/mate-desktop/mate-power-manager|{{Pkg|mate-power-manager}}}}<br />
* {{App|Xfce Power Manager|Power manager for Xfce.|https://docs.xfce.org/xfce/xfce4-power-manager/start|{{Pkg|xfce4-power-manager}}}}<br />
* {{App|vattery|Battery monitoring application written in Vala that will display the status of a laptop battery in a system tray.|http://www.jezra.net/projects/vattery|{{AUR|vattery}}}}<br />
<br />
== Power management with systemd ==<br />
<br />
=== ACPI events ===<br />
<br />
''systemd'' handles some power-related [[Wikipedia:Advanced_Configuration_and_Power_Interface|ACPI]] events, whose actions can be configured in {{ic|/etc/systemd/logind.conf}} or {{ic|/etc/systemd/logind.conf.d/*.conf}} — see {{man|5|logind.conf}}. On systems with no dedicated power manager, this may replace the [[acpid]] daemon which is usually used to react to these ACPI events.<br />
<br />
The specified action for each event can be one of {{ic|ignore}}, {{ic|poweroff}}, {{ic|reboot}}, {{ic|halt}}, {{ic|suspend}}, {{ic|hibernate}}, {{ic|hybrid-sleep}}, {{ic|suspend-then-hibernate}}, {{ic|lock}} or {{ic|kexec}}. In case of hibernation and suspension, they must be properly [[Power management/Suspend and hibernate|set up]]. If an event is not configured, ''systemd'' will use a default action.<br />
<br />
{| class="wikitable sortable" border=1<br />
!Event handler<br />
!Description<br />
!Default action<br />
|-<br />
|{{ic|HandlePowerKey}}<br />
|Triggered when the power key/button is pressed.<br />
|{{ic|poweroff}}<br />
|-<br />
|{{ic|HandleSuspendKey}}<br />
|Triggered when the suspend key/button is pressed.<br />
|{{ic|suspend}}<br />
|-<br />
|{{ic|HandleHibernateKey}}<br />
|Triggered when the hibernate key/button is pressed.<br />
|{{ic|hibernate}}<br />
|-<br />
|{{ic|HandleLidSwitch}}<br />
|Triggered when the lid is closed, except in the cases below.<br />
|{{ic|suspend}}<br />
|-<br />
|{{ic|HandleLidSwitchDocked}}<br />
|Triggered when the lid is closed if the system is inserted in a docking station, or more than one display is connected.<br />
|{{ic|ignore}}<br />
|-<br />
|{{ic|HandleLidSwitchExternalPower}}<br />
|Triggered when the lid is closed if the system is connected to external power.<br />
|action set for {{ic|HandleLidSwitch}}<br />
|}<br />
<br />
To apply any changes, [[restart]] the {{ic|systemd-logind}} daemon (be warned that this will terminate all login sessions that might still be open).<br />
<br />
{{Note|''systemd'' cannot handle AC and Battery ACPI events, so if you use [[Laptop Mode Tools]] or other similar tools [[acpid]] is still required.}}<br />
<br />
==== Power managers ====<br />
<br />
Some [[desktop environment]]s include power managers which [http://www.freedesktop.org/wiki/Software/systemd/inhibit/ inhibit] (temporarily turn off) some or all of the ''systemd'' ACPI settings. If such a power manager is running, then the actions for ACPI events can be configured in the power manager alone. Changes to {{ic|/etc/systemd/logind.conf}} or {{ic|/etc/systemd/logind.conf.d/*.conf}} need be made only if you wish to configure behaviour for a particular event that is not inhibited by the power manager. <br />
<br />
Note that if the power manager does not inhibit ''systemd'' for the appropriate events you can end up with a situation where ''systemd'' suspends your system and then when the system is woken up the other power manager suspends it again. As of December 2016, the power managers of [[KDE]], [[GNOME]], [[Xfce]] and [[MATE]] issue the necessary ''inhibited'' commands. If the ''inhibited'' commands are not being issued, such as when using [[acpid]] or others to handle ACPI events, set the {{ic|Handle}} options to {{ic|ignore}}. See also {{man|1|systemd-inhibit}}.<br />
<br />
==== xss-lock ====<br />
<br />
{{pkg|xss-lock}} subscribes to the systemd-events {{ic|suspend}}, {{ic|hibernate}}, {{ic|lock-session}}, and {{ic|unlock-session}} with appropriate actions (run locker and wait for user to unlock or kill locker). ''xss-lock'' also reacts to [[DPMS]] events and runs or kills the locker in response.<br />
<br />
Start xss-lock in your [[autostart]], for example<br />
<br />
xss-lock -- i3lock -n -i ''background_image.png'' &<br />
<br />
=== Suspend and hibernate ===<br />
<br />
''systemd'' provides commands to suspend to RAM or hibernate using the kernel's native suspend/resume functionality. There are also mechanisms to add hooks to customize pre- and post-suspend actions.<br />
<br />
{{ic|systemctl suspend}} should work out of the box, for {{ic|systemctl hibernate}} to work on your system you need to follow the instructions at [[Suspend and hibernate#Hibernation]].<br />
<br />
There are also two modes combining suspend and hibernate:<br />
<br />
* {{ic|systemctl hybrid-sleep}} suspends the system both to RAM and disk, so a complete power loss does not result in lost data. This mode is also called [[Power management/Suspend and hibernate|suspend to both]].<br />
* {{ic|systemctl suspend-then-hibernate}} initially suspends the system to RAM and if it is not interrupted within the delay specified by {{ic|HibernateDelaySec}} in {{man|5|systemd-sleep.conf}}, then the system will be woken using an RTC alarm and hibernated.<br />
<br />
{{Note|''systemd'' can also use other suspend backends (such as [[Uswsusp]]), in addition to the default ''kernel'' backend, in order to put the computer to sleep or hibernate. See [[Uswsusp#With systemd]] for an example.}}<br />
<br />
==== Hybrid-sleep on suspend or hibernation request ====<br />
<br />
It is possible to configure systemd to always do a ''hybrid-sleep'' even on a ''suspend'' or ''hibernation'' request.<br />
<br />
The default ''suspend'' and ''hibernation'' action can be configured in the {{ic|/etc/systemd/sleep.conf}} file. To set both actions to ''hybrid-sleep'':<br />
<br />
{{hc|/etc/systemd/sleep.conf|2=<br />
[Sleep]<br />
# suspend=hybrid-sleep<br />
SuspendMode=suspend<br />
SuspendState=disk<br />
# hibernate=hybrid-sleep<br />
HibernateMode=suspend<br />
HibernateState=disk<br />
}}<br />
<br />
See the {{man|5|sleep.conf.d}} manual page for details and the [https://www.kernel.org/doc/html/latest/admin-guide/pm/sleep-states.html#basic-sysfs-interfaces-for-system-suspend-and-hibernation linux kernel documentation on power states].<br />
<br />
=== Sleep hooks ===<br />
<br />
==== Suspend/resume service files ====<br />
<br />
Service files can be hooked into ''suspend.target'', ''hibernate.target'' and ''sleep.target'' to execute actions before or after suspend/hibernate. Separate files should be created for user actions and root/system actions. [[Enable]] the {{ic|suspend@''user''}} and {{ic|resume@''user''}} services to have them started at boot. Examples:<br />
<br />
{{hc|/etc/systemd/system/suspend@.service|2=<nowiki><br />
[Unit]<br />
Description=User suspend actions<br />
Before=sleep.target<br />
<br />
[Service]<br />
User=%I<br />
Type=forking<br />
Environment=DISPLAY=:0<br />
ExecStartPre= -/usr/bin/pkill -u %u unison ; /usr/local/bin/music.sh stop<br />
ExecStart=/usr/bin/sflock<br />
ExecStartPost=/usr/bin/sleep 1<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/resume@.service|2=<nowiki><br />
[Unit]<br />
Description=User resume actions<br />
After=suspend.target<br />
<br />
[Service]<br />
User=%I<br />
Type=simple<br />
ExecStart=/usr/local/bin/ssh-connect.sh<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
{{Note|As screen lockers may return before the screen is "locked", the screen may flash on resuming from suspend. Adding a small delay via {{ic|1=ExecStartPost=/usr/bin/sleep 1}} helps prevent this.}}<br />
<br />
For root/system actions ([[enable]] the {{ic|root-resume}} and {{ic|root-suspend}} services to have them started at boot):<br />
<br />
{{hc|/etc/systemd/system/root-resume.service|2=<nowiki><br />
[Unit]<br />
Description=Local system resume actions<br />
After=suspend.target<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/bin/systemctl restart mnt-media.automount<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/root-suspend.service|2=<nowiki><br />
[Unit]<br />
Description=Local system suspend actions<br />
Before=sleep.target<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=-/usr/bin/pkill sshfs<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
A couple of handy hints about these service files (more in {{man|5|systemd.service}}):<br />
<br />
* If {{ic|1=<nowiki>Type=oneshot</nowiki>}} then you can use multiple {{ic|1=<nowiki>ExecStart=</nowiki>}} lines. Otherwise only one {{ic|ExecStart}} line is allowed. You can add more commands with either {{ic|ExecStartPre}} or by separating commands with a semicolon (see the first example above; note the spaces before and after the semicolon, as they are ''required'').<br />
* A command prefixed with {{ic|-}} will cause a non-zero exit status to be ignored and treated as a successful command. <br />
* The best place to find errors when troubleshooting these service files is of course with [[journalctl]].<br />
<br />
==== Combined Suspend/resume service file ====<br />
<br />
With the combined suspend/resume service file, a single hook does all the work for different phases (sleep/resume) and for different targets (suspend/hibernate/hybrid-sleep).<br />
<br />
Example and explanation:<br />
<br />
{{hc|/etc/systemd/system/wicd-sleep.service|2=<nowiki><br />
[Unit]<br />
Description=Wicd sleep hook<br />
Before=sleep.target<br />
StopWhenUnneeded=yes<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=-/usr/share/wicd/daemon/suspend.py<br />
ExecStop=-/usr/share/wicd/daemon/autoconnect.py<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
* {{ic|1=<nowiki>RemainAfterExit=yes</nowiki>}}: After started, the service is considered active until it is explicitly stopped.<br />
* {{ic|1=<nowiki>StopWhenUnneeded=yes</nowiki>}}: When active, the service will be stopped if no other active service requires it. In this specific example, it will be stopped after ''sleep.target'' is stopped.<br />
* Because ''sleep.target'' is pulled in by ''suspend.target'', ''hibernate.target'' and ''hybrid-sleep.target'' and because ''sleep.target'' itself is a ''StopWhenUnneeded'' service, the hook is guaranteed to start/stop properly for different tasks.<br />
<br />
==== Hooks in /usr/lib/systemd/system-sleep ====<br />
<br />
''systemd'' runs all executables in {{ic|/usr/lib/systemd/system-sleep/}}, passing two arguments to each of them:<br />
<br />
* Argument 1: either {{ic|pre}} or {{ic|post}}, depending on whether the machine is going to sleep or waking up<br />
* Argument 2: {{ic|suspend}}, {{ic|hibernate}} or {{ic|hybrid-sleep}}, depending on which is being invoked<br />
<br />
''systemd'' will run these scripts concurrently and not one after another.<br />
<br />
The output of any custom script will be logged by ''systemd-suspend.service'', ''systemd-hibernate.service'' or ''systemd-hybrid-sleep.service''. You can see its output in ''systemd''<nowiki>'</nowiki>s [[systemd#Journal|journal]]:<br />
<br />
# journalctl -b -u systemd-suspend<br />
<br />
{{Note|You can also use ''sleep.target'', ''suspend.target'', ''hibernate.target'' or ''hybrid-sleep.target'' to hook units into the sleep state logic instead of using custom scripts.}}<br />
<br />
An example of a custom sleep script:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/example.sh|<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
;;<br />
esac<br />
}}<br />
<br />
Do not forget to make your script executable:<br />
# chmod a+x /usr/lib/systemd/system-sleep/example.sh<br />
<br />
See {{man|7|systemd.special}} and {{man|8|systemd-sleep}} for more details.<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Delayed lid switch action ====<br />
<br />
When performing lid switches in short succession, ''logind'' will delay the suspend action for up to 90s to detect possible docks. [http://lists.freedesktop.org/archives/systemd-devel/2015-January/027131.html] This delay was made configurable with systemd v220:[https://github.com/systemd/systemd/commit/9d10cbee89ca7f82d29b9cb27bef11e23e3803ba]<br />
<br />
{{hc|/etc/systemd/logind.conf|<nowiki><br />
...<br />
HoldoffTimeoutSec=30s<br />
...<br />
</nowiki>}}<br />
<br />
==== Suspend from corresponding laptop Fn key not working ====<br />
<br />
If, regardless of the setting in logind.conf, the sleep button does not work (pressing it does not even produce a message in syslog), then logind is probably not watching the keyboard device. [http://lists.freedesktop.org/archives/systemd-devel/2015-February/028325.html] Do:<br />
<br />
# journalctl | grep "Watching system buttons"<br />
<br />
You might see something like this:<br />
<br />
May 25 21:28:19 vmarch.lan systemd-logind[210]: Watching system buttons on /dev/input/event2 (Power Button)<br />
May 25 21:28:19 vmarch.lan systemd-logind[210]: Watching system buttons on /dev/input/event3 (Sleep Button)<br />
May 25 21:28:19 vmarch.lan systemd-logind[210]: Watching system buttons on /dev/input/event4 (Video Bus)<br />
<br />
Notice no keyboard device. Now obtain ATTRS{name} for the parent keyboard device [http://systemd-devel.freedesktop.narkive.com/Rbi3rjNN/patch-1-2-logind-add-support-for-tps65217-power-button] :<br />
<br />
# udevadm info -a /dev/input/by-path/*-kbd<br />
...<br />
KERNEL=="event0"<br />
...<br />
ATTRS{name}=="AT Translated Set 2 keyboard"<br />
<br />
Now write a custom udev rule to add the "power-switch" tag:<br />
<br />
{{hc|/etc/udev/rules.d/70-power-switch-my.rules|<nowiki><br />
ACTION=="remove", GOTO="power_switch_my_end"<br />
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", TAG+="power-switch"<br />
LABEL="power_switch_my_end"<br />
</nowiki>}}<br />
<br />
Restart services and reload rules:<br />
<br />
# systemctl restart systemd-udevd.service<br />
# udevadm trigger<br />
# systemctl restart systemd-logind.service<br />
<br />
Now you should see "Watching system buttons on /dev/input/event0" in syslog<br />
<br />
== Power saving ==<br />
<br />
{{Note|See [[Laptop#Power management]] for power management specific to laptops, such as battery monitoring.}}<br />
<br />
This section is a reference for creating custom scripts and power saving settings such as by udev rules. Make sure that the settings are not managed by some [[#Userspace tools|other utility]] to avoid conflicts.<br />
<br />
Almost all of the features listed here are worth using whether or not the computer is on AC or battery power. Most have negligible performance impact and are just not enabled by default because of commonly broken hardware/drivers. Reducing power usage means reducing heat, which can even lead to higher performance on a modern Intel or AMD CPU, thanks to [[Wikipedia:Intel Turbo Boost|dynamic overclocking]].<br />
<br />
=== Processors with HWP (Hardware P-state) support ===<br />
<br />
{{Merge|CPU frequency scaling|More context in the main article.}}<br />
<br />
The available energy preferences of a HWP supported processor are {{ic|default performance balance_performance balance_power power}}.<br />
<br />
This can be validated by {{ic|$ cat /sys/devices/system/cpu/cpufreq/policy?/energy_performance_available_preferences}}<br />
<br />
To conserve more energy, you can config by creating the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/energy_performance_preference.conf|<br />
w /sys/devices/system/cpu/cpufreq/policy?/energy_performance_preference - - - - balance_power<br />
}}<br />
<br />
See the {{man|8|systemd-tmpfiles}} and {{man|5|tmpfiles.d}} man pages for details.<br />
<br />
=== Audio ===<br />
<br />
By default, audio power saving is turned off by most drivers. It can be enabled by setting the {{ic|power_save}} parameter; a time (in seconds) to go into idle mode. To idle the audio card after one second, create the following file for Intel soundcards.<br />
<br />
{{hc|/etc/modprobe.d/audio_powersave.conf|2=<br />
options snd_hda_intel power_save=1<br />
}}<br />
<br />
Alternatively, use the following for ac97:<br />
<br />
options snd_ac97_codec power_save=1<br />
<br />
{{Note|<br />
* To retrieve the manufacturer and the corresponding kernel driver which is used for your sound card, run {{ic|lspci -k}}.<br />
* Toggling the audio card's power state can cause a popping sound or noticeable latency on some broken hardware.<br />
}}<br />
<br />
It is also possible to further reduce the audio power requirements by disabling the HDMI audio output, which can done by [[blacklisting]] the appropriate kernel modules (e.g. {{ic|snd_hda_codec_hdmi}} in case of Intel hardware).<br />
<br />
=== Backlight ===<br />
<br />
See [[Backlight]].<br />
<br />
=== Bluetooth ===<br />
<br />
{{expansion|reason=The device should likely be disabled with hciconfig first.}}<br />
<br />
To disable bluetooth completely, [[blacklist]] the {{ic|btusb}} and {{ic|bluetooth}} modules.<br />
<br />
To turn off bluetooth only temporarily, use ''rfkill'':<br />
<br />
# rfkill block bluetooth<br />
<br />
Or with udev rule:<br />
<br />
{{hc|/etc/udev/rules.d/50-bluetooth.rules|<nowiki><br />
# disable bluetooth<br />
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"<br />
</nowiki>}}<br />
<br />
=== Web camera ===<br />
<br />
If you will not use integrated web camera then [[blacklist]] the {{ic|uvcvideo}} module.<br />
<br />
=== Kernel parameters ===<br />
<br />
This section uses configs in {{ic|/etc/sysctl.d/}}, which is ''"a drop-in directory for kernel sysctl parameters."'' See [http://0pointer.de/blog/projects/the-new-configuration-files The New Configuration Files] and more specifically {{man|5|sysctl.d}} for more information.<br />
<br />
==== Disabling NMI watchdog ====<br />
{{Expansion|This or {{ic|nowatchdog}} as can be seen in [[Improving performance#Watchdogs]]}}<br />
<br />
The [[Wikipedia:Non-maskable interrupt|NMI]] watchdog is a debugging feature to catch hardware hangs that cause a kernel panic. On some systems it can generate a lot of interrupts, causing a noticeable increase in power usage:<br />
<br />
{{hc|/etc/sysctl.d/disable_watchdog.conf|2=<br />
kernel.nmi_watchdog = 0<br />
}}<br />
<br />
or add {{ic|1=nmi_watchdog=0}} to the [[kernel line]] to disable it completely from early boot.<br />
<br />
==== Writeback Time ====<br />
<br />
Increasing the virtual memory dirty writeback time helps to aggregate disk I/O together, thus reducing spanned disk writes, and increasing power saving. To set the value to 60 seconds (default is 5 seconds):<br />
<br />
{{hc|/etc/sysctl.d/dirty.conf|2=<br />
vm.dirty_writeback_centisecs = 6000<br />
}}<br />
<br />
To do the same for journal commits on supported filesystems (e.g. ext4, btrfs...), use {{ic|1=commit=60}} as a option in [[fstab]].<br />
<br />
Note that this value is modified as a side effect of the Laptop Mode setting below.<br />
See also [[sysctl#Virtual memory]] for other parameters affecting I/O performance and power saving.<br />
<br />
==== Laptop Mode ====<br />
<br />
See the [https://www.kernel.org/doc/Documentation/laptops/laptop-mode.txt kernel documentation] on the laptop mode 'knob.' ''"A sensible value for the knob is 5 seconds."''<br />
<br />
{{hc|/etc/sysctl.d/laptop.conf|2=<br />
vm.laptop_mode = 5<br />
}}<br />
<br />
{{Note|This setting is mainly relevant to spinning-disk drives.}}<br />
<br />
=== Network interfaces ===<br />
<br />
[[Wake-on-LAN]] can be a useful feature, but if you are not making use of it then it is simply draining extra power waiting for a magic packet while in suspend. You can adapt a [[Wake-on-LAN#udev|udev rule]] to disable the feature for all Ethernet interfaces.<br />
<br />
To enable powersaving with {{Pkg|iw}} on all wireless interfaces:<br />
<br />
{{hc|/etc/udev/rules.d/70-wifi-powersave.rules|2=<br />
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/bin/iw dev %k set power_save on"<br />
}}<br />
<br />
In this example, {{ic|%k}} is a specifier for the kernel name of the matched device. For example, if it finds that the rule is applicable to {{ic|wlan0}}, the {{ic|%k}} specifier will be replaced with {{ic|wlan0}}. To apply the rules to only a particular interface, just replace the pattern {{ic|wlan*}} and specifier {{ic|%k}} with the desired interface name. For more information, see [http://www.reactivated.net/writing_udev_rules.html Writing udev rules].<br />
<br />
{{Note|In this case, the name of the configuration file is important. Due to the introduction of [[Network configuration#Change interface name|persistent device names]] via {{ic|80-net-setup-link.rules}} in systemd, it is important that the network powersave rules are named lexicographically before {{ic|80-net-setup-link.rules}} so that they are applied before the devices are named e.g. {{ic|enp2s0}}.<br />
<br />
However, be advised that commands ran with {{ic|RUN}} are executed '''after''' all rules have been processed -- in which case the naming of the rules file is irrelevant and the persistent device names should be used (the persistent device name can be referenced by replacing {{ic|%k}} with {{ic|$name}}).}}<br />
<br />
==== Intel wireless cards (iwlwifi) ====<br />
<br />
Additional power saving functions of Intel wireless cards with {{ic|iwlwifi}} driver can be enabled by passing the correct parameters to the kernel module. Making it persistent can be achieved by adding the line below to {{ic|/etc/modprobe.d/iwlwifi.conf}} file:<br />
<br />
options iwlwifi power_save=1 d0i3_disable=0 uapsd_disable=0<br />
options iwldvm force_cam=0<br />
<br />
Keep in mind that these power saving options are experimental and can cause an unstable system.<br />
<br />
=== Bus power management ===<br />
<br />
==== Active State Power Management ====<br />
<br />
If the computer is believed not to support [[Wikipedia:Active State Power Management|ASPM]] it will be disabled on boot:<br />
<br />
# lspci -vv | grep 'ASPM.*abled;'<br />
<br />
ASPM is handled by the BIOS, if ASPM is disabled it will be because [http://wireless.kernel.org/en/users/Documentation/ASPM ref]:<br />
<br />
# The BIOS disabled it for some reason (for conflicts?).<br />
# PCIE requires ASPM but L0s are optional (so L0s might be disabled and only L1 enabled).<br />
# The BIOS might not have been programmed for it.<br />
# The BIOS is buggy.<br />
<br />
If believing the computer has support for ASPM it can be forced on for the kernel to handle with the {{ic|1=pcie_aspm=force}} [[kernel parameter]].<br />
<br />
{{Warning|<br />
* Forcing on ASPM can cause a freeze/panic, so make sure you have a way to undo the option if it does not work.<br />
* On systems that do not support it forcing on ASPM can even increase power consumption.<br />
* This forces ASPM in kernel while it can still remain disabled in hardware and not work. To check whether this is the case the {{ic|dmesg &#124; grep ASPM}} command can be used and if that is the case, hardware-specific Wiki article should be consulted.<br />
}}<br />
<br />
To adjust to {{ic|powersave}} do (the following command will not work unless enabled):<br />
<br />
# echo powersave | tee /sys/module/pcie_aspm/parameters/policy<br />
<br />
By default it looks like this:<br />
<br />
{{hc|$ cat /sys/module/pcie_aspm/parameters/policy|[default] performance powersave}}<br />
<br />
==== PCI Runtime Power Management ====<br />
<br />
{{hc|/etc/udev/rules.d/pci_pm.rules|2=<br />
SUBSYSTEM=="pci", ATTR{power/control}="auto"<br />
}}<br />
<br />
The rule above powers all unused devices down, but some devices will not wake up again.<br />
To allow runtime power management only for devices that are known to work, use simple matching against vendor and device IDs (use {{ic|lspci -nn}} to get these values):<br />
<br />
{{hc|/etc/udev/rules.d/pci_pm.rules|<nowiki><br />
# whitelist for pci autosuspend<br />
SUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
Alternatively, to blacklist devices that are not working with PCI runtime power management and enable it for all other devices:<br />
<br />
{{hc|/etc/udev/rules.d/pci_pm.rules|<nowiki><br />
# blacklist for pci runtime power management<br />
SUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}:="on"<br />
<br />
SUBSYSTEM=="pci", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
==== USB autosuspend ====<br />
<br />
The Linux kernel can automatically suspend USB devices when they are not in use. This can sometimes save quite a bit of power, however some USB devices are not compatible with USB power saving and start to misbehave (common for USB mice/keyboards). [[udev]] rules based on whitelist or blacklist filtering can help to mitigate the problem.<br />
<br />
The most simple and likely useless example is enabling autosuspend for all USB devices:<br />
<br />
{{hc|/etc/udev/rules.d/50-usb_power_save.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
To allow autosuspend only for devices that are known to work, use simple matching against vendor and product IDs (use ''lsusb'' to get these values):<br />
<br />
{{hc|/etc/udev/rules.d/50-usb_power_save.rules|<nowiki><br />
# whitelist for usb autosuspend<br />
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
Alternatively, to blacklist devices that are not working with USB autosuspend and enable it for all other devices:<br />
<br />
{{hc|/etc/udev/rules.d/50-usb_power_save.rules|<nowiki><br />
# blacklist for usb autosuspend<br />
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", GOTO="power_usb_rules_end"<br />
<br />
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"<br />
LABEL="power_usb_rules_end"<br />
</nowiki>}}<br />
<br />
The default autosuspend idle delay time is controlled by the {{ic|autosuspend}} parameter of the {{ic|usbcore}} [[kernel module]]. To set the delay to 5 seconds instead of the default 2 seconds:<br />
<br />
{{hc|/etc/modprobe.d/usb-autosuspend.conf|<nowiki><br />
options usbcore autosuspend=5<br />
</nowiki>}}<br />
<br />
Similarly to {{ic|power/control}}, the delay time can be fine-tuned per device by setting the {{ic|power/autosuspend}} attribute.<br />
<br />
See the [https://www.kernel.org/doc/Documentation/usb/power-management.txt Linux kernel documentation] for more information on USB power management.<br />
<br />
==== SATA Active Link Power Management ====<br />
<br />
{{Warning|SATA Active Link Power Management can lead to data loss on some devices. Do not enable this setting unless you have frequent backups.}}<br />
<br />
Since Linux 4.15 there is a [https://hansdegoede.livejournal.com/18412.html new setting] called {{ic|med_power_with_dipm}} that matches the behaviour of Windows IRST driver settings and should not cause data loss with recent SSD/HDD drives. The power saving can be significant, ranging [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebb82e3c79d2a956366d0848304a53648bd6350b from 1.0 to 1.5 Watts (when idle)]. It will become a default setting for Intel based laptops in Linux 4.16 [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebb82e3c79d2a956366d0848304a53648bd6350b].<br />
<br />
The current setting can be read from {{ic|/sys/class/scsi_host/host*/link_power_management_policy}} as follows:<br />
<br />
# cat /sys/class/scsi_host/host*/link_power_management_policy<br />
<br />
{| class="wikitable"<br />
|+ Available ALPM settings<br />
! Setting<br />
! Description<br />
! Power saving<br />
|-<br />
| max_performance<br />
| current default<br />
| None<br />
|-<br />
| medium_power<br />
| -<br />
| ~1.0 Watts<br />
|-<br />
| med_power_with_dipm<br />
| recommended setting<br />
| ~1.5 Watts<br />
|-<br />
| min_power<br />
| '''WARNING: possible data loss'''<br />
| ~1.5 Watts<br />
|}<br />
<br />
{{hc|/etc/udev/rules.d/hd_power_save.rules|2=<br />
ACTION=="add", SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"<br />
}}<br />
<br />
{{Note|This adds latency when accessing a drive that has been idle, so it is one of the few settings that may be worth toggling based on whether you are on AC power.}}<br />
<br />
=== Hard disk drive ===<br />
<br />
See [[hdparm#Power management configuration]] for drive parameters that can be set.<br />
<br />
Power saving is not effective when too many programs are frequently writing to the disk. Tracking all programs, and how and when they write to disk is the way to limit disk usage. Use {{Pkg|iotop}} to see which programs use the disk frequently. See [[Improving performance#Storage devices]] for other tips.<br />
<br />
Also little things like setting the [[Fstab#atime options|noatime]] option can help. If enough RAM is available, consider disabling or limiting [[swappiness]] as it has the possibility to limit a good number of disk writes.<br />
<br />
=== CD-ROM or DVD drive ===<br />
<br />
See [[Udisks#Devices do not remain unmounted (udisks)]].<br />
<br />
== Tools and scripts ==<br />
<br />
{{Style|Merged from [[Power saving]], needs reorganization to fit into this page.}}<br />
<br />
=== Using a script and an udev rule ===<br />
<br />
Since systemd users can suspend and hibernate through {{ic|systemctl suspend}} or {{ic|systemctl hibernate}} and handle acpi events with {{ic|/etc/systemd/logind.conf}}, it might be interesting to remove ''pm-utils'' and [[acpid]]. There is just one thing systemd cannot do (as of systemd-204): power management depending on whether the system is running on AC or battery. To fill this gap, you can create a single [[udev]] rule that runs a script when the AC adapter is plugged and unplugged:<br />
<br />
{{hc|/etc/udev/rules.d/powersave.rules|2=<nowiki><br />
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/path/to/your/script true"<br />
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/path/to/your/script false"<br />
</nowiki>}}<br />
<br />
{{Note|You can use the same script that ''pm-powersave'' uses. You just have to make it executable and place it somewhere else (for example {{ic|/usr/local/bin/}}).}}<br />
<br />
Examples of powersave scripts:<br />
<br />
* [https://github.com/supplantr/ftw ftw], package: {{AUR|ftw-git}}<br />
* [https://github.com/Unia/powersave powersave]<br />
* [https://github.com/quequotion/pantheon-bzr-qq/blob/master/EXTRAS/indicator-powersave/throttle throttle], from {{AUR|indicator-powersave}}<br />
<br />
The above udev rule should work as expected, but if your power settings are not updated after a suspend or hibernate cycle, you should add a script in {{ic|/usr/lib/systemd/system-sleep/}} with the following contents:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/00powersave|<nowiki><br />
#!/bin/sh<br />
<br />
case $1 in<br />
pre) /path/to/your/script false ;;<br />
post) <br />
if cat /sys/class/power_supply/AC0/online | grep 0 > /dev/null 2>&1<br />
then<br />
/path/to/your/script true <br />
else<br />
/path/to/your/script false<br />
fi<br />
;;<br />
esac<br />
exit 0<br />
</nowiki>}}<br />
<br />
Do not forget to make it executable!<br />
<br />
{{Note|Be aware that AC0 may be different for your laptop, change it if that is the case.}}<br />
<br />
=== Print power settings ===<br />
<br />
This script prints power settings and a variety of other properties for USB and PCI devices. Note that root permissions are needed to see all settings.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
for i in $(find /sys/devices -name "bMaxPower")<br />
do<br />
busdir=${i%/*}<br />
busnum=$(<$busdir/busnum)<br />
devnum=$(<$busdir/devnum)<br />
title=$(lsusb -s $busnum:$devnum)<br />
<br />
printf "\n\n+++ %s\n -%s\n" "$title" "$busdir"<br />
<br />
for ff in $(find $busdir/power -type f ! -empty 2>/dev/null)<br />
do<br />
v=$(cat $ff 2>/dev/null|tr -d "\n")<br />
[[ ${#v} -gt 0 ]] && echo -e " ${ff##*/}=$v";<br />
v=;<br />
done | sort -g;<br />
done;<br />
<br />
printf "\n\n\n+++ %s\n" "Kernel Modules"<br />
for mod in $(lspci -k | sed -n '/in use:/s,^.*: ,,p' | sort -u)<br />
do<br />
echo "+ $mod";<br />
systool -v -m $mod 2> /dev/null | sed -n "/Parameters:/,/^$/p";<br />
done<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption ThinkWiki:How to reduce power consumption]<br />
* [http://ivanvojtko.blogspot.sk/2016/04/how-to-get-longer-battery-life-on-linux.html How to get longer battery life on Linux]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Power_management&diff=551965Power management2018-10-29T16:44:18Z<p>Bepvte: For some reason, the "action" tag doesnt trigger events for all my pci devices. Maybe its an udev bug. Either way, this solves the problem for me.</p>
<hr />
<div>[[Category:Power management]]<br />
[[es:Power management]]<br />
[[it:Shutdown Pressing Power Button]]<br />
[[ja:電源管理]]<br />
[[zh-hans:Power management]]<br />
{{Related articles start}}<br />
{{Related|Power management/Suspend and hibernate}}<br />
{{Related|Display Power Management Signaling}}<br />
{{Related|CPU frequency scaling}}<br />
{{Related|Hybrid graphics}}<br />
{{Related|Kernel modules}}<br />
{{Related|sysctl}}<br />
{{Related|udev}}<br />
{{Related articles end}}<br />
[[Wikipedia:Power management|Power management]] is a feature that turns off the power or switches system's components to a low-power state when inactive.<br />
<br />
In Arch Linux, power management consists of two main parts:<br />
<br />
# Configuration of the Linux kernel, which interacts with the hardware.<br />
#* [[Kernel parameters]]<br />
#* [[Kernel modules]]<br />
#* [[udev]] rules<br />
# Configuration of userspace tools, which interact with the kernel and react to its events. Many userspace tools also allow to modify kernel configuration in a "user-friendly" way. See [[#Userspace tools]] for the options.<br />
<br />
== Userspace tools ==<br />
<br />
Using these tools can replace setting a lot of settings by hand. Only run '''one''' of these tools to avoid possible conflicts as they all work more or less similarly. Have a look at the [[:Category:Power management|power management category]] to get an overview on what power management options exist in Arch Linux.<br />
<br />
These are the more popular scripts and tools designed to help power saving:<br />
<br />
=== Console ===<br />
<br />
* {{App|[[acpid]]| A daemon for delivering ACPI power management events with netlink support.|http://sourceforge.net/projects/acpid2/|{{Pkg|acpid}}}}<br />
* {{App|[[Laptop Mode Tools]]|Utility to configure laptop power saving settings, considered by many to be the de facto utility for power saving though may take a bit of configuration.|https://github.com/rickysarraf/laptop-mode-tools|{{AUR|laptop-mode-tools}}}}<br />
* {{App|[[powertop]]|A tool to diagnose issues with power consumption and power management to help set power saving settings.|https://01.org/powertop/|{{Pkg|powertop}}}}<br />
* [[systemd]]<br />
* {{App|[[TLP]]|Advanced power management for Linux.|http://linrunner.de/tlp|{{Pkg|tlp}}}}<br />
<br />
=== Graphical ===<br />
<br />
* {{App|batterymon-clone|Simple battery monitor tray icon.|https://github.com/jareksed/batterymon-clone|{{AUR|batterymon-clone}}}}<br />
* {{App|cbatticon|Lightweight and fast battery icon that sits in your system tray.|https://github.com/valr/cbatticon|{{Pkg|cbatticon}}}}<br />
* {{App|GNOME Power Statistics|System power information and statistics for GNOME.|https://gitlab.gnome.org/GNOME/gnome-power-manager|{{Pkg|gnome-power-manager}}}}<br />
* {{App|LXQt Power Management|Power management module for LXQt.|https://github.com/lxqt/lxqt-powermanagement|{{Pkg|lxqt-powermanagement}}}}<br />
* {{App|MATE Power Management|Power management tool for MATE.|https://github.com/mate-desktop/mate-power-manager|{{Pkg|mate-power-manager}}}}<br />
* {{App|MATE Power Statistics|System power information and statistics for MATE.|https://github.com/mate-desktop/mate-power-manager|{{Pkg|mate-power-manager}}}}<br />
* {{App|Xfce Power Manager|Power manager for Xfce.|https://docs.xfce.org/xfce/xfce4-power-manager/start|{{Pkg|xfce4-power-manager}}}}<br />
* {{App|vattery|Battery monitoring application written in Vala that will display the status of a laptop battery in a system tray.|http://www.jezra.net/projects/vattery|{{AUR|vattery}}}}<br />
<br />
== Power management with systemd ==<br />
<br />
=== ACPI events ===<br />
<br />
''systemd'' handles some power-related [[Wikipedia:Advanced_Configuration_and_Power_Interface|ACPI]] events, whose actions can be configured in {{ic|/etc/systemd/logind.conf}} or {{ic|/etc/systemd/logind.conf.d/*.conf}} — see {{man|5|logind.conf}}. On systems with no dedicated power manager, this may replace the [[acpid]] daemon which is usually used to react to these ACPI events.<br />
<br />
The specified action for each event can be one of {{ic|ignore}}, {{ic|poweroff}}, {{ic|reboot}}, {{ic|halt}}, {{ic|suspend}}, {{ic|hibernate}}, {{ic|hybrid-sleep}}, {{ic|suspend-then-hibernate}}, {{ic|lock}} or {{ic|kexec}}. In case of hibernation and suspension, they must be properly [[Power management/Suspend and hibernate|set up]]. If an event is not configured, ''systemd'' will use a default action.<br />
<br />
{| class="wikitable sortable" border=1<br />
!Event handler<br />
!Description<br />
!Default action<br />
|-<br />
|{{ic|HandlePowerKey}}<br />
|Triggered when the power key/button is pressed.<br />
|{{ic|poweroff}}<br />
|-<br />
|{{ic|HandleSuspendKey}}<br />
|Triggered when the suspend key/button is pressed.<br />
|{{ic|suspend}}<br />
|-<br />
|{{ic|HandleHibernateKey}}<br />
|Triggered when the hibernate key/button is pressed.<br />
|{{ic|hibernate}}<br />
|-<br />
|{{ic|HandleLidSwitch}}<br />
|Triggered when the lid is closed, except in the cases below.<br />
|{{ic|suspend}}<br />
|-<br />
|{{ic|HandleLidSwitchDocked}}<br />
|Triggered when the lid is closed if the system is inserted in a docking station, or more than one display is connected.<br />
|{{ic|ignore}}<br />
|-<br />
|{{ic|HandleLidSwitchExternalPower}}<br />
|Triggered when the lid is closed if the system is connected to external power.<br />
|action set for {{ic|HandleLidSwitch}}<br />
|}<br />
<br />
To apply any changes, [[restart]] the {{ic|systemd-logind}} daemon (be warned that this will terminate all login sessions that might still be open).<br />
<br />
{{Note|''systemd'' cannot handle AC and Battery ACPI events, so if you use [[Laptop Mode Tools]] or other similar tools [[acpid]] is still required.}}<br />
<br />
==== Power managers ====<br />
<br />
Some [[desktop environment]]s include power managers which [http://www.freedesktop.org/wiki/Software/systemd/inhibit/ inhibit] (temporarily turn off) some or all of the ''systemd'' ACPI settings. If such a power manager is running, then the actions for ACPI events can be configured in the power manager alone. Changes to {{ic|/etc/systemd/logind.conf}} or {{ic|/etc/systemd/logind.conf.d/*.conf}} need be made only if you wish to configure behaviour for a particular event that is not inhibited by the power manager. <br />
<br />
Note that if the power manager does not inhibit ''systemd'' for the appropriate events you can end up with a situation where ''systemd'' suspends your system and then when the system is woken up the other power manager suspends it again. As of December 2016, the power managers of [[KDE]], [[GNOME]], [[Xfce]] and [[MATE]] issue the necessary ''inhibited'' commands. If the ''inhibited'' commands are not being issued, such as when using [[acpid]] or others to handle ACPI events, set the {{ic|Handle}} options to {{ic|ignore}}. See also {{man|1|systemd-inhibit}}.<br />
<br />
==== xss-lock ====<br />
<br />
{{pkg|xss-lock}} subscribes to the systemd-events {{ic|suspend}}, {{ic|hibernate}}, {{ic|lock-session}}, and {{ic|unlock-session}} with appropriate actions (run locker and wait for user to unlock or kill locker). ''xss-lock'' also reacts to [[DPMS]] events and runs or kills the locker in response.<br />
<br />
Start xss-lock in your [[autostart]], for example<br />
<br />
xss-lock -- i3lock -n -i ''background_image.png'' &<br />
<br />
=== Suspend and hibernate ===<br />
<br />
''systemd'' provides commands to suspend to RAM or hibernate using the kernel's native suspend/resume functionality. There are also mechanisms to add hooks to customize pre- and post-suspend actions.<br />
<br />
{{ic|systemctl suspend}} should work out of the box, for {{ic|systemctl hibernate}} to work on your system you need to follow the instructions at [[Suspend and hibernate#Hibernation]].<br />
<br />
There are also two modes combining suspend and hibernate:<br />
<br />
* {{ic|systemctl hybrid-sleep}} suspends the system both to RAM and disk, so a complete power loss does not result in lost data. This mode is also called [[Power management/Suspend and hibernate|suspend to both]].<br />
* {{ic|systemctl suspend-then-hibernate}} initially suspends the system to RAM and if it is not interrupted within the delay specified by {{ic|HibernateDelaySec}} in {{man|5|systemd-sleep.conf}}, then the system will be woken using an RTC alarm and hibernated.<br />
<br />
{{Note|''systemd'' can also use other suspend backends (such as [[Uswsusp]]), in addition to the default ''kernel'' backend, in order to put the computer to sleep or hibernate. See [[Uswsusp#With systemd]] for an example.}}<br />
<br />
==== Hybrid-sleep on suspend or hibernation request ====<br />
<br />
It is possible to configure systemd to always do a ''hybrid-sleep'' even on a ''suspend'' or ''hibernation'' request.<br />
<br />
The default ''suspend'' and ''hibernation'' action can be configured in the {{ic|/etc/systemd/sleep.conf}} file. To set both actions to ''hybrid-sleep'':<br />
<br />
{{hc|/etc/systemd/sleep.conf|2=<br />
[Sleep]<br />
# suspend=hybrid-sleep<br />
SuspendMode=suspend<br />
SuspendState=disk<br />
# hibernate=hybrid-sleep<br />
HibernateMode=suspend<br />
HibernateState=disk<br />
}}<br />
<br />
See the {{man|5|sleep.conf.d}} manual page for details and the [https://www.kernel.org/doc/html/latest/admin-guide/pm/sleep-states.html#basic-sysfs-interfaces-for-system-suspend-and-hibernation linux kernel documentation on power states].<br />
<br />
=== Sleep hooks ===<br />
<br />
==== Suspend/resume service files ====<br />
<br />
Service files can be hooked into ''suspend.target'', ''hibernate.target'' and ''sleep.target'' to execute actions before or after suspend/hibernate. Separate files should be created for user actions and root/system actions. [[Enable]] the {{ic|suspend@''user''}} and {{ic|resume@''user''}} services to have them started at boot. Examples:<br />
<br />
{{hc|/etc/systemd/system/suspend@.service|2=<nowiki><br />
[Unit]<br />
Description=User suspend actions<br />
Before=sleep.target<br />
<br />
[Service]<br />
User=%I<br />
Type=forking<br />
Environment=DISPLAY=:0<br />
ExecStartPre= -/usr/bin/pkill -u %u unison ; /usr/local/bin/music.sh stop<br />
ExecStart=/usr/bin/sflock<br />
ExecStartPost=/usr/bin/sleep 1<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/resume@.service|2=<nowiki><br />
[Unit]<br />
Description=User resume actions<br />
After=suspend.target<br />
<br />
[Service]<br />
User=%I<br />
Type=simple<br />
ExecStart=/usr/local/bin/ssh-connect.sh<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
{{Note|As screen lockers may return before the screen is "locked", the screen may flash on resuming from suspend. Adding a small delay via {{ic|1=ExecStartPost=/usr/bin/sleep 1}} helps prevent this.}}<br />
<br />
For root/system actions ([[enable]] the {{ic|root-resume}} and {{ic|root-suspend}} services to have them started at boot):<br />
<br />
{{hc|/etc/systemd/system/root-resume.service|2=<nowiki><br />
[Unit]<br />
Description=Local system resume actions<br />
After=suspend.target<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/bin/systemctl restart mnt-media.automount<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/root-suspend.service|2=<nowiki><br />
[Unit]<br />
Description=Local system suspend actions<br />
Before=sleep.target<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=-/usr/bin/pkill sshfs<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
A couple of handy hints about these service files (more in {{man|5|systemd.service}}):<br />
<br />
* If {{ic|1=<nowiki>Type=oneshot</nowiki>}} then you can use multiple {{ic|1=<nowiki>ExecStart=</nowiki>}} lines. Otherwise only one {{ic|ExecStart}} line is allowed. You can add more commands with either {{ic|ExecStartPre}} or by separating commands with a semicolon (see the first example above; note the spaces before and after the semicolon, as they are ''required'').<br />
* A command prefixed with {{ic|-}} will cause a non-zero exit status to be ignored and treated as a successful command. <br />
* The best place to find errors when troubleshooting these service files is of course with [[journalctl]].<br />
<br />
==== Combined Suspend/resume service file ====<br />
<br />
With the combined suspend/resume service file, a single hook does all the work for different phases (sleep/resume) and for different targets (suspend/hibernate/hybrid-sleep).<br />
<br />
Example and explanation:<br />
<br />
{{hc|/etc/systemd/system/wicd-sleep.service|2=<nowiki><br />
[Unit]<br />
Description=Wicd sleep hook<br />
Before=sleep.target<br />
StopWhenUnneeded=yes<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=-/usr/share/wicd/daemon/suspend.py<br />
ExecStop=-/usr/share/wicd/daemon/autoconnect.py<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
* {{ic|1=<nowiki>RemainAfterExit=yes</nowiki>}}: After started, the service is considered active until it is explicitly stopped.<br />
* {{ic|1=<nowiki>StopWhenUnneeded=yes</nowiki>}}: When active, the service will be stopped if no other active service requires it. In this specific example, it will be stopped after ''sleep.target'' is stopped.<br />
* Because ''sleep.target'' is pulled in by ''suspend.target'', ''hibernate.target'' and ''hybrid-sleep.target'' and because ''sleep.target'' itself is a ''StopWhenUnneeded'' service, the hook is guaranteed to start/stop properly for different tasks.<br />
<br />
==== Hooks in /usr/lib/systemd/system-sleep ====<br />
<br />
''systemd'' runs all executables in {{ic|/usr/lib/systemd/system-sleep/}}, passing two arguments to each of them:<br />
<br />
* Argument 1: either {{ic|pre}} or {{ic|post}}, depending on whether the machine is going to sleep or waking up<br />
* Argument 2: {{ic|suspend}}, {{ic|hibernate}} or {{ic|hybrid-sleep}}, depending on which is being invoked<br />
<br />
''systemd'' will run these scripts concurrently and not one after another.<br />
<br />
The output of any custom script will be logged by ''systemd-suspend.service'', ''systemd-hibernate.service'' or ''systemd-hybrid-sleep.service''. You can see its output in ''systemd''<nowiki>'</nowiki>s [[systemd#Journal|journal]]:<br />
<br />
# journalctl -b -u systemd-suspend<br />
<br />
{{Note|You can also use ''sleep.target'', ''suspend.target'', ''hibernate.target'' or ''hybrid-sleep.target'' to hook units into the sleep state logic instead of using custom scripts.}}<br />
<br />
An example of a custom sleep script:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/example.sh|<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
;;<br />
esac<br />
}}<br />
<br />
Do not forget to make your script executable:<br />
# chmod a+x /usr/lib/systemd/system-sleep/example.sh<br />
<br />
See {{man|7|systemd.special}} and {{man|8|systemd-sleep}} for more details.<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Delayed lid switch action ====<br />
<br />
When performing lid switches in short succession, ''logind'' will delay the suspend action for up to 90s to detect possible docks. [http://lists.freedesktop.org/archives/systemd-devel/2015-January/027131.html] This delay was made configurable with systemd v220:[https://github.com/systemd/systemd/commit/9d10cbee89ca7f82d29b9cb27bef11e23e3803ba]<br />
<br />
{{hc|/etc/systemd/logind.conf|<nowiki><br />
...<br />
HoldoffTimeoutSec=30s<br />
...<br />
</nowiki>}}<br />
<br />
==== Suspend from corresponding laptop Fn key not working ====<br />
<br />
If, regardless of the setting in logind.conf, the sleep button does not work (pressing it does not even produce a message in syslog), then logind is probably not watching the keyboard device. [http://lists.freedesktop.org/archives/systemd-devel/2015-February/028325.html] Do:<br />
<br />
# journalctl | grep "Watching system buttons"<br />
<br />
You might see something like this:<br />
<br />
May 25 21:28:19 vmarch.lan systemd-logind[210]: Watching system buttons on /dev/input/event2 (Power Button)<br />
May 25 21:28:19 vmarch.lan systemd-logind[210]: Watching system buttons on /dev/input/event3 (Sleep Button)<br />
May 25 21:28:19 vmarch.lan systemd-logind[210]: Watching system buttons on /dev/input/event4 (Video Bus)<br />
<br />
Notice no keyboard device. Now obtain ATTRS{name} for the parent keyboard device [http://systemd-devel.freedesktop.narkive.com/Rbi3rjNN/patch-1-2-logind-add-support-for-tps65217-power-button] :<br />
<br />
# udevadm info -a /dev/input/by-path/*-kbd<br />
...<br />
KERNEL=="event0"<br />
...<br />
ATTRS{name}=="AT Translated Set 2 keyboard"<br />
<br />
Now write a custom udev rule to add the "power-switch" tag:<br />
<br />
{{hc|/etc/udev/rules.d/70-power-switch-my.rules|<nowiki><br />
ACTION=="remove", GOTO="power_switch_my_end"<br />
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", TAG+="power-switch"<br />
LABEL="power_switch_my_end"<br />
</nowiki>}}<br />
<br />
Restart services and reload rules:<br />
<br />
# systemctl restart systemd-udevd.service<br />
# udevadm trigger<br />
# systemctl restart systemd-logind.service<br />
<br />
Now you should see "Watching system buttons on /dev/input/event0" in syslog<br />
<br />
== Power saving ==<br />
<br />
{{Note|See [[Laptop#Power management]] for power management specific to laptops, such as battery monitoring.}}<br />
<br />
This section is a reference for creating custom scripts and power saving settings such as by udev rules. Make sure that the settings are not managed by some [[#Userspace tools|other utility]] to avoid conflicts.<br />
<br />
Almost all of the features listed here are worth using whether or not the computer is on AC or battery power. Most have negligible performance impact and are just not enabled by default because of commonly broken hardware/drivers. Reducing power usage means reducing heat, which can even lead to higher performance on a modern Intel or AMD CPU, thanks to [[Wikipedia:Intel Turbo Boost|dynamic overclocking]].<br />
<br />
=== Processors with HWP (Hardware P-state) support ===<br />
<br />
{{Merge|CPU frequency scaling|More context in the main article.}}<br />
<br />
The available energy preferences of a HWP supported processor are {{ic|default performance balance_performance balance_power power}}.<br />
<br />
This can be validated by {{ic|$ cat /sys/devices/system/cpu/cpufreq/policy?/energy_performance_available_preferences}}<br />
<br />
To conserve more energy, you can config by creating the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/energy_performance_preference.conf|<br />
w /sys/devices/system/cpu/cpufreq/policy?/energy_performance_preference - - - - balance_power<br />
}}<br />
<br />
See the {{man|8|systemd-tmpfiles}} and {{man|5|tmpfiles.d}} man pages for details.<br />
<br />
=== Audio ===<br />
<br />
By default, audio power saving is turned off by most drivers. It can be enabled by setting the {{ic|power_save}} parameter; a time (in seconds) to go into idle mode. To idle the audio card after one second, create the following file for Intel soundcards.<br />
<br />
{{hc|/etc/modprobe.d/audio_powersave.conf|2=<br />
options snd_hda_intel power_save=1<br />
}}<br />
<br />
Alternatively, use the following for ac97:<br />
<br />
options snd_ac97_codec power_save=1<br />
<br />
{{Note|<br />
* To retrieve the manufacturer and the corresponding kernel driver which is used for your sound card, run {{ic|lspci -k}}.<br />
* Toggling the audio card's power state can cause a popping sound or noticeable latency on some broken hardware.<br />
}}<br />
<br />
It is also possible to further reduce the audio power requirements by disabling the HDMI audio output, which can done by [[blacklisting]] the appropriate kernel modules (e.g. {{ic|snd_hda_codec_hdmi}} in case of Intel hardware).<br />
<br />
=== Backlight ===<br />
<br />
See [[Backlight]].<br />
<br />
=== Bluetooth ===<br />
<br />
{{expansion|reason=The device should likely be disabled with hciconfig first.}}<br />
<br />
To disable bluetooth completely, [[blacklist]] the {{ic|btusb}} and {{ic|bluetooth}} modules.<br />
<br />
To turn off bluetooth only temporarily, use ''rfkill'':<br />
<br />
# rfkill block bluetooth<br />
<br />
Or with udev rule:<br />
<br />
{{hc|/etc/udev/rules.d/50-bluetooth.rules|<nowiki><br />
# disable bluetooth<br />
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"<br />
</nowiki>}}<br />
<br />
=== Web camera ===<br />
<br />
If you will not use integrated web camera then [[blacklist]] the {{ic|uvcvideo}} module.<br />
<br />
=== Kernel parameters ===<br />
<br />
This section uses configs in {{ic|/etc/sysctl.d/}}, which is ''"a drop-in directory for kernel sysctl parameters."'' See [http://0pointer.de/blog/projects/the-new-configuration-files The New Configuration Files] and more specifically {{man|5|sysctl.d}} for more information.<br />
<br />
==== Disabling NMI watchdog ====<br />
{{Expansion|This or {{ic|nowatchdog}} as can be seen in [[Improving performance#Watchdogs]]}}<br />
<br />
The [[Wikipedia:Non-maskable interrupt|NMI]] watchdog is a debugging feature to catch hardware hangs that cause a kernel panic. On some systems it can generate a lot of interrupts, causing a noticeable increase in power usage:<br />
<br />
{{hc|/etc/sysctl.d/disable_watchdog.conf|2=<br />
kernel.nmi_watchdog = 0<br />
}}<br />
<br />
or add {{ic|1=nmi_watchdog=0}} to the [[kernel line]] to disable it completely from early boot.<br />
<br />
==== Writeback Time ====<br />
<br />
Increasing the virtual memory dirty writeback time helps to aggregate disk I/O together, thus reducing spanned disk writes, and increasing power saving. To set the value to 60 seconds (default is 5 seconds):<br />
<br />
{{hc|/etc/sysctl.d/dirty.conf|2=<br />
vm.dirty_writeback_centisecs = 6000<br />
}}<br />
<br />
To do the same for journal commits on supported filesystems (e.g. ext4, btrfs...), use {{ic|1=commit=60}} as a option in [[fstab]].<br />
<br />
Note that this value is modified as a side effect of the Laptop Mode setting below.<br />
See also [[sysctl#Virtual memory]] for other parameters affecting I/O performance and power saving.<br />
<br />
==== Laptop Mode ====<br />
<br />
See the [https://www.kernel.org/doc/Documentation/laptops/laptop-mode.txt kernel documentation] on the laptop mode 'knob.' ''"A sensible value for the knob is 5 seconds."''<br />
<br />
{{hc|/etc/sysctl.d/laptop.conf|2=<br />
vm.laptop_mode = 5<br />
}}<br />
<br />
{{Note|This setting is mainly relevant to spinning-disk drives.}}<br />
<br />
=== Network interfaces ===<br />
<br />
[[Wake-on-LAN]] can be a useful feature, but if you are not making use of it then it is simply draining extra power waiting for a magic packet while in suspend. You can adapt a [[Wake-on-LAN#udev|udev rule]] to disable the feature for all Ethernet interfaces.<br />
<br />
To enable powersaving with {{Pkg|iw}} on all wireless interfaces:<br />
<br />
{{hc|/etc/udev/rules.d/70-wifi-powersave.rules|2=<br />
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/bin/iw dev %k set power_save on"<br />
}}<br />
<br />
In this example, {{ic|%k}} is a specifier for the kernel name of the matched device. For example, if it finds that the rule is applicable to {{ic|wlan0}}, the {{ic|%k}} specifier will be replaced with {{ic|wlan0}}. To apply the rules to only a particular interface, just replace the pattern {{ic|wlan*}} and specifier {{ic|%k}} with the desired interface name. For more information, see [http://www.reactivated.net/writing_udev_rules.html Writing udev rules].<br />
<br />
{{Note|In this case, the name of the configuration file is important. Due to the introduction of [[Network configuration#Change interface name|persistent device names]] via {{ic|80-net-setup-link.rules}} in systemd, it is important that the network powersave rules are named lexicographically before {{ic|80-net-setup-link.rules}} so that they are applied before the devices are named e.g. {{ic|enp2s0}}.<br />
<br />
However, be advised that commands ran with {{ic|RUN}} are executed '''after''' all rules have been processed -- in which case the naming of the rules file is irrelevant and the persistent device names should be used (the persistent device name can be referenced by replacing {{ic|%k}} with {{ic|$name}}).}}<br />
<br />
==== Intel wireless cards (iwlwifi) ====<br />
<br />
Additional power saving functions of Intel wireless cards with {{ic|iwlwifi}} driver can be enabled by passing the correct parameters to the kernel module. Making it persistent can be achieved by adding the line below to {{ic|/etc/modprobe.d/iwlwifi.conf}} file:<br />
<br />
options iwlwifi power_save=1 d0i3_disable=0 uapsd_disable=0<br />
options iwldvm force_cam=0<br />
<br />
Keep in mind that these power saving options are experimental and can cause an unstable system.<br />
<br />
=== Bus power management ===<br />
<br />
==== Active State Power Management ====<br />
<br />
If the computer is believed not to support [[Wikipedia:Active State Power Management|ASPM]] it will be disabled on boot:<br />
<br />
# lspci -vv | grep 'ASPM.*abled;'<br />
<br />
ASPM is handled by the BIOS, if ASPM is disabled it will be because [http://wireless.kernel.org/en/users/Documentation/ASPM ref]:<br />
<br />
# The BIOS disabled it for some reason (for conflicts?).<br />
# PCIE requires ASPM but L0s are optional (so L0s might be disabled and only L1 enabled).<br />
# The BIOS might not have been programmed for it.<br />
# The BIOS is buggy.<br />
<br />
If believing the computer has support for ASPM it can be forced on for the kernel to handle with the {{ic|1=pcie_aspm=force}} [[kernel parameter]].<br />
<br />
{{Warning|<br />
* Forcing on ASPM can cause a freeze/panic, so make sure you have a way to undo the option if it does not work.<br />
* On systems that do not support it forcing on ASPM can even increase power consumption.<br />
* This forces ASPM in kernel while it can still remain disabled in hardware and not work. To check whether this is the case the {{ic|dmesg &#124; grep ASPM}} command can be used and if that is the case, hardware-specific Wiki article should be consulted.<br />
}}<br />
<br />
To adjust to {{ic|powersave}} do (the following command will not work unless enabled):<br />
<br />
# echo powersave | tee /sys/module/pcie_aspm/parameters/policy<br />
<br />
By default it looks like this:<br />
<br />
{{hc|$ cat /sys/module/pcie_aspm/parameters/policy|[default] performance powersave}}<br />
<br />
==== PCI Runtime Power Management ====<br />
<br />
{{hc|/etc/udev/rules.d/pci_pm.rules|2=<br />
SUBSYSTEM=="pci", ATTR{power/control}="auto"<br />
}}<br />
<br />
The rule above powers all unused devices down, but some devices will not wake up again.<br />
To allow runtime power management only for devices that are known to work, use simple matching against vendor and device IDs (use {{ic|lspci -nn}} to get these values):<br />
<br />
{{hc|/etc/udev/rules.d/pci_pm.rules|<nowiki><br />
# whitelist for pci autosuspend<br />
SUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
Alternatively, to blacklist devices that are not working with PCI runtime power management and enable it for all other devices:<br />
<br />
{{hc|/etc/udev/rules.d/pci_pm.rules|<nowiki><br />
# blacklist for pci runtime power management<br />
SUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}:="on"<br />
SUBSYSTEM=="pci", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
==== USB autosuspend ====<br />
<br />
The Linux kernel can automatically suspend USB devices when they are not in use. This can sometimes save quite a bit of power, however some USB devices are not compatible with USB power saving and start to misbehave (common for USB mice/keyboards). [[udev]] rules based on whitelist or blacklist filtering can help to mitigate the problem.<br />
<br />
The most simple and likely useless example is enabling autosuspend for all USB devices:<br />
<br />
{{hc|/etc/udev/rules.d/50-usb_power_save.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
To allow autosuspend only for devices that are known to work, use simple matching against vendor and product IDs (use ''lsusb'' to get these values):<br />
<br />
{{hc|/etc/udev/rules.d/50-usb_power_save.rules|<nowiki><br />
# whitelist for usb autosuspend<br />
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", ATTR{power/control}="auto"<br />
</nowiki>}}<br />
<br />
Alternatively, to blacklist devices that are not working with USB autosuspend and enable it for all other devices:<br />
<br />
{{hc|/etc/udev/rules.d/50-usb_power_save.rules|<nowiki><br />
# blacklist for usb autosuspend<br />
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", GOTO="power_usb_rules_end"<br />
<br />
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"<br />
LABEL="power_usb_rules_end"<br />
</nowiki>}}<br />
<br />
The default autosuspend idle delay time is controlled by the {{ic|autosuspend}} parameter of the {{ic|usbcore}} [[kernel module]]. To set the delay to 5 seconds instead of the default 2 seconds:<br />
<br />
{{hc|/etc/modprobe.d/usb-autosuspend.conf|<nowiki><br />
options usbcore autosuspend=5<br />
</nowiki>}}<br />
<br />
Similarly to {{ic|power/control}}, the delay time can be fine-tuned per device by setting the {{ic|power/autosuspend}} attribute.<br />
<br />
See the [https://www.kernel.org/doc/Documentation/usb/power-management.txt Linux kernel documentation] for more information on USB power management.<br />
<br />
==== SATA Active Link Power Management ====<br />
<br />
{{Warning|SATA Active Link Power Management can lead to data loss on some devices. Do not enable this setting unless you have frequent backups.}}<br />
<br />
Since Linux 4.15 there is a [https://hansdegoede.livejournal.com/18412.html new setting] called {{ic|med_power_with_dipm}} that matches the behaviour of Windows IRST driver settings and should not cause data loss with recent SSD/HDD drives. The power saving can be significant, ranging [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebb82e3c79d2a956366d0848304a53648bd6350b from 1.0 to 1.5 Watts (when idle)]. It will become a default setting for Intel based laptops in Linux 4.16 [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebb82e3c79d2a956366d0848304a53648bd6350b].<br />
<br />
The current setting can be read from {{ic|/sys/class/scsi_host/host*/link_power_management_policy}} as follows:<br />
<br />
# cat /sys/class/scsi_host/host*/link_power_management_policy<br />
<br />
{| class="wikitable"<br />
|+ Available ALPM settings<br />
! Setting<br />
! Description<br />
! Power saving<br />
|-<br />
| max_performance<br />
| current default<br />
| None<br />
|-<br />
| medium_power<br />
| -<br />
| ~1.0 Watts<br />
|-<br />
| med_power_with_dipm<br />
| recommended setting<br />
| ~1.5 Watts<br />
|-<br />
| min_power<br />
| '''WARNING: possible data loss'''<br />
| ~1.5 Watts<br />
|}<br />
<br />
{{hc|/etc/udev/rules.d/hd_power_save.rules|2=<br />
ACTION=="add", SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"<br />
}}<br />
<br />
{{Note|This adds latency when accessing a drive that has been idle, so it is one of the few settings that may be worth toggling based on whether you are on AC power.}}<br />
<br />
=== Hard disk drive ===<br />
<br />
See [[hdparm#Power management configuration]] for drive parameters that can be set.<br />
<br />
Power saving is not effective when too many programs are frequently writing to the disk. Tracking all programs, and how and when they write to disk is the way to limit disk usage. Use {{Pkg|iotop}} to see which programs use the disk frequently. See [[Improving performance#Storage devices]] for other tips.<br />
<br />
Also little things like setting the [[Fstab#atime options|noatime]] option can help. If enough RAM is available, consider disabling or limiting [[swappiness]] as it has the possibility to limit a good number of disk writes.<br />
<br />
=== CD-ROM or DVD drive ===<br />
<br />
See [[Udisks#Devices do not remain unmounted (udisks)]].<br />
<br />
== Tools and scripts ==<br />
<br />
{{Style|Merged from [[Power saving]], needs reorganization to fit into this page.}}<br />
<br />
=== Using a script and an udev rule ===<br />
<br />
Since systemd users can suspend and hibernate through {{ic|systemctl suspend}} or {{ic|systemctl hibernate}} and handle acpi events with {{ic|/etc/systemd/logind.conf}}, it might be interesting to remove ''pm-utils'' and [[acpid]]. There is just one thing systemd cannot do (as of systemd-204): power management depending on whether the system is running on AC or battery. To fill this gap, you can create a single [[udev]] rule that runs a script when the AC adapter is plugged and unplugged:<br />
<br />
{{hc|/etc/udev/rules.d/powersave.rules|2=<nowiki><br />
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/path/to/your/script true"<br />
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/path/to/your/script false"<br />
</nowiki>}}<br />
<br />
{{Note|You can use the same script that ''pm-powersave'' uses. You just have to make it executable and place it somewhere else (for example {{ic|/usr/local/bin/}}).}}<br />
<br />
Examples of powersave scripts:<br />
<br />
* [https://github.com/supplantr/ftw ftw], package: {{AUR|ftw-git}}<br />
* [https://github.com/Unia/powersave powersave]<br />
* [https://github.com/quequotion/pantheon-bzr-qq/blob/master/EXTRAS/indicator-powersave/throttle throttle], from {{AUR|indicator-powersave}}<br />
<br />
The above udev rule should work as expected, but if your power settings are not updated after a suspend or hibernate cycle, you should add a script in {{ic|/usr/lib/systemd/system-sleep/}} with the following contents:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/00powersave|<nowiki><br />
#!/bin/sh<br />
<br />
case $1 in<br />
pre) /path/to/your/script false ;;<br />
post) <br />
if cat /sys/class/power_supply/AC0/online | grep 0 > /dev/null 2>&1<br />
then<br />
/path/to/your/script true <br />
else<br />
/path/to/your/script false<br />
fi<br />
;;<br />
esac<br />
exit 0<br />
</nowiki>}}<br />
<br />
Do not forget to make it executable!<br />
<br />
{{Note|Be aware that AC0 may be different for your laptop, change it if that is the case.}}<br />
<br />
=== Print power settings ===<br />
<br />
This script prints power settings and a variety of other properties for USB and PCI devices. Note that root permissions are needed to see all settings.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
for i in $(find /sys/devices -name "bMaxPower")<br />
do<br />
busdir=${i%/*}<br />
busnum=$(<$busdir/busnum)<br />
devnum=$(<$busdir/devnum)<br />
title=$(lsusb -s $busnum:$devnum)<br />
<br />
printf "\n\n+++ %s\n -%s\n" "$title" "$busdir"<br />
<br />
for ff in $(find $busdir/power -type f ! -empty 2>/dev/null)<br />
do<br />
v=$(cat $ff 2>/dev/null|tr -d "\n")<br />
[[ ${#v} -gt 0 ]] && echo -e " ${ff##*/}=$v";<br />
v=;<br />
done | sort -g;<br />
done;<br />
<br />
printf "\n\n\n+++ %s\n" "Kernel Modules"<br />
for mod in $(lspci -k | sed -n '/in use:/s,^.*: ,,p' | sort -u)<br />
do<br />
echo "+ $mod";<br />
systool -v -m $mod 2> /dev/null | sed -n "/Parameters:/,/^$/p";<br />
done<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption ThinkWiki:How to reduce power consumption]<br />
* [http://ivanvojtko.blogspot.sk/2016/04/how-to-get-longer-battery-life-on-linux.html How to get longer battery life on Linux]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Bcache&diff=547994Bcache2018-10-16T22:59:17Z<p>Bepvte: </p>
<hr />
<div>[[Category:File systems]]<br />
[[ja:Bcache]]<br />
{{Style|Some first-person comments, see [[Help:Style]].}}<br />
<br />
[https://bcache.evilpiepirate.org/ Bcache] (block cache) allows one to use an SSD as a read/write cache (in writeback mode) or read cache (writethrough or writearound) for another blockdevice (generally a rotating HDD or array). This article will show how to install arch using Bcache as the root partition. For an intro to bcache itself, see [http://bcache.evilpiepirate.org/ the bcache homepage]. Be sure to read and reference [https://evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt the bcache manual]. Bcache is in the mainline kernel since 3.10. The kernel on the arch install disk includes the bcache module since 2013.08.01.<br />
<br />
An alternative to Bcache is Facebook's [[Flashcache]] and its offspring [[EnhanceIO]]. Another alternative - {{AUR|btier-dkms}}{{Broken package link|{{aur-mirror|btier-dkms}}}}.<br />
<br />
{{Accuracy|Backwards incompatible changes to on-disk format for linux 3.18 appears to be false. bcache on-disk format changes have not yet landed upstream yet as of 3.19}}<br />
<br />
Bcache needs the backing device to be formatted as a bcache block device. In most cases, [https://github.com/g2p/blocks blocks to-bcache] can do an in-place conversion.<br />
{{Warning|<br />
* Be sure you back up any important data first.<br />
* The bcache-dev branch is under heavy development. The on-disk format has undergone changes in 3.18 which are not backwards compatible with previous formats[http://www.spinics.net/lists/linux-bcache/msg02721.html]. Note: This only applies to users who compile-in bcache-dev. The version built-in to the upstream Linux kernel is unaffected[http://www.spinics.net/lists/linux-bcache/msg02724.html].<br />
* Bcache and [[btrfs]] could leave you with a corrupted filesystem. Please visit [https://www.hdevalence.ca/blog/2013-09-21-notes-on-my-archlinux-install this post] for more information. Btrfs wiki reports that it was fixed in kernels 3.19+ [https://btrfs.wiki.kernel.org/index.php/Gotchas#Historical_references].<br />
}}<br />
<br />
== Setting up a bcache device on an existing system ==<br />
<br />
{{Warning|make-bcache '''will not''' import an existing drive or partition – it will reformat it. If you want to use an existing data partition as backing device, see [[#Converting existing disks]].}}<br />
<br />
1. Install the {{AUR|bcache-tools}} package from [[AUR]].<br />
<br />
2. Create a backing device (This will typically be your mechanical drive). The backing device can be a whole device, a partition or any other standard block device. This will create /dev/bcache0<br />
# make-bcache -B /dev/sdx1<br />
<br />
3. Create a cache device (This will typically be your SSD). The cache device can be a whole device, a partition or any other standard block device<br />
# make-bcache -C /dev/sdy2<br />
In this example the default block and bucket sizes of 512B and 128kB are used. The block size should match the backing devices sector size which will usually be either 512 or 4k. The bucket size should match the erase block size of the caching device with the intent of reducing write amplification. For example, using a HDD with 4k sectors and an SSD with an erase block size of 2MB this command would look like<br />
# make-bcache --block 4k --bucket 2M -C /dev/sdy2<br />
<br />
4. Register the cache device against your backing device. To find its ''cache set UUID'', run {{ic|# bcache-super-show /dev/sdy2 &#124; grep cset.uuid}} and then add it to the bcache device initially. Udev rules will take care of this on reboot and will only need to be done once.<br />
# echo '''cset.uuid''' > /sys/block/bcache0/bcache/attach<br />
<br />
5. Change your cache mode (if you want to cache writes as well as reads):<br />
# echo writeback > /sys/block/bcache0/bcache/cache_mode<br />
<br />
6. If you want to have this partition available during the initcpio (i.e. you require it at some point in the boot process) you need to add 'bcache' to your modules array in /etc/mkinitcpio.conf as well as adding the 'bcache' hook in your list between block and filesystems. You must then rebuild the initramfs image. This is typically done with<br />
<br />
# mkinitcpio -p linux<br />
<br />
=== Bcache management ===<br />
1. Check that everything has been correctly setup <br />
<br />
# cat /sys/block/bcache0/bcache/state<br />
<br />
The output can be:<br />
* '''no cache''': this means you have not attached a caching device to your backing bcache device<br />
* '''clean''': this means everything is ok. The cache is clean.<br />
* '''dirty''': this means everything is setup fine and that you have enabled ''writeback'' and that the cache is dirty.<br />
* '''inconsistent''': you are in trouble because the backing device is not in sync with the caching device<br />
<br />
You can have a {{ic|/dev/bcache0}} device associated with a backing device with no caching device attached. This means that all I/O (read/write) are passed directly to the backing device (pass-through mode)<br />
<br />
2. See what caching mode is in use<br />
{{bc|# cat /sys/block/bcache0/bcache/cache_mode <br />
[writethrough] writeback writearound none<br />
}}<br />
In the above example, the ''writethrough'' mode is enabled.<br />
<br />
3. Show info about a bcached device:<br />
<br />
# bcache-super-show /dev/sdXY<br />
<br />
4. Stop the backing device:<br />
<br />
# echo 1 > /sys/block/sdX/sdX[Y]/bcache/stop<br />
<br />
5. Detach a caching device:<br />
<br />
# echo 1 > /sys/block/sdX/sdX[Y]/bcache/detach<br />
<br />
6. Safely remove the cache device<br />
# echo <cache-set-uuid> > /sys/block/bcache0/bcache/detach<br />
<br />
7. Release attached devices<br />
# echo 1 > /sys/fs/bcache/<cache-set-uuid>/stop<br />
<br />
=== Converting existing disks ===<br />
{{Accuracy| it is strongly advises to make Bcache first, underneath any other block layer}}<br />
{{Warning|<br />
* it is widely recommended to use Bcache underneath any other block layer.<br />
* the '''blocks''' package is broken with Python3. Please visit [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug&#61;769737 this thread] for a workaround, or use [[Python VirtualEnv]].<br />
* when on top of a '''LVM2''' layer, the ''discard'' mount option may not be handled well.<br />
}}<br />
With {{ic|blocks}}, you can add a Bcache layer on a device with an existing filesystem or layer (normal partition, LUKS partition, logical volume).<br />
<br />
First, install the {{AUR|blocks-git}}{{Broken package link|{{aur-mirror|blocks-git}}}} package from [[AUR]].<br />
<br />
''blocks'' needs to add the '''bcache''' metadata at the start of the targeted partition, here {{ic|/dev/sdz4}}; to be able to do so, it will resize the partition just before the targeted one ({{ic|/dev/sdz3}}) to make necessary room, typically 2048 bits (2k). It will ask for your passphrase if the partition({{ic|/dev/sdz3}}) is an LUKS partition. Then it will recreate another partition with the start just lower of 2048 bits and run ''make-bcache'', so you do not need to run it yourself.<br />
<br />
# blocks to-bcache /dev/sdz4<br />
<br />
You can check that everything is ok by running:<br />
<br />
# bcache-super-show /dev/sdz4<br />
<br />
which should output metadata about the new backing '''bcache''' device<br />
<br />
You can proceed to create the caching device and attach it to the backing device.<br />
<br />
==== Troubleshooting ====<br />
If {{ic|blocks}} complains complains about ''overlapping metadata'' when running {{ic|blocks to-bcache}}, you will need to shrink by 100Mb the partition you want to cache and create a new 100Mb free partition.<br />
<br />
== Installation to a bcache device ==<br />
<br />
1. Boot on the install disk (2013.08.01 minimum).<br />
<br />
2. Install the {{AUR|bcache-tools}} package from [[AUR]].<br />
<br />
3. Partition your hdd<br />
<br />
{{Note|While it may be true that Grub2 does not offer support for bcache as noted below, it does, however, fully support UEFI. It follows then, that so long as the necessary modules for the linux kernel to properly handle your boot device are either compiled into the kernel or are included in an initramfs, and you can include these files on it, the separate boot partition described below may be omitted in favor of the FAT EFI system partition. See [[GRUB]] and/or [[UEFI]] for more.}}<br />
grub cannot handle bcache, so you will need at least 2 partitions (boot and one for the bcache backing device). If you are doing UEFI, you will need an [[EFI system partition]] (ESP) as well. E.g.:<br />
1 2048 22527 10.0 MiB EF00 EFI System<br />
2 22528 432127 200.0 MiB 8300 arch_boot<br />
3 432128 625142414 297.9 GiB 8300 bcache_backing<br />
<br />
{{Note|This example has no swapfile/partition. For a swap partition on the cache, use LVM in step 7. For a swap partition outside the cache, be sure to make a swap partition now.}}<br />
<br />
4. Configure your HDD as a bcache backing device.<br />
<br />
# make-bcache -B /dev/sda3<br />
<br />
{{Note|<br />
* When preparing any boot disk it is important to know the ramifications of any decision you may make. Please review and review again the documentation for your chosen boot-loader/-manager and consider seriously how it might relate to bcache.<br />
* If all associated disks are partitioned at once as below bcache will automatically attach "-B backing stores" to the "-C ssd cache" and step 5 is unnecessary.<br />
}}<br />
<br />
# make-bcache -B /dev/sd? /dev/sd? -C /dev/sd?<br />
<br />
You now have a {{ic|/dev/bcache0}} device.<br />
<br />
5. Configure your SSD<br />
<br />
Format the SSD as a caching device and link it to the backing device<br />
<br />
# make-bcache -C /dev/sdb<br />
# echo /dev/sdb > /sys/fs/bcache/register <br />
# echo ''UUID__from_previous_command'' > /sys/block/bcache0/bcache/attach<br />
<br />
{{Note|If the UUID is forgotten, it can be found with {{ic|ls /sys/fs/bcache/}} after the cache device has been registered.}}<br />
<br />
6. Format the bcache device. Use LVM or btrfs subvolumes if you want to divide up the {{ic|/dev/bcache0}} device how you like (ex for separate {{ic|/}}, {{ic|/home}}, {{ic|/var}}, etc):<br />
<br />
# mkfs.btrfs /dev/bcache0<br />
# mount /dev/bcache0 /mnt/<br />
# btrfs subvolume create /mnt/root<br />
# btrfs subvolume create /mnt/home<br />
# umount /mnt<br />
<br />
You can even setup LUKS on it if you want using e.g. cryptsetup. Referencing the bcache device in the 'cryptdevice' kernel option will work fine, for instance.<br />
<br />
7. Prepare the installation mount point:<br />
<br />
# mkfs.ext4 /dev/sda2<br />
# mkfs.msdos /dev/sda1 (if your ESP is at least 500MB, use mkfs.vfat to make a FAT32 partition instead)<br />
# pacman -S arch-install-scripts<br />
# mount /dev/bcache0 -o subvol=root,compress=lzo /mnt/<br />
# mkdir /mnt/boot /mnt/home<br />
# mount /dev/bcache0 -o subvol=home,compress=lzo /mnt/home<br />
# mount /dev/sda2 /mnt/boot<br />
# mkdir /boot/efi<br />
# mount /dev/sda1 /mnt/boot/efi/<br />
<br />
8. Install the system as per the [[Installation guide#Connect to the Internet|Installation Guide]] as normal except this:<br />
<br />
Before you edit {{ic|/etc/mkinitcpio.conf}} and run {{ic|mkinitcpio -p linux}}:<br />
<br />
* install {{AUR|bcache-tools}} package from the [[AUR]] on the new system.<br />
* Edit {{ic|/etc/mkinitcpio.conf}}:<br />
** add the "bcache" module<br />
** add the "bcache" hook between block and filesystem hooks<br />
<br />
{{Note| Should you want to open the backing device from the installation media for any reason after a reboot you must register it manually. Make sure the bcache module is loaded and then echo the relevant devices to /sys/bcache/register. You should see whether this worked or not by using dmesg.<br />
<br />
}}<br />
<br />
== Accessing from the install disk ==<br />
<br />
This is how to access a bcache partition from the install disk that was present before the install disk was booted. Boot the install disk and install {{AUR|bcache-tools}} from the AUR, just as in the previous section. Then, add the module to the kernel:<br />
<br />
# modprobe bcache<br />
<br />
Your device will not appear immediately at {{ic|/dev/bcache*}}. To force the kernel to find it, tell it to reread the partition table:<br />
<br />
# partprobe<br />
<br />
Now, {{ic|/dev/bcache*}} should be present, and you can carry on mounting, reformatting, etc. from here.<br />
<br />
== Configuring ==<br />
<br />
There are many options that can be configured (such as cache mode, cache flush interval, sequential write heuristic, etc.) This is currently done by writing to files in {{ic|/sys}}. See the [https://evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt bcache user documentation].<br />
<br />
Changing the cache mode is done by echoing one of 'writethrough', 'writeback', 'writearound' or 'none' to /sys/block/bcache[0-9]/bcache/cache_mode.<br />
<br />
Note that changes to /sys are temporary, and will revert back after a reboot. To set custom configurations at boot create a .conf file in {{ic|/etc/tmpfile.d}}. To set, in a persistent fashion, the sequential cutoff for bcache0 to 1 MB and write back you could create a file {{ic|/etc/tmpfile.d/my-bcache.conf}} with the contents<br />
<br />
w /sys/block/bcache0/bcache/sequential_cutoff - - - - 1M<br />
w /sys/block/bcache0/bcache/cache_mode - - - - writeback<br />
<br />
== Advanced operations ==<br />
<br />
=== Resize backing device ===<br />
<br />
It is possible to resize the backing device so long as you do not move the partition start. This process is described on [http://comments.gmane.org/gmane.linux.kernel.bcache.devel/249 the mailing list]. Here is an example using btrfs volume directly on bcache0. For LVM containers or for other filesystems, procedure will differ.<br />
<br />
==== Example of growing ====<br />
<br />
In this example, I grow the filesystem by 4GB. <br />
<br />
1. Reboot to a live CD/USB Drive (need not be bcache enabled) and use fdisk, gdisk, parted, or your other favorite tool to delete the backing partition and recreate it with the same start and a total size 4G larger. <br />
<br />
{{Warning|Do not use a tool like GParted that might perform filesystem operations! It will not recognize the bcache partition and might overwrite part of it!!}}<br />
<br />
2. Reboot to your normal install. Your filesystem will be currently mounted. That is fine. Issue the command to resize the partition to its maximum. For btrfs, that is<br />
<br />
# btrfs filesystem resize max /<br />
<br />
For ext3/4, that is:<br />
<br />
# resize2fs /dev/bcache0<br />
<br />
==== Example of shrinking ====<br />
<br />
In this example, I shrink the filesystem by 4GB.<br />
<br />
1. Disable writeback cache (switch to writethrough cache) and wait for the disk to flush.<br />
<br />
# echo writethrough > /sys/block/bcache0/bcache/cache_mode<br />
$ watch cat /sys/block/bcache0/bcache/state<br />
<br />
wait until state reports "clean". This might take a while.<br />
<br />
====== Force flush of cache to backing device ======<br />
I suggest to use <br />
<br />
# echo 0 > /sys/block/bcache0/bcache/writeback_percent<br />
<br />
This will flush the dirty data of the cache to the backing device in less a minute.<br />
<br />
Revert back the value after with<br />
<br />
# echo 10 > /sys/block/bcache0/bcache/writeback_percent<br />
<br />
2. Shrink the mounted filesystem by something more than the desired amount, to ensure we do not accidentally clip it later. For btrfs, that is:<br />
<br />
# btrfs filesystem resize -5G /<br />
<br />
For ext3/4 you can use ''resize2fs'', but only if the partition is unmounted<br />
<br />
$ df -h /home<br />
/dev/bcache0 290G 20G 270G 1% /home<br />
# umount /home<br />
# resize2fs /dev/bcache0 283G<br />
<br />
3. Reboot to a LiveCD/USB drive (does not need to support bcache) and use fdisk, gdisk, parted, or your other favorite tool to delete the backing partition and recreate it with the same start and a total size 4G smaller.<br />
<br />
{{Warning|Do not use a tool like GParted that might perform filesystem operations! It will not recognize the bcache partition and might overwrite part of it!!}}<br />
<br />
4. Reboot to your normal install. Your filesystem will be currently mounted. That is fine. Issue the command to resize the partition to its maximum (that is, the size we shrunk the actual partition to in step 3). For btrfs, that is:<br />
<br />
# btrfs filesystem resize max /<br />
<br />
For ext3/4, that is:<br />
<br />
# resize2fs /dev/bcache0<br />
<br />
5. Re-enable writeback cache if you want that enabled:<br />
<br />
# echo writeback > /sys/block/bcache0/bcache/cache_mode<br />
<br />
{{Note|If you are very careful you can shrink the filesystem to the exact size in step 2 and avoid step 4. Be careful, though, many partition tools do not do exactly what you want, but instead adjust the requested partition start/end points to end on sector boundaries. This may be difficult to calculate ahead of time}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== /dev/bcache device does not exist on bootup ===<br />
<br />
If you are sent to a busy box shell with an error:<br />
<br />
{{bc|1=<br />
ERROR: Unable to find root device 'UUID=b6b2d82b-f87e-44d5-bbc5-c51dd7aace15'.<br />
You are being dropped to a recovery shell<br />
Type 'exit' to try and continue booting<br />
}}<br />
<br />
This might happen if the backing device is configured for "writeback" mode (default is writearound). When in "writeback" mode, the /dev/bcache0 device is not started until the cache device is both registered and attached. Registering is something that needs to happen every bootup, but attaching should only have to be done once. <br />
<br />
To continue booting, try one of the following:<br />
<br />
* Register both the backing device and the caching device<br />
<br />
# echo /dev/sda3 > /sys/fs/bcache/register<br />
# echo /dev/sdb > /sys/fs/bcache/register<br />
<br />
If the /dev/bcache0 device now exists, type exit and continue booting. You will need to fix your initcpio to ensure devices are registered before mounting the root device.<br />
<br />
{{Note|<br />
* An error of "sh: echo: write error: Invalid argument" means the device was already registered or is not recognized as either a bcache backing device or cache. If using the udev rule on boot it should only attempt to register a device if it finds a bcache superblock<br />
* This can also happen if using udev's 69-bcache.rules in Installation's step 7 and blkid and bcache-probe "disagree" due to rogue superblocks. See [http://bcache.evilpiepirate.org/#index6h1 bcache's wiki] for a possible explanation/resolution.<br />
}}<br />
<br />
* Re-attach the cache to the backing device:<br />
<br />
If the cache device was registered, a folder with the UUID of the cache should exist in {{ic|/sys/fs/bcache}}. Use that UUID when following the example below:<br />
<br />
# ls /sys/fs/bcache/<br />
b6b2d82b-f87e-44d5-bbc5-c51dd7aace15 register register_quiet<br />
# echo b6b2d82b-f87e-44d5-bbc5-c51dd7aace15 > /sys/block/sda/sda3/bcache/attach<br />
<br />
If the {{ic|/dev/bcache0}} device now exists, type exit and continue booting. You should not have to do this again. If it persists, ask on the bcache mailing list.<br />
<br />
{{Note|An error of {{ic|sh: echo: write error: Invalid argument}} means the device was already attached. An error of {{ic|sh: echo: write error: No such file or directory}} means the UUID is not a valid cache (make sure you typed it correctly).}}<br />
<br />
* Invalidate the cache and force the backing device to run without it. You might want to check some stats, such as "dirty_data" so you have some idea of how much data will be lost.<br />
<br />
# cat /sys/block/sda/sda3/bcache/dirty_data<br />
-3.9M<br />
<br />
dirty data is data in the cache that has not been written to the backing device. If you force the backing device to run, this data will be lost, even if you later re-attach the cache.<br />
<br />
# cat /sys/block/sda/sda3/bcache/running<br />
0<br />
# echo 1 > /sys/block/sda/sda3/bcache/running<br />
<br />
The {{ic|/dev/bcache0}} device will now exist. Type exit and continue booting. You might want to unregister the cache device and run make-bcache again. An fsck on {{ic|/dev/bcache0}} would also be wise. See the [http://atlas.evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt?h=bcache bcache user documentation].<br />
<br />
{{Warning|Only invalidate the cache if one of the two options above did not work.}}<br />
<br />
=== /sys/fs/bcache/ does not exist ===<br />
<br />
The kernel you booted is not bcache enabled, or you the bcache [[Kernel_module#Manual_module_handling|module is not loaded]]<br />
<br />
== See also ==<br />
<br />
* [http://bcache.evilpiepirate.org Bcache Homepage] <br />
* [https://www.kernel.org/doc/Documentation/bcache.txt Bcache Manual]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Dell_XPS_13_(9360)&diff=542314Dell XPS 13 (9360)2018-09-20T15:05:21Z<p>Bepvte: giving up on killer wireless is good for your mental health</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:Dell XPS 13 (9360)]]<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 (mousedev)<br />
|-<br />
| Webcam || {{G|Working}} || uvcvideo<br />
|-<br />
| USB-C / Thunderbolt 3 || {{G|Working}} || ?<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 (9370)}}<br />
{{Related|Dell XPS 13 2-in-1 (9365)}}<br />
{{Related articles end}}<br />
<br />
The Dell XPS 13 Late 2016 (9360) is the fourth-generation model of the XPS 13 line. The laptop is available since October (pre-2017 model) in both a standard edition with Windows installed as well as both a pre-2017 model and a 2017 model (with insignificant hardware differences) Developer Edition with Ubuntu 16.04 "SP1" installed, featuring kernel 4.8 as of now. There is only minor hardware differences between them, mostly in regards to the mainboard microchip manufacturers. Just like the older versions ([[Dell XPS 13 (9333)|9333]], [[Dell XPS 13 (9343)|9343]] and [[Dell XPS 13 (9350)|9350]]) it is available in different hardware configurations as well. These fourth gen models includes Intel's Kaby Lake CPUs and advertised with up to 16GB LPDDR 1866 MHz RAM and a 1TB PCI SSD. It will now also be available in Rose Gold. Prior to previous information and current specifications available provided by Dell (at least to regular customers), it is not available with the 2133 MHz RAM speed. However, some models, including those available to employees and possibly Dell partners (and/or business customers), memory speed is indeed available up to 2133 Mhz LPDDR3 (non-upgradable). The same mentioned models are also available with the Intel Core i7-7660U (aswell as i7-7560U) with the Intel 640 Iris Plus onboard graphics. Respective clock frequencies are 2.5 Ghz (up to 4GHz in Turbo-mode) and 2,4 Ghz (up to 3.8 Ghz), respectively.<br />
<br />
The installation process for Arch on the XPS 13 does not differ from any other PC. 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 />
As of kernel 4.5, the Intel Kaby Lake architecture is supported.<br />
<br />
<br />
== Content Adaptive Brightness Control ==<br />
In the XPS 13 the display panels (both FHD and QHD+) come with Content Adaptive Brightness Control (usually referred to as CABC or DBC) embedded in the panel firmware - it adjusts the screen brightness depending on the content displayed on the screen. While it saves a bit of power, it is generally undesirable, especially for Linux users who are likely to be switching between dark and light screen content. Dell has issued a fix for this, however it is only available to run in Windows. The fix is available [http://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverId=312K3&lwp=rt directly from Dell].<br />
<br />
To test if your XPS 13 is affected by the CABC, go to this [http://tylerwatt12.com/dc/ test page]. It is possible to apply Dell's firmware update using a portable Windows 10 on a USB device:<br />
# Install (for example) {{AUR|woeusb-git}}<br />
# Download a Windows 10 ISO from [https://www.microsoft.com/en-in/software-download/windows10ISO Microsoft's website]<br />
# Create a portable Windows 10 installation [https://www.addictivetips.com/ubuntu-linux-tips/make-windows-usb-drive-on-linux-woeusb/ using woeusb]<br />
# Boot the XPS 13 from your Windows 10 USB device (F12)<br />
# In Windows, download and install the latest driver for the [http://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverId=M10YG Intel Graphics controller]<br />
# Then download and install [http://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverId=312K3 this tool] to update the panel firmware. The tool gives you the option to disable CABC<br />
# Reboot (from USB)<br />
# Reboot to Arch Linux and rerun the [http://tylerwatt12.com/dc/ test]<br />
<br />
== Power Saving ==<br />
<br />
It's possible to save around ~10/20% energy with somes tricks.<br />
<br />
First, we can disable SD-Card adapter in bios settings (-0.5W~)<br />
<br />
Then, it's possible to undervolt CPU and GPU with [https://wiki.archlinux.org/index.php/Undervolting_CPU#intel-undervolt|intel-undervolt]<br />
<br />
This is an example of best stable values for a I5-7200u (depend of your cpu):<br />
<br />
CPU (0): -160.16 mV<br />
GPU (1): -125.00 mV<br />
CPU Cache (2): -89.84 mV<br />
<br />
Edit the config file<br />
<br />
<code>sudo nano /etc/intel-undervolt.conf</code><br />
<br />
This is an example for i5-7200u<br />
<br />
<code># CPU Undervolting<br />
<br />
apply 0 'CPU' -160<br />
<br />
apply 1 'GPU' -125<br />
<br />
apply 2 'CPU Cache' -90<br />
<br />
apply 3 'System Agent' 0<br />
<br />
apply 4 'Analog I/O' 0<br />
<br />
interval 5000</code><br />
<br />
then enable/start the daemon :)<br />
<br />
<code>sudo systemctl enable intel-undervolt && sudo systemctl start intel-undervolt</code><br />
<br />
== NVM Express SSD Power Saving ==<br />
<br />
For some devices it might be necessary to set a higher value for the {{ic|nvme_core.default_ps_max_latency_us}} parameter to enable all power saving states. This parameter has to be set on the [[kernel command line]].<br />
<br />
For the Toshiba 512GB SSD used in some models of the XPS 13 the value to enable all states is 170000 (the combined latency of entering and leaving the highest power state, add {{ic|<nowiki>nvme_core.default_ps_max_latency_us=170000</nowiki>}} to your kernel command line). For the 1TB SSD this valued should be increased to 180000 instead. To check if all states are enabled you can use the {{AUR|nvme-cli}} package, which provides the {{ic|nvme-cli}} command:<br />
<br />
# nvme get-feature -f 0x0c -H /dev/nvme0<br />
get-feature:0xc (Autonomous Power State Transition), Current value:0x000001<br />
Autonomous Power State Transition Enable (APSTE): Enabled<br />
Auto PST Entries .................<br />
Entry[ 0] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 1] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 2] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 3] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 8500 ms<br />
Idle Transition Power State (ITPS): 4<br />
.................<br />
<br />
If the power states are enabled there should be values for ITPT and ITPS in the first entries. Also the ITPS-value of the last filled entry should be the highest power saving-state of the SSD (which can be viewed using {{ic|smartctl -a /dev/nvme0}} or {{ic|nvme id-ctrl /dev/nvme0}}).<br />
<br />
== Video ==<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 QHD+ (3200x1800) model, also check out [[HiDPI]] for UI scaling configurations.<br />
<br />
''But there might be video issues left for this model. '''Please help by contributing any feedback''' about similar issues you might have experience(d) to this bugreport (https://bugs.freedesktop.org/show_bug.cgi?id=100671).''<br />
<br />
=== Module-based Powersaving Options ===<br />
For the HD 620 graphics card the following modules are working: (see [[Intel graphics#Module-based Powersaving Options]]{{Broken section link}})<br />
modeset=1 enable_fbc=1 <br />
The first argument is to enable modesetting if it's not set by default. The second argument is needed to activate framebuffer compression power savings. These values should work well!<br />
<br />
enable_guc=3<br />
This argument is used to enable GuC updates. GuC is a small proprietary binary blob released by intel to update the GuC binary in faster intervals than the kernel release does. It is used for graphics workload scheduling on the various graphics parallel engines. More details at (https://01.org/linuxgraphics/downloads/firmware). The GuC binary for kaby lake is included since firmware release linux-firmware 20170217 in the official repository. HuC is also a binary blob from intel. It's designed to offload some of the media functions from the CPU to GPU. As of kernel 4.12, HuC is loaded if GuC is enabled. One can check with 'cat /sys/kernel/debug/dri/0/i915_huc_load_status' and 'cat /sys/kernel/debug/dri/0/i915_guc_load_status'.<br />
<br />
enable_psr=1<br />
Panel Self Refresh (PSR) is working for eDP 1.3 and up and does stop the creation of new frames when the screen content is static to save energy. If you experience problems with PSR try to set 'disable_power_well=0' or disable otherwise. <br />
{{Tip|If you use {{ic|1=enable_psr=1}} may need to add the {{ic|modconf}} hook to your [[Mkinitcpio#HOOKS|Mkinitcpio]] to avoid a hang after resume. The {{AUR|xf86-video-intel-git}} package was required to solve the bug for me as well, even though I was using Wayland.}}<br />
<br />
NOT WORKING: semaphores=1 <br />
The semaphore option is NOT working for kaby lake CPUs and won't enable even if you set the option to 1.<br />
<br />
=== Blank screen issue after booting ===<br />
If using "late start" [[KMS]] (the default) and the screen goes blank when loading modules, it may help to add {{ic|i915}} and {{ic|intel_agp}} to the initramfs or using a special [[kernel parameter]]. Consult [[Intel graphics#Blank screen during boot, when "Loading modules"]] for more information about the kernel parameter way and have a look at [[Kernel mode setting#Early KMS start]] for a guide on how to setup the modules for the initramfs.<br />
<br />
== Wireless ==<br />
<br />
The Killer 1535 Wirless Adapter is functional and the ath10k firmware is included in recent linux kernel versions. The connection speed reported by iw is limited to 1-6Mbits/s. However this is just the output being wrong. The real connection speed is not limited to this value.<br />
<br />
[http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19998908?pi41127=3 Some users are experiencing issues], where the connection is dropped under heavy load but reconnects within a brief moment. This might not be noticed during browsing at all but becomes apparent in online games. There is [http://en.community.dell.com/techcenter/os-applications/f/4613/p/20002634/20994007#20994007 a firmware update proposed by DELL] to fix the issue, but it might not fix all the issues. In at least one case the new firmware did not fix the connection loss / low connection speed problem. Signs of this problem seems to be two kinds of messages in dmesg:<br />
<br />
{{bc|<nowiki><br />
pcieport 0000:00:1c.4: AER: Corrected error received: id=00e4<br />
pcieport 0000:00:1c.4: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=00e4(Transmitter ID)<br />
pcieport 0000:00:1c.4: device [8086:9d14] error status/mask=00001000/00002000<br />
pcieport 0000:00:1c.4: [12] Replay Timer Timeout <br />
</nowiki>}}<br />
<br />
And also:<br />
{{bc|<br />
CPU: 3 PID: 1410 Comm: irq/133-ath10k_ Not tainted <br />
Hardware name: Dell Inc. XPS 13 9360/0839Y6, BIOS 2.1.0 08/02/2017<br />
Call Trace:<br />
<IRQ><br />
dump_stack+0x63/0x82<br />
__warn+0xcb/0xf0<br />
warn_slowpath_null+0x1d/0x20<br />
net_rx_action+0x274/0x3a0<br />
? irq_finalize_oneshot.part.35+0xe0/0xe0<br />
}}<br />
<br />
<br />
As of February 2018, Dell support suggests to update the firmware of the network adapter in the following way:<br />
<br />
# Confirm that you have QCA6174 checking the output of {{ic|sudo lspci | grep –i qca6174}}<br />
# [https://codeload.github.com/kvalo/ath10k-firmware/zip/master Download] the latest firmware and extract the contents from [https://github.com/kvalo/ath10k-firmware git]<br />
# Substitute the {{ic|QCA6174}} folder in {{ic|/lib/firmware/ath10k/}} with the one downloaded<br />
# Inside the new folder, rename {{ic|firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1}} to {{ic|firmware-4.bin}}<br />
# Reboot and test the new Killer Wi-Fi firmware<br />
<br />
Update: Internet connection dropped even with the firmware from the above fix. Using the newer firmware {{ic|firmware-6.bin_WLAN.RM.4.4.1-00102-QCARMSWP-1}} by downloading that file from https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/4.4.1.c1/firmware-6.bin_RM.4.4.1.c1-00042-QCARMSWP-1, copying it to {{ic|/usr/lib/firmware/ath10k/QCA6174/hw3.0/}} and renaming it to {{ic|firmware-6.bin}} fixes this.<br />
Reboot and verify that this newer firmware is used by verifying that {{ic|<nowiki>dmesg | grep ath</nowiki>}} outputs:<br />
{{bc|<nowiki><br />
ath10k_pci 0000:3a:00.0: firmware ver RM.4.4.1.c1-00042-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 40fb7bdd<br />
</nowiki>}}<br />
<br />
The latest bios update (2.9.0), which also contains important microcode security updates, manages to make these crashes occur no matter what firmware you load. Installing an [https://www.amazon.com/Intel-Dual-Band-Wireless-Ac-8265/dp/B01MZA1AB2 alternative intel wifi card] solves the problem.<br />
<br />
== Bluetooth ==<br />
<br />
After following the instructions given at [[Bluetooth]] tethering of internet connections via phone works immediately.<br />
<br />
<br />
== Thunderbolt 3 / USB 3.1 ==<br />
<br />
The USB-C port supports Thunderbolt 3, Displayport-over-USB-C and USB power delivery as well as USB 3.1.<br />
<br />
=== Ethernet repeatedly disconnects/reconnects with Dell USB-C adapter (DA200) ===<br />
<br />
Use of a power management package (such as [[TLP]]) may cause the ethernet adapter to repeatedly disconnect and reconnect. If this happens, disable/blacklist USB autosuspend for the ethernet adapter. (On my laptop, this is the device <tt>Bus 004 Device 007: ID 0bda:8153 Realtek Semiconductor Corp</tt> in the output of <tt>lsusb</tt>.)<br />
<br />
Also disabling or reducing power of wifi may help: http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19995423<br />
<br />
=== USB-C Compatibility Chart ===<br />
{{Note|''A comprehensive and up to date list of USB type C adapters and hubs is present in the [[Talk:Dell_XPS_13_(9360)#USB-C_Compatibility_Chart|discussion]] page.''}}<br />
<br />
=== Thunderbolt Firmware updates ===<br />
The thunderbolt controller in the laptop has an embedded firmware. The laptop ships with firmware version NVM 18, and the most recent available version from Dell's website is NVM 26. If encountering compatibility problems with Thunderbolt accessories (such as the DA-200), the firmware may need to be updated. If you have fwupd (see: [[#Firmware Updates]]) set up then you should receive this update automatically. Otherwise, you can install it manually as follows.<br />
<br />
Dell maintained a github repository with the firmware, but abandoned it now that the firmware is on LVFS. The current version is available as {{ic|0x075B_secure.bin}} (or 0x082A for newer model, see instructions below) inside the [http://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverId=4FC9M Windows package]. This can be extracted with {{Pkg|p7zip}}.<br />
<br />
Here is a short list of steps to update the Thunderbolt-Firmware on linux 4.13+ (use at your own risk):<br />
<br />
* Force enable the thunderbolt controller (or plug in a device to enable it)<br />
# echo 1 | sudo tee /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power <br />
* Check your model ID. If it's 0x082A, use the 0x082A firmware instead of the 0x075B one.<br />
# cat /sys/bus/thunderbolt/devices/0-0/device<br />
* Flash the 9360 firmware from the thunderbolt-nvm-linux repository to a non active NVME memory spot<br />
# dd if=payloads/0x075B.bin of=/sys/bus/thunderbolt/devices/0-0/nvm_non_active0/nvmem<br />
* Trigger the update process<br />
# echo 1 > /sys/bus/thunderbolt/devices/0-0/nvm_authenticate<br />
* At this point, your screen should flickr a couple of time. Verify that the update is done by checking that authenticate returns 0<br />
# cat /sys/bus/thunderbolt/devices/0-0/nvm_authenticate<br />
* Verify the new nvme version (it should return 26.1)<br />
# cat /sys/bus/thunderbolt/devices/0-0/nvm_version<br />
* Put the controller back in normal mode<br />
# echo 0 | sudo tee /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power<br />
<br />
== SATA controller ==<br />
When the SATA-controller is set to {{ic|RAID On}} in Bios, the SSD is not recognized. Set to {{ic|AHCI}} before attempting to install Arch.<br />
<br />
== Touchpad ==<br />
The touchpad has no explicit buttons. The buttons are built into the pads surface. There is a small line printed on the pad separating left from right click button. The pad has a '''middle button''' built in! (works with libinput without any configuration): To issue a middle click, simply press on the middle area right between the virtual left and click buttons - so on the small printed separator line.<br />
<br />
=== Remove psmouse errors from dmesg ===<br />
<br />
If {{ic|<nowiki>dmesg | grep -i psmouse</nowiki>}} returns an error, but your touchpad still works, then it might be a good idea to disable {{ic|psmouse}}. First create a config file:<br />
<br />
# nano /etc/modprobe.d/modprobe.conf<br />
<br />
blacklist psmouse<br />
<br />
Then add this file to {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
...<br />
FILES=(/etc/modprobe.d/modprobe.conf)<br />
...<br />
<br />
Rebuild your initial ramdisk image (see [[Mkinitcpio#Image creation and activation]]).<br />
<br />
== Touchscreen ==<br />
The touchscreen works without additional configuration. The bug resulting in a disabled touchscreen after resume was fixed with kernel 4.8.5.<br />
<br />
=== Gestures ===<br />
Refer to [[libinput#Gestures]] for information about the current development state and available methods.<br />
<br />
=== Scrolling in Firefox ===<br />
See [[Firefox/Tweaks#Pixel-perfect trackpad scrolling]]. This enables both touchscreen scrolling and high-res trackpad scrolling.<br />
<br />
== Keyboard Backlight ==<br />
By default, the keyboard backlight turns off after 10 seconds of inactivity. Some users might find this too short and annoying.<br />
The delay can be increased (or decreased) by editing this file:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout<br />
<br />
You can also change the brightness (0-2) by editing the following file. This is identical to pressing F10 on your keyboard:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness<br />
<br />
== Hidden Keyboard Keys ==<br />
There are additional Fn+<Key> (sequences) that are not marked at all on the keyboard but underlying hardware generates them anyway. Here they are (if you find more add them to the table below):<br />
{| class="wikitable"<br />
|+ Hidden Fn Keys<br />
! Fn+<Key> !! Resulting key (sequence)<br />
|-<br />
| Fn+Ins || XF86Sleep<br />
|-<br />
| Fn+Super_L || Super_R<br />
|-<br />
| Fn+B || Pause<br />
|-<br />
| Fn+R || Print<br />
|-<br />
| Fn+S || Scroll_Lock<br />
|-<br />
| Fn+A / D / E / F / G / T / Q / W || XF86Launch3<br />
|}<br />
<br />
=== Unobtrusive mode ===<br />
If enabled in BIOS, pressing Fn+F7 will disable sound, keyboard and screen backlight, the charging LED and the LED on the power button. Unfortunately there seems to be no way to disable just the LEDs- some users recommend black electrical tape.<br />
The output of `smbios-token-ctl -d` only list changes related to screen, keyboard and sound when unobtrusive mode is active.<br />
<br />
== Firmware Updates ==<br />
Dell provides firmware updates via {{Pkg|fwupd}}. See [[Flashing BIOS from Linux#fwupd]]. Please note if you have used a bind mount partition for /boot, you will not be able to use the fwupd utility; Instead format a USB as FAT32 and put the bios update .exe on. Reboot into the one-time-boot menu and update the BIOS flash through there.<br />
<br />
Alternatively, the BIOS update can be downloaded from the [http://www.dell.com/support/home/us/en/04/Drivers/DriversDetails?driverId=GVNVJ Dell website], and placed in a location accessible to the firmware. This could be the '/boot' folder, or a FAT32 formatted USB stick. Then restart your laptop and hit F12 while starting. In the boot menu choose firmware update and select the new file!<br />
<br />
== Troubleshooting ==<br />
<br />
=== EFISTUB does not boot ===<br />
The BIOS does not pass any boot parameters to the kernel. Use a UEFI [[boot loader]] instead.<br />
<br />
=== Not waking from suspend ===<br />
Update the BIOS to 1.0.7 to patch this issue.<br />
<br />
=== Power Drain after waking from standby ===<br />
<br />
Some users recognised ~2W more power consumption after waking up from standby. Go to the UEFI Firmware Settings (tap the F2 key when the Dell logo appears) and uncheck the 'Enable Thunderbolt Boot Support'. You may use {{Pkg|powertop}} or {{AUR|powerstat-git}} to reproduce and check this behaviour yourself. <br />
<br />
=== Popping sound on headphones/external speakers ===<br />
<br />
Power saving being enabled on the audio chip will cause the hissing and popping to appear. <br />
<br />
Have a look at [[ALSA troubleshooting#Pops when starting and stopping playback]] and [[ALSA troubleshooting#Popping sound after resuming from suspension]].<br />
<br />
If you are using {{Pkg|tlp}}, it will activate power saving by default when on battery. Edit {{ic|/etc/default/tlp}} and disable it.<br />
<br />
=== Crackling sound with screen changes ===<br />
<br />
Some users experienced a weird crackling, white noise sound when the display is changing its contents after waking the computer from S3 sleep.. <br />
<br />
This issue should be patched as of the 4.14.15 kernel. <br />
<br />
If you're still encountering this issue, try manually applying this patch[https://lkml.org/lkml/2018/1/22/169]. Adding the kernel parameter {{ic|1=i915 enable_guc=1}} as described in [[Intel graphics]] might also help, however multiple people have reported that this does not fix the problem completely.<br />
<br />
=== Coil Whine ===<br />
<br />
Unfortunately Dell still did not fix this issue and the sound for my model was very loud. The issue seems to be connected to the graphic card. For some users, it is possible to reduce it a lot by activating frame buffer compression "enable_fbc=1" [[Intel graphics#Framebuffer compression (enable_fbc)]]. The coil whine will then start again under heavy graphic load. For the touchscreen model, this may be very often, due to the high resolution screen. In a similar vein, the display can be run at a lower resolution, again reducing the load on the graphics card.<br />
<br />
=== Freezing after waking from suspend ===<br />
<br />
Installing {{aur|xf86-video-intel-git}} is [https://bbs.archlinux.org/viewtopic.php?pid=1698282#p1698282 reported] to fix this.<br />
<br />
=== Continuous hissing sound with headphones ===<br />
<br />
Open alsamixer and set "Headphone Mic Boost" gain to 10 dB (See discussion on [https://www.reddit.com/r/Dell/comments/4j1zz4/headphones_have_static_noise_with_ubuntu_1604_on/ reddit]). Note that this does reduce the volume slightly.<br />
<br />
You may also run the equivalent command:<br />
<br />
$ amixer -c PCH cset 'name=Headphone Mic Boost Volume' 1<br />
<br />
PulseAudio will rewrite these ALSA settings. So if you use PulseAudio you should change its config to make them permanent:<br />
<br />
{{hc|/usr/share/pulseaudio/alsa-mixer/paths/analog-input-headphone-mic.conf|<nowiki><br />
[Element Headphone Mic Boost]<br />
required-any = any<br />
switch = select<br />
# Replace "volume = merge" by:<br />
volume = 1<br />
override-map.1 = all<br />
override-map.2 = all-left,all-right<br />
</nowiki>}}<br />
<br />
{{hc|/usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf|<nowiki><br />
[Element Headphone Mic Boost]<br />
switch = off<br />
# Replace "volume = off" by:<br />
volume = 1<br />
</nowiki>}}<br />
<br />
== Fingerprint sensor ==<br />
<br />
Dell officially does not support fingerprint reader functionality [http://en.community.dell.com/techcenter/os-applications/f/4613/t/20006668], however an effort on reverse engineering the protocol of Validity 138a:0090, 138a:0094, 138a:0097 fingerprint readers can be found at github [https://github.com/nmikhailov/Validity90].<br />
<br />
== See Also == <br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=217865 Arch Forum thread for Dell XPS 13 (9360)]<br />
* [http://topics-cdn.dell.com/pdf/xps-13-9360-laptop_service%20manual2_en-us.pdf Service Manual for Dell XPS 13 (9360)]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=User:Bepvte&diff=520223User:Bepvte2018-05-04T13:43:01Z<p>Bepvte: Created page with "hey!"</p>
<hr />
<div>hey!</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Dell_XPS_13_(9360)&diff=520222Dell XPS 13 (9360)2018-05-04T13:39:47Z<p>Bepvte: /* Module-based Powersaving Options */ Adds some more</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:Dell XPS 13 (9360)]]<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 (mousedev)<br />
|-<br />
| Webcam || {{G|Working}} || uvcvideo<br />
|-<br />
| USB-C / Thunderbolt 3 || {{G|Working}} || ?<br />
|-<br />
| Wireless switch || {{G|Working}} || intel_hid<br />
|-<br />
| Function/Multimedia Keys || {{G|Working}} || ?<br />
|-<br />
| Fingerprint sensor || {{R|Not working}} || ?<br />
|}<br />
<br />
The Dell XPS 13 Late 2016 (9360) is the fourth-generation model of the XPS 13 line. The laptop is available since October (pre-2017 model) in both a standard edition with Windows installed as well as both a pre-2017 model and a 2017 model (with insignificant hardware differences) Developer Edition with Ubuntu 16.04 "SP1" installed, featuring kernel 4.8 as of now. There is only minor hardware differences between them, mostly in regards to the mainboard microchip manufacturers. Just like the older versions ([[Dell XPS 13 (9333)|9333]], [[Dell XPS 13 (9343)|9343]] and [[Dell XPS 13 (9350)|9350]]) it is available in different hardware configurations as well. These fourth gen models includes Intel's Kaby Lake CPUs and advertised with up to 16GB LPDDR 1866 MHz RAM and a 1TB PCI SSD. It will now also be available in Rose Gold. Prior to previous information and current specifications available provided by Dell (at least to regular customers), it is not available with the 2133 MHz RAM speed. However, some models, including those available to employees and possibly Dell partners (and/or business customers), memory speed is indeed available up to 2133 Mhz LPDDR3 (non-upgradable). The same mentioned models are also available with the Intel Core i7-7660U (aswell as i7-7560U) with the Intel 640 Iris Plus onboard graphics. Respective clock frequencies are 2.5 Ghz (up to 4GHz in Turbo-mode) and 2,4 Ghz (up to 3.8 Ghz), respectively.<br />
<br />
The installation process for Arch on the XPS 13 does not differ from any other PC. 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 />
As of kernel 4.5, the Intel Kaby Lake architecture is supported.<br />
<br />
<br />
== Content Adaptive Brightness Control ==<br />
In the XPS 13 the display panels (both FHD and QHD+) come with Content Adaptive Brightness Control (usually referred to as CABC or DBC) embedded in the panel firmware - it adjusts the screen brightness depending on the content displayed on the screen. While it saves a bit of power, it is generally undesirable, especially for Linux users who are likely to be switching between dark and light screen content. Dell has issued a fix for this, however it is only available to run in Windows. The fix is available [http://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverId=312K3&lwp=rt directly from Dell].<br />
<br />
== NVM Express SSD Power Saving ==<br />
<br />
For some devices it might be necessary to set a higher value for the {{ic|nvme_core.default_ps_max_latency_us}} parameter to enable all power saving states. This parameter has to be set on the [[kernel command line]].<br />
<br />
For the Toshiba 512GB SSD used in some models of the XPS 13 the value to enable all states is 170000 (the combined latency of entering and leaving the highest power state, add {{ic|<nowiki>nvme_core.default_ps_max_latency_us=170000</nowiki>}} to your kernel command line). For the 1TB SSD this valued should be increased to 180000 instead. To check if all states are enabled you can use the {{AUR|nvme-cli}} package, which provides the {{ic|nvme-cli}} command:<br />
<br />
# nvme get-feature -f 0x0c -H /dev/nvme0<br />
get-feature:0xc (Autonomous Power State Transition), Current value:0x000001<br />
Autonomous Power State Transition Enable (APSTE): Enabled<br />
Auto PST Entries .................<br />
Entry[ 0] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 1] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 2] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 3] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 8500 ms<br />
Idle Transition Power State (ITPS): 4<br />
.................<br />
<br />
If the power states are enabled there should be values for ITPT and ITPS in the first entries. Also the ITPS-value of the last filled entry should be the highest power saving-state of the SSD (which can be viewed using {{ic|smartctl -a /dev/nvme0}} or {{ic|nvme id-ctrl /dev/nvme0}}).<br />
<br />
== Video ==<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 QHD+ (3200x1800) model, also check out [[HiDPI]] for UI scaling configurations.<br />
<br />
''But there might be video issues left for this model. '''Please help by contributing any feedback''' about similar issues you might have experience(d) to this bugreport (https://bugs.freedesktop.org/show_bug.cgi?id=100671).''<br />
<br />
=== Module-based Powersaving Options ===<br />
For the HD 620 graphics card the following modules are working: (see [[Intel graphics#Module-based Powersaving Options]])<br />
modeset=1 enable_rc6=1 enable_fbc=1 <br />
The first argument is to enable modesetting if it's not set by default. The second argument is needed to activate power-saving C-States. Higher values than 1 are not available for kaby lake CPUs. The third argument is for frame buffer compression power savings. These values should work well!<br />
<br />
enable_guc_loading=1 enable_guc_submission=1<br />
These arguments are used to enable GuC updates. GuC is a small proprietary binary blob released by intel to update the GuC binary in faster intervals than the kernel release does. It is used for graphics workload scheduling on the various graphics parallel engines. More details at (https://01.org/linuxgraphics/downloads/firmware). The GuC binary for kaby lake is included since firmware release linux-firmware 20170217 in the official repository. HuC is also a binary blob from intel. It's designed to offload some of the media functions from the CPU to GPU. As of kernel 4.12, HuC is loaded if GuC is enabled. One can check with 'cat /sys/kernel/debug/dri/0/i915_huc_load_status' and 'cat /sys/kernel/debug/dri/0/i915_guc_load_status'.<br />
<br />
enable_psr=1<br />
Panel Self Refresh (PSR) is working for eDP 1.3 and up and does stop the creation of new frames when the screen content is static to save energy. If you experience problems with PSR try to set 'disable_power_well=0' or disable otherwise. <br />
{{Tip|If you use {{ic|1=enable_psr=1}} may need to add the {{ic|modconf}} hook to your [[Mkinitcpio#HOOKS|Mkinitcpio]] to avoid a hang after resume. The {{AUR|xf86-video-intel-git}} package was required to solve the bug for me as well, even though I was using Wayland.}}<br />
<br />
NOT WORKING: semaphores=1 <br />
The semaphore option is NOT working for kaby lake CPUs and won't enable even if you set the option to 1.<br />
<br />
=== Blank screen issue after booting ===<br />
If using "late start" [[KMS]] (the default) and the screen goes blank when loading modules, it may help to add {{ic|i915}} and {{ic|intel_agp}} to the initramfs or using a special [[kernel parameter]]. Consult [[Intel graphics#Blank screen during boot, when "Loading modules"]] for more information about the kernel parameter way and have a look at [[Kernel mode setting#Early KMS start]] for a guide on how to setup the modules for the initramfs.<br />
<br />
== Wireless ==<br />
<br />
The Killer 1535 Wirless Adapter is functional and the ath10k firmware is included in recent linux kernel versions. The connection speed reported by iw is limited to 1-6Mbits/s. However this is just the output being wrong. The real connection speed is not limited to this value.<br />
<br />
[http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19998908?pi41127=3 Some users are experiencing issues], where the connection is dropped under heavy load but reconnects within a brief moment. This might not be noticed during browsing at all but becomes apparent in online games. There is [http://en.community.dell.com/techcenter/os-applications/f/4613/p/20002634/20994007#20994007 a firmware update proposed by DELL] to fix the issue, but it might not fix all the issues. In at least one case the new firmware did not fix the connection loss / low connection speed problem. Signs of this problem seems to be two kinds of messages in dmesg:<br />
<br />
{{bc|<nowiki><br />
pcieport 0000:00:1c.4: AER: Corrected error received: id=00e4<br />
pcieport 0000:00:1c.4: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=00e4(Transmitter ID)<br />
pcieport 0000:00:1c.4: device [8086:9d14] error status/mask=00001000/00002000<br />
pcieport 0000:00:1c.4: [12] Replay Timer Timeout <br />
</nowiki>}}<br />
<br />
And also:<br />
{{bc|<br />
CPU: 3 PID: 1410 Comm: irq/133-ath10k_ Not tainted <br />
Hardware name: Dell Inc. XPS 13 9360/0839Y6, BIOS 2.1.0 08/02/2017<br />
Call Trace:<br />
<IRQ><br />
dump_stack+0x63/0x82<br />
__warn+0xcb/0xf0<br />
warn_slowpath_null+0x1d/0x20<br />
net_rx_action+0x274/0x3a0<br />
? irq_finalize_oneshot.part.35+0xe0/0xe0<br />
}}<br />
<br />
<br />
As of February 2018, Dell support suggests to update the firmware of the network adapter in the following way:<br />
<br />
# Confirm that you have QCA6174 checking the output of {{ic|sudo lspci | grep –i qca6174}}<br />
# [https://codeload.github.com/kvalo/ath10k-firmware/zip/master Download] the latest firmware and extract the contents from [https://github.com/kvalo/ath10k-firmware git]<br />
# Substitute the {{ic|QCA6174}} folder in {{ic|/lib/firmware/ath10k/}} with the one downloaded<br />
# Inside the new folder, rename {{ic|firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1}} to {{ic|firmware-4.bin}}<br />
# Reboot and test the new Killer Wi-Fi firmware<br />
<br />
Update: Internet connection dropped even with the firmware from the above fix. Using the newer firmware {{ic|firmware-6.bin_WLAN.RM.4.4.1-00102-QCARMSWP-1}} by downloading that file from https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/4.4.1.c1/firmware-6.bin_RM.4.4.1.c1-00042-QCARMSWP-1, copying it to {{ic|/usr/lib/firmware/ath10k/QCA6174/hw3.0/}} and renaming it to {{ic|firmware-6.bin}} fixes this.<br />
Reboot and verify that this newer firmware is used by verifying that {{ic|<nowiki>dmesg | grep ath</nowiki>}} outputs:<br />
{{bc|<nowiki><br />
ath10k_pci 0000:3a:00.0: firmware ver RM.4.4.1.c1-00042-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 40fb7bdd<br />
</nowiki>}}<br />
<br />
== Bluetooth ==<br />
<br />
After following the instructions given at [[Bluetooth]] tethering of internet connections via phone works immediately.<br />
<br />
<br />
== Thunderbolt 3 / USB 3.1 ==<br />
<br />
The USB-C port supports Thunderbolt 3, Displayport-over-USB-C and USB power delivery as well as USB 3.1.<br />
<br />
=== Ethernet repeatedly disconnects/reconnects with Dell USB-C adapter (DA200) ===<br />
<br />
Use of a power management package (such as [[TLP]]) may cause the ethernet adapter to repeatedly disconnect and reconnect. If this happens, disable/blacklist USB autosuspend for the ethernet adapter. (On my laptop, this is the device <tt>Bus 004 Device 007: ID 0bda:8153 Realtek Semiconductor Corp</tt> in the output of <tt>lsusb</tt>.)<br />
<br />
Also disabling or reducing power of wifi may help: http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19995423<br />
<br />
=== USB-C Compatibility Chart ===<br />
{{Note|''A comprehensive and up to date list of USB type C adapters and hubs is present in the [[Talk:Dell_XPS_13_(9360)#USB-C_Compatibility_Chart|discussion]] page.''}}<br />
<br />
=== Thunderbolt Firmware updates ===<br />
The thunderbolt controller in the laptop has an embedded firmware. The laptop ships with firmware version NVM 18, and the most recent available version from Dell's website is NVM 21. If encountering compatibility problems with Thunderbolt accessories (such as the DA-200), the firmware may need to be updated. If you have fwupd (see: [[#Firmware Updates]]) set up then you should receive this update automatically. Otherwise, you can install it manually as follows.<br />
<br />
Dell maintains a [https://github.com/dell/thunderbolt-nvm-linux Github repository] explaining the process to update the firmware which also provides the updated payload files. If the provided payload does not work, try {{ic|0x075B_secure.bin}} inside the [http://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverId=MHTHF Windows package]. This can be extracted with {{Pkg|p7zip}}.<br />
<br />
Here is a short list of steps to update the Thunderbolt-Firmware on linux 4.13+ (use at your own risk):<br />
<br />
* Install {{Pkg|libsmbios}} and {{Pkg|efivar}}<br />
* Clone [https://github.com/dell/thunderbolt-nvm-linux dell Thunderbolt Force Tool]<br />
* Build the Dell Force tool <br />
# gcc -o force_dell_tbt force_dell_tbt.c -I /usr/include/efivar/ -lsmbios_c -lefivar<br />
* Force the controller to accept updates<br />
# ./force_dell_tbt 1<br />
* Flash the 9360 firmware from the thunderbolt-nvm-linux repository to a non active NVME memory spot<br />
# dd if=payloads/0x075B.bin of=/sys/bus/thunderbolt/devices/0-0/nvm_non_active0/nvmem<br />
* Trigger the update process<br />
# echo 1 > /sys/bus/thunderbolt/devices/0-0/nvm_authenticate<br />
* At this point, your screen should flickr a couple of time. Verify that the update is done by checking that authenticate returns 0<br />
# cat /sys/bus/thunderbolt/devices/0-0/nvm_authenticate<br />
* Verify the new nvme version (it should return 21.0)<br />
# cat /sys/bus/thunderbolt/devices/0-0/nvm_version<br />
* Put the controller back in normal mode<br />
# ./force_dell_tbt 0<br />
<br />
== SATA controller ==<br />
When the SATA-controller is set to {{ic|RAID On}} in Bios, the SSD is not recognized. Set to {{ic|AHCI}} before attempting to install Arch.<br />
<br />
== Touchpad ==<br />
The touchpad has no explicit buttons. The buttons are built into the pads surface. There is a small line printed on the pad separating left from right click button. The pad has a '''middle button''' built in! (works with libinput without any configuration): To issue a middle click, simply press on the middle area right between the virtual left and click buttons - so on the small printed separator line.<br />
<br />
=== Remove psmouse errors from dmesg ===<br />
<br />
If {{ic|<nowiki>dmesg | grep -i psmouse</nowiki>}} returns an error, but your touchpad still works, then it might be a good idea to disable {{ic|psmouse}}. First create a config file:<br />
<br />
# nano /etc/modprobe.d/modprobe.conf<br />
<br />
blacklist psmouse<br />
<br />
Then add this file to {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
...<br />
FILES=(/etc/modprobe.d/modprobe.conf)<br />
...<br />
<br />
Rebuild your initial ramdisk image (see [[Mkinitcpio#Image creation and activation]]).<br />
<br />
== Touchscreen ==<br />
The touchscreen works without additional configuration. The bug resulting in a disabled touchscreen after resume was fixed with kernel 4.8.5.<br />
<br />
=== Gestures ===<br />
Refer to [[libinput#Gestures]] for information about the current development state and available methods.<br />
<br />
=== Scrolling in Firefox ===<br />
See [[Firefox/Tweaks#Pixel-perfect trackpad scrolling]]. This enables both touchscreen scrolling and high-res trackpad scrolling.<br />
<br />
== Keyboard Backlight ==<br />
By default, the keyboard backlight turns off after 10 seconds of inactivity. Some users might find this too short and annoying.<br />
The delay can be increased (or decreased) by editing this file:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout<br />
<br />
You can also change the brightness (0-2) by editing the following file. This is identical to pressing F10 on your keyboard:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness<br />
<br />
== Hidden Keyboard Keys ==<br />
There are additional Fn+<Key> (sequences) that are not marked at all on the keyboard but underlying hardware generates them anyway. Here they are (if you find more add them to the table below):<br />
{| class="wikitable"<br />
|+ Hidden Fn Keys<br />
! Fn+<Key> !! Resulting key (sequence)<br />
|-<br />
| Fn+Ins || XF86Sleep<br />
|-<br />
| Fn+Super_L || Super_R<br />
|-<br />
| Fn+B || Pause<br />
|-<br />
| Fn+R || Print<br />
|-<br />
| Fn+S || Scroll_Lock<br />
|-<br />
| Fn+A / D / E / F / G / T / Q / W || XF86Launch3<br />
|}<br />
<br />
=== Unobtrusive mode ===<br />
If enabled in BIOS, pressing Fn+F7 will disable sound, keyboard and screen backlight, the charging LED and the LED on the power button. Unfortunately there seems to be no way to disable just the LEDs- some users recommend black electrical tape.<br />
The output of `smbios-token-ctl -d` only list changes related to screen, keyboard and sound when unobtrusive mode is active.<br />
<br />
== Firmware Updates ==<br />
Dell provides firmware updates via {{Pkg|fwupd}}. See [[Flashing BIOS from Linux#fwupd]]. Please note if you have used a bind mount partition for /boot, you will not be able to use the fwupd utility; Instead format a USB as FAT32 and put the bios update .exe on. Reboot into the one-time-boot menu and update the BIOS flash through there.<br />
<br />
Alternatively, the BIOS update can be downloaded from the [http://www.dell.com/support/home/us/en/04/Drivers/DriversDetails?driverId=GVNVJ Dell website], and placed in a location accessible to the firmware. This could be the '/boot' folder, or a FAT32 formatted USB stick. Then restart your laptop and hit F12 while starting. In the boot menu choose firmware update and select the new file!<br />
<br />
== Troubleshooting ==<br />
<br />
=== EFISTUB does not boot ===<br />
The BIOS does not pass any boot parameters to the kernel. Use a UEFI [[boot loader]] instead.<br />
<br />
=== Not waking from suspend ===<br />
Update the BIOS to 1.0.7 to patch this issue.<br />
<br />
=== Power Drain after waking from standby ===<br />
<br />
Some users recognised ~2W more power consumption after waking up from standby. Go to the UEFI Firmware Settings (tap the F2 key when the Dell logo appears) and uncheck the 'Enable Thunderbolt Boot Support'. You may use {{Pkg|powertop}} or {{AUR|powerstat-git}} to reproduce and check this behaviour yourself. <br />
<br />
=== Popping sound on headphones/external speakers ===<br />
<br />
Power saving being enabled on the audio chip will cause the hissing and popping to appear. <br />
<br />
Have a look at [[ALSA/Troubleshooting#Pops when starting and stopping playback]] and [[ALSA/Troubleshooting#Popping sound after resuming from suspension]].<br />
<br />
If you are using {{Pkg|tlp}}, it will activate power saving by default when on battery. Edit {{ic|/etc/default/tlp}} and disable it.<br />
<br />
=== Crackling sound with screen changes ===<br />
<br />
Some users experienced a weird crackling, white noise sound when the display is changing its contents after waking the computer from S3 sleep.. <br />
<br />
This issue should be patched as of the 4.14.15 kernel. <br />
<br />
If you're still encountering this issue, try manually applying this patch[https://lkml.org/lkml/2018/1/22/169]. Adding the kernel parameter {{ic|1=i915.enable_guc_loading=1}} as described in [[Intel graphics]] might also help, however multiple people have reported that this does not fix the problem completely.<br />
<br />
=== Coil Whine ===<br />
<br />
Unfortunately Dell still did not fix this issue and the sound for my model was very loud. The issue seems to be connected to the graphic card. For some users, it is possible to reduce it a lot by activating frame buffer compression "enable_fbc=1" [[Intel graphics#Module-based Powersaving Options]]. The coil whine will then start again under heavy graphic load. For the touchscreen model, this may be very often, due to the high resolution screen. In a similar vein, the display can be run at a lower resolution, again reducing the load on the graphics card.<br />
<br />
=== Freezing after waking from suspend ===<br />
<br />
Installing {{aur|xf86-video-intel-git}} is [https://bbs.archlinux.org/viewtopic.php?pid=1698282#p1698282 reported] to fix this.<br />
<br />
=== Continuous hissing sound with headphones ===<br />
<br />
Open alsamixer and set "Headphone Mic Boost" gain to 10 dB (See discussion on [https://www.reddit.com/r/Dell/comments/4j1zz4/headphones_have_static_noise_with_ubuntu_1604_on/ reddit]). Note that this does reduce the volume slightly.<br />
<br />
You may also run the equivalent command:<br />
<br />
$ amixer -c PCH cset 'name=Headphone Mic Boost Volume' 1<br />
<br />
PulseAudio will rewrite these ALSA settings. So if you use PulseAudio you should change its config to make them permanent:<br />
<br />
{{hc|/usr/share/pulseaudio/alsa-mixer/paths/analog-input-headphone-mic.conf|<nowiki><br />
[Element Headphone Mic Boost]<br />
required-any = any<br />
switch = select<br />
# Replace "volume = merge" by:<br />
volume = 1<br />
override-map.1 = all<br />
override-map.2 = all-left,all-right<br />
</nowiki>}}<br />
<br />
{{hc|/usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf|<nowiki><br />
[Element Headphone Mic Boost]<br />
switch = off<br />
# Replace "volume = off" by:<br />
volume = 1<br />
</nowiki>}}<br />
<br />
== Fingerprint sensor ==<br />
<br />
Dell officially does not support fingerprint reader functionality [http://en.community.dell.com/techcenter/os-applications/f/4613/t/20006668], however an effort on reverse engineering the protocol of Validity 138a:0090, 138a:0094, 138a:0097 fingerprint readers can be found at github [https://github.com/nmikhailov/Validity90].<br />
<br />
== See Also == <br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=217865 Arch Forum thread for Dell XPS 13 (9360)]<br />
* [http://topics-cdn.dell.com/pdf/xps-13-9360-laptop_service%20manual2_en-us.pdf Service Manual for Dell XPS 13 (9360)]</div>Bepvtehttps://wiki.archlinux.org/index.php?title=Dell_XPS_13_(9360)&diff=520221Dell XPS 13 (9360)2018-05-04T13:29:58Z<p>Bepvte: Updated to newer firmware because last one gave me kernel panics</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:Dell XPS 13 (9360)]]<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 (mousedev)<br />
|-<br />
| Webcam || {{G|Working}} || uvcvideo<br />
|-<br />
| USB-C / Thunderbolt 3 || {{G|Working}} || ?<br />
|-<br />
| Wireless switch || {{G|Working}} || intel_hid<br />
|-<br />
| Function/Multimedia Keys || {{G|Working}} || ?<br />
|-<br />
| Fingerprint sensor || {{R|Not working}} || ?<br />
|}<br />
<br />
The Dell XPS 13 Late 2016 (9360) is the fourth-generation model of the XPS 13 line. The laptop is available since October (pre-2017 model) in both a standard edition with Windows installed as well as both a pre-2017 model and a 2017 model (with insignificant hardware differences) Developer Edition with Ubuntu 16.04 "SP1" installed, featuring kernel 4.8 as of now. There is only minor hardware differences between them, mostly in regards to the mainboard microchip manufacturers. Just like the older versions ([[Dell XPS 13 (9333)|9333]], [[Dell XPS 13 (9343)|9343]] and [[Dell XPS 13 (9350)|9350]]) it is available in different hardware configurations as well. These fourth gen models includes Intel's Kaby Lake CPUs and advertised with up to 16GB LPDDR 1866 MHz RAM and a 1TB PCI SSD. It will now also be available in Rose Gold. Prior to previous information and current specifications available provided by Dell (at least to regular customers), it is not available with the 2133 MHz RAM speed. However, some models, including those available to employees and possibly Dell partners (and/or business customers), memory speed is indeed available up to 2133 Mhz LPDDR3 (non-upgradable). The same mentioned models are also available with the Intel Core i7-7660U (aswell as i7-7560U) with the Intel 640 Iris Plus onboard graphics. Respective clock frequencies are 2.5 Ghz (up to 4GHz in Turbo-mode) and 2,4 Ghz (up to 3.8 Ghz), respectively.<br />
<br />
The installation process for Arch on the XPS 13 does not differ from any other PC. 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 />
As of kernel 4.5, the Intel Kaby Lake architecture is supported.<br />
<br />
<br />
== Content Adaptive Brightness Control ==<br />
In the XPS 13 the display panels (both FHD and QHD+) come with Content Adaptive Brightness Control (usually referred to as CABC or DBC) embedded in the panel firmware - it adjusts the screen brightness depending on the content displayed on the screen. While it saves a bit of power, it is generally undesirable, especially for Linux users who are likely to be switching between dark and light screen content. Dell has issued a fix for this, however it is only available to run in Windows. The fix is available [http://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverId=312K3&lwp=rt directly from Dell].<br />
<br />
== NVM Express SSD Power Saving ==<br />
<br />
For some devices it might be necessary to set a higher value for the {{ic|nvme_core.default_ps_max_latency_us}} parameter to enable all power saving states. This parameter has to be set on the [[kernel command line]].<br />
<br />
For the Toshiba 512GB SSD used in some models of the XPS 13 the value to enable all states is 170000 (the combined latency of entering and leaving the highest power state, add {{ic|<nowiki>nvme_core.default_ps_max_latency_us=170000</nowiki>}} to your kernel command line). For the 1TB SSD this valued should be increased to 180000 instead. To check if all states are enabled you can use the {{AUR|nvme-cli}} package, which provides the {{ic|nvme-cli}} command:<br />
<br />
# nvme get-feature -f 0x0c -H /dev/nvme0<br />
get-feature:0xc (Autonomous Power State Transition), Current value:0x000001<br />
Autonomous Power State Transition Enable (APSTE): Enabled<br />
Auto PST Entries .................<br />
Entry[ 0] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 1] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 2] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 1500 ms<br />
Idle Transition Power State (ITPS): 3<br />
.................<br />
Entry[ 3] <br />
.................<br />
Idle Time Prior to Transition (ITPT): 8500 ms<br />
Idle Transition Power State (ITPS): 4<br />
.................<br />
<br />
If the power states are enabled there should be values for ITPT and ITPS in the first entries. Also the ITPS-value of the last filled entry should be the highest power saving-state of the SSD (which can be viewed using {{ic|smartctl -a /dev/nvme0}} or {{ic|nvme id-ctrl /dev/nvme0}}).<br />
<br />
== Video ==<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 QHD+ (3200x1800) model, also check out [[HiDPI]] for UI scaling configurations.<br />
<br />
''But there might be video issues left for this model. '''Please help by contributing any feedback''' about similar issues you might have experience(d) to this bugreport (https://bugs.freedesktop.org/show_bug.cgi?id=100671).''<br />
<br />
=== Module-based Powersaving Options ===<br />
For the HD 620 graphics card the following modules are working: (see [[Intel graphics#Module-based Powersaving Options]])<br />
modeset=1 enable_rc6=1 enable_fbc=1 <br />
The first argument is to enable modesetting if it's not set by default. The second argument is needed to activate power-saving C-States. Higher values than 1 are not available for kaby lake CPUs. The third argument is for frame buffer compression power savings. These values should work well!<br />
<br />
enable_guc_loading=1 enable_guc_submission=1<br />
These arguments are used to enable GuC updates. GuC is a small proprietary binary blob released by intel to update the GuC binary in faster intervals than the kernel release does. It is used for graphics workload scheduling on the various graphics parallel engines. More details at (https://01.org/linuxgraphics/downloads/firmware). The GuC binary for kaby lake is included since firmware release linux-firmware 20170217 in the official repository. HuC is also a binary blob from intel. It's designed to offload some of the media functions from the CPU to GPU. As of kernel 4.12, HuC is loaded if GuC is enabled. One can check with 'cat /sys/kernel/debug/dri/0/i915_huc_load_status' and 'cat /sys/kernel/debug/dri/0/i915_guc_load_status'.<br />
<br />
enable_psr=1<br />
Panel Self Refresh (PSR) is working for eDP 1.3 and up and does stop the creation of new frames when the screen content is static to save energy. If you experience problems with PSR try to set 'disable_power_well=0' or disable otherwise. <br />
<br />
NOT WORKING: semaphores=1 <br />
The semaphore option is NOT working for kaby lake CPUs and won't enable even if you set the option to 1.<br />
<br />
=== Blank screen issue after booting ===<br />
If using "late start" [[KMS]] (the default) and the screen goes blank when loading modules, it may help to add {{ic|i915}} and {{ic|intel_agp}} to the initramfs or using a special [[kernel parameter]]. Consult [[Intel graphics#Blank screen during boot, when "Loading modules"]] for more information about the kernel parameter way and have a look at [[Kernel mode setting#Early KMS start]] for a guide on how to setup the modules for the initramfs.<br />
<br />
== Wireless ==<br />
<br />
The Killer 1535 Wirless Adapter is functional and the ath10k firmware is included in recent linux kernel versions. The connection speed reported by iw is limited to 1-6Mbits/s. However this is just the output being wrong. The real connection speed is not limited to this value.<br />
<br />
[http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19998908?pi41127=3 Some users are experiencing issues], where the connection is dropped under heavy load but reconnects within a brief moment. This might not be noticed during browsing at all but becomes apparent in online games. There is [http://en.community.dell.com/techcenter/os-applications/f/4613/p/20002634/20994007#20994007 a firmware update proposed by DELL] to fix the issue, but it might not fix all the issues. In at least one case the new firmware did not fix the connection loss / low connection speed problem. Signs of this problem seems to be two kinds of messages in dmesg:<br />
<br />
{{bc|<nowiki><br />
pcieport 0000:00:1c.4: AER: Corrected error received: id=00e4<br />
pcieport 0000:00:1c.4: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=00e4(Transmitter ID)<br />
pcieport 0000:00:1c.4: device [8086:9d14] error status/mask=00001000/00002000<br />
pcieport 0000:00:1c.4: [12] Replay Timer Timeout <br />
</nowiki>}}<br />
<br />
And also:<br />
{{bc|<br />
CPU: 3 PID: 1410 Comm: irq/133-ath10k_ Not tainted <br />
Hardware name: Dell Inc. XPS 13 9360/0839Y6, BIOS 2.1.0 08/02/2017<br />
Call Trace:<br />
<IRQ><br />
dump_stack+0x63/0x82<br />
__warn+0xcb/0xf0<br />
warn_slowpath_null+0x1d/0x20<br />
net_rx_action+0x274/0x3a0<br />
? irq_finalize_oneshot.part.35+0xe0/0xe0<br />
}}<br />
<br />
<br />
As of February 2018, Dell support suggests to update the firmware of the network adapter in the following way:<br />
<br />
# Confirm that you have QCA6174 checking the output of {{ic|sudo lspci | grep –i qca6174}}<br />
# [https://codeload.github.com/kvalo/ath10k-firmware/zip/master Download] the latest firmware and extract the contents from [https://github.com/kvalo/ath10k-firmware git]<br />
# Substitute the {{ic|QCA6174}} folder in {{ic|/lib/firmware/ath10k/}} with the one downloaded<br />
# Inside the new folder, rename {{ic|firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1}} to {{ic|firmware-4.bin}}<br />
# Reboot and test the new Killer Wi-Fi firmware<br />
<br />
Update: Internet connection dropped even with the firmware from the above fix. Using the newer firmware {{ic|firmware-6.bin_WLAN.RM.4.4.1-00102-QCARMSWP-1}} by downloading that file from https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/4.4.1.c1/firmware-6.bin_RM.4.4.1.c1-00042-QCARMSWP-1, copying it to {{ic|/usr/lib/firmware/ath10k/QCA6174/hw3.0/}} and renaming it to {{ic|firmware-6.bin}} fixes this.<br />
Reboot and verify that this newer firmware is used by verifying that {{ic|<nowiki>dmesg | grep ath</nowiki>}} outputs:<br />
{{bc|<nowiki><br />
ath10k_pci 0000:3a:00.0: firmware ver RM.4.4.1.c1-00042-QCARMSWP-1 api 6 features wowlan,ignore-otp crc32 40fb7bdd<br />
</nowiki>}}<br />
<br />
== Bluetooth ==<br />
<br />
After following the instructions given at [[Bluetooth]] tethering of internet connections via phone works immediately.<br />
<br />
<br />
== Thunderbolt 3 / USB 3.1 ==<br />
<br />
The USB-C port supports Thunderbolt 3, Displayport-over-USB-C and USB power delivery as well as USB 3.1.<br />
<br />
=== Ethernet repeatedly disconnects/reconnects with Dell USB-C adapter (DA200) ===<br />
<br />
Use of a power management package (such as [[TLP]]) may cause the ethernet adapter to repeatedly disconnect and reconnect. If this happens, disable/blacklist USB autosuspend for the ethernet adapter. (On my laptop, this is the device <tt>Bus 004 Device 007: ID 0bda:8153 Realtek Semiconductor Corp</tt> in the output of <tt>lsusb</tt>.)<br />
<br />
Also disabling or reducing power of wifi may help: http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19995423<br />
<br />
=== USB-C Compatibility Chart ===<br />
{{Note|''A comprehensive and up to date list of USB type C adapters and hubs is present in the [[Talk:Dell_XPS_13_(9360)#USB-C_Compatibility_Chart|discussion]] page.''}}<br />
<br />
=== Thunderbolt Firmware updates ===<br />
The thunderbolt controller in the laptop has an embedded firmware. The laptop ships with firmware version NVM 18, and the most recent available version from Dell's website is NVM 21. If encountering compatibility problems with Thunderbolt accessories (such as the DA-200), the firmware may need to be updated. If you have fwupd (see: [[#Firmware Updates]]) set up then you should receive this update automatically. Otherwise, you can install it manually as follows.<br />
<br />
Dell maintains a [https://github.com/dell/thunderbolt-nvm-linux Github repository] explaining the process to update the firmware which also provides the updated payload files. If the provided payload does not work, try {{ic|0x075B_secure.bin}} inside the [http://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverId=MHTHF Windows package]. This can be extracted with {{Pkg|p7zip}}.<br />
<br />
Here is a short list of steps to update the Thunderbolt-Firmware on linux 4.13+ (use at your own risk):<br />
<br />
* Install {{Pkg|libsmbios}} and {{Pkg|efivar}}<br />
* Clone [https://github.com/dell/thunderbolt-nvm-linux dell Thunderbolt Force Tool]<br />
* Build the Dell Force tool <br />
# gcc -o force_dell_tbt force_dell_tbt.c -I /usr/include/efivar/ -lsmbios_c -lefivar<br />
* Force the controller to accept updates<br />
# ./force_dell_tbt 1<br />
* Flash the 9360 firmware from the thunderbolt-nvm-linux repository to a non active NVME memory spot<br />
# dd if=payloads/0x075B.bin of=/sys/bus/thunderbolt/devices/0-0/nvm_non_active0/nvmem<br />
* Trigger the update process<br />
# echo 1 > /sys/bus/thunderbolt/devices/0-0/nvm_authenticate<br />
* At this point, your screen should flickr a couple of time. Verify that the update is done by checking that authenticate returns 0<br />
# cat /sys/bus/thunderbolt/devices/0-0/nvm_authenticate<br />
* Verify the new nvme version (it should return 21.0)<br />
# cat /sys/bus/thunderbolt/devices/0-0/nvm_version<br />
* Put the controller back in normal mode<br />
# ./force_dell_tbt 0<br />
<br />
== SATA controller ==<br />
When the SATA-controller is set to {{ic|RAID On}} in Bios, the SSD is not recognized. Set to {{ic|AHCI}} before attempting to install Arch.<br />
<br />
== Touchpad ==<br />
The touchpad has no explicit buttons. The buttons are built into the pads surface. There is a small line printed on the pad separating left from right click button. The pad has a '''middle button''' built in! (works with libinput without any configuration): To issue a middle click, simply press on the middle area right between the virtual left and click buttons - so on the small printed separator line.<br />
<br />
=== Remove psmouse errors from dmesg ===<br />
<br />
If {{ic|<nowiki>dmesg | grep -i psmouse</nowiki>}} returns an error, but your touchpad still works, then it might be a good idea to disable {{ic|psmouse}}. First create a config file:<br />
<br />
# nano /etc/modprobe.d/modprobe.conf<br />
<br />
blacklist psmouse<br />
<br />
Then add this file to {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
...<br />
FILES=(/etc/modprobe.d/modprobe.conf)<br />
...<br />
<br />
Rebuild your initial ramdisk image (see [[Mkinitcpio#Image creation and activation]]).<br />
<br />
== Touchscreen ==<br />
The touchscreen works without additional configuration. The bug resulting in a disabled touchscreen after resume was fixed with kernel 4.8.5.<br />
<br />
=== Gestures ===<br />
Refer to [[libinput#Gestures]] for information about the current development state and available methods.<br />
<br />
=== Scrolling in Firefox ===<br />
See [[Firefox/Tweaks#Pixel-perfect trackpad scrolling]]. This enables both touchscreen scrolling and high-res trackpad scrolling.<br />
<br />
== Keyboard Backlight ==<br />
By default, the keyboard backlight turns off after 10 seconds of inactivity. Some users might find this too short and annoying.<br />
The delay can be increased (or decreased) by editing this file:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout<br />
<br />
You can also change the brightness (0-2) by editing the following file. This is identical to pressing F10 on your keyboard:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness<br />
<br />
== Hidden Keyboard Keys ==<br />
There are additional Fn+<Key> (sequences) that are not marked at all on the keyboard but underlying hardware generates them anyway. Here they are (if you find more add them to the table below):<br />
{| class="wikitable"<br />
|+ Hidden Fn Keys<br />
! Fn+<Key> !! Resulting key (sequence)<br />
|-<br />
| Fn+Ins || XF86Sleep<br />
|-<br />
| Fn+Super_L || Super_R<br />
|-<br />
| Fn+B || Pause<br />
|-<br />
| Fn+R || Print<br />
|-<br />
| Fn+S || Scroll_Lock<br />
|-<br />
| Fn+A / D / E / F / G / T / Q / W || XF86Launch3<br />
|}<br />
<br />
=== Unobtrusive mode ===<br />
If enabled in BIOS, pressing Fn+F7 will disable sound, keyboard and screen backlight, the charging LED and the LED on the power button. Unfortunately there seems to be no way to disable just the LEDs- some users recommend black electrical tape.<br />
The output of `smbios-token-ctl -d` only list changes related to screen, keyboard and sound when unobtrusive mode is active.<br />
<br />
== Firmware Updates ==<br />
Dell provides firmware updates via {{Pkg|fwupd}}. See [[Flashing BIOS from Linux#fwupd]]. Please note if you have used a bind mount partition for /boot, you will not be able to use the fwupd utility; Instead format a USB as FAT32 and put the bios update .exe on. Reboot into the one-time-boot menu and update the BIOS flash through there.<br />
<br />
Alternatively, the BIOS update can be downloaded from the [http://www.dell.com/support/home/us/en/04/Drivers/DriversDetails?driverId=GVNVJ Dell website], and placed in a location accessible to the firmware. This could be the '/boot' folder, or a FAT32 formatted USB stick. Then restart your laptop and hit F12 while starting. In the boot menu choose firmware update and select the new file!<br />
<br />
== Troubleshooting ==<br />
<br />
=== EFISTUB does not boot ===<br />
The BIOS does not pass any boot parameters to the kernel. Use a UEFI [[boot loader]] instead.<br />
<br />
=== Not waking from suspend ===<br />
Update the BIOS to 1.0.7 to patch this issue.<br />
<br />
=== Power Drain after waking from standby ===<br />
<br />
Some users recognised ~2W more power consumption after waking up from standby. Go to the UEFI Firmware Settings (tap the F2 key when the Dell logo appears) and uncheck the 'Enable Thunderbolt Boot Support'. You may use {{Pkg|powertop}} or {{AUR|powerstat-git}} to reproduce and check this behaviour yourself. <br />
<br />
=== Popping sound on headphones/external speakers ===<br />
<br />
Power saving being enabled on the audio chip will cause the hissing and popping to appear. <br />
<br />
Have a look at [[ALSA/Troubleshooting#Pops when starting and stopping playback]] and [[ALSA/Troubleshooting#Popping sound after resuming from suspension]].<br />
<br />
If you are using {{Pkg|tlp}}, it will activate power saving by default when on battery. Edit {{ic|/etc/default/tlp}} and disable it.<br />
<br />
=== Crackling sound with screen changes ===<br />
<br />
Some users experienced a weird crackling, white noise sound when the display is changing its contents after waking the computer from S3 sleep.. <br />
<br />
This issue should be patched as of the 4.14.15 kernel. <br />
<br />
If you're still encountering this issue, try manually applying this patch[https://lkml.org/lkml/2018/1/22/169]. Adding the kernel parameter {{ic|1=i915.enable_guc_loading=1}} as described in [[Intel graphics]] might also help, however multiple people have reported that this does not fix the problem completely.<br />
<br />
=== Coil Whine ===<br />
<br />
Unfortunately Dell still did not fix this issue and the sound for my model was very loud. The issue seems to be connected to the graphic card. For some users, it is possible to reduce it a lot by activating frame buffer compression "enable_fbc=1" [[Intel graphics#Module-based Powersaving Options]]. The coil whine will then start again under heavy graphic load. For the touchscreen model, this may be very often, due to the high resolution screen. In a similar vein, the display can be run at a lower resolution, again reducing the load on the graphics card.<br />
<br />
=== Freezing after waking from suspend ===<br />
<br />
Installing {{aur|xf86-video-intel-git}} is [https://bbs.archlinux.org/viewtopic.php?pid=1698282#p1698282 reported] to fix this.<br />
<br />
=== Continuous hissing sound with headphones ===<br />
<br />
Open alsamixer and set "Headphone Mic Boost" gain to 10 dB (See discussion on [https://www.reddit.com/r/Dell/comments/4j1zz4/headphones_have_static_noise_with_ubuntu_1604_on/ reddit]). Note that this does reduce the volume slightly.<br />
<br />
You may also run the equivalent command:<br />
<br />
$ amixer -c PCH cset 'name=Headphone Mic Boost Volume' 1<br />
<br />
PulseAudio will rewrite these ALSA settings. So if you use PulseAudio you should change its config to make them permanent:<br />
<br />
{{hc|/usr/share/pulseaudio/alsa-mixer/paths/analog-input-headphone-mic.conf|<nowiki><br />
[Element Headphone Mic Boost]<br />
required-any = any<br />
switch = select<br />
# Replace "volume = merge" by:<br />
volume = 1<br />
override-map.1 = all<br />
override-map.2 = all-left,all-right<br />
</nowiki>}}<br />
<br />
{{hc|/usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf|<nowiki><br />
[Element Headphone Mic Boost]<br />
switch = off<br />
# Replace "volume = off" by:<br />
volume = 1<br />
</nowiki>}}<br />
<br />
== Fingerprint sensor ==<br />
<br />
Dell officially does not support fingerprint reader functionality [http://en.community.dell.com/techcenter/os-applications/f/4613/t/20006668], however an effort on reverse engineering the protocol of Validity 138a:0090, 138a:0094, 138a:0097 fingerprint readers can be found at github [https://github.com/nmikhailov/Validity90].<br />
<br />
== See Also == <br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=217865 Arch Forum thread for Dell XPS 13 (9360)]<br />
* [http://topics-cdn.dell.com/pdf/xps-13-9360-laptop_service%20manual2_en-us.pdf Service Manual for Dell XPS 13 (9360)]</div>Bepvte