https://wiki.archlinux.org/api.php?action=feedcontributions&user=AgustinD&feedformat=atomArchWiki - User contributions [en]2024-03-29T14:30:42ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=GNOME&diff=398420GNOME2015-09-05T19:28:38Z<p>AgustinD: /* Tear-free video with Intel HD Graphics */ Added a working, efficient solution for tearing problems in Sandy Bridge+ Intel graphics. The (removed) CLUTTER_PAINT hack doesn't work at all in my machine.</p>
<hr />
<div>[[Category:GNOME]]<br />
[[cs:GNOME]]<br />
[[de:GNOME]]<br />
[[es:GNOME]]<br />
[[fr:GNOME]]<br />
[[it:GNOME]]<br />
[[ja:GNOME]]<br />
[[nl:GNOME]]<br />
[[pl:GNOME]]<br />
[[pt:GNOME]]<br />
[[ru:GNOME]]<br />
[[sr:GNOME]]<br />
[[th:GNOME]]<br />
[[tr:Gnome Masaüstü Ortamı]]<br />
[[uk:GNOME]]<br />
[[zh-CN:GNOME]]<br />
[[zh-TW:GNOME]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|GTK+}}<br />
{{Related|GDM}}<br />
{{Related|GNOME Files}}<br />
{{Related|Gedit}}<br />
{{Related|GNOME Web}}<br />
{{Related|Evolution}}<br />
{{Related|GNOME Flashback}}<br />
{{Related|GNOME Keyring}}<br />
{{Related|Cinnamon}}<br />
{{Related|MATE}}<br />
{{Related articles end}}<br />
<br />
GNOME (pronounced ''gah-nohm'' or ''nohm'') is a [[desktop environment]] that aims to be simple and easy to use. It is designed by [[Wikipedia:The GNOME Project|The GNOME Project]] and is composed entirely of free and open-source software. GNOME is a part of the [[Wikipedia:GNU Project|GNU Project]].<br />
<br />
== Installation ==<br />
<br />
Two groups are available:<br />
<br />
* {{Grp|gnome}} contains the base GNOME desktop and a subset of well-integrated [https://wiki.gnome.org/Apps applications];<br />
* {{Grp|gnome-extra}} contains further GNOME applications, including an archive manager, disk manager, [[Gedit|text editor]], and a set of games. Note that this group builds on the {{Grp|gnome}} group.<br />
<br />
The base desktop consists of [[Wikipedia:GNOME_Shell|GNOME Shell]], a plugin for the [[Wikipedia:Mutter_(software)|Mutter]] window manager. It can be installed separately with {{Pkg|gnome-shell}}.<br />
<br />
{{Note|''mutter'' acts as a composite manager for the desktop, employing hardware graphics acceleration to provide effects aimed at reducing screen clutter. The GNOME session manager automatically detects if your video driver is capable of running GNOME Shell and if not, falls back to software rendering using ''llvmpipe''.}} <br />
<br />
=== Additional packages ===<br />
<br />
These packages are not in the above mentioned groups:<br />
<br />
* {{App|[[Wikipedia:GNOME Boxes|Boxes]]|A simple user interface to access [[libvirt]] virtual machines.|https://wiki.gnome.org/Apps/Boxes|{{Pkg|gnome-boxes}}}}<br />
* {{App|GNOME Initial Setup|A simple, easy, and safe way to prepare a new system.|https://github.com/GNOME/gnome-initial-setup|{{Pkg|gnome-initial-setup}}}}<br />
* {{App|GNOME PackageKit|Collection of graphical tools for PackageKit to be used in the GNOME desktop.|https://github.com/GNOME/gnome-packagekit|{{Pkg|gnome-packagekit}}}}<br />
* {{App|[[Wikipedia:Nemiver|Nemiver]]|A C/C++ debugger.|https://wiki.gnome.org/Apps/Nemiver|{{Pkg|nemiver}}}}<br />
* {{App|[[Wikipedia:GNOME Software|Software]]|Lets you install and update applications and system extensions.|https://wiki.gnome.org/Apps/Software/|{{Pkg|gnome-software}}}}<br />
<br />
== GNOME Sessions ==<br />
<br />
GNOME has three available sessions, all using GNOME Shell.<br />
<br />
*'''GNOME''' is the default, innovative layout.<br />
*'''GNOME Classic''' is a traditional desktop layout with a similar interface to GNOME 2, using pre-activated extensions and parameters. [http://worldofgnome.org/welcome-to-gnome-3-8-flintstones-mode/] Hence it is more a customized GNOME Shell than a truly distinct mode.<br />
*'''GNOME on Wayland''' runs GNOME Shell using the new Wayland protocol. Traditional X applications are run through Xwayland.<br />
<br />
=== Custom GNOME sessions ===<br />
<br />
It is possible to create custom GNOME sessions which use the GNOME session manager but start different sets of components ([[Openbox]] with [[tint2]] instead of GNOME Shell for example).<br />
<br />
Two files are required for a custom GNOME session: a session file in {{ic|/usr/share/gnome-session/sessions/}} which defines the components to be started and a [[desktop entry]] in {{ic|/usr/share/xsessions}} which is read by the [[display manager]]. An example session file is provided below:<br />
{{hc|/usr/share/gnome-session/sessions/gnome-openbox.session|<nowiki><br />
[GNOME Session]<br />
Name=GNOME Openbox<br />
RequiredComponents=openbox;tint2;gnome-settings-daemon;<br />
</nowiki>}}<br />
<br />
And an example desktop file:<br />
{{hc|/usr/share/xsessions/gnome-openbox.desktop|<nowiki><br />
[Desktop Entry]<br />
Name=GNOME Openbox<br />
Exec=gnome-session --session=gnome-openbox<br />
</nowiki>}}<br />
<br />
{{Note|GNOME Session calls upon the {{ic|.desktop}} files of each of the components to be started. If a component you wish to start does not provide a {{ic|.desktop}} file, you must create a suitable desktop entry in a directory such as {{ic|/usr/local/share/applications}}.}}<br />
<br />
== Starting GNOME ==<br />
<br />
GNOME can be started either graphically, using a [[display manager]], or manually from the console. For optimal desktop integration, using [[GDM]] (the GNOME Display manager) is recommended. Note that [[enabling]] a display manager (such as GDM) means that Xorg will run with root rights. <br />
<br />
{{Note|Support for screen locking in GNOME is provided by GDM. If GNOME is not started using GDM, you will have to use another screen locker to provide this functionality - see [[List of applications/Security#Screen lockers]].}}<br />
<br />
=== Graphically ===<br />
<br />
Select the session: ''GNOME'', ''GNOME Classic'' or ''GNOME on Wayland'' from the display manager's session menu.<br />
<br />
=== Manually ===<br />
<br />
* For the standard GNOME session, add to the {{ic|~/.xinitrc}} file: {{ic|exec gnome-session}}.<br />
* For the GNOME Classic session, add to the {{ic|~/.xinitrc}} file: {{ic|exec env GNOME_SHELL_SESSION_MODE&#61;classic gnome-session --session gnome-classic}}.<br />
<br />
After editing the {{ic|~/.xinitrc}} file, GNOME can be launched with the {{ic|startx}} command (see [[xinitrc]] for additional details, such as preserving the logind session). After setting up the {{ic|~/.xinitrc}} file it can also be arranged to [[Start X at login]].<br />
<br />
{{Note|GNOME on Wayland requires the {{Pkg|xorg-server-xwayland}} package, and '''cannot''' be started using ''startx'' and {{ic|~/.xinitrc}}. Instead, run {{ic|gnome-session --session&#61;gnome-wayland}}. For more information, see [[Wayland]].}}<br />
<br />
=== GNOME applications in Wayland ===<br />
<br />
Currently, by default, GNOME applications will be run as traditional X applications through Xwayland. To test GNOME applications with Wayland, use the command line to run the application and prefix the command with {{ic|env GDK_BACKEND&#61;wayland <command>}}.<br />
<br />
{{Note|Setting a global Wayland environment, by running {{ic|env GDK_BACKEND&#61;wayland gnome-session --session&#61;gnome-wayland}}, currently does not work - ''gnome-session'' will exit immediately.}}<br />
<br />
See the following page for the status of [https://wiki.gnome.org/Initiatives/Wayland/Applications/ GNOME Applications under Wayland].<br />
<br />
== Navigation ==<br />
<br />
To learn how to use the GNOME shell effectively read the [https://wiki.gnome.org/Projects/GnomeShell/CheatSheet GNOME Shell Cheat Sheet]; it highlights GNOME shell features and keyboard shortcuts. Features include task switching, keyboard use, window control, the panel, overview mode, and more. A few of the shortcuts are:<br />
<br />
* {{ic|Super}} + {{ic|m}}: show message tray<br />
* {{ic|Super}} + {{ic|a}}: show applications menu<br />
* {{ic|Alt-}} + {{ic|Tab}}: cycle active applications <br />
* {{ic|Alt-}} + {{ic|`}} (the key above {{ic|Tab}} on US keyboard layouts): cycle windows of the application in the foreground <br />
* {{ic|Alt}} + {{ic|F2}}, then enter {{ic|r}} or {{ic|restart}}: restart the shell in case of graphical shell problems. <br />
<br />
=== Legacy names ===<br />
<br />
{{Note|<br />
Some GNOME programs have undergone name changes where the application's name in documentation and about dialogs has been changed but the executable name has not. A few such applications are listed in the table below.}}<br />
<br />
{{Tip|Searching for the legacy name of an application in the Shell search bar will successfully return the application in question. For instance, searching for ''nautilus'' will return ''Files''.}}<br />
<br />
{| class="wikitable"<br />
! Current<br />
! Legacy<br />
|-<br />
| [[Files]]<br />
| Nautilus<br />
|-<br />
| [[GNOME Web|Web]]<br />
| Epiphany<br />
|-<br />
| Videos<br />
| Totem<br />
|-<br />
| Main Menu<br />
| Alacarte<br />
|-<br />
| Document Viewer<br />
| Evince<br />
|-<br />
| Disk Usage Analyser<br />
| Baobab<br />
|-<br />
| Image Viewer<br />
| EoG (Eye of GNOME)<br />
|-<br />
| [[GNOME Keyring|Passwords and Keys]]<br />
| Seahorse<br />
|}<br />
<br />
== Configuration ==<br />
<br />
The GNOME desktop relies on a configuration database backend (DConf) to store system and application settings. The desktop comes with default configuration settings, installed applications add their own to the database. The basic configuration is done either via the GNOME System Settings panel (''gnome-control-center'') or the preferences of the individual applications. A direct configuration of the DConf database is always possible as well and performed with the ''gsettings'' command line tool. In particular it can be used to configure settings which are not exposed via the user interface.<br />
<br />
GNOME settings are then applied by the GNOME Settings Daemon. Note that the daemon can be run outside of a GNOME session in order to apply GNOME configuration in a non-GNOME environment. Execute {{ic|nohup /usr/lib/gnome-settings-daemon/gnome-settings-daemon > /dev/null &}} to do so.<br />
<br />
The configuration is usually performed per user and the rest of this section does not cover how to create configuration templates for a multi-user-system. <br />
<br />
=== System settings ===<br />
<br />
Control panel settings of note.<br />
<br />
==== Color ====<br />
<br />
The daemon {{ic|colord}} reads the display's EDID and extracts the appropriate color profile. Most color profiles are accurate and no setup is required; however for those that are not accurate, or for older dislplays, color profiles can be put in {{ic|~/.local/share/icc/}} and directed to.<br />
<br />
==== Date & time ====<br />
<br />
If the system has a configured [[Network Time Protocol daemon]], it will be effective for GNOME as well. The synchronization can be set to manual control from the menu, if required. <br />
<br />
To show the date in the top bar, execute:<br />
<br />
$ gsettings set org.gnome.desktop.interface clock-show-date true<br />
<br />
Additionally, to show week numbers in the Shell calendar, execute:<br />
$ gsettings set org.gnome.shell.calendar show-weekdate true<br />
<br />
==== Default applications ==== <br />
<br />
Upon installing GNOME for the first time, you may find that the wrong applications are handling certain protocols. For example, ''totem'' opens videos instead of a previously used [[VLC]]. Some of the associations can be set from system settings via: ''System'' > ''Details'' > ''Default applications''. <br />
<br />
For other protocols and methods see [[Default applications]] for configuration. <br />
<br />
==== Mouse and touchpad ====<br />
<br />
To help reduce touchpad interference you may wish to implement the settings below:<br />
<br />
* Disable touchpad while typing<br />
* Disable scrolling<br />
* Disable tap-to-click<br />
<br />
==== Network ====<br />
<br />
[[NetworkManager]] is the native tool of the GNOME project to control network settings from the shell. It is installed by default as a dependency for {{Pkg|tracker}} package, which is a part of {{Grp|gnome}} group, and just needs to be [[NetworkManager#Enable NetworkManager|enabled]].<br />
<br />
While any other [[List_of_applications/Internet#Network_managers|network manager]] can be used as well, NetworkManager provides the full integration via the shell network settings and a status indicator applet {{Pkg|network-manager-applet}} (not required for GNOME).<br />
<br />
==== Online accounts ====<br />
<br />
Backends for the GNOME messaging application {{Pkg|empathy}} as well as the GNOME Online Accounts section of the System Settings panel are provided in a separate group: {{Grp|telepathy}}. See [[#Unable to add accounts in Empathy and GNOME Online Accounts]].<br />
<br />
==== Search ====<br />
<br />
The GNOME shell has a search that can be quickly accessed by pressing the {{ic|Super}} key and starting to type. The {{Pkg|tracker}} package is installed by default as a part of {{Grp|gnome}} group and provides an indexing application and metadata database. It can be configured with the ''Search and Indexing'' menu item; monitor status with ''tracker-control''. It is started automatically by ''gnome-session'' when the user logs in. Indexing can be started manually with {{ic|tracker-control -s}}. Search settings can also be configured in the ''System Settings'' panel.<br />
<br />
The Tracker database can be queried using the ''tracker-sparql'' command. View its manual page {{ic|man tracker-sparql}} for more information.<br />
<br />
=== Advanced settings ===<br />
<br />
As noted above, many configuration options such as changing the [[GTK+]] theme or the [[window manager]] theme are not exposed in the GNOME System Settings panel (''gnome-control-center''). Those users that want to configure these settings may wish to use the GNOME Tweak Tool ({{Pkg|gnome-tweak-tool}}), a convenient graphical tool which exposes many of these settings. <br />
<br />
GNOME settings (which are stored in the DConf database) can also be configured using the [https://developer.gnome.org/dconf/unstable/dconf-editor.html ''dconf-editor''] (a graphical DConf configuration tool) or the [https://developer.gnome.org/gio/stable/GSettings.html ''gsettings''] command line tool. The GNOME Tweak Tool does not do anything else in the background of the GUI; note though that you will not find all settings described in the following sections in it. <br />
<br />
==== Appearance ====<br />
<br />
===== GTK+ themes and icon themes =====<br />
<br />
To install a new theme or icon set, add the relevant {{ic|~/.local/share/themes}} or {{ic|~/.local/share/icons}} respectively (add to {{ic|/usr/share/}} instead of {{ic|~/.local/share/}} for the themes to be available systemwide.) They and other GUI settings can also be defined in {{ic|~/.config/gtk-3.0/settings.ini}}:<br />
<br />
{{hc|~/.config/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-theme-name = Adwaita<br />
# next option is applicable only if selected theme supports it<br />
gtk-application-prefer-dark-theme = true<br />
# set font name and dimension<br />
gtk-font-name = Sans 10<br />
</nowiki>}}<br />
<br />
Additional theme locations:<br />
* [http://www.deviantart.com/browse/all/customization/skins/linuxutil/desktopenv/gnome/gtk3/ DeviantArt].<br />
* [http://gnome-look.org/index.php?xcontentmode=167 gnome-look.org].<br />
* [https://aur.archlinux.org/packages.php?O=0&K=gtk3&do_Search=Go GTK3 themes in the AUR].<br />
* [https://aur.archlinux.org/packages.php?O=0&K=xcursor&do_Search=Go&PP=50&SB=v&SO=d Cursor themes in the AUR].<br />
* [https://aur.archlinux.org/packages.php?O=0&K=icon-theme&do_Search=Go&PP=50&SB=v&SO=d Icon themes in the AUR].<br />
<br />
Once installed, they can be selected using the GNOME Tweak Tool or GSettings - see below for GSettings commands:<br />
<br />
For the GTK+ theme:<br />
$ gsettings set org.gnome.desktop.interface gtk-theme ''theme-name''<br />
<br />
For the icon theme<br />
$ gsettings set org.gnome.desktop.interface icon-theme ''theme-name''<br />
<br />
====== Global dark theme ======<br />
<br />
GNOME will use the Adwaita light theme by default however a dark variant of this theme (called the Global Dark Theme) also exists and can be selected using the Tweak Tool. Some applications such as Image Viewer (''eog'') use the dark theme by default. It should be noted that the Global Dark Theme only works with GTK+ 3 applications; some GTK+ 3 applications may only have partial support for the Global Dark theme. Qt and GTK+ 2 support for the Global Dark Theme may be added in the future.<br />
<br />
===== Window manager themes =====<br />
<br />
The window manager theme (the style of the window titlebars) can be set using the GNOME Tweak Tool or the following GSettings command:<br />
$ gsettings set org.gnome.desktop.wm.preferences theme ''theme-name''<br />
<br />
====== Titlebar height ======<br />
<br />
{{Note|As of GNOME 3.16, Mutter no longer uses Metacity themes. Instead, the titlebar decorations are themed using GTK+.}}<br />
<br />
To change the titlebar height, create the following file, adjusting the padding as desired:<br />
<br />
{{hc|~/.config/gtk-3.0/gtk.css|<br />
.header-bar.default-decoration {<br />
padding-top: 3px;<br />
padding-bottom: 3px;<br />
}<br />
<br />
.header-bar.default-decoration .button.titlebutton {<br />
padding-top: 2px;<br />
padding-bottom: 2px;<br />
}<br />
}}<br />
<br />
The titlebar height can also be reduced by selecting a smaller font. By default, the font is set to Cantarell Bold 11. You may wish to set the font to something smaller such as Sans Bold 10. You can do so using the following GSettings command:<br />
$ gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Sans Bold 10'<br />
<br />
====== Titlebar button order ======<br />
<br />
To set the order for the GNOME window manager (Mutter, Metacity): <br />
$ gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'<br />
<br />
{{Tip|The colon indicates which side of the titlebar the window buttons will appear.}}<br />
<br />
====== Hide titlebar when maximized ======<br />
<br />
*[[Install]] {{AUR|mutter-hide-legacy-decorations}}. It changes a default setting in the window manager, so as to automatically hide the titlebar on legacy (non-headerbar) apps when they are maximized or tiled to the side.<br />
<br />
*[[Install]] {{AUR|maximus}}. To start the application, execute ''maximus'' from a terminal. When running, the daemon will automatically maximize windows. It will undecorate maximized windows and redecorate them when they are unmaximized. If you do not want all windows to start maximized, run {{ic|maximus -m}} instead. Note that this will only work with windows decorated by the window manager; applications that use client-side decoration such as [[GNOME Files]] will not be undecorated when maximized.<br />
<br />
===== GNOME Shell themes =====<br />
<br />
The theme of GNOME Shell itself is configurable. To use a Shell theme, firstly ensure that you have the {{Pkg|gnome-shell-extensions}} package installed. Then enable the ''User Themes'' extension, either through GNOME Tweak Tool or through the [https://extensions.gnome.org GNOME Shell Extensions] webpage. Shell themes can then be loaded and selected using the GNOME Tweak Tool.<br />
<br />
There are a number of GNOME Shell themes available [https://aur.archlinux.org/packages.php?O=0&K=gnome-shell-theme&do_Search=Go&PP=50&SB=v&SO=d in the AUR].<br />
<br />
Shell themes can also be downloaded from [http://gnome-look.org/index.php?xcontentmode=191 gnome-look.org].<br />
<br />
==== Desktop ====<br />
<br />
Various Desktop settings can be applied.<br />
<br />
===== Icons on the Desktop =====<br />
<br />
See [[GNOME Files#Desktop Icons]].<br />
<br />
===== Lock screen and background =====<br />
<br />
When setting the Desktop or Lock screen background, it is important to note that the Pictures tab will only display pictures located in {{ic|/home/''username''/Pictures}} folder. If you wish to use a picture not located in this folder, use the commands indicated below.<br />
<br />
For the desktop background:<br />
$ gsettings set org.gnome.desktop.background picture-uri 'file:///path/to/my/picture.jpg'<br />
<br />
For the lock screen background<br />
$ gsettings set org.gnome.desktop.screensaver picture-uri 'file:///path/to/my/picture.jpg'<br />
<br />
==== Extensions ====<br />
<br />
{{Note|The GNOME Shell browser plugin which allows users to install extensions from [https://extensions.gnome.org extensions.gnome.org] is not compatible with Chrome/Chromium versions 35 and over. Users wishing to install extensions from the webpage will have to use a compatible browser such as [[Firefox]] or [[GNOME Web]].}}<br />
<br />
GNOME Shell can be customized with extensions per user or system-wide. <br />
<br />
The catalogue of extensions is available at [https://extensions.gnome.org extensions.gnome.org]. By a user they can be installed and activated in the browser by setting the switch in the top left of the screen to '''ON''' and clicking '''Install''' on the resulting dialog (if the extension in question is not installed). After installation it is shown in the [https://extensions.gnome.org/local/ extensions.gnome.org/local/] tab, which has to be visited as well to check for available updates. Installed extensions can also be enabled or disabled using {{Pkg|gnome-tweak-tool}}. <br />
<br />
More information about GNOME shell extensions is available on the [https://extensions.gnome.org/about/ GNOME Shell Extensions about page].<br />
<br />
[[Installing]] extensions via a package makes them available for all users of the system and automates the update process. <br />
<br />
The {{Pkg|gnome-shell-extensions}} package provides a set of extensions maintained as part of the GNOME project (many of the included extensions are used by the GNOME Classic session). <br />
<br />
Users who want a taskbar but do not wish to use the GNOME Classic session may want to enable the ''Window list'' extension (provided by the {{Pkg|gnome-shell-extensions}} package).<br />
<br />
==== Input methods ====<br />
<br />
Gnome has integrated support for input methods through [[IBus]], only {{Pkg|ibus}} and the wanted input method engine (e.g. {{Pkg|ibus-libpinyin}} for Intelligent Pinyin) needed to be installed, after installation the input method engine can be added as a keyboard layout in Gnome's Regional & Language Settings.<br />
<br />
==== Fonts ====<br />
<br />
{{Tip|If you set the ''Scaling factor'' to a value above 1.00, the Accessibility menu will be automatically enabled.}}<br />
<br />
Fonts can be set for Window titles, Interface (applications), Documents and Monospace. See the Fonts tab in the Tweak Tool for the relevant options.<br />
<br />
For hinting, RGBA will likely be desired as this fits most monitors types, and if fonts appear too blocked reduce hinting to ''Slight'' or ''None''.<br />
<br />
==== Startup applications ====<br />
<br />
To start certain applications on login, copy the relevant {{ic|.desktop}} file from {{ic|/usr/share/applications/}} to {{ic|~/.config/autostart/}}.<br />
<br />
The same effect can be achieved using the Tweak Tool.<br />
<br />
{{Tip|If the plus sign button in the Tweak Tool's Startup Applications section is unresponsive, try start the Tweak Tool from the terminal using the following command: {{ic|gnome-tweak-tool}}. See the following [https://bbs.archlinux.org/viewtopic.php?pid&#61;1413631#p1413631 forum thread].}}<br />
<br />
{{Note|The ''gnome-session-properties'' dialog was removed as of GNOME 3.12. It can be added back by [[install]]ing the {{AUR|gnome-session-properties}} package.}}<br />
<br />
==== Power ====<br />
<br />
The basic power settings that may want to be altered (these settings assume the user is using a laptop):<br />
<br />
$ gset_powr_path=org.gnome.settings-daemon.plugins.power<br />
$ gsettings set $gset_powr_path button-power hibernate<br />
$ gsettings set $gset_powr_path sleep-inactive-ac-timeout 3600<br />
$ gsettings set $gset_powr_path sleep-inactive-ac-type hibernate<br />
$ gsettings set $gset_powr_path sleep-inactive-battery-timeout 1800<br />
$ gsettings set $gset_powr_path sleep-inactive-battery-type hibernate<br />
$ gsettings set org.gnome.desktop.lockdown disable-lock-screen true<br />
<br />
To keep a monitor active on lid close: <br />
<br />
$ gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing<br />
<br />
===== Prevent Suspend-To-RAM (S3) when closing the LID =====<br />
Not all important power settings are exposed in the Settings panel. Some general settings may be modified on the level of [[Power management#ACPI_events|Systemd]]. Therefore it is necessary to edit the file {{ic|/etc/systemd/logind.conf}}. Set the variable '''HandleLidSwitch''' on '''ignore''' to prevent Suspend on LID-CLOSE:<br />
<br />
{{hc|/etc/systemd/logind.conf|<br />
#HandleLidSwitch&#61;suspend<br />
HandleLidSwitch&#61;ignore}}<br />
<br />
Then, either reboot or restart the logind service:<br />
# systemctl restart systemd-logind<br />
<br />
===== Change critical battery level action =====<br />
<br />
The System Settings panel only allows the user to choose between ''Suspend'' or ''Hibernate''. To choose another option such as ''Do Nothing'' open the {{ic|dconf-editor}} and navigate to {{ic|org.gnome.settings-daemon.plugins.power}}. Edit the {{ic|"critical-battery-action"}} value to {{ic|"nothing"}}.<br />
<br />
==== Sort applications into application (app) folders ====<br />
<br />
{{Tip|The [https://github.com/prurigro/gnome-catgen gnome-catgen] ({{AUR|gnome-catgen-git}}) script allows you to manage folders through the creation of files in {{ic|~/.local/share/applications-categories}} named after each category and containing a list of the desktop files belonging to apps you'd like to have inside. Optionally, you can have it cycle through each app without a folder and input the desired category until you ctrl-c or run out of apps.}}<br />
<br />
In the '''dconf-editor''' navigate to {{ic|org.gnome.desktop.app-folders}} and set the value of {{ic|folder-children}} to an array of comma separated folder names:<br />
<br />
['Utilities', 'Sundry']<br />
<br />
Add applications using {{ic|gsettings}}:<br />
<br />
$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ apps "['alacarte.desktop', 'dconf-editor.desktop']"<br />
<br />
This adds the applications {{ic|alacarte.desktop}} and {{ic|dconf-editor.desktop}} to the Sundry folder. This will also create the folder {{ic|org.gnome.desktop.app-folders.folders.Sundry}}.<br />
<br />
To name the folder (if it has no name that appears at the top of the applications):<br />
<br />
$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ name "Sundry"<br />
<br />
Applications can also be sorted by their category (specified in their ''.desktop'' file):<br />
<br />
$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ categories "['Office']"<br />
<br />
If certain applications matching a category are not wanted in a certain folder, exclusions can be set:<br />
<br />
$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ excluded-apps "['libreoffice-draw.desktop']"<br />
<br />
For further information, refer to the [https://git.gnome.org/browse/gsettings-desktop-schemas/tree/schemas/org.gnome.desktop.app-folders.gschema.xml.in.in app-folders schema].<br />
<br />
== Tips and tricks ==<br />
<br />
Other GNOME system settings and tips. <br />
<br />
=== Keyboard ===<br />
<br />
==== Turn on NumLock on login ====<br />
<br />
Run the following command:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on<br />
<br />
==== Hotkey alternatives ====<br />
<br />
A lot of hotkeys can be changed via system settings menu. For example, to re-enable the show desktop keybinding: <br />
<br />
''System settings'' > ''Keyboard'' > ''Shortcuts'' > ''Navigation'' > ''Hide all normal windows''<br />
<br />
However, certain hotkeys cannot be changed directly via system settings. In order to change these keys, use ''dconf-editor''. An example of particular note is the hotkey {{ic|Alt-}} + {{ic|`}} (the key above {{ic|Tab}} on US keyboard layouts). In GNOME Shell it is pre-configured to cycle through windows of an application, however it is also a hotkey often used in the [[Emacs]] editor. It can be changed by opening ''dconf-editor'' and modifying the ''switch-group'' key found in {{ic|org.gnome.desktop.wm.keybindings}}.<br />
<br />
It is possible to manually change the keys via an application's so-called '''accel''' map file. Where it is to be found is up to the application: For instance, Thunar's is at {{ic|~/.config/Thunar/accels.scm}}, whereas Files's is located at {{ic|~/.config/nautilus/accels}} and {{ic|~/.gnome2/accels/nautilus}} on old release.<br />
<br />
The file should contain a list of possible hotkeys, each unchanged line commented out with a leading ";" that has to be removed for a change to become active.<br />
For example to replace the hotkey used by Files to move files to the trash folder, change the line:<br />
<br />
; (gtk_accel_path "<Actions>/DirViewActions/Trash" "<Primary>Delete")<br />
to this:<br />
<br />
(gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")<br />
<br />
The file is regenerated regularly so do not comment the file. The uncommented line will stay but every comment you add will be lost.<br />
<br />
==== Keyboard switch with command ====<br />
<br />
To have keyboard shortcut '''Alt''' + '''Shift''' switch keyboards:<br />
<br />
Open Gnome-Tweak-Tool (or Keyboard Settings, in GNOME 3.16) and set ''Typing'' > ''Modifiers-only input sources'' > ''select Alt-shift''. For more information see also the forum [https://bbs.archlinux.org/viewtopic.php?id=152127 thread].<br />
<br />
==== XkbOptions keyboard options ====<br />
<br />
Using the '''dconf-editor''', navigate to the key named {{ic|org.gnome.desktop.input-sources.xkb-options}} and add desired XkbOptions (e.g. ''caps:swapescape'') to the list.<br />
<br />
See {{ic|/usr/share/X11/xkb/rules/xorg}} for all XkbOptions and {{ic|/usr/share/X11/xkb/symbols/*}} for the respective descriptions.<br />
<br />
{{Note|To enable the {{ic|Ctrl+Alt+Backspace}} combination to terminate Xorg, use the {{Pkg|gnome-tweak-tool}}. Within the '''Tweak Tool''', navigate to ''Typing > Key sequence to kill the X server'' and select the option {{ic|Ctrl+Alt+Backspace}} from the dropdown menu.}}<br />
<br />
==== De-bind Windows key ====<br />
<br />
By default, the 'Windows key' will open the GNOME Shell overview mode. You can unbind this key by running the command below<br />
<br />
$ gsettings set org.gnome.mutter overlay-key 'Foo'<br />
<br />
=== Disks ===<br />
<br />
GNOME provides a disk utility to manipulate storage drive settings. These are some of its features:<br />
<br />
* '''Enable write cache''' is a feature that most hard drives provide. Data is cached and allocated at chosen times to improve system performance. Not recommended unless the computer has a backup battery pack or is a laptop as data would be lost on power failure.<br />
: ''Settings'' > ''Drive Settings'' > ''Write Cache'' > '''On'''<br />
* '''Automatic Mount Options''' can mount drives and partitions that are GPT based - will use default, recommended options.<br />
: {{Warning|This setting erases related [[fstab]] entries}}<br />
: ''Partition Settings'' > ''Edit Mount Options'' > ''Automatic Mount Options'' > '''On'''<br />
<br />
=== Hiding applications from the menu ===<br />
<br />
{{Tip|Desktop entries can be hidden by editing the {{ic|.desktop}} files themselves. See [[Desktop entries#Hide desktop entries]].}}<br />
<br />
Use the ''Main Menu'' application (provided by the {{Pkg|alacarte}} package) to hide any applications you do not wish to show in the menu.<br />
<br />
=== Screencast recording ===<br />
<br />
GNOME features built-in screencast recording with the '''Ctrl''' + '''Shift''' + '''Alt''' + '''R''' key combination. A red circle is displayed in the bottom right corner of the screen when the recording is in progress. After the recording is finished, a file named {{ic|Screencast from %d%u-%c.webm}} is saved in the Videos directory. In order to use the screencast feature the gst plugins need to be installed.<br />
<br />
=== Screenshot ===<br />
<br />
Default save directory:<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/Desktop<br />
<br />
Check the ''gnome-screenshot'' manual page for more options.<br />
<br />
=== Log out delay ===<br />
<br />
To eliminate the default 60 second delay when logging out:<br />
<br />
$ gsettings set org.gnome.SessionManager logout-prompt false<br />
<br />
=== Disable animations ===<br />
<br />
To disable Shell animations (such as "Show Applications" and the wave animation in the top left activities hot corner), run:<br />
<br />
$ gsettings set org.gnome.desktop.interface enable-animations false<br />
<br />
=== Retina (HiDPI) display support ===<br />
<br />
Gnome introduced HiDPI support in version 3.10. If your display does not provide the correct screen size through EDID, this can lead to incorrectly scaled UI elements. As a workaround you can open ''dconf-editor'' and find the key {{ic|scaling-factor}} in {{ic|org.gnome.desktop.interface}}. Set it to {{ic|1}} to get the standard scale.<br />
<br />
Also see [[HiDPI]].<br />
<br />
=== Passwords and keys (PGP Keys) ===<br />
<br />
You can use the Passwords and Keys program (''seahorse'') to create a PGP key as it is a front end for [[GnuPG]] and installs it as dependency. This may be useful in the future (for instance if to encrypt a file). Create a key as shown below (the process may take about 10 minutes):<br />
<br />
''File'' > ''New'' > ''PGP Key'' > ''Name'' > ''Email'' > ''Defaults'' > ''Passphrase''.<br />
<br />
=== Terminal ===<br />
<br />
==== Change default terminal size ====<br />
<br />
The default size of a new terminal can be adjusted in the menu ''Edit > Profile preferences ''. <br />
<br />
==== New terminals adopt current directory ====<br />
<br />
By default new terminals open in the {{ic|$HOME}} directory. To have new terminals adopt the current working directory: {{ic|source /etc/profile.d/vte.sh}}. Add the command to the shell configuration to retain the behaviour.<br />
<br />
==== Pad the terminal ====<br />
<br />
To pad the terminal (create a small, invisible border between the window edges and the terminal contents) create the file below:<br />
<br />
{{hc|~/.config/gtk-3.0/gtk.css|<nowiki><br />
VteTerminal,<br />
TerminalScreen {<br />
padding: 10px 10px 10px 10px;<br />
-VteTerminal-inner-border: 10px 10px 10px 10px;<br />
}</nowiki>}}<br />
<br />
==== Disable blinking cursor ====<br />
<br />
Since GNOME 3.8 and the migration to GSettings and DConf the key required to modify in order to disable the blinking cursor in the Terminal differs slightly in contrast to the old GConf key. To disable the blinking cursor in GNOME 3.8 and above use:<br />
<br />
$ gsettings set org.gnome.desktop.interface cursor-blink false<br />
<br />
To disable the blinking cursor in Terminal only use (make sure profile uid is correct one):<br />
<br />
$ dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/cursor-blink-mode "'off'"<br />
<br />
Note that {{ic|gnome-settings-daemon}}, from the package of the same name, must be running for this and other settings changes to take effect in GNOME applications - see [[GNOME#Configuration]].<br />
<br />
==== Disable confirmation window when closing Terminal ====<br />
<br />
The Terminal will always display a confirmation window when trying to close the window while one is logged in as root. To avoid this, execute the following:<br />
$ gsettings set org.gnome.Terminal.Legacy.Settings confirm-close false<br />
<br />
=== Middle mouse button ===<br />
<br />
By default, GNOME 3 disables middle mouse button emulation regardless of [[Xorg]] settings ('''Emulate3Buttons'''). To enable middle mouse button emulation use:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true<br />
<br />
=== Enable button and menu icons ===<br />
<br />
Since GTK+ 3.10, the GSettings key 'menus-have-icons' has been deprecated. Icons in buttons and menus can still be enabled by setting the following overrides:<br />
$ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"<br />
<br />
=== Use custom colours and gradients for desktop background ===<br />
<br />
To use custom colours and gradients for your desktop background, you will first need to set either a transparent picture or else a non-existent picture as your desktop background. For instance, the command below will set a non-existent picture as the background.<br />
<br />
$ gsettings set org.gnome.desktop.background picture-uri none<br />
<br />
At this point, the desktop background should be a flat colour - the default colour setting is for a deep blue.<br />
<br />
For a different flat colour you need only change the primary colour setting:<br />
$ gsettings set org.gnome.desktop.background primary-color <my color><br />
where <my color> is a hex value (such as ''ffffff'' for white).<br />
<br />
For a colour gradient, you will also need to change secondary colour setting {{ic|org.gnome.desktop.background secondary-color}} and select a shading type. For instance, if you want a horizontal gradient, execute the following:<br />
$ gsettings set org.gnome.desktop.background color-shading-type horizontal<br />
<br />
If you are using a transparent picture as your background, you can set the opacity by executing the following:<br />
$ gsettings set org.gnome.desktop.background picture-opacity <value><br />
where value is a number between 1 and 100 (100 for maximum opacity).<br />
<br />
=== Transitioning backgrounds ===<br />
<br />
GNOME can transition between different wallpapers at specific time intervals. This is done by creating an XML file specifying the pictures to be used and the time interval. For more information on creating such files, see the following [http://www.linuxjournal.com/content/create-custom-transitioning-background-your-gnome-228-desktop article].<br />
<br />
Alternatively, a number of tools are available to automate the process:<br />
<br />
* {{App|mkwlppr|This script creates XML files that can act as dynamic wallpapers for GNOME by referring to multiple wallpapers.|http://pastebin.com/019G2rCy|see [http://pastebin.com/019G2rCy mkwlppr]}}<br />
* {{App|[[Wallpapoz]]|Wallpapoz is a tool that provides dynamic wallpapers for GNOME and Xfce desktops.|https://vajrasky.wordpress.com/|{{AUR|wallpapoz}}}}<br />
* {{App|CreBS|A Python/GTK application used to create and set desktop wallpaper slideshows for GNOME.|http://www.obfuscatepenguin.net/|{{AUR|crebs}}}}<br />
<br />
For setting the XML file as the default background, see [[#Lock screen and background]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Shell freezes ===<br />
<br />
In the event of a Shell freeze (which might be caused by certain appearance tweaks, malfunctioning extensions or perhaps a lack of available memory) restarting the Shell by pressing {{ic|Alt}} + {{ic|F2}} and then entering '''r''' may not be possible.<br />
<br />
In this case, try switching to another TTY ('''Ctrl''' + '''Alt''' + '''F2''') and entering the following command: {{ic|pkill -HUP gnome-shell}}. It may take a few seconds before the Shell successfully restarts. Restarting the shell in this fashion should not log the user out but it is a good idea to try and ensure that all work is saved anyway.<br />
<br />
If this fails, the [[Xorg]] server will need to be restarted either by: {{ic|pkill X}} for console logins or: {{ic|systemctl restart gdm}} for GDM logins. Bear in mind that restarting the Xorg server will log the user out so try to ensure that all work is saved before attempting this.<br />
<br />
=== Incorrect application defaults ===<br />
<br />
When installing applications for the first time you may find that GNOME has the wrong application associated to a certain protocols - for instance, ''easytag'' becomes the folder handler instead of [[GNOME Files]].<br />
<br />
For GNOME Files see the following page: [[GNOME Files#Files is no longer the default file manager]].<br />
<br />
For Document Viewer, run the following command:<br />
$ xdg-mime default evince.desktop application/pdf<br />
<br />
For other applications, default handler settings are detailed on the following page: [[Default applications]].<br />
<br />
Optionally, you can [[install]] {{AUR|gnome-defaults-list}}. It will place your configuration file at {{ic|/etc/gnome/defaults.list}}.<br />
<br />
=== Tracker & Documents do not list any local files ===<br />
<br />
In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in an [http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG compliant directory] (such as 'Documents' or 'Music'). For more information, see [[Xdg user directories]].<br />
<br />
You can also configure Tracker to recursively search inside specific directories such as your home directory. These settings can be made using {{ic|tracker-preferences}}.<br />
<br />
=== Unable to add accounts in Empathy and GNOME Online Accounts ===<br />
<br />
Empathy, the engine behind integrated messaging, GNOME Online Accounts, and all other system settings based on messaging accounts will not function correctly unless the {{Grp|telepathy}} group of packages or at least one of the backends ({{Pkg|telepathy-gabble}}, or {{Pkg|telepathy-haze}}, for example) is [[install]]ed. View descriptions of ''telepathy'' components on the [http://telepathy.freedesktop.org/wiki/Components freedesktop.org telepathy wiki].<br />
<br />
{{Note|[[Avahi]] daemon is required for connecting with the People Nearby account, and also in order for some desktop extensions to work correctly like [https://extensions.gnome.org/extension/746/chat-status/ Chat Status]}}<br />
<br />
=== Cannot change settings in dconf-editor ===<br />
<br />
When one cannot set settings in {{pkg|dconf}}, it is possible their dconf user settings are corrupt. In this case it is best to delete the user dconf files in {{ic|~/.config/dconf/user*}} and set the settings in dconf-editor after.<br />
<br />
=== When an extension breaks the shell ===<br />
<br />
When enabling shell extensions causes GNOME breakage, you should first remove the ''user-theme'' and ''auto-move-windows'' extensions from their installation directory.<br />
<br />
The installation directory could be one of {{ic|~/.local/share/gnome‑shell/extensions}}, {{ic|/usr/share/gnome‑shell/extensions}} or {{ic|/usr/local/share/gnome‑shell/extensions}}. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.<br />
<br />
Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the [https://live.gnome.org/GnomeShell/Extensions GNOME web site.]<br />
<br />
If you have trouble with uninstalling an extension via [https://extensions.gnome.org/local/ extensions.gnome.org/local], then probably they have been installed as system-wide extensions with {{ic|pacman -S gnome-shell-extensions}} before. Removing the package again obviously affects all user accounts.<br />
<br />
=== Extensions do not work after GNOME 3 update ===<br />
<br />
{{Note|Please bear in mind that whilst the methods below will allow you to '''try''' and activate an extension with an unsupported version of GNOME Shell, it is by no means a guarantee that the extension will work successfully. The most likely outcome of trying to activate such an extension is that GNOME Shell will crash and then restart.}}<br />
<br />
Before trying the workarounds below, check if an update is available for the extension by visiting [https://extensions.gnome.org/local extensions.gnome.org/local]. <br />
<br />
If there is no update for your current GNOME version yet, use the following command to disable version validation for extensions:<br />
$ gsettings set org.gnome.shell disable-extension-version-validation true<br />
<br />
Alternatively, you could modify the extension itself, changing the supported shell version to satisfy the version validation. See the method below.<br />
<br />
Locate the folder where your extensions are installed. It might be {{ic|~/.local/share/gnome-shell/extensions}} or {{ic|/usr/share/gnome-shell/extensions}}.<br />
<br />
Edit each occurrence of {{ic|metadata.json}} which appears in each extension sub-folder.<br />
<br />
{| border="0"<br />
| Insert: || {{ic|"shell-version": ["3.x"]}}<br />
|-<br />
| Instead of (for example): || {{ic|"shell-version": ["3.4"]}}<br />
|}<br />
<br />
{{ic|"3.x"}} indicates the extension works with every shell version. If it breaks, you will know to change it back.<br />
<br />
=== Keyboard shortcut do not work with only conky running ===<br />
<br />
The GNOME shell keyboard shortcuts like {{ic|Alt+F2}}, {{ic|Alt+F1}}, and the media key shortcuts do not work if conky is the only program running. However, if another application like ''gedit'' is running, then the keyboard shortcuts work.<br />
<br />
Solution: edit {{ic|.conkyrc}}<br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_argb_visual yes<br />
own_window_type dock<br />
own_window_class Conky<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
=== Unable to apply stored configuration for monitors ===<br />
<br />
If you encounter this message try to disable the ''xrandr'' {{ic|gnome-settings-daemon plugin}}:<br />
<br />
$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false<br />
<br />
=== Consistent cursor theme ===<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
=== Windows cannot be modified with Alt-Key + mouse-button ===<br />
<br />
In GNOME 3.6 and above, the mouse button modifier (the key that allows you to drag a window from a location other than the titlebar) is the {{ic|Super}} key instead of the {{ic|Alt}} key which was used in the past. The change was made in response to the following [https://bugzilla.gnome.org/show_bug.cgi?id=607797 bug report]. <br />
<br />
To change the mouse button modifier back to the {{ic|Alt}} key, execute the following:<br />
$ gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>' <br />
<br />
{{Note|It is not possible to change this with ''System settings'' > ''Keyboard'' > ''Shortcuts''}}<br />
<br />
=== Slow loading of system icons/slow GDM login ===<br />
<br />
Problems with the loading of system icons, such the ones in the title bar of Files, might be solved by [[pacman#Installing specific packages|installing]] (or re-installing) the {{Pkg|gdk-pixbuf2}} package.<br />
<br />
Re-installing the aforementioned package may also fix repeated occurrences of the "Oh no! Something has gone wrong!" error screen and/or very slow loading and login with GDM as described in the following [https://bbs.archlinux.org/viewtopic.php?pid=1414157 forum thread].<br />
<br />
=== Artifacts when maximizing windows ===<br />
<br />
Maximizing windows may cause artifacts as of GNOME 3.12.0 - see the following [https://bbs.archlinux.org/viewtopic.php?id=183617 forum thread] and [https://bugzilla.gnome.org/show_bug.cgi?id=728385 bug report]. A solution is detailed in the following section: [[#Tear-free video with Intel HD Graphics]].<br />
<br />
=== Tear-free video with Intel HD Graphics ===<br />
<br />
Enabling the [[Intel _Graphics#Tear-free_video|Xorg Intel TearFree option]] is a known workaround for tearing problems on Intel adapters. However, the way this option acts makes it redundant with the use of a compositor (it increases memory consumption and lowers performance, see [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c123 the original bug report's final comment]).<br />
<br />
According to [https://bugzilla.gnome.org/show_bug.cgi?id=711028#c2 this bug report], DRI3 includes the {{ic|buffer_age}} extension that allows GNOME Shell's Mutter compositor to sync windows to vblank in an efficient way. DRI3 support is not compiled in to the mesa package, so you have to recompile {{Pkg|mesa}} with {{ic|--enable-dri3}} in the {{ic|./configure}} flags (see [[ABS]]). Then enable it in the Xorg driver:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|<br />
Section "Device"<br />
Identifier "Intel Graphics"<br />
Driver "intel"<br />
Option "DRI" "3"<br />
EndSection}}<br />
<br />
=== Window opens behind other windows when using multiple monitors ===<br />
<br />
This is possibly a bug in GNOME Shell which causes new windows to open behind others. To fix this issue, one can run the following command:<br />
$ gsettings set org.gnome.shell.overrides workspaces-only-on-primary false<br />
<br />
=== Lock button fails to re-enable touchpad ===<br />
<br />
Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. Currently, it appears that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can run the following to unlock it:<br />
<br />
$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1<br />
<br />
=== Passwords are not remembered ===<br />
<br />
{{Merge|GNOME Keyring}}<br />
<br />
If you get a password prompt every time you login, and you find that passwords are not saved, you might need to create/set a default keyring.<br />
<br />
Ensure that the {{pkg|seahorse}} package is installed, open it ("Passwords and Keys" in system settings) and select ''View'' > ''By Keyring'' <br />
If there is no keyring in the left column (it will be marked with a lock icon), go to ''File'' > ''New'' > ''Password Keyring'' and give it a name. You will be asked to enter a password. If you do not give the keyring a password it will be unlocked automatically, even when using autologin, but passwords will not be stored securely. Finally, right-click on the keyring you just created and select "Set as default".<br />
<br />
=== GNOME Shell keyboard sources menu not visible ===<br />
<br />
A menu showing the keyboard input sources (for example 'en' for an English keyboard layout) should be visible next to the status area containing icons for network, volume and power sources. If the keyboard sources menu is not visible, this is probably because you have configured your [[Xorg]] keyboard layout in a way which GNOME does not recognise.<br />
<br />
To ensure that the menu is visible, remove any Xorg keyboard configuration you might have created and set the keyboard locale using [[Keyboard_configuration_in_Xorg#Using_localectl|localectl]].<br />
<br />
Upon running the command and then logging out, you should find that the keyboard input sources menu is visible in GDM and in the GNOME Shell desktop. See [http://blogs.gnome.org/mclasen/2012/09/21/input-sources-in-gnome/ Input sources in GNOME] for more information.<br />
<br />
=== Mouse cursor missing ===<br />
<br />
When using a separate [[window manager]] with ''gnome-settings-daemon'', the mouse cursor may vanish. Run:<br />
<br />
$ gsettings set org.gnome.settings-daemon.plugins.cursor active false<br />
<br />
=== No restart button in session menu when screen is locked ===<br />
<br />
If [[XScreenSaver]] is installed, ensure that it is not running at startup, see [[GNOME#Startup applications]].<br />
<br />
== See also ==<br />
<br />
* [http://www.gnome.org/ The Official Website of GNOME]<br />
* [http://extensions.gnome.org/ Extensions for GNOME-shell]<br />
* [https://wiki.gnome.org/Projects/GnomeShell/CheatSheet GNOME Shell Cheat Sheet], commands, keyboard shortcuts and other tips for using GNOME Shell.<br />
* Themes, icons, and backgrounds:<br />
** [http://art.gnome.org/ GNOME Art]<br />
** [http://www.gnome-look.org/ GNOME Look]<br />
* GTK/GNOME programs:<br />
** [http://www.gnomefiles.org/ GNOME Files]<br />
** [http://www.gnome.org/projects/ GNOME Project Listing]<br />
* [http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html Customizing the GNOME Shell]</div>AgustinDhttps://wiki.archlinux.org/index.php?title=Unified_Extensible_Firmware_Interface&diff=386205Unified Extensible Firmware Interface2015-07-21T22:24:11Z<p>AgustinD: Derp.</p>
<hr />
<div>[[Category:Boot process]]<br />
[[es:Unified Extensible Firmware Interface]]<br />
[[it:Unified Extensible Firmware Interface]]<br />
[[ja:Unified Extensible Firmware Interface]]<br />
[[ru:Unified Extensible Firmware Interface]]<br />
[[zh-CN:Unified Extensible Firmware Interface]]<br />
{{Related articles start}}<br />
{{Related|Arch boot process}}<br />
{{Related|Master Boot Record}}<br />
{{Related|GUID Partition Table}}<br />
{{Related|UEFI/Hardware}}<br />
{{Related articles end}}<br />
<br />
'''Unified Extensible Firmware Interface''' (or UEFI for short) is a new type of firmware. It introduces new ways of booting an OS that is distinct from the commonly used "[[MBR]] boot code" method followed for [[Wikipedia:BIOS|BIOS]] systems. See [[Arch boot process#Firmware types]] for their differences. This page explains '''What is UEFI''' and '''UEFI support in Linux kernel'''. To set up UEFI Boot Loaders, see [[Boot loaders]].<br />
<br />
== UEFI versions ==<br />
* UEFI started as Intel's EFI in versions 1.x. <br />
* Later, a group of companies called the UEFI Forum took over its development, which renamed it as Unified EFI starting with version 2.0. <br />
* Unless specified as EFI 1.x, EFI and UEFI terms are used interchangeably to denote UEFI 2.x firmware. <br />
* As of 15 April 2015, UEFI Specification 2.5 is the most recent version. <br />
* Apple's EFI implementation is neither a EFI 1.x version nor UEFI 2.x version but mixes up both. This kind of firmware does not fall under any one (U)EFI specification and therefore is not a standard UEFI firmware. Unless stated explicitly, these instructions are general and some of them may not work or may be different in [[MacBook|Apple Macs]].<br />
<br />
== Boot Process under UEFI ==<br />
<br />
# System switched on - Power On Self Test, or POST process.<br />
# UEFI firmware is loaded. Firmware initializes the hardware required for booting.<br />
# Firmware then reads its Boot Manager data to determine which UEFI application to be launched and from where (i.e. from which disk and partition).<br />
# Firmware then launches the UEFI application as defined in the boot entry in the firmware's boot manager.<br />
# The launched UEFI application may launch another application (in case of UEFI Shell or a boot manager like rEFInd) or the kernel and initramfs (in case of a boot loader like GRUB) depending on how the UEFI application was configured.<br />
<br />
{{Note|On some UEFI systems the only possible way to launch UEFI application on boot (if it does not have custom entry in UEFI boot menu) is to put it in this fixed location: {{ic|<EFI SYSTEM PARTITION>/EFI/BOOT/BOOTX64.EFI}} (for 64-bit x86 system)}}<br />
<br />
=== Multibooting in UEFI ===<br />
<br />
Since each OS or vendor can maintain its own files within the EFI System Partition without affecting the other, multi-booting using UEFI is just a matter of launching a different UEFI application corresponding to the particular OS's bootloader. This removes the need for relying on chainloading mechanisms of one [[boot loader]] to load another to switch OSes.<br />
<br />
==== Booting Microsoft Windows ====<br />
<br />
<br />
<br />
=== Detecting UEFI Firmware bitness ===<br />
<br />
==== Non Macs ====<br />
<br />
Check whether the dir {{ic|/sys/firmware/efi}} exists, if it exists it means the kernel has booted in EFI mode. In that case the UEFI bitness is same as kernel bitness. (ie. i686 or x86_64)<br />
<br />
{{Note|Intel Atom System-on-Chip systems ship with 32-bit UEFI (as on 2 November 2013). See [[#Using_GRUB]] for more info.}}<br />
<br />
==== Apple Macs ====<br />
<br />
Pre-2008 Macs mostly have i386-efi firmware while >=2008 Macs have mostly x86_64-efi. All Macs capable of running Mac OS X Snow Leopard 64-bit Kernel have x86_64 EFI 1.x firmware. <br />
<br />
To find out the arch of the efi firmware in a Mac, type the following into the Mac OS X terminal:<br />
<br />
ioreg -l -p IODeviceTree | grep firmware-abi<br />
<br />
If the command returns EFI32 then it is IA32 (32-bit) EFI firmware. If it returns EFI64 then it is x86_64 EFI firmware. Most of the Macs do not have UEFI 2.x firmware as Apple's EFI implementation is not fully compliant with UEFI 2.x Specification.<br />
<br />
=== Secure Boot ===<br />
For an overview about Secure Boot in Linux see [http://www.rodsbooks.com/efi-bootloaders/secureboot.html Rodsbooks' Secure Boot] article. This section focuses on how to set up Secure Boot in Arch Linux. For the time being, this section is limited to explain the procedure of booting the archiso with Secure Boot enabled.<br />
Booting the archiso with Secure Boot enabled is possible since the EFI applications {{ic|PreLoader.efi}} and {{ic|HashTool.efi}} have been added to it. A message will show up that says ''Failed to Start loader... I will now execute HashTool.'' To use HashTool for enrolling the hash of {{ic|loader.efi}} and {{ic|vmlinuz.efi}}, follow these steps.<br />
* Select {{ic|OK}}<br />
* In the HashTool main menu, select {{ic|Enroll Hash}}, choose {{ic|\loader.efi}} and confirm with {{ic|Yes}}. Again, select {{ic|Enroll Hash}} and {{ic|archiso}} to enter the archiso directory, then select {{ic|vmlinuz-efi}} and confirm with {{ic|Yes}}. Then choose {{ic|Exit}} to return to the boot device selection menu.<br />
* In the boot device selection menu choose {{ic|Arch Linux archiso x86_64 UEFI CD}}<br />
The archiso boots, and you are presented with a shell prompt, automatically logged in as root.<br />
To check if the archiso was booted with Secure Boot, use this command:<br />
<br />
$ od -An -t u1 /sys/firmware/efi/efivars/SecureBoot-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX<br />
<br />
The characters denoted by {{ic|XXXX}} differ from machine to machine. To help with this, you can use tab completion or list the EFI variables.<br />
<br />
If a Secure Boot is enabled, this command returns {{ic|1}} as the final integer in a list of five, for example:<br />
<br />
6 0 0 0 1<br />
<br />
For a verbose status, another way is to execute:<br />
# bootctl status<br />
<br />
== Linux Kernel Config options for UEFI ==<br />
<br />
The required Linux Kernel configuration options for UEFI systems are :<br />
<br />
CONFIG_RELOCATABLE=y<br />
CONFIG_EFI=y<br />
CONFIG_EFI_STUB=y<br />
CONFIG_FB_EFI=y<br />
CONFIG_FRAMEBUFFER_CONSOLE=y<br />
<br />
UEFI Runtime Variables Support ('''efivarfs''' filesystem - {{ic|/sys/firmware/efi/efivars}}). This option is important as this is required to manipulate UEFI Runtime Variables using tools like {{ic|/usr/bin/efibootmgr}}. The below config option has been added in kernel 3.10 and above.<br />
<br />
CONFIG_EFIVAR_FS=y<br />
<br />
UEFI Runtime Variables Support (old '''efivars sysfs''' interface - {{ic|/sys/firmware/efi/vars}}). This option should be disabled to prevent any potential issues with both efivarfs and sysfs-efivars enabled.<br />
<br />
CONFIG_EFI_VARS=n<br />
<br />
GUID Partition Table [[GPT]] config option - mandatory for UEFI support<br />
<br />
CONFIG_EFI_PARTITION=y<br />
<br />
{{Note|All of the above options are required to boot Linux via UEFI, and are enabled in Archlinux kernels in official repos.}}<br />
<br />
Retrieved from https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt .<br />
<br />
== UEFI Variables ==<br />
<br />
UEFI defines variables through which an operating system can interact with the firmware. UEFI Boot Variables are used by the boot-loader and used by the OS only for early system start-up. UEFI Runtime Variables allow an OS to manage certain settings of the firmware like the UEFI Boot Manager or managing the keys for UEFI Secure Boot Protocol etc. You can get the list using <br />
$ efivar -l<br />
<br />
=== UEFI Variables Support in Linux Kernel ===<br />
<br />
Linux kernel exposes EFI variables data to userspace via 2 interfaces:<br />
<br />
* '''OLD sysfs-efivars''' interface (CONFIG_EFI_VARS) - populated by {{ic|efivars}} kernel module at {{ic|/sys/firmware/efi/vars}} - 1024 byte maximum per-variable data size limitation, no UEFI Secure Boot variables support (due to the size limitation) and not recommended by kernel upstream anymore. Still supported by kernel upstream but '''completely disabled in Arch's official kernels'''.<br />
<br />
* '''NEW efivarfs''' ('''EFI''' '''VAR'''iable '''F'''ile'''S'''ystem) interface (CONFIG_EFIVAR_FS) - mounted using {{ic|efivarfs}} kernel module at {{ic|/sys/firmware/efi/efivars}} - replacement for the OLD sysfs-efivars interface, has no maximum per-variable size limitation, supports UEFI Secure Boot variables and recommended by kernel upstream. Introduced in kernel 3.8 and NEW {{ic|efivarfs}} module split from OLD {{ic|efivars}} kernel module in kernel 3.10 .<br />
<br />
==== Inconsistency between efivarfs and sysfs-efivars ====<br />
<br />
Enabling both OLD sysfs-efivars and NEW efivarfs can cause data inconsistency issues (see See https://lkml.org/lkml/2013/4/16/473 for more info). Due to this OLD sysfs-efivars is completely disabled in Arch's official kernels (since '''core/{{Pkg|linux}}-3.11''' and '''core/{{Pkg|linux-lts}}-3.10''') and only NEW efivarfs is enabled/supported going forward. All the UEFI Variables related tools and utilities in [[official repositories]] support efivarfs as of 01 October 2013.<br />
<br />
{{Note|As a side-effect of disabling OLD sysfs-efivars, {{ic|efi_pstore}} module is also disabled in the official Arch kernels as EFI pstore functionality in the kernel depends of OLD sysfs-efivars support.}}<br />
<br />
If you have both interfaces enabled, you need to disable one of them, and disable and re-enable the other interface (to refresh the data, to prevent inconsistencies) before accessing the EFI VAR data using any userspace tool:<br />
<br />
To disable sysfs-efivars and refresh efivarfs:<br />
# modprobe -r efivars<br />
<br />
# umount /sys/firmware/efi/efivars<br />
# modprobe -r efivarfs<br />
<br />
# modprobe efivarfs<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
<br />
To disable efivarfs and refresh sysfs-efivars:<br />
# umount /sys/firmware/efi/efivars<br />
# modprobe -r efivarfs<br />
<br />
# modprobe -r efivars<br />
# modprobe efivars<br />
<br />
=== Requirements for UEFI variable support ===<br />
<br />
# EFI Runtime Services support should be present in the kernel ({{ic|1=CONFIG_EFI=y}}, check if present with {{ic|zgrep CONFIG_EFI /proc/config.gz}}).<br />
# Kernel processor bitness/arch and EFI processor bitness/arch should match<br />
# Kernel should be booted in EFI mode (via [[EFISTUB]] or any [[Boot loaders|EFI boot loader]], not via BIOS/CSM or Apple's "bootcamp" which is also BIOS/CSM)<br />
# EFI Runtime Services in the kernel SHOULD NOT be disabled via kernel cmdline, i.e. {{ic|noefi}} kernel parameter SHOULD NOT be used<br />
# {{ic|efivarfs}} filesystem should be mounted at {{ic|/sys/firmware/efi/efivars}}, otherwise follow [[#Mount efivarfs]] section below.<br />
# {{ic|efivar}} should list (option {{ic|-l}}) the EFI Variables without any error. For sample output see [[#Sample List of UEFI Variables]].<br />
<br />
If EFI Variables support does not work even after the above conditions are satisfied, try the below workarounds:<br />
<br />
# If any userspace tool is unable to modify efi variables data, check for existence of {{ic|/sys/firmware/efi/efivars/dump-*}} files. If they exist, delete them, reboot and retry again.<br />
# If the above step does not fix the issue, try booting with {{ic|efi_no_storage_paranoia}} kernel parameter to disable kernel efi variable storage space check that may prevent writing/modification of efi variables.<br />
<br />
{{Note|{{ic|efi_no_storage_paranoia}} should only be used when needed and should not be left as a normal boot option. The effect of this kernel command line parameter turns off a safeguard that was put in place to help avoid the bricking of machines when the NVRAM gets too full.}}<br />
<br />
==== Mount efivarfs ====<br />
<br />
If {{ic|efivarfs}} is not automatically mounted at {{ic|/sys/firmware/efi/efivars}} by [[systemd]] during boot, then you need to manually mount it to expose UEFI Variable support to the userspace tools like {{ic|efibootmgr}} etc.:<br />
<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
<br />
{{Note|The above command should be run both OUTSIDE (BEFORE) and INSIDE '''chroot''', if any.}}<br />
<br />
It is also a good idea to auto-mount {{ic|efivarfs}} during boot via {{ic|/etc/fstab}} as follows:<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
efivarfs /sys/firmware/efi/efivars efivarfs defaults 0 0<br />
</nowiki>}}<br />
<br />
=== Userspace Tools ===<br />
<br />
There are few tools that can access/modify the UEFI variables, namely<br />
<br />
# '''efivar''' - Library and Tool to manipulate UEFI Variables (used by efibootmgr) - https://github.com/vathpela/efivar - {{Pkg|efivar}} or {{AUR|efivar-git}}<br />
# '''efibootmgr''' - Tool to manipulate UEFI Firmware Boot Manager Settings - https://github.com/vathpela/efibootmgr - {{Pkg|efibootmgr}} or {{AUR|efibootmgr-git}}<br />
# '''uefivars''' - Dumps list of EFI variables with some additional PCI related info (uses efibootmgr code internally) - https://github.com/fpmurphy/Various/tree/master/uefivars-2.0 supports only efivarfs and https://github.com/fpmurphy/Various/tree/master/uefivars-1.0 supports only sysfs-efivars . AUR package {{AUR|uefivars-git}} <br />
# '''efitools''' - Tools to Create and Setup own UEFI Secure Boot Certificates, Keys and Signed Binaries (requires efivarfs) - {{AUR|efitools-git}}<br />
# '''Ubuntu's Firmware Test Suite''' - https://wiki.ubuntu.com/FirmwareTestSuite/ - {{AUR|fwts}} (along with {{AUR|fwts-efi-runtime-dkms}}) or {{AUR|fwts-git}}<br />
<br />
==== efibootmgr ====<br />
<br />
{{Note|<br />
* If {{ic|efibootmgr}} completely fails to work in your system, you can reboot into UEFI Shell v2 and use {{ic|bcfg}} command to create a boot entry for the bootloader.<br />
* If you are unable to use {{ic|efibootmgr}}, some UEFI firmwares allow users to directly manage uefi boot entries from within its boot-time interface. For example, some ASUS firmwares have an "Add New Boot Option" choice which enables you to select a local EFI System Partition and manually enter the EFI stub location. (for example {{ic|\EFI\refind\refind_x64.efi}}).<br />
* The below commands use {{Pkg|refind-efi}} boot-loader as example.<br />
}}<br />
<br />
Assuming the boot-loader file to be launched is {{ic|/boot/efi/EFI/refind/refind_x64.efi}}, {{ic|/boot/efi/EFI/refind/refind_x64.efi}} can be split up as {{ic|/boot/efi}} and {{ic|/EFI/refind/refind_x64.efi}}, wherein {{ic|/boot/efi}} is the mountpoint of the EFI System Partition, which is assumed to be {{ic|/dev/sdXY}} (here {{ic|X}} and {{ic|Y}} are just placeholders for the actual values - eg:- in {{ic|/dev/sda1}} , {{ic|1=X==a}} {{ic|1=Y==1}}).<br />
<br />
To determine the actual device path for the EFI System Partition (assuming mountpoint {{ic|/boot/efi}} for example) (should be in the form {{ic|/dev/sdXY}}), try :<br />
<br />
# findmnt /boot/efi<br />
TARGET SOURCE FSTYPE OPTIONS<br />
/boot/efi /dev/sdXY vfat rw,flush,tz=UTC<br />
<br />
Verify that uefi variables support in kernel is working properly by running:<br />
<br />
# efivar -l<br />
<br />
If efivar lists the uefi variables without any error, then you can proceed. If not, check whether all the conditions in [[#Requirements for UEFI Variables support to work properly]] are met.<br />
<br />
Then create the boot entry using efibootmgr as follows:<br />
<br />
# efibootmgr -c -d /dev/sdX -p Y -l /EFI/refind/refind_x64.efi -L "rEFInd"<br />
<br />
{{Note|1=UEFI uses backward slash {{ic|\}} as path separator (similar to Windows paths), but the official {{Pkg|efibootmgr}} pkg support passing unix-style paths with forward-slash {{ic|/}} as path-separator for the {{ic|-l}} option. Efibootmgr internally converts {{ic|/}} to {{ic|\}} before encoding the loader path. The relevant git commit that incorporated this feature in efibootmgr is http://linux.dell.com/cgi-bin/cgit.cgi/efibootmgr.git/commit/?id=f38f4aaad1dfa677918e417c9faa6e3286411378 .}}<br />
<br />
In the above command {{ic|/boot/efi/EFI/refind/refind_x64.efi}} translates to {{ic|/boot/efi}} and {{ic|/EFI/refind/refind_x64.efi}} which in turn translate to drive {{ic|/dev/sdX}} -> partition {{ic|Y}} -> file {{ic|/EFI/refind/refind_x64.efi}}.<br />
<br />
The 'label' is the name of the menu entry shown in the UEFI boot menu. This name is user's choice and does not affect the booting of the system. More info can be obtained from [http://linux.dell.com/cgi-bin/cgit.cgi/efibootmgr.git/plain/README efibootmgr GIT README] .<br />
<br />
FAT32 filesystem is case-insensitive since it does not use UTF-8 encoding by default. In that case the firmware uses capital 'EFI' instead of small 'efi', therefore using {{ic|\EFI\refind\refindx64.efi}} or {{ic|\efi\refind\refind_x64.efi}} does not matter (this will change if the filesystem encoding is UTF-8).<br />
<br />
== EFI System Partition ==<br />
<br />
The EFI System Partition (also called ESP or EFISYS) is a FAT32 formatted physical partition (in the main partition table of the disk, not LVM or software raid etc.) from where the UEFI firmware launches the UEFI bootloader and application. <br />
<br />
It is an OS independent partition that acts as the storage place for the EFI bootloaders and applications to be launched by the EFI firmware. It is mandatory for UEFI boot. It should have the EFI System partition type (see [[#GPT partitioned disks]]). It is recommended to keep ESP size at 512 MiB although smaller/larger sizes are fine (see note below). For more information see [[Wikipedia:EFI System partition]].<br />
<br />
{{Note|<br />
* It is recommended to use always GPT for UEFI boot as some UEFI firmwares do not allow UEFI-MBR boot.<br />
* In [[GNU Parted]], {{ic|boot}} flag (not to be confused with {{ic|legacy_boot}} flag) has different effect in MBR and GPT disk. In MBR disk, it marks the partition as active. In GPT disk, it changes the type code of the partition to {{ic|EFI System Partition}} type. [[Parted]] has no flag to mark a partition as ESP in MBR disk (this can be done using fdisk though).<br />
* According to a Microsoft note[http://technet.microsoft.com/en-us/library/hh824839.aspx#DiskPartitionRules], the minimum size for the EFI System Partition (ESP) would be 100 MB, though this is not stated in the UEFI Specification. Note that for Advanced Format 4K Native drives (4-KB-per-sector) drives, the size is at least 260 MB, because it's the minimum partition size of FAT32 drives (calculated as sector size (4KB) x 65527 &#61; 256 MB), due to a limitation of the FAT32 file format.<br />
* In case of [[EFISTUB]], the kernels and initramfs files should be stored in the EFI System Partition. For sake of simplicity, you can also use the ESP as the {{ic|/boot}} partition itself instead of a separate {{ic|/boot}} partition, for EFISTUB booting.<br />
}}<br />
<br />
=== GPT partitioned disks ===<br />
<br />
*'''fdisk'''/'''gdisk''': Create a partition with partition type EFI System ({{ic|EFI System}} in ''fdisk'' or {{ic|ef00}} in ''gdisk''). Then format that partition as FAT32 using {{ic|mkfs.fat -F32 /dev/<THAT_PARTITION>}} <br />
(or)<br />
*[[GNU Parted]]: Create a FAT32 partition and in Parted set/activate the {{ic|boot}} flag (not {{ic|legacy_boot}} flag) on that partition<br />
<br />
{{Note|If you get the message {{ic|WARNING: Not enough clusters for a 32 bit FAT!}}, reduce cluster size with {{ic|mkfs.fat -s2 -F32 ...}} or {{ic|-s1}}, otherwise the partition may be unreadable by UEFI.}}<br />
<br />
=== MBR partitioned disks ===<br />
<br />
*'''fdisk''': Create a partition with partition type ''EFI System'' using fdisk. Then format that partition as FAT32 using {{ic|mkfs.fat -F32 /dev/<THAT_PARTITION>}}<br />
<br />
=== ESP on RAID ===<br />
It is possible to make the ESP part of a RAID1 array, but doing so brings the risk of data corruption, and further considerations need to be taken when creating the ESP. <br />
See https://bbs.archlinux.org/viewtopic.php?pid=1398710#p1398710 and https://bbs.archlinux.org/viewtopic.php?pid=1390741#p1390741 for details.<br />
<br />
== UEFI Shell ==<br />
<br />
The UEFI Shell is a shell/terminal for the firmware which allows launching uefi applications which include uefi bootloaders. Apart from that, the shell can also be used to obtain various other information about the system or the firmware like memory map (memmap), modifying boot manager variables (bcfg), running partitioning programs (diskpart), loading uefi drivers, editing text files (edit), hexedit etc. <br />
<br />
=== Obtaining UEFI Shell ===<br />
<br />
You can download a BSD licensed UEFI Shell from Intel's Tianocore UDK/EDK2 Sourceforge.net project.<br />
https://github.com/tianocore/edk2-EdkShellBinPkg/blob/master/FullShell/X64/Shell_Full.efi?raw=true<br />
* [[AUR]] '''{{AUR|uefi-shell-svn}}''' pkg (recommended) - provides x86_64 Shell in x86_64 system and IA32 Shell in i686 system - compiled directly from latest Tianocore EDK2 SVN source<br />
* [https://github.com/tianocore/edk2-ShellBinPkg/blob/master/UefiShell/X64/Shell.efi?raw=true Precompiled x86_64 UEFI Shell v2 binary] (may not be up-to-date)<br />
* [https://github.com/tianocore/edk2-EdkShellBinPkg/blob/master/FullShell/X64/Shell_Full.efi?raw=true Precompiled x86_64 UEFI Shell v1 binary] (not updated anymore upstream)<br />
* [https://github.com/tianocore/edk2-ShellBinPkg/blob/master/UefiShell/Ia32/Shell.efi?raw=true Precompiled IA32 UEFI Shell v2 binary] (may not be up-to-date)<br />
* [https://github.com/tianocore/edk2-EdkShellBinPkg/blob/master/FullShell/Ia32/Shell_Full.efi?raw=true Precompiled IA32 UEFI Shell v1 binary] (not updated anymore upstream)<br />
<br />
Shell v2 works best in UEFI 2.3+ systems and is recommended over Shell v1 in those systems. Shell v1 should work in all UEFI systems irrespective of the spec. version the firmware follows. More info at [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ShellPkg ShellPkg] and [http://sourceforge.net/mailarchive/message.php?msg_id=28690732 this mail]<br />
<br />
=== Launching UEFI Shell ===<br />
<br />
Few Asus and other AMI Aptio x86_64 UEFI firmware based motherboards (from Sandy Bridge onwards) provide an option called {{ic|"Launch EFI Shell from filesystem device"}} . For those motherboards, download the x86_64 UEFI Shell and copy it to your EFI System Partition as {{ic|<EFI_SYSTEM_PARTITION>/shellx64.efi}} (mostly {{ic|/boot/efi/shellx64.efi}}) .<br />
<br />
Systems with Phoenix SecureCore Tiano UEFI firmware are known to have embedded UEFI Shell which can be launched using either {{ic|F6}}, {{ic|F11}} or {{ic|F12}} key.<br />
<br />
{{Note|If you are unable to launch UEFI Shell from the firmware directly using any of the above mentioned methods, create a FAT32 USB pen drive with {{ic|Shell.efi}} copied as {{ic|(USB)/efi/boot/bootx64.efi}}. This USB should come up in the firmware boot menu. Launching this option will launch the UEFI Shell for you.}}<br />
<br />
=== Important UEFI Shell Commands ===<br />
<br />
UEFI Shell commands usually support {{ic|-b}} option which makes output pause after each page. {{ic|map}} lists recognized filesystems ({{ic|fs0}}, ...) and data storage devices ({{ic|blk0}}, ...). Run {{ic|help -b}} to list available commands.<br />
<br />
More info at http://software.intel.com/en-us/articles/efi-shells-and-scripting/<br />
<br />
==== bcfg ====<br />
<br />
BCFG command is used to modify the UEFI NVRAM entries, which allow the user to change the boot entries or driver options. This command is described in detail in page 83 (Section 5.3) of "UEFI Shell Specification 2.0" PDF document.<br />
<br />
{{Note|<br />
* Users are recommended to try {{ic|bcfg}} only if {{ic|efibootmgr}} fails to create working boot entries in their system.<br />
* UEFI Shell v1 official binary does not support {{ic|bcfg}} command. You can download a [http://dl.dropbox.com/u/17629062/Shell2.zip modified UEFI Shell v2 binary] which may work in UEFI pre-2.3 firmwares.<br />
}}<br />
<br />
To dump a list of current boot entries:<br />
<br />
Shell> bcfg boot dump -v<br />
<br />
To add a boot menu entry for rEFInd (for example) as 4th (numbering starts from zero) option in the boot menu:<br />
<br />
Shell> bcfg boot add 3 fs0:\EFI\refind\refind_x64.efi "rEFInd"<br />
<br />
where {{ic|fs0:}} is the mapping corresponding to the EFI System Partition and {{ic|fs0:\EFI\refind\refind_x64.efi}} is the file to be launched.<br />
<br />
To remove the 4th boot option:<br />
<br />
Shell> bcfg boot rm 3<br />
<br />
To move the boot option #3 to #0 (i.e. 1st or the default entry in the UEFI Boot menu):<br />
<br />
Shell> bcfg boot mv 3 0<br />
<br />
For bcfg help text:<br />
<br />
Shell> help bcfg -v -b<br />
<br />
or:<br />
<br />
Shell> bcfg -? -v -b<br />
<br />
==== edit ====<br />
<br />
EDIT command provides a basic text editor with an interface similar to nano text editor, but slightly less functional. It handles UTF-8 encoding and takes care or LF vs CRLF line endings.<br />
<br />
To edit, for example rEFInd's {{ic|refind.conf}} in the EFI System Partition ({{ic|fs0:}} in the firmware)<br />
<br />
Shell> fs0:<br />
FS0:\> cd \EFI\arch\refind<br />
FS0:\EFI\arch\refind\> edit refind.conf<br />
<br />
Type {{ic|Ctrl-E}} for help.<br />
<br />
== UEFI Linux Hardware Compatibility ==<br />
<br />
See [[Unified Extensible Firmware Interface/Hardware]] for more information.<br />
<br />
== UEFI Bootable Media ==<br />
<br />
=== Create UEFI bootable USB from ISO ===<br />
<br />
Follow [[USB flash installation media#BIOS and UEFI Bootable USB]]<br />
<br />
=== Remove UEFI boot support from Optical Media ===<br />
<br />
{{Note|This section mentions removing UEFI boot support from a '''CD/DVD only''' (Optical Media), not from a USB flash drive.}}<br />
<br />
Most of the 32-bit EFI Macs and some 64-bit EFI Macs refuse to boot from a UEFI(X64)+BIOS bootable CD/DVD. If one wishes to proceed with the installation using optical media, it might be necessary to remove UEFI support first.<br />
<br />
* Mount the official installation media and obtain the {{ic|archisolabel}} as shown in the previous section.<br />
<br />
# mount -o loop ''input.iso'' /mnt/iso<br />
<br />
* Then rebuild the ISO, excluding the UEFI Optical Media booting support, using {{ic|xorriso}} from {{pkg|libisoburn}}. Be sure to set the correct archisolabel, e.g. "ARCH_201411" or similar:<br />
{{bc|1=<br />
$ xorriso -as mkisofs -iso-level 3 \<br />
-full-iso9660-filenames\<br />
-volid "''archisolabel''" \<br />
-appid "Arch Linux CD" \<br />
-publisher "Arch Linux <https://www.archlinux.org>" \<br />
-preparer "prepared by $USER" \<br />
-eltorito-boot isolinux/isolinux.bin \<br />
-eltorito-catalog isolinux/boot.cat \<br />
-no-emul-boot -boot-load-size 4 -boot-info-table \<br />
-isohybrid-mbr "/mnt/iso/isolinux/isohdpfx.bin" \<br />
-output ''output.iso'' /mnt/iso/<br />
}}<br />
<br />
* Burn {{ic|''output.iso''}} to optical media and proceed with installation normally.<br />
<br />
== Testing UEFI in systems without native support ==<br />
<br />
=== OVMF for Virtual Machines ===<br />
<br />
[https://tianocore.github.io/ovmf/ OVMF] is a tianocore project to enable UEFI support for Virtual Machines. OVMF contains a sample UEFI firmware for QEMU.<br />
<br />
You can build OVMF (with Secure Boot support) from AUR {{AUR|ovmf-svn}} and run it as follows:<br />
<br />
$ qemu-system-x86_64 -enable-kvm -net none -m 1024 -pflash /usr/share/ovmf/x86_64/bios.bin<br />
<br />
=== DUET for BIOS only systems ===<br />
<br />
DUET is a tianocore project that enables chainloading a full UEFI environment from a BIOS system, in a way similar to BIOS OS booting. This method is being discussed extensively in http://www.insanelymac.com/forum/topic/186440-linux-and-windows-uefi-boot-using-tianocore-duet-firmware/. Pre-build DUET images can be downloaded from one of the repos at https://gitorious.org/tianocore_uefi_duet_builds. Specific instructions for setting up DUET is available at https://gitorious.org/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer/blobs/raw/master/Migle_BootDuet_INSTALL.txt. <br />
<br />
You can also try http://sourceforge.net/projects/cloverefiboot/ which provides modified DUET images that may contain some system specific fixes and is more frequently updated compared to the gitorious repos.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows 7 will not boot in UEFI Mode ===<br />
<br />
If you have installed Windows to a different hard disk with GPT partitioning and still have a MBR partitioned hard disk in your computer, then it is possible that the firmware (UEFI) is starting its CSM support (for booting MBR partitions) and therefore Windows will not boot. To solve this merge your MBR hard disk to GPT partitioning or disable the SATA port where the MBR hard disk is plugged in or unplug the SATA connector from this hard disk.<br />
<br />
Mainboards with this kind of problem:<br />
<br />
* Gigabyte Z77X-UD3H rev. 1.1 (UEFI version F19e)<br />
** The firmware option for booting "UEFI Only" does not prevent the firmware from starting CSM.<br />
<br />
=== Windows changes boot order ===<br />
In some motherboards (confirmed in ASRock Z77 Extreme4) Windows 8 changes the boot order in the NVRAM everytime is booted. This can be fixed making the Windows Boot Manager to load another loader instead of booting Windows.<br />
Run this command in a Administrator mode console in Windows:<br />
bcdedit /set {bootmgr} path \EFI\boot_app_dir\boot_app.efi<br />
<br />
=== USB media gets struck with black screen ===<br />
<br />
* This issue can occur either due to [[KMS]] issue. Try [[Kernel mode setting#Disabling_modesetting|Disabling KMS]] while booting the USB.<br />
<br />
* If the issue is not due to KMS, then it may be due to bug in [[EFISTUB]] booting (see [https://bugs.archlinux.org/task/33745] and [https://bbs.archlinux.org/viewtopic.php?id=156670] for more information.). Both Official ISO ([[Archiso]]) and [[Archboot]] iso use EFISTUB (via [[Gummiboot]] Boot Manager for menu) for booting the kernel in UEFI mode. In such a case you have to use [[GRUB]] as the USB's UEFI bootloader by following the below section.<br />
<br />
==== Using GRUB ====<br />
{{Tip|The given configuration entries can also be entered inside a [[GRUB#Using_the_command_shell|GRUB command-shell]].}}<br />
<br />
* [[USB flash installation media#BIOS_and_UEFI_Bootable_USB|Create an USB Flash Installation]]<br />
<br />
* Backup {{ic|EFI/boot/loader.efi}} to {{ic|EFI/boot/gummiboot.efi}}<br />
<br />
* [[GRUB#GRUB_standalone|Create a GRUB standalone image]] and copy the generate {{ic|grub*.efi}} to the USB as {{ic|EFI/boot/loader.efi}}, {{ic|EFI/boot/bootx64.efi}} and/or {{ic|EFI/boot/bootia32.efi}} (useful when running on a 32-bit UEFI)<br />
<br />
* Create {{ic|EFI/boot/grub.cfg}} with the following contents (replace {{ic|ARCH_YYYYMM}} with the required archiso label e.g. {{ic|ARCH_201507}}):<br />
<br />
{{hc|grub.cfg for Official ISO|<nowiki><br />
insmod part_gpt<br />
insmod part_msdos<br />
insmod fat<br />
<br />
insmod efi_gop<br />
insmod efi_uga<br />
insmod video_bochs<br />
insmod video_cirrus<br />
<br />
insmod font<br />
<br />
if loadfont "${prefix}/fonts/unicode.pf2" ; then<br />
insmod gfxterm<br />
set gfxmode="1024x768x32;auto"<br />
terminal_input console<br />
terminal_output gfxterm<br />
fi<br />
<br />
menuentry "Arch Linux archiso x86_64" {<br />
set gfxpayload=keep<br />
search --no-floppy --set=root --label ARCH_YYYYMM<br />
linux /arch/boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_YYYYMM add_efi_memmap<br />
initrd /arch/boot/x86_64/archiso.img<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v2" {<br />
search --no-floppy --set=root --label ARCH_YYYYMM<br />
chainloader /EFI/shellx64_v2.efi<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v1" {<br />
search --no-floppy --set=root --label ARCH_YYYYMM<br />
chainloader /EFI/shellx64_v1.efi<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|grub.cfg for Archboot ISO|<nowiki><br />
insmod part_gpt<br />
insmod part_msdos<br />
insmod fat<br />
<br />
insmod efi_gop<br />
insmod efi_uga<br />
insmod video_bochs<br />
insmod video_cirrus<br />
<br />
insmod font<br />
<br />
if loadfont "${prefix}/fonts/unicode.pf2" ; then<br />
insmod gfxterm<br />
set gfxmode="1024x768x32;auto"<br />
terminal_input console<br />
terminal_output gfxterm<br />
fi<br />
<br />
menuentry "Arch Linux x86_64 Archboot" {<br />
set gfxpayload=keep<br />
search --no-floppy --set=root --file /boot/vmlinuz_x86_64<br />
linux /boot/vmlinuz_x86_64 cgroup_disable=memory loglevel=7 add_efi_memmap<br />
initrd /boot/initramfs_x86_64.img<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v2" {<br />
search --no-floppy --set=root --file /boot/vmlinuz_x86_64<br />
chainloader /EFI/tools/shellx64_v2.efi<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v1" {<br />
search --no-floppy --set=root --file /boot/vmlinuz_x86_64<br />
chainloader /EFI/tools/shellx64_v1.efi<br />
}<br />
</nowiki>}}<br />
<br />
=== UEFI boot loader does not show up in firmware menu ===<br />
<br />
On some UEFI motherboards like boards with an Intel Z77 chipset, adding entries with {{ic|efibootmgr}} or {{ic|bcfg}} from the EFI Shell will not work because they do not show up on the boot menu list after being added to NVRAM.<br />
<br />
This issue is caused because the motherboards can only load Microsoft Windows. To solve this you have to place the {{ic|.efi}} file in the location that Windows uses.<br />
<br />
Copy the {{ic|bootx64.efi}} file from the Arch Linux installation medium ({{ic|FSO:}}) to the Microsoft directory your ESP partition on your hard drive ({{ic|FS1:}}). Do this by booting into EFI shell and typing:<br />
<br />
FS1:<br />
cd EFI<br />
mkdir Microsoft<br />
cd Microsoft<br />
mkdir Boot<br />
cp FS0:\EFI\BOOT\bootx64.efi FS1:\EFI\Microsoft\Boot\bootmgfw.efi<br />
<br />
After reboot, any entries added to NVRAM should show up in the boot menu.<br />
<br />
== See also ==<br />
<br />
* [[Wikipedia:UEFI]]<br />
* [http://www.uefi.org/home/ UEFI Forum] - contains the official [http://uefi.org/specifications UEFI Specifications] - GUID Partition Table is part of UEFI Specification<br />
* [https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/ UEFI boot: how does that actually work, then? - A blog post by AdamW]<br />
* [[Wikipedia:EFI System partition]]<br />
* [http://blog.uncooperative.org/blog/2014/02/06/the-efi-system-partition/ The EFI System Partition and the Default Boot Behavior]<br />
* [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt Linux Kernel x86_64 UEFI Documentation]<br />
* [http://www.intel.com/technology/efi/ Intel's page on EFI]<br />
* [http://uefidk.intel.com/ Intel UEFI Community Resource Center]<br />
* [http://uefidk.intel.com/blog/linux-efi-boot-stub Matt Fleming - The Linux EFI Boot Stub]<br />
* [http://uefidk.intel.com/blog/accessing-uefi-variables-linux Matt Fleming - Accessing UEFI Variables from Linux]<br />
* [http://www.rodsbooks.com/linux-uefi/ Rod Smith - Linux on UEFI: A Quick Installation Guide]<br />
* [https://lkml.org/lkml/2011/6/8/322 UEFI Boot problems on some newer machines (LKML)]<br />
* [http://linuxplumbers.ubicast.tv/videos/plumbing-uefi-into-linux/ LPC 2012 Plumbing UEFI into Linux]<br />
* [http://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-1/ LPC 2012 UEFI Tutorial : part 1]<br />
* [http://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-2/ LPC 2012 UEFI Tutorial : part 2]<br />
* [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Welcome_to_TianoCore Intel's Tianocore Project] for Open-Source UEFI firmware which includes DuetPkg for direct BIOS based booting and OvmfPkg used in QEMU and Oracle VirtualBox<br />
* [http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/efi-boot-process.html FGA: The EFI boot process]<br />
* [http://www.microsoft.com/whdc/device/storage/GPT_FAQ.mspx Microsoft's Windows and GPT FAQ]<br />
* [https://gitorious.org/tianocore_uefi_duet_builds/pages/Windows_x64_BIOS_to_UEFI Convert Windows x64 from BIOS-MBR mode to UEFI-GPT mode without Reinstall]<br />
* [https://gitorious.org/tianocore_uefi_duet_builds/pages/Linux_Windows_BIOS_UEFI_boot_USB Create a Linux BIOS+UEFI and Windows x64 BIOS+UEFI bootable USB drive]<br />
* [http://rodsbooks.com/bios2uefi/ Rod Smith - A BIOS to UEFI Transformation]<br />
* [http://software.intel.com/en-us/articles/efi-shells-and-scripting/ EFI Shells and Scripting - Intel Documentation]<br />
* [http://software.intel.com/en-us/articles/uefi-shell/ UEFI Shell - Intel Documentation]<br />
* [http://www.hpuxtips.es/?q=node/293 UEFI Shell - bcfg command info]<br />
* [http://dl.dropbox.com/u/17629062/Shell2.zip UEFI Shell v2 binary with bcfg modified to work with UEFI pre-2.3 firmware - from Clover efiboot]</div>AgustinDhttps://wiki.archlinux.org/index.php?title=Unified_Extensible_Firmware_Interface&diff=386204Unified Extensible Firmware Interface2015-07-21T22:20:42Z<p>AgustinD: Updated broken UEFI Shell links.</p>
<hr />
<div>[[Category:Boot process]]<br />
[[es:Unified Extensible Firmware Interface]]<br />
[[it:Unified Extensible Firmware Interface]]<br />
[[ja:Unified Extensible Firmware Interface]]<br />
[[ru:Unified Extensible Firmware Interface]]<br />
[[zh-CN:Unified Extensible Firmware Interface]]<br />
{{Related articles start}}<br />
{{Related|Arch boot process}}<br />
{{Related|Master Boot Record}}<br />
{{Related|GUID Partition Table}}<br />
{{Related|UEFI/Hardware}}<br />
{{Related articles end}}<br />
<br />
'''Unified Extensible Firmware Interface''' (or UEFI for short) is a new type of firmware. It introduces new ways of booting an OS that is distinct from the commonly used "[[MBR]] boot code" method followed for [[Wikipedia:BIOS|BIOS]] systems. See [[Arch boot process#Firmware types]] for their differences. This page explains '''What is UEFI''' and '''UEFI support in Linux kernel'''. To set up UEFI Boot Loaders, see [[Boot loaders]].<br />
<br />
== UEFI versions ==<br />
* UEFI started as Intel's EFI in versions 1.x. <br />
* Later, a group of companies called the UEFI Forum took over its development, which renamed it as Unified EFI starting with version 2.0. <br />
* Unless specified as EFI 1.x, EFI and UEFI terms are used interchangeably to denote UEFI 2.x firmware. <br />
* As of 15 April 2015, UEFI Specification 2.5 is the most recent version. <br />
* Apple's EFI implementation is neither a EFI 1.x version nor UEFI 2.x version but mixes up both. This kind of firmware does not fall under any one (U)EFI specification and therefore is not a standard UEFI firmware. Unless stated explicitly, these instructions are general and some of them may not work or may be different in [[MacBook|Apple Macs]].<br />
<br />
== Boot Process under UEFI ==<br />
<br />
# System switched on - Power On Self Test, or POST process.<br />
# UEFI firmware is loaded. Firmware initializes the hardware required for booting.<br />
# Firmware then reads its Boot Manager data to determine which UEFI application to be launched and from where (i.e. from which disk and partition).<br />
# Firmware then launches the UEFI application as defined in the boot entry in the firmware's boot manager.<br />
# The launched UEFI application may launch another application (in case of UEFI Shell or a boot manager like rEFInd) or the kernel and initramfs (in case of a boot loader like GRUB) depending on how the UEFI application was configured.<br />
<br />
{{Note|On some UEFI systems the only possible way to launch UEFI application on boot (if it does not have custom entry in UEFI boot menu) is to put it in this fixed location: {{ic|<EFI SYSTEM PARTITION>/EFI/BOOT/BOOTX64.EFI}} (for 64-bit x86 system)}}<br />
<br />
=== Multibooting in UEFI ===<br />
<br />
Since each OS or vendor can maintain its own files within the EFI System Partition without affecting the other, multi-booting using UEFI is just a matter of launching a different UEFI application corresponding to the particular OS's bootloader. This removes the need for relying on chainloading mechanisms of one [[boot loader]] to load another to switch OSes.<br />
<br />
==== Booting Microsoft Windows ====<br />
<br />
<br />
<br />
=== Detecting UEFI Firmware bitness ===<br />
<br />
==== Non Macs ====<br />
<br />
Check whether the dir {{ic|/sys/firmware/efi}} exists, if it exists it means the kernel has booted in EFI mode. In that case the UEFI bitness is same as kernel bitness. (ie. i686 or x86_64)<br />
<br />
{{Note|Intel Atom System-on-Chip systems ship with 32-bit UEFI (as on 2 November 2013). See [[#Using_GRUB]] for more info.}}<br />
<br />
==== Apple Macs ====<br />
<br />
Pre-2008 Macs mostly have i386-efi firmware while >=2008 Macs have mostly x86_64-efi. All Macs capable of running Mac OS X Snow Leopard 64-bit Kernel have x86_64 EFI 1.x firmware. <br />
<br />
To find out the arch of the efi firmware in a Mac, type the following into the Mac OS X terminal:<br />
<br />
ioreg -l -p IODeviceTree | grep firmware-abi<br />
<br />
If the command returns EFI32 then it is IA32 (32-bit) EFI firmware. If it returns EFI64 then it is x86_64 EFI firmware. Most of the Macs do not have UEFI 2.x firmware as Apple's EFI implementation is not fully compliant with UEFI 2.x Specification.<br />
<br />
=== Secure Boot ===<br />
For an overview about Secure Boot in Linux see [http://www.rodsbooks.com/efi-bootloaders/secureboot.html Rodsbooks' Secure Boot] article. This section focuses on how to set up Secure Boot in Arch Linux. For the time being, this section is limited to explain the procedure of booting the archiso with Secure Boot enabled.<br />
Booting the archiso with Secure Boot enabled is possible since the EFI applications {{ic|PreLoader.efi}} and {{ic|HashTool.efi}} have been added to it. A message will show up that says ''Failed to Start loader... I will now execute HashTool.'' To use HashTool for enrolling the hash of {{ic|loader.efi}} and {{ic|vmlinuz.efi}}, follow these steps.<br />
* Select {{ic|OK}}<br />
* In the HashTool main menu, select {{ic|Enroll Hash}}, choose {{ic|\loader.efi}} and confirm with {{ic|Yes}}. Again, select {{ic|Enroll Hash}} and {{ic|archiso}} to enter the archiso directory, then select {{ic|vmlinuz-efi}} and confirm with {{ic|Yes}}. Then choose {{ic|Exit}} to return to the boot device selection menu.<br />
* In the boot device selection menu choose {{ic|Arch Linux archiso x86_64 UEFI CD}}<br />
The archiso boots, and you are presented with a shell prompt, automatically logged in as root.<br />
To check if the archiso was booted with Secure Boot, use this command:<br />
<br />
$ od -An -t u1 /sys/firmware/efi/efivars/SecureBoot-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX<br />
<br />
The characters denoted by {{ic|XXXX}} differ from machine to machine. To help with this, you can use tab completion or list the EFI variables.<br />
<br />
If a Secure Boot is enabled, this command returns {{ic|1}} as the final integer in a list of five, for example:<br />
<br />
6 0 0 0 1<br />
<br />
For a verbose status, another way is to execute:<br />
# bootctl status<br />
<br />
== Linux Kernel Config options for UEFI ==<br />
<br />
The required Linux Kernel configuration options for UEFI systems are :<br />
<br />
CONFIG_RELOCATABLE=y<br />
CONFIG_EFI=y<br />
CONFIG_EFI_STUB=y<br />
CONFIG_FB_EFI=y<br />
CONFIG_FRAMEBUFFER_CONSOLE=y<br />
<br />
UEFI Runtime Variables Support ('''efivarfs''' filesystem - {{ic|/sys/firmware/efi/efivars}}). This option is important as this is required to manipulate UEFI Runtime Variables using tools like {{ic|/usr/bin/efibootmgr}}. The below config option has been added in kernel 3.10 and above.<br />
<br />
CONFIG_EFIVAR_FS=y<br />
<br />
UEFI Runtime Variables Support (old '''efivars sysfs''' interface - {{ic|/sys/firmware/efi/vars}}). This option should be disabled to prevent any potential issues with both efivarfs and sysfs-efivars enabled.<br />
<br />
CONFIG_EFI_VARS=n<br />
<br />
GUID Partition Table [[GPT]] config option - mandatory for UEFI support<br />
<br />
CONFIG_EFI_PARTITION=y<br />
<br />
{{Note|All of the above options are required to boot Linux via UEFI, and are enabled in Archlinux kernels in official repos.}}<br />
<br />
Retrieved from https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt .<br />
<br />
== UEFI Variables ==<br />
<br />
UEFI defines variables through which an operating system can interact with the firmware. UEFI Boot Variables are used by the boot-loader and used by the OS only for early system start-up. UEFI Runtime Variables allow an OS to manage certain settings of the firmware like the UEFI Boot Manager or managing the keys for UEFI Secure Boot Protocol etc. You can get the list using <br />
$ efivar -l<br />
<br />
=== UEFI Variables Support in Linux Kernel ===<br />
<br />
Linux kernel exposes EFI variables data to userspace via 2 interfaces:<br />
<br />
* '''OLD sysfs-efivars''' interface (CONFIG_EFI_VARS) - populated by {{ic|efivars}} kernel module at {{ic|/sys/firmware/efi/vars}} - 1024 byte maximum per-variable data size limitation, no UEFI Secure Boot variables support (due to the size limitation) and not recommended by kernel upstream anymore. Still supported by kernel upstream but '''completely disabled in Arch's official kernels'''.<br />
<br />
* '''NEW efivarfs''' ('''EFI''' '''VAR'''iable '''F'''ile'''S'''ystem) interface (CONFIG_EFIVAR_FS) - mounted using {{ic|efivarfs}} kernel module at {{ic|/sys/firmware/efi/efivars}} - replacement for the OLD sysfs-efivars interface, has no maximum per-variable size limitation, supports UEFI Secure Boot variables and recommended by kernel upstream. Introduced in kernel 3.8 and NEW {{ic|efivarfs}} module split from OLD {{ic|efivars}} kernel module in kernel 3.10 .<br />
<br />
==== Inconsistency between efivarfs and sysfs-efivars ====<br />
<br />
Enabling both OLD sysfs-efivars and NEW efivarfs can cause data inconsistency issues (see See https://lkml.org/lkml/2013/4/16/473 for more info). Due to this OLD sysfs-efivars is completely disabled in Arch's official kernels (since '''core/{{Pkg|linux}}-3.11''' and '''core/{{Pkg|linux-lts}}-3.10''') and only NEW efivarfs is enabled/supported going forward. All the UEFI Variables related tools and utilities in [[official repositories]] support efivarfs as of 01 October 2013.<br />
<br />
{{Note|As a side-effect of disabling OLD sysfs-efivars, {{ic|efi_pstore}} module is also disabled in the official Arch kernels as EFI pstore functionality in the kernel depends of OLD sysfs-efivars support.}}<br />
<br />
If you have both interfaces enabled, you need to disable one of them, and disable and re-enable the other interface (to refresh the data, to prevent inconsistencies) before accessing the EFI VAR data using any userspace tool:<br />
<br />
To disable sysfs-efivars and refresh efivarfs:<br />
# modprobe -r efivars<br />
<br />
# umount /sys/firmware/efi/efivars<br />
# modprobe -r efivarfs<br />
<br />
# modprobe efivarfs<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
<br />
To disable efivarfs and refresh sysfs-efivars:<br />
# umount /sys/firmware/efi/efivars<br />
# modprobe -r efivarfs<br />
<br />
# modprobe -r efivars<br />
# modprobe efivars<br />
<br />
=== Requirements for UEFI variable support ===<br />
<br />
# EFI Runtime Services support should be present in the kernel ({{ic|1=CONFIG_EFI=y}}, check if present with {{ic|zgrep CONFIG_EFI /proc/config.gz}}).<br />
# Kernel processor bitness/arch and EFI processor bitness/arch should match<br />
# Kernel should be booted in EFI mode (via [[EFISTUB]] or any [[Boot loaders|EFI boot loader]], not via BIOS/CSM or Apple's "bootcamp" which is also BIOS/CSM)<br />
# EFI Runtime Services in the kernel SHOULD NOT be disabled via kernel cmdline, i.e. {{ic|noefi}} kernel parameter SHOULD NOT be used<br />
# {{ic|efivarfs}} filesystem should be mounted at {{ic|/sys/firmware/efi/efivars}}, otherwise follow [[#Mount efivarfs]] section below.<br />
# {{ic|efivar}} should list (option {{ic|-l}}) the EFI Variables without any error. For sample output see [[#Sample List of UEFI Variables]].<br />
<br />
If EFI Variables support does not work even after the above conditions are satisfied, try the below workarounds:<br />
<br />
# If any userspace tool is unable to modify efi variables data, check for existence of {{ic|/sys/firmware/efi/efivars/dump-*}} files. If they exist, delete them, reboot and retry again.<br />
# If the above step does not fix the issue, try booting with {{ic|efi_no_storage_paranoia}} kernel parameter to disable kernel efi variable storage space check that may prevent writing/modification of efi variables.<br />
<br />
{{Note|{{ic|efi_no_storage_paranoia}} should only be used when needed and should not be left as a normal boot option. The effect of this kernel command line parameter turns off a safeguard that was put in place to help avoid the bricking of machines when the NVRAM gets too full.}}<br />
<br />
==== Mount efivarfs ====<br />
<br />
If {{ic|efivarfs}} is not automatically mounted at {{ic|/sys/firmware/efi/efivars}} by [[systemd]] during boot, then you need to manually mount it to expose UEFI Variable support to the userspace tools like {{ic|efibootmgr}} etc.:<br />
<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
<br />
{{Note|The above command should be run both OUTSIDE (BEFORE) and INSIDE '''chroot''', if any.}}<br />
<br />
It is also a good idea to auto-mount {{ic|efivarfs}} during boot via {{ic|/etc/fstab}} as follows:<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
efivarfs /sys/firmware/efi/efivars efivarfs defaults 0 0<br />
</nowiki>}}<br />
<br />
=== Userspace Tools ===<br />
<br />
There are few tools that can access/modify the UEFI variables, namely<br />
<br />
# '''efivar''' - Library and Tool to manipulate UEFI Variables (used by efibootmgr) - https://github.com/vathpela/efivar - {{Pkg|efivar}} or {{AUR|efivar-git}}<br />
# '''efibootmgr''' - Tool to manipulate UEFI Firmware Boot Manager Settings - https://github.com/vathpela/efibootmgr - {{Pkg|efibootmgr}} or {{AUR|efibootmgr-git}}<br />
# '''uefivars''' - Dumps list of EFI variables with some additional PCI related info (uses efibootmgr code internally) - https://github.com/fpmurphy/Various/tree/master/uefivars-2.0 supports only efivarfs and https://github.com/fpmurphy/Various/tree/master/uefivars-1.0 supports only sysfs-efivars . AUR package {{AUR|uefivars-git}} <br />
# '''efitools''' - Tools to Create and Setup own UEFI Secure Boot Certificates, Keys and Signed Binaries (requires efivarfs) - {{AUR|efitools-git}}<br />
# '''Ubuntu's Firmware Test Suite''' - https://wiki.ubuntu.com/FirmwareTestSuite/ - {{AUR|fwts}} (along with {{AUR|fwts-efi-runtime-dkms}}) or {{AUR|fwts-git}}<br />
<br />
==== efibootmgr ====<br />
<br />
{{Note|<br />
* If {{ic|efibootmgr}} completely fails to work in your system, you can reboot into UEFI Shell v2 and use {{ic|bcfg}} command to create a boot entry for the bootloader.<br />
* If you are unable to use {{ic|efibootmgr}}, some UEFI firmwares allow users to directly manage uefi boot entries from within its boot-time interface. For example, some ASUS firmwares have an "Add New Boot Option" choice which enables you to select a local EFI System Partition and manually enter the EFI stub location. (for example {{ic|\EFI\refind\refind_x64.efi}}).<br />
* The below commands use {{Pkg|refind-efi}} boot-loader as example.<br />
}}<br />
<br />
Assuming the boot-loader file to be launched is {{ic|/boot/efi/EFI/refind/refind_x64.efi}}, {{ic|/boot/efi/EFI/refind/refind_x64.efi}} can be split up as {{ic|/boot/efi}} and {{ic|/EFI/refind/refind_x64.efi}}, wherein {{ic|/boot/efi}} is the mountpoint of the EFI System Partition, which is assumed to be {{ic|/dev/sdXY}} (here {{ic|X}} and {{ic|Y}} are just placeholders for the actual values - eg:- in {{ic|/dev/sda1}} , {{ic|1=X==a}} {{ic|1=Y==1}}).<br />
<br />
To determine the actual device path for the EFI System Partition (assuming mountpoint {{ic|/boot/efi}} for example) (should be in the form {{ic|/dev/sdXY}}), try :<br />
<br />
# findmnt /boot/efi<br />
TARGET SOURCE FSTYPE OPTIONS<br />
/boot/efi /dev/sdXY vfat rw,flush,tz=UTC<br />
<br />
Verify that uefi variables support in kernel is working properly by running:<br />
<br />
# efivar -l<br />
<br />
If efivar lists the uefi variables without any error, then you can proceed. If not, check whether all the conditions in [[#Requirements for UEFI Variables support to work properly]] are met.<br />
<br />
Then create the boot entry using efibootmgr as follows:<br />
<br />
# efibootmgr -c -d /dev/sdX -p Y -l /EFI/refind/refind_x64.efi -L "rEFInd"<br />
<br />
{{Note|1=UEFI uses backward slash {{ic|\}} as path separator (similar to Windows paths), but the official {{Pkg|efibootmgr}} pkg support passing unix-style paths with forward-slash {{ic|/}} as path-separator for the {{ic|-l}} option. Efibootmgr internally converts {{ic|/}} to {{ic|\}} before encoding the loader path. The relevant git commit that incorporated this feature in efibootmgr is http://linux.dell.com/cgi-bin/cgit.cgi/efibootmgr.git/commit/?id=f38f4aaad1dfa677918e417c9faa6e3286411378 .}}<br />
<br />
In the above command {{ic|/boot/efi/EFI/refind/refind_x64.efi}} translates to {{ic|/boot/efi}} and {{ic|/EFI/refind/refind_x64.efi}} which in turn translate to drive {{ic|/dev/sdX}} -> partition {{ic|Y}} -> file {{ic|/EFI/refind/refind_x64.efi}}.<br />
<br />
The 'label' is the name of the menu entry shown in the UEFI boot menu. This name is user's choice and does not affect the booting of the system. More info can be obtained from [http://linux.dell.com/cgi-bin/cgit.cgi/efibootmgr.git/plain/README efibootmgr GIT README] .<br />
<br />
FAT32 filesystem is case-insensitive since it does not use UTF-8 encoding by default. In that case the firmware uses capital 'EFI' instead of small 'efi', therefore using {{ic|\EFI\refind\refindx64.efi}} or {{ic|\efi\refind\refind_x64.efi}} does not matter (this will change if the filesystem encoding is UTF-8).<br />
<br />
== EFI System Partition ==<br />
<br />
The EFI System Partition (also called ESP or EFISYS) is a FAT32 formatted physical partition (in the main partition table of the disk, not LVM or software raid etc.) from where the UEFI firmware launches the UEFI bootloader and application. <br />
<br />
It is an OS independent partition that acts as the storage place for the EFI bootloaders and applications to be launched by the EFI firmware. It is mandatory for UEFI boot. It should have the EFI System partition type (see [[#GPT partitioned disks]]). It is recommended to keep ESP size at 512 MiB although smaller/larger sizes are fine (see note below). For more information see [[Wikipedia:EFI System partition]].<br />
<br />
{{Note|<br />
* It is recommended to use always GPT for UEFI boot as some UEFI firmwares do not allow UEFI-MBR boot.<br />
* In [[GNU Parted]], {{ic|boot}} flag (not to be confused with {{ic|legacy_boot}} flag) has different effect in MBR and GPT disk. In MBR disk, it marks the partition as active. In GPT disk, it changes the type code of the partition to {{ic|EFI System Partition}} type. [[Parted]] has no flag to mark a partition as ESP in MBR disk (this can be done using fdisk though).<br />
* According to a Microsoft note[http://technet.microsoft.com/en-us/library/hh824839.aspx#DiskPartitionRules], the minimum size for the EFI System Partition (ESP) would be 100 MB, though this is not stated in the UEFI Specification. Note that for Advanced Format 4K Native drives (4-KB-per-sector) drives, the size is at least 260 MB, because it's the minimum partition size of FAT32 drives (calculated as sector size (4KB) x 65527 &#61; 256 MB), due to a limitation of the FAT32 file format.<br />
* In case of [[EFISTUB]], the kernels and initramfs files should be stored in the EFI System Partition. For sake of simplicity, you can also use the ESP as the {{ic|/boot}} partition itself instead of a separate {{ic|/boot}} partition, for EFISTUB booting.<br />
}}<br />
<br />
=== GPT partitioned disks ===<br />
<br />
*'''fdisk'''/'''gdisk''': Create a partition with partition type EFI System ({{ic|EFI System}} in ''fdisk'' or {{ic|ef00}} in ''gdisk''). Then format that partition as FAT32 using {{ic|mkfs.fat -F32 /dev/<THAT_PARTITION>}} <br />
(or)<br />
*[[GNU Parted]]: Create a FAT32 partition and in Parted set/activate the {{ic|boot}} flag (not {{ic|legacy_boot}} flag) on that partition<br />
<br />
{{Note|If you get the message {{ic|WARNING: Not enough clusters for a 32 bit FAT!}}, reduce cluster size with {{ic|mkfs.fat -s2 -F32 ...}} or {{ic|-s1}}, otherwise the partition may be unreadable by UEFI.}}<br />
<br />
=== MBR partitioned disks ===<br />
<br />
*'''fdisk''': Create a partition with partition type ''EFI System'' using fdisk. Then format that partition as FAT32 using {{ic|mkfs.fat -F32 /dev/<THAT_PARTITION>}}<br />
<br />
=== ESP on RAID ===<br />
It is possible to make the ESP part of a RAID1 array, but doing so brings the risk of data corruption, and further considerations need to be taken when creating the ESP. <br />
See https://bbs.archlinux.org/viewtopic.php?pid=1398710#p1398710 and https://bbs.archlinux.org/viewtopic.php?pid=1390741#p1390741 for details.<br />
<br />
== UEFI Shell ==<br />
<br />
The UEFI Shell is a shell/terminal for the firmware which allows launching uefi applications which include uefi bootloaders. Apart from that, the shell can also be used to obtain various other information about the system or the firmware like memory map (memmap), modifying boot manager variables (bcfg), running partitioning programs (diskpart), loading uefi drivers, editing text files (edit), hexedit etc. <br />
<br />
=== Obtaining UEFI Shell ===<br />
<br />
You can download a BSD licensed UEFI Shell from Intel's Tianocore UDK/EDK2 Sourceforge.net project.<br />
<br />
* [[AUR]] '''{{AUR|uefi-shell-svn}}''' pkg (recommended) - provides x86_64 Shell in x86_64 system and IA32 Shell in i686 system - compiled directly from latest Tianocore EDK2 SVN source<br />
* [https://github.com/tianocore/edk2-ShellBinPkg/UefiShell/X64/Shell.efi Precompiled x86_64 UEFI Shell v2 binary] (may not be up-to-date)<br />
* [https://github.com/tianocore/edk2-EdkShellBinPkg/FullShell/X64/Shell_Full.efi Precompiled x86_64 UEFI Shell v1 binary] (not updated anymore upstream)<br />
* [hhttps://github.com/tianocore/edk2-ShellBinPkg/UefiShell/Ia32/Shell.efi Precompiled IA32 UEFI Shell v2 binary] (may not be up-to-date)<br />
* [https://github.com/tianocore/edk2-EdkShellBinPkg/FullShell/Ia32/Shell_Full.efi Precompiled IA32 UEFI Shell v1 binary] (not updated anymore upstream)<br />
<br />
Shell v2 works best in UEFI 2.3+ systems and is recommended over Shell v1 in those systems. Shell v1 should work in all UEFI systems irrespective of the spec. version the firmware follows. More info at [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ShellPkg ShellPkg] and [http://sourceforge.net/mailarchive/message.php?msg_id=28690732 this mail]<br />
<br />
=== Launching UEFI Shell ===<br />
<br />
Few Asus and other AMI Aptio x86_64 UEFI firmware based motherboards (from Sandy Bridge onwards) provide an option called {{ic|"Launch EFI Shell from filesystem device"}} . For those motherboards, download the x86_64 UEFI Shell and copy it to your EFI System Partition as {{ic|<EFI_SYSTEM_PARTITION>/shellx64.efi}} (mostly {{ic|/boot/efi/shellx64.efi}}) .<br />
<br />
Systems with Phoenix SecureCore Tiano UEFI firmware are known to have embedded UEFI Shell which can be launched using either {{ic|F6}}, {{ic|F11}} or {{ic|F12}} key.<br />
<br />
{{Note|If you are unable to launch UEFI Shell from the firmware directly using any of the above mentioned methods, create a FAT32 USB pen drive with {{ic|Shell.efi}} copied as {{ic|(USB)/efi/boot/bootx64.efi}}. This USB should come up in the firmware boot menu. Launching this option will launch the UEFI Shell for you.}}<br />
<br />
=== Important UEFI Shell Commands ===<br />
<br />
UEFI Shell commands usually support {{ic|-b}} option which makes output pause after each page. {{ic|map}} lists recognized filesystems ({{ic|fs0}}, ...) and data storage devices ({{ic|blk0}}, ...). Run {{ic|help -b}} to list available commands.<br />
<br />
More info at http://software.intel.com/en-us/articles/efi-shells-and-scripting/<br />
<br />
==== bcfg ====<br />
<br />
BCFG command is used to modify the UEFI NVRAM entries, which allow the user to change the boot entries or driver options. This command is described in detail in page 83 (Section 5.3) of "UEFI Shell Specification 2.0" PDF document.<br />
<br />
{{Note|<br />
* Users are recommended to try {{ic|bcfg}} only if {{ic|efibootmgr}} fails to create working boot entries in their system.<br />
* UEFI Shell v1 official binary does not support {{ic|bcfg}} command. You can download a [http://dl.dropbox.com/u/17629062/Shell2.zip modified UEFI Shell v2 binary] which may work in UEFI pre-2.3 firmwares.<br />
}}<br />
<br />
To dump a list of current boot entries:<br />
<br />
Shell> bcfg boot dump -v<br />
<br />
To add a boot menu entry for rEFInd (for example) as 4th (numbering starts from zero) option in the boot menu:<br />
<br />
Shell> bcfg boot add 3 fs0:\EFI\refind\refind_x64.efi "rEFInd"<br />
<br />
where {{ic|fs0:}} is the mapping corresponding to the EFI System Partition and {{ic|fs0:\EFI\refind\refind_x64.efi}} is the file to be launched.<br />
<br />
To remove the 4th boot option:<br />
<br />
Shell> bcfg boot rm 3<br />
<br />
To move the boot option #3 to #0 (i.e. 1st or the default entry in the UEFI Boot menu):<br />
<br />
Shell> bcfg boot mv 3 0<br />
<br />
For bcfg help text:<br />
<br />
Shell> help bcfg -v -b<br />
<br />
or:<br />
<br />
Shell> bcfg -? -v -b<br />
<br />
==== edit ====<br />
<br />
EDIT command provides a basic text editor with an interface similar to nano text editor, but slightly less functional. It handles UTF-8 encoding and takes care or LF vs CRLF line endings.<br />
<br />
To edit, for example rEFInd's {{ic|refind.conf}} in the EFI System Partition ({{ic|fs0:}} in the firmware)<br />
<br />
Shell> fs0:<br />
FS0:\> cd \EFI\arch\refind<br />
FS0:\EFI\arch\refind\> edit refind.conf<br />
<br />
Type {{ic|Ctrl-E}} for help.<br />
<br />
== UEFI Linux Hardware Compatibility ==<br />
<br />
See [[Unified Extensible Firmware Interface/Hardware]] for more information.<br />
<br />
== UEFI Bootable Media ==<br />
<br />
=== Create UEFI bootable USB from ISO ===<br />
<br />
Follow [[USB flash installation media#BIOS and UEFI Bootable USB]]<br />
<br />
=== Remove UEFI boot support from Optical Media ===<br />
<br />
{{Note|This section mentions removing UEFI boot support from a '''CD/DVD only''' (Optical Media), not from a USB flash drive.}}<br />
<br />
Most of the 32-bit EFI Macs and some 64-bit EFI Macs refuse to boot from a UEFI(X64)+BIOS bootable CD/DVD. If one wishes to proceed with the installation using optical media, it might be necessary to remove UEFI support first.<br />
<br />
* Mount the official installation media and obtain the {{ic|archisolabel}} as shown in the previous section.<br />
<br />
# mount -o loop ''input.iso'' /mnt/iso<br />
<br />
* Then rebuild the ISO, excluding the UEFI Optical Media booting support, using {{ic|xorriso}} from {{pkg|libisoburn}}. Be sure to set the correct archisolabel, e.g. "ARCH_201411" or similar:<br />
{{bc|1=<br />
$ xorriso -as mkisofs -iso-level 3 \<br />
-full-iso9660-filenames\<br />
-volid "''archisolabel''" \<br />
-appid "Arch Linux CD" \<br />
-publisher "Arch Linux <https://www.archlinux.org>" \<br />
-preparer "prepared by $USER" \<br />
-eltorito-boot isolinux/isolinux.bin \<br />
-eltorito-catalog isolinux/boot.cat \<br />
-no-emul-boot -boot-load-size 4 -boot-info-table \<br />
-isohybrid-mbr "/mnt/iso/isolinux/isohdpfx.bin" \<br />
-output ''output.iso'' /mnt/iso/<br />
}}<br />
<br />
* Burn {{ic|''output.iso''}} to optical media and proceed with installation normally.<br />
<br />
== Testing UEFI in systems without native support ==<br />
<br />
=== OVMF for Virtual Machines ===<br />
<br />
[https://tianocore.github.io/ovmf/ OVMF] is a tianocore project to enable UEFI support for Virtual Machines. OVMF contains a sample UEFI firmware for QEMU.<br />
<br />
You can build OVMF (with Secure Boot support) from AUR {{AUR|ovmf-svn}} and run it as follows:<br />
<br />
$ qemu-system-x86_64 -enable-kvm -net none -m 1024 -pflash /usr/share/ovmf/x86_64/bios.bin<br />
<br />
=== DUET for BIOS only systems ===<br />
<br />
DUET is a tianocore project that enables chainloading a full UEFI environment from a BIOS system, in a way similar to BIOS OS booting. This method is being discussed extensively in http://www.insanelymac.com/forum/topic/186440-linux-and-windows-uefi-boot-using-tianocore-duet-firmware/. Pre-build DUET images can be downloaded from one of the repos at https://gitorious.org/tianocore_uefi_duet_builds. Specific instructions for setting up DUET is available at https://gitorious.org/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer/blobs/raw/master/Migle_BootDuet_INSTALL.txt. <br />
<br />
You can also try http://sourceforge.net/projects/cloverefiboot/ which provides modified DUET images that may contain some system specific fixes and is more frequently updated compared to the gitorious repos.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows 7 will not boot in UEFI Mode ===<br />
<br />
If you have installed Windows to a different hard disk with GPT partitioning and still have a MBR partitioned hard disk in your computer, then it is possible that the firmware (UEFI) is starting its CSM support (for booting MBR partitions) and therefore Windows will not boot. To solve this merge your MBR hard disk to GPT partitioning or disable the SATA port where the MBR hard disk is plugged in or unplug the SATA connector from this hard disk.<br />
<br />
Mainboards with this kind of problem:<br />
<br />
* Gigabyte Z77X-UD3H rev. 1.1 (UEFI version F19e)<br />
** The firmware option for booting "UEFI Only" does not prevent the firmware from starting CSM.<br />
<br />
=== Windows changes boot order ===<br />
In some motherboards (confirmed in ASRock Z77 Extreme4) Windows 8 changes the boot order in the NVRAM everytime is booted. This can be fixed making the Windows Boot Manager to load another loader instead of booting Windows.<br />
Run this command in a Administrator mode console in Windows:<br />
bcdedit /set {bootmgr} path \EFI\boot_app_dir\boot_app.efi<br />
<br />
=== USB media gets struck with black screen ===<br />
<br />
* This issue can occur either due to [[KMS]] issue. Try [[Kernel mode setting#Disabling_modesetting|Disabling KMS]] while booting the USB.<br />
<br />
* If the issue is not due to KMS, then it may be due to bug in [[EFISTUB]] booting (see [https://bugs.archlinux.org/task/33745] and [https://bbs.archlinux.org/viewtopic.php?id=156670] for more information.). Both Official ISO ([[Archiso]]) and [[Archboot]] iso use EFISTUB (via [[Gummiboot]] Boot Manager for menu) for booting the kernel in UEFI mode. In such a case you have to use [[GRUB]] as the USB's UEFI bootloader by following the below section.<br />
<br />
==== Using GRUB ====<br />
{{Tip|The given configuration entries can also be entered inside a [[GRUB#Using_the_command_shell|GRUB command-shell]].}}<br />
<br />
* [[USB flash installation media#BIOS_and_UEFI_Bootable_USB|Create an USB Flash Installation]]<br />
<br />
* Backup {{ic|EFI/boot/loader.efi}} to {{ic|EFI/boot/gummiboot.efi}}<br />
<br />
* [[GRUB#GRUB_standalone|Create a GRUB standalone image]] and copy the generate {{ic|grub*.efi}} to the USB as {{ic|EFI/boot/loader.efi}}, {{ic|EFI/boot/bootx64.efi}} and/or {{ic|EFI/boot/bootia32.efi}} (useful when running on a 32-bit UEFI)<br />
<br />
* Create {{ic|EFI/boot/grub.cfg}} with the following contents (replace {{ic|ARCH_YYYYMM}} with the required archiso label e.g. {{ic|ARCH_201507}}):<br />
<br />
{{hc|grub.cfg for Official ISO|<nowiki><br />
insmod part_gpt<br />
insmod part_msdos<br />
insmod fat<br />
<br />
insmod efi_gop<br />
insmod efi_uga<br />
insmod video_bochs<br />
insmod video_cirrus<br />
<br />
insmod font<br />
<br />
if loadfont "${prefix}/fonts/unicode.pf2" ; then<br />
insmod gfxterm<br />
set gfxmode="1024x768x32;auto"<br />
terminal_input console<br />
terminal_output gfxterm<br />
fi<br />
<br />
menuentry "Arch Linux archiso x86_64" {<br />
set gfxpayload=keep<br />
search --no-floppy --set=root --label ARCH_YYYYMM<br />
linux /arch/boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_YYYYMM add_efi_memmap<br />
initrd /arch/boot/x86_64/archiso.img<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v2" {<br />
search --no-floppy --set=root --label ARCH_YYYYMM<br />
chainloader /EFI/shellx64_v2.efi<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v1" {<br />
search --no-floppy --set=root --label ARCH_YYYYMM<br />
chainloader /EFI/shellx64_v1.efi<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|grub.cfg for Archboot ISO|<nowiki><br />
insmod part_gpt<br />
insmod part_msdos<br />
insmod fat<br />
<br />
insmod efi_gop<br />
insmod efi_uga<br />
insmod video_bochs<br />
insmod video_cirrus<br />
<br />
insmod font<br />
<br />
if loadfont "${prefix}/fonts/unicode.pf2" ; then<br />
insmod gfxterm<br />
set gfxmode="1024x768x32;auto"<br />
terminal_input console<br />
terminal_output gfxterm<br />
fi<br />
<br />
menuentry "Arch Linux x86_64 Archboot" {<br />
set gfxpayload=keep<br />
search --no-floppy --set=root --file /boot/vmlinuz_x86_64<br />
linux /boot/vmlinuz_x86_64 cgroup_disable=memory loglevel=7 add_efi_memmap<br />
initrd /boot/initramfs_x86_64.img<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v2" {<br />
search --no-floppy --set=root --file /boot/vmlinuz_x86_64<br />
chainloader /EFI/tools/shellx64_v2.efi<br />
}<br />
<br />
menuentry "UEFI Shell x86_64 v1" {<br />
search --no-floppy --set=root --file /boot/vmlinuz_x86_64<br />
chainloader /EFI/tools/shellx64_v1.efi<br />
}<br />
</nowiki>}}<br />
<br />
=== UEFI boot loader does not show up in firmware menu ===<br />
<br />
On some UEFI motherboards like boards with an Intel Z77 chipset, adding entries with {{ic|efibootmgr}} or {{ic|bcfg}} from the EFI Shell will not work because they do not show up on the boot menu list after being added to NVRAM.<br />
<br />
This issue is caused because the motherboards can only load Microsoft Windows. To solve this you have to place the {{ic|.efi}} file in the location that Windows uses.<br />
<br />
Copy the {{ic|bootx64.efi}} file from the Arch Linux installation medium ({{ic|FSO:}}) to the Microsoft directory your ESP partition on your hard drive ({{ic|FS1:}}). Do this by booting into EFI shell and typing:<br />
<br />
FS1:<br />
cd EFI<br />
mkdir Microsoft<br />
cd Microsoft<br />
mkdir Boot<br />
cp FS0:\EFI\BOOT\bootx64.efi FS1:\EFI\Microsoft\Boot\bootmgfw.efi<br />
<br />
After reboot, any entries added to NVRAM should show up in the boot menu.<br />
<br />
== See also ==<br />
<br />
* [[Wikipedia:UEFI]]<br />
* [http://www.uefi.org/home/ UEFI Forum] - contains the official [http://uefi.org/specifications UEFI Specifications] - GUID Partition Table is part of UEFI Specification<br />
* [https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/ UEFI boot: how does that actually work, then? - A blog post by AdamW]<br />
* [[Wikipedia:EFI System partition]]<br />
* [http://blog.uncooperative.org/blog/2014/02/06/the-efi-system-partition/ The EFI System Partition and the Default Boot Behavior]<br />
* [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt Linux Kernel x86_64 UEFI Documentation]<br />
* [http://www.intel.com/technology/efi/ Intel's page on EFI]<br />
* [http://uefidk.intel.com/ Intel UEFI Community Resource Center]<br />
* [http://uefidk.intel.com/blog/linux-efi-boot-stub Matt Fleming - The Linux EFI Boot Stub]<br />
* [http://uefidk.intel.com/blog/accessing-uefi-variables-linux Matt Fleming - Accessing UEFI Variables from Linux]<br />
* [http://www.rodsbooks.com/linux-uefi/ Rod Smith - Linux on UEFI: A Quick Installation Guide]<br />
* [https://lkml.org/lkml/2011/6/8/322 UEFI Boot problems on some newer machines (LKML)]<br />
* [http://linuxplumbers.ubicast.tv/videos/plumbing-uefi-into-linux/ LPC 2012 Plumbing UEFI into Linux]<br />
* [http://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-1/ LPC 2012 UEFI Tutorial : part 1]<br />
* [http://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-2/ LPC 2012 UEFI Tutorial : part 2]<br />
* [http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Welcome_to_TianoCore Intel's Tianocore Project] for Open-Source UEFI firmware which includes DuetPkg for direct BIOS based booting and OvmfPkg used in QEMU and Oracle VirtualBox<br />
* [http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/efi-boot-process.html FGA: The EFI boot process]<br />
* [http://www.microsoft.com/whdc/device/storage/GPT_FAQ.mspx Microsoft's Windows and GPT FAQ]<br />
* [https://gitorious.org/tianocore_uefi_duet_builds/pages/Windows_x64_BIOS_to_UEFI Convert Windows x64 from BIOS-MBR mode to UEFI-GPT mode without Reinstall]<br />
* [https://gitorious.org/tianocore_uefi_duet_builds/pages/Linux_Windows_BIOS_UEFI_boot_USB Create a Linux BIOS+UEFI and Windows x64 BIOS+UEFI bootable USB drive]<br />
* [http://rodsbooks.com/bios2uefi/ Rod Smith - A BIOS to UEFI Transformation]<br />
* [http://software.intel.com/en-us/articles/efi-shells-and-scripting/ EFI Shells and Scripting - Intel Documentation]<br />
* [http://software.intel.com/en-us/articles/uefi-shell/ UEFI Shell - Intel Documentation]<br />
* [http://www.hpuxtips.es/?q=node/293 UEFI Shell - bcfg command info]<br />
* [http://dl.dropbox.com/u/17629062/Shell2.zip UEFI Shell v2 binary with bcfg modified to work with UEFI pre-2.3 firmware - from Clover efiboot]</div>AgustinD