... | @@ -739,4 +739,95 @@ Alternatively, you can use the Displays sub-menu in the Librem 5’s Settings ap |
... | @@ -739,4 +739,95 @@ Alternatively, you can use the Displays sub-menu in the Librem 5’s Settings ap |
|
|
|
|
|
Tap the `Tweaks` app icon. Only landscape view is completely usable (currently)…and the text will be tiny; activate Adwaita-dark in the Themes sub-menu.
|
|
Tap the `Tweaks` app icon. Only landscape view is completely usable (currently)…and the text will be tiny; activate Adwaita-dark in the Themes sub-menu.
|
|
|
|
|
|
GNOME apps will now display in dark mode. To revert to Adwaita (light theme), select it in the Tweaks app. |
|
GNOME apps will now display in dark mode. To revert to Adwaita (light theme), select it in the Tweaks app.
|
|
\ No newline at end of file |
|
|
|
|
|
### Add a Swap File
|
|
|
|
|
|
|
|
If you find yourself running out of RAM, you may want to consider creating a Swap file.
|
|
|
|
|
|
|
|
From [this Linuxize tutorial](https://linuxize.com/post/create-a-linux-swap-file/):
|
|
|
|
|
|
|
|
> Swap is a space on a disk that is used when the amount of physical RAM memory is full. When a Linux system runs out of RAM, inactive pages are moved from the RAM to the swap space.
|
|
|
|
>
|
|
|
|
> Swap space can take the form of either a dedicated swap partition or a swap file. In most cases, when running Linux on a virtual machine, a swap partition is not present, so the only option is to create a swap file.
|
|
|
|
|
|
|
|
1. Create a file that will be used for swap. The example below will add 1GB of swap; if you want more, such as 2GB, substitute `1G` with the desired amount (e.g. `2G` for 2GB).
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo fallocate -l 1G /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Only the root user should be able to write and read the swap file. To set the correct permissions type:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo chmod 600 /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
3. Use the `mkswap` utility to set up the file as Linux swap area:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo mkswap /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
4. Enable the swap with the following command:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo swapon /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
To make the change permanent, open the `/etc/fstab` file and append the following line:
|
|
|
|
|
|
|
|
```
|
|
|
|
/swapfile swap swap defaults 0 0
|
|
|
|
```
|
|
|
|
|
|
|
|
5. To verify that the swap is active, use either the `swapon` or the `free` command as shown below (The output values shown are just samples):
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ sudo swapon --show
|
|
|
|
NAME TYPE SIZE USED PRIO
|
|
|
|
/swapfile file 1024M 507.4M -2
|
|
|
|
```
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ sudo free -h
|
|
|
|
total used free shared buff/cache available
|
|
|
|
Mem: 488M 158M 83M 2.3M 246M 217M
|
|
|
|
Swap: 1.0G 506M 517M
|
|
|
|
```
|
|
|
|
|
|
|
|
### Resize Swap File Size
|
|
|
|
|
|
|
|
If you find that the swap file is too large or too small, you can resize it.
|
|
|
|
|
|
|
|
1. Before you resize the swap file, you should turn the swap off. You should also make sure that you have enough free RAM available to take the data from swap file. Otherwise, create a temporary swap file.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo swapoff /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Now use the `fallocate` command in Linux to change the size of the swap file. The example below will resize the swap file to 4GB of swap; if you want more, such as 8GB, substitute `4G` with the desired amount (e.g. `8G` for 8GB).
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo fallocate -l 4G /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
3. Mark the file as a swap file:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo mkswap /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
4. Enable the swap file:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo swapon /swapfile
|
|
|
|
```
|
|
|
|
|
|
|
|
To make the change permanent, open the `/etc/fstab` file and append the following line:
|
|
|
|
|
|
|
|
```
|
|
|
|
/swapfile swap swap defaults 0 0
|
|
|
|
```
|
|
|
|
|
|
|
|
This may already exist from creating a swap file before so don't add a duplicate entry if that's the case. |
|
|
|
\ No newline at end of file |