Arch linux wayland install

Installation guide

This document is a guide for installing Arch Linux using the live system booted from an installation medium made from an official installation image. The installation medium provides accessibility features which are described on the page Install Arch Linux with accessibility options. For alternative means of installation, see Category:Installation process.

Before installing, it would be advised to view the FAQ. For conventions used in this document, see Help:Reading. In particular, code examples may contain placeholders (formatted in italics ) that must be replaced manually.

For more detailed instructions, see the respective ArchWiki articles or the various programs’ man pages, both linked from this guide. For interactive help, the IRC channel and the forums are also available.

Arch Linux should run on any x86_64-compatible machine with a minimum of 512 MiB RAM, though more memory is needed to boot the live system for installation.[1] A basic installation should take less than 2 GiB of disk space. As the installation process needs to retrieve packages from a remote repository, this guide assumes a working internet connection is available.

Contents

Pre-installation

Acquire an installation image

Visit the Download page and, depending on how you want to boot, acquire the ISO file or a netboot image, and the respective GnuPG signature.

Verify signature

It is recommended to verify the image signature before use, especially when downloading from an HTTP mirror, where downloads are generally prone to be intercepted to serve malicious images.

On a system with GnuPG installed, do this by downloading the PGP signature (under Checksums in the Download page) to the ISO directory, and verifying it with:

Alternatively, from an existing Arch Linux installation run:

Prepare an installation medium

The installation image can be supplied to the target machine via a USB flash drive, an optical disc or a network with PXE: follow the appropriate article to prepare yourself an installation medium from the chosen image.

Boot the live environment

  1. Point the current boot device to the one which has the Arch Linux installation medium. Typically it is achieved by pressing a key during the POST phase, as indicated on the splash screen. Refer to your motherboard’s manual for details.
  2. When the installation medium’s boot loader menu appears, select Arch Linux install medium and press Enter to enter the installation environment.

To switch to a different console—for example, to view this guide with Lynx alongside the installation—use the Alt+arrow shortcut. To edit configuration files, mcedit(1) , nano and vim are available. See packages.x86_64 for a list of the packages included in the installation medium.

Set the console keyboard layout

The default console keymap is US. Available layouts can be listed with:

To modify the layout, append a corresponding file name to loadkeys(1) , omitting path and file extension. For example, to set a German keyboard layout:

Console fonts are located in /usr/share/kbd/consolefonts/ and can likewise be set with setfont(8) .

Verify the boot mode

To verify the boot mode, list the efivars directory:

If the command shows the directory without error, then the system is booted in UEFI mode. If the directory does not exist, the system may be booted in BIOS (or CSM) mode. If the system did not boot in the mode you desired, refer to your motherboard’s manual.

Connect to the internet

To set up a network connection in the live environment, go through the following steps:

  • Ensure your network interface is listed and enabled, for example with ip-link(8) :
  • For wireless and WWAN, make sure the card is not blocked with rfkill.
  • Connect to the network:
    • Ethernet—plug in the cable.
    • Wi-Fi—authenticate to the wireless network using iwctl.
    • Mobile broadband modem—connect to the mobile network with the mmcli utility.
  • Configure your network connection:
    • DHCP: dynamic IP address and DNS server assignment (provided by systemd-networkd and systemd-resolved) should work out of the box for Ethernet, WLAN and WWAN network interfaces.
    • Static IP address: follow Network configuration#Static IP address.
  • The connection may be verified with ping:

Update the system clock

Use timedatectl(1) to ensure the system clock is accurate:

To check the service status, use timedatectl status .

Partition the disks

When recognized by the live system, disks are assigned to a block device such as /dev/sda , /dev/nvme0n1 or /dev/mmcblk0 . To identify these devices, use lsblk or fdisk.

Results ending in rom , loop or airoot may be ignored.

The following partitions are required for a chosen device:

If you want to create any stacked block devices for LVM, system encryption or RAID, do it now.

Use fdisk or parted to modify partition tables. For example:

Example layouts

BIOS with MBR
Mount point Partition Partition type Suggested size
[SWAP] /dev/swap_partition Linux swap More than 512 MiB
/mnt /dev/root_partition Linux Remainder of the device
UEFI with GPT
Mount point Partition Partition type Suggested size
/mnt/boot or /mnt/efi 1 /dev/efi_system_partition EFI system partition At least 260 MiB
[SWAP] /dev/swap_partition Linux swap More than 512 MiB
/mnt /dev/root_partition Linux x86-64 root (/) Remainder of the device
  1. /mnt/efi should only be considered if the used boot loader is capable of loading the kernel and initramfs images from the root volume. See the warning in Arch boot process#Boot loader.

Format the partitions

Once the partitions have been created, each newly created partition must be formatted with an appropriate file system. For example, to create an Ext4 file system on /dev/root_partition , run:

If you created a partition for swap, initialize it with mkswap(8) :

Mount the file systems

Mount the root volume to /mnt . For example, if the root volume is /dev/root_partition :

Create any remaining mount points (such as /mnt/efi ) using mkdir(1) and mount their corresponding volumes.

If you created a swap volume, enable it with swapon(8) :

genfstab(8) will later detect mounted file systems and swap space.

Installation

Select the mirrors

Packages to be installed must be downloaded from mirror servers, which are defined in /etc/pacman.d/mirrorlist . On the live system, after connecting to the internet, reflector updates the mirror list by choosing 20 most recently synchronized HTTPS mirrors and sorting them by download rate.[2]

Читайте также:  Аудио драйвер для windows 10 для микрофона

The higher a mirror is placed in the list, the more priority it is given when downloading a package. You may want to inspect the file to see if it is satisfactory. If it is not, edit the file accordingly, and move the geographically closest mirrors to the top of the list, although other criteria should be taken into account.

This file will later be copied to the new system by pacstrap, so it is worth getting right.

Install essential packages

Use the pacstrap(8) script to install the base package, Linux kernel and firmware for common hardware:

The base package does not include all tools from the live installation, so installing other packages may be necessary for a fully functional base system. In particular, consider installing:

  • userspace utilities for the management of file systems that will be used on the system,
  • utilities for accessing RAID or LVM partitions,
  • specific firmware for other devices not included in linux-firmware (e.g. sof-firmware for sound cards),
  • software necessary for networking,
  • a text editor,
  • packages for accessing documentation in man and info pages: man-db , man-pages and texinfo .

To install other packages or package groups, append the names to the pacstrap command above (space separated) or use pacman while chrooted into the new system. For comparison, packages available in the live system can be found in packages.x86_64.

Configure the system

Fstab

Generate an fstab file (use -U or -L to define by UUID or labels, respectively):

Check the resulting /mnt/etc/fstab file, and edit it in case of errors.

Chroot

Change root into the new system:

Time zone

Run hwclock(8) to generate /etc/adjtime :

This command assumes the hardware clock is set to UTC. See System time#Time standard for details.

Localization

Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 and other needed locales. Generate the locales by running:

Network configuration

Add matching entries to hosts(5) :

If the system has a permanent IP address or a fully qualified domain name, see the example in Network configuration#Local hostname resolution.

Complete the network configuration for the newly installed environment, that may include installing suitable network management software.

Initramfs

Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the kernel package with pacstrap.

For LVM, system encryption or RAID, modify mkinitcpio.conf(5) and recreate the initramfs image:

Root password

Boot loader

Choose and install a Linux-capable boot loader. If you have an Intel or AMD CPU, enable microcode updates in addition.

Reboot

Exit the chroot environment by typing exit or pressing Ctrl+d .

Optionally manually unmount all the partitions with umount -R /mnt : this allows noticing any «busy» partitions, and finding the cause with fuser(1) .

Finally, restart the machine by typing reboot : any partitions still mounted will be automatically unmounted by systemd. Remember to remove the installation medium and then login into the new system with the root account.

Post-installation

See General recommendations for system management directions and post-installation tutorials (like creating unprivileged user accounts, setting up a graphical user interface, sound or a touchpad).

For a list of applications that may be of interest, see List of applications.

Источник

Установка Arch Linux и XWayland

Не могу понять, что нужно для работы XWayland.
Приложения нативные под Wayland, идут прекрасно. А те, что требуют XWayland, работают с дикими тормозами.
При этом, если запустить Gnome не с Wayland, а с X11, те приложения начинают работать нормально.
Собственно вся проблема с Chromium, под xwayland тормозит жутко.
Есть подсказки?

Не пользоваться Wayland или не пользоваться GNOME. Низкая производительность композитора GNOME Shell (особенно в Wayland) и низкая производительность XWayland (особенно для тяжёлых на графику программ, типа браузеров) — это известные проблемы, которые (насколько мне известно) не имеют решения.

Нет, правда, есть такие проблемы. Я сейчас сам сижу на Xorg из-за этого. Железо околотоповое (UHD 620, камон).

У меня на убунте всё работало, но к совету примкну, проблема, скорее всего, нерешабельна.

Собственно вся проблема с Chromium, под xwayland тормозит жутко.
Есть подсказки?

Ждать нативный порт Chrom под Wayland. Firefox уже подготавливают:

Нет, правда, есть такие проблемы. Я сейчас сам сижу на Xorg из-за этого.

Ничем кроме Xorg сейчас невозможно пользоваться.
Ныть про это кроме багтрекера того же вайленда бессмыслено.

а чем же я тогда пользуюсь уже больше 2х лет?

Не заставляй меня перечислять приложения, которые в итоге не запустятся. Это скучно.

всё запускается, ЧЯДНТ?

я себе уже собрал. пока есть минорные проблемы, но в целом работает отлично

Низкая производительность композитора GNOME Shell (особенно в Wayland) и низкая производительность XWayland (особенно для тяжёлых на графику программ, типа браузеров) — это известные проблемы, которые (насколько мне известно) не имеют решения.

Всё так плохо?( Вроде собирались же переписывать с целью оптимизации? И почему не тормозит основанный на том же Clutter Gala (WM из elementary os)?

Достаточно плохо для того, чтобы это было заметно.

Вроде собирались же переписывать с целью оптимизации?

И продолжают собираться. Это планы на GNOME 4.

И почему не тормозит основанный на том же Clutter Gala (WM из elementary os)?

Возможно, потому что дело не в Clutter. Без идей.

Какие драйвера на видео? Проверь, есть ли у тебя 3D под xwayland’ом. Возможно, оно откатилось на llvm, тогда не удивительно, что тормозит.

Источник

Arch linux wayland install

sway (contracted from SirCmpwn’s Wayland compositor [1]) is a compositor for Wayland designed to be fully compatible with i3. According to the official website:

Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3’s features, plus a few extras.

Contents

Installation

sway can be installed with the sway package. The development version can be installed using wlroots-git AUR and sway-git AUR . It is advisable to always update wlroots when you update sway, due to tight dependencies.

You may also install swaylock and swayidle to lock your screen and set up an idle manager.

The default application launcher is dmenu and the default terminal emulator is alacritty . Before starting sway it is advisable to either install them or set a new launcher and terminal in the configuration.

Starting

Manually

To start Sway, simply type sway in the Linux console.

Automatically on TTY login

Similarly to X, Sway can be started by adding the following to your shell initialization file (see Command-line shell#Login shell):

From a display manager

The sway session is located at /usr/share/wayland-sessions/sway.desktop . It is automatically recognized by modern display managers like GDM and SDDM.

It is also possible to start sway as a systemd user service through the display manager.

Also you can use text-based session manager, see Display manager#Console.

Configuration

If you already use i3, you may copy your i3 configuration to

/.config/sway/config and it should work out of the box. Otherwise, copy the sample configuration file located at /etc/sway/config to

/.config/sway/config . See sway(5) for information on the configuration.

Keymap

By default, sway starts with the US QWERTY keymap. To configure per-input:

More details are available in xkeyboard-config(7) and sway-input(5) .

The keymap can also be configured using environment variables ( XKB_DEFAULT_LAYOUT , XKB_DEFAULT_VARIANT , etc.) when starting sway . The config options take precedence over environment variables.

Typematic delay and rate

To change typematic delay and rate, you can add the following lines to your input section:

Читайте также:  Chromium browser для linux

Statusbar

sway ships with a default status bar in the form of swaybar which runs in a pure Wayland environment. swaybar can call a shell script or other program to show information in the status bar. See sway-bar(5) and swaybar-protocol(7) for details.

Installing i3status is an option to obtain a practical, default status bar under Wayland. All you have to do is add the following snippet at the end of your sway config:

If you want to enable colored output for i3status, you need to adjust the following part in the i3status configuration:

Wallpaper

The displaying of a wallpaper in sway is handled by a dedicated program which is packaged separately as swaybg . It is needed in order to run the output command.

The following line, which can be appended at the end of your sway configuration, sets a background image on all displays (output matches all with name «*» ):

Of course you have to replace the file name and path according to your wallpaper.

Solid colors may be set as follows:

You may use azote AUR as the GTK3 frontend to swaybg.

Input devices

It is possible to tweak specific input device configurations. For example, to enable tap-to-click and natural scrolling for all touchpads:

To set the configuration for a particular touchpad, use swaymsg -t get_inputs to obtain a device identifier and use it instead of type:touchpad .

More documentation and options like acceleration profiles or disabling input entirely can be found in sway-input(5) .

HiDPI

Set your displays scale factor with the output command in your config file. The scale factor can be fractional, but it is usually 2 for HiDPI screens.

You can find your display name with the following command:

Custom keybindings

Special keys on your keyboard can be used to execute commands, for example to control volume, monitor brightness or media players:

To allow a keybinding to be executed while the lockscreen is active add the —locked parameter to bindsym.

Graphical indicator bars

It is often desirable to have the current level of some percentage-valued setting, such as brightness or volume, be indicated by a graphical bar when it is adjusted. A good option for providing this facility in Sway is wob AUR (alternatively wob-git AUR ), which provides a subset of the functionality of the popular X tool xob AUR but as a native Wayland utility implementing the layer-shell protocol. See the project website for usage examples.

Sway has a dedicated idle management daemon named swayidle to handle idling sessions. There are different ways to start and parameterize the daemon. The simplest is to use the config of sway itself. swayidle accepts a multitude of arguments to configure events like timeout (a.k.a. idling), resume (resume from sleep), before-sleep etc. See swayidle(1) for more details and further explanations of the events. Each event can then be assigned an action. To assign multiple actions to an event simply repeat the trigger.

The following instructs swayidle to lock the screen after 30 minutes and turn it off five seconds after:

To turn off a locked screen much sooner e.g. after 10 seconds, grep the process list for your locking manager and execute swaymsg «output * dpms off» accordingly like so:

In order to lock the screen before suspending and pause any playing media, amend the following instructions to the swayidle command:

Floating windows

To enable floating windows or window assignments, open the application and then use the app_id , the class , the instance and the title attributes to enable floating windows/window assignments. The following command will list the properties of all the open windows.

To get only the app_id ‘s of all open windows use:

To get the app_id of the focused window use:

If the app_id happens to be null for some windows, you might have to use the class and/or the instance attributes to enable floating mode/window assignments. You can search the output and create fine grained rules for your windows.

This is similar to using xorg-xprop to find the class or wm_name attributes in X11.

When using multiple monitors, the floating scratchpad window can get too large, covering more than one monitor. This command centers and resizes the floating window to 80% of the current monitor’s size:

Clipboard

This article or section is a candidate for merging with Clipboard.

By default, the clipboard is emptied whenever a window is closed. This can be a surprising default behaviour.

A «clipboard manager» must be installed to make the clipboard’s content shared amongst windows.

One example of a clipboard manager, designed for Wayland, is clipman, which can be installed from clipman AUR or clipman-git AUR .

To start clipman with Sway, add the following line to your config file:

Xresources

/.Xdefaults to use them in Sway.

XWayland

See Wayland#XWayland for details and an overview of available packages.

The use of XWayland is enabled by default.

If you would like to disable XWayland entirely and run a «pure» Wayland session, set the following config key to deactivate the use of XWayland:

Tips and tricks

Initially enable CapsLock/NumLock

By default, sway initially disables the CapsLock and NumLock keys on startup. To instead enable them on startup, set the xkb_capslock and/or xkb_numlock input configurations to enable for your keyboards. For example, to do so on all keyboards, add the following lines to your sway configuration:

In either case, the CapsLock and NumLock keys may be toggled by pressing the relevant keys on a keyboard.

Current keyboard layout

The current keyboard layout can be retrieved as follows, where kbd_identifier needs to be replaced with your keyboard’s identifier:

Compose key

To set up PrintScreen as the compose key:

The combinations for the compose key can also be configured in the XCompose file. Applications need to be restarted for this change to take effect.

This article or section needs expansion.

You can look up key names in /usr/include/X11/keysymdef.h , or use the xev(1) -like debugger: xkbcli-interactive-wayland(1) (in /usr/lib/xkbcommon/ ).

Backlight toggle

To turn off (and on) your displays with a key (e.g. Pause ) bind the following script in your Sway config :

Screen capture and screen sharing

Color temperature adjustment

Control swaynag with the keyboard

Swaynag, the default warning/prompt program shipped with sway, only supports user interaction with the mouse. A helper program such as swaynagmode AUR may be used to enable interaction via keyboard shortcuts.

Swaynagmode works by first launching swaynag, then listening for signals which trigger actions such as selecting the next button, dismissing the prompt, or accepting the selected button. These signals are sent by launching another instance of the swaynagmode script itself with a control argument, such as swaynagmode —select right or swaynagmode —confirm .

Swaynagmode by default triggers the sway mode nag upon initialization, followed by default on exit. This makes it easy to define keybindings in your sway configuration:

Note that, beginning in sway version 1.2, mode names are case-sensitive.

You can configure sway to use swaynagmode with the configuration command swaynag_command swaynagmode .

Change cursor theme and size

To set the cursor theme and size:

Where my_cursor_theme can be set to or replaced by a specific value like default , Adwaita or Simple-and-Soft , and my_cursor_size a value like 48 .

You can inspect their values with echo $XCURSOR_SIZE and echo $XCURSOR_THEME .

Note that you need to restart the application to see the changes.

Читайте также:  Где взять дистрибутив windows

Manage Sway-specific daemons with systemd

Systemd provides a graphical-session.target which is a user unit which is active whenever any graphical session is running, whether Xorg or Wayland. User services which should run in all graphical environments can be bound to that target. It also allows for a window-manager-specific target to be bound to graphical-session.target to start and stop services which should run only under that window manager. See systemd.special(7)

Users may want to start some services/daemons (such as swayidle or kanshi ) only when the current window manager is Sway, and they may also want these services to stop when Sway stops. Additionally, users who are running systemd-oomd.service(8) may want to have the services be in separate cgroups so that a single memory-hungry service does not take down the whole Sway session (see the Fedora bug report).

Some or all of this functionality is provided by Arch Sway packages. For example, the sway package in community provides the sway-session.target file and both sway and sway-git AUR provide a 50-systemd-user.conf drop-in file for the /etc/sway/config.d/ directory. This file imports required environment variables into the systemd user session and dbus if the Sway config file contains include /etc/sway/config.d/* .

If you intend to provide functionality using the roll-your-own method described below or by using a specialist package such as sway-systemd-git AUR or sway-services-git AUR you should consider removing files that provide the same functionality.

This functionality can be provided on a roll-your-own basis by creating a sway-session.target and let those daemons/services wanted by sway-session.target . This systemd target should be a user target (see systemd/User). For example:

Then, add the following line to Sway’s config file (for example, append the line to

/.config/sway/config , or add a new file to /etc/sway/config.d/ ):

With the above line in the configuration file, whenever Sway starts, it also activates sway-session.target .

Finally, link the desired services to sway-session.target . For example, adding a kanshi (or kanshi-git AUR ) service:

When this service is enabled (with —user flag), it is only activated when Sway is running and deactivated when Sway stops:

The creation of the sway-session.target file and the importing of the environment can also be accomplished by installing sway-systemd-git AUR . In addition to separating services into cgroups, sway-systemd also places each GUI application in its own cgroup. This enables imposition of per-cgroup resource constraints on individual application. See the sway-systemd README.

Change screen resolution after start

You can use the graphical program wdisplays AUR to change the resolution, rotate and arrange displays.

Troubleshooting

Application launchers

i3-dmenu-desktop, dmenu , and rofi all function relatively well in Sway, but all run under XWayland and suffer from the same issue where they can become unresponsive if the cursor is moved to a native Wayland window. The reason for this issue is that Wayland clients/windows do not have access to input devices unless they have focus of the screen. The XWayland server is itself a client to the Wayland compositor, so one of its XWayland clients must have focus for it to access user input. However, once one of its clients has focus, it can gather input and make it available to all XWayland clients through the X11 protocol. Hence, moving the cursor to an XWayland window and pressing Escape should fix the issue, and sometimes running pkill does too.

bemenu is a native Wayland dmenu replacement which can optionally be combined with j4-dmenu-desktop AUR to provide a Wayland-native combination for launching desktop files (as i3-dmenu-desktop does):

You may need to set BEMENU_BACKEND environment variable to «wayland» if you choose not to disable XWayland.

You can also build your own with a floating terminal and fzf as discussed in a GitHub issue.

Also krunner binary provided by plasma-workspace package can serve as launcher, offering both XWayland and native Wayland support.

rofi-lbonn-wayland-git AUR is a fork of rofi that works in Wayland and also has an -x11 flag if you need to launch it in an X11 session.

wofi is a command launcher, that provides some of the same features as rofi but running under Wayland. wofi lacks some features from rofi like an SSH mode and a window-switching mode. It is based on wlroots library and use GTK3 for rendering. It works pretty well with sway.

Virtualization

Sway works with both VirtualBox and VMware ESXi.

Unable to start Sway from tty

For ESXi, you need to enable 3D support under the Hardware Configuration > Video card settings. See also VMware#Enable 3D graphics on Intel and Optimus.

No visible cursor

When using the VMSVGA graphics controller, the cursor is invisible. This can be fixed by using software cursors as discussed in [3]:

Sway socket not detected

Using a swaymsg argument, such as swaymsg -t get_outputs , will sometimes return the message:

when run inside a terminal multiplexer (such as gnu screen or tmux). This means swaymsg could not connect to the socket provided in your SWAYSOCK .

To view what the current value of SWAYSOCK is, type:

To work around this problem, you may try attaching to a socket based on the running sway process:

To avoid this error, run the command outside of a multiplexer.

Unable to retrieve socket path

Requesting messages from swaymsg -t on a tty may return the following message:

SWAYSOCK environment variable is set after launching Sway, therefore a workaround to this error is to request swaymsg -t [message] in a terminal inside Sway.

Keybindings and keyboard layouts

By default, if you are using more than one keyboard layout, e.g. input * xkb_layout «us,ru» , bindings may become broken when you switch on some secondary layout.

Thanks to https://github.com/swaywm/sway/pull/3058, all you need is to add —to-code key to sensitive bindsym lines like this:

Alternatively you can create a variable set $mybind bindsym —to-code and then replace all instances of bindsym with $mybind like so: $mybind $mod+w thing

Java applications

Some Java-based applications will display blank screen when opened, for example any JetBrains editor such as IntelliJ, CLion, or PyCharm. To mitigate this, the application can be started with the _JAVA_AWT_WM_NONREPARENTING environment variable set to 1.

If you start the application from a launcher like rofi or dmenu , you might want to modify the application desktop entry as shown in Desktop entries#Modify environment variables.

Some issues with Java applications have been fixed in OpenJDK 11 and Sway 1.5. However, certain applications require additional configuration to use newer versions of OpenJDK, in the case of Android Studio you must set STUDIO_JDK=/usr/lib/jvm/java-11-openjdk/ . [4]

Scroll on border

If using the mouse scroll wheel on an application’s border crashes sway, you could use border none for the app_id (e.g. Firefox).

Program cannot open display

If a program crashes on start with the error message «cannot open display», it is likely that the program you are using is an X11 program. You can use the XWayland compatibility layer to run X11 programs under Wayland, see #XWayland for details.

Sway v1.6 shows garbage or blank screen when using nouveau

If sway displays a corrupted image, or a blank screen on one or more displays connected to an Nvidia GPU using nouveau, but starts properly otherwise, try setting WLR_DRM_NO_MODIFIERS=1 before starting sway.

The underlying issue relates to outstanding nouveau bugs in Mesa, and should be fixed in a future update. [5]

Источник

Оцените статью