summaryrefslogtreecommitdiff
path: root/docs/desktop/desktop.md
blob: fa5bd9585efd9bec95ce5bf01968c15cbe0c09d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Desktop Wiki

This page describes several useful tips and configurations that I've used.

[Thunderbird](thunderbird.md)

[Syncthing on Artix](syncthing.md)

## Disabling ACPI for sleep

Somtimes we cannot sleep the computer due to ACPI devices being annoying.
To fix this, we need to disable their wakeup ability.

The following command will look at the status of the ACPI devices:

	cat /proc/acpi/wakeup

The following command will toggle the status of the ACPI device:

	echo GP12 > /proc/acpi/wakeup

### Making changes persistant

To make the changes persistant, we shall use a oneshot systemd service.

	/etc/systemd/system/disable-acpi.service
	----------------------------------------
	[Unit]
	Description="Disable ACPI for sleeping"
	
	[Service]
	ExecStart=/bin/sh -c "/etc/suspend"
	Type=oneshot
	
	[Install]
	WantedBy=multi-user.target

The script /etc/suspend` works by disabling all devices if they are enabled:

	#!/bin/sh

	declare -a devices=(INSERT DEVICE LIST HERE)
	for device in "${devices[@]}"; do
	    if grep -qw ^$device.*enabled /proc/acpi/wakeup; then
	        sudo sh -c "echo $device > /proc/acpi/wakeup"
	    fi
	done