various small email-related tweaks
[~bandali/configs] / rc.org
CommitLineData
08146d0e 1#+title: rc.org
5d3bd409 2#+property: header-args :comments no :mkdirp yes :results silent
08146d0e 3
ca3a844a
AB
4This file contains some of the system-level (global) configuration
5files for various programs I use.
e5e4450f 6
ca3a844a 7* systemd
339f55ac
AB
8
9Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
10
c65377de 11#+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
339f55ac
AB
12[Service]
13TTYVTDisallocate=no
14#+end_src
ad65bea0 15
ca3a844a 16* TLP
08e87a0a 17
c4b21117 18*** darrud
08e87a0a 19
c4b21117 20#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "darrud")) "/sudo::/etc/default/tlp")
08e87a0a
AB
21# ------------------------------------------------------------------------------
22# tlp - Parameters for power saving
23# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
24
25# Hint: some features are disabled by default, remove the leading # to enable
26# them.
27
28# Set to 0 to disable, 1 to enable TLP.
29TLP_ENABLE=1
30
31# Operation mode when no power supply can be detected: AC, BAT.
32# Concerns some desktop and embedded hardware only.
33TLP_DEFAULT_MODE=AC
34
35# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
36# Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
37TLP_PERSISTENT_DEFAULT=0
38
39# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
40# Non-zero value enables, zero disables laptop mode.
41DISK_IDLE_SECS_ON_AC=0
42DISK_IDLE_SECS_ON_BAT=2
43
44# Dirty page values (timeouts in secs).
45MAX_LOST_WORK_SECS_ON_AC=15
46MAX_LOST_WORK_SECS_ON_BAT=60
47
48# Hint: CPU parameters below are disabled by default, remove the leading #
49# to enable them, otherwise kernel default values are used.
50
51# Select a CPU frequency scaling governor.
52# Intel Core i processor with intel_pstate driver:
53# powersave(*), performance.
54# Older hardware with acpi-cpufreq driver:
55# ondemand(*), powersave, performance, conservative, schedutil.
56# (*) is recommended.
57# Hint: use tlp-stat -p to show the active driver and available governors.
58# Important:
59# powersave for intel_pstate and ondemand for acpi-cpufreq are power
60# efficient for *almost all* workloads and therefore kernel and most
61# distributions have chosen them as defaults. If you still want to change,
62# you should know what you're doing! You *must* disable your distribution's
63# governor settings or conflicts will occur.
64#CPU_SCALING_GOVERNOR_ON_AC=powersave
65#CPU_SCALING_GOVERNOR_ON_BAT=powersave
c4b21117
AB
66CPU_SCALING_GOVERNOR_ON_AC=conservative
67CPU_SCALING_GOVERNOR_ON_BAT=conservative
08e87a0a
AB
68
69# Set the min/max frequency available for the scaling governor.
70# Possible values strongly depend on your CPU. For available frequencies see
71# the output of tlp-stat -p.
72#CPU_SCALING_MIN_FREQ_ON_AC=0
73#CPU_SCALING_MAX_FREQ_ON_AC=0
74#CPU_SCALING_MIN_FREQ_ON_BAT=0
75#CPU_SCALING_MAX_FREQ_ON_BAT=0
76
77# Set energy performance hints (HWP) for Intel P-state governor:
78# performance, balance_performance, default, balance_power, power
79# Values are given in order of increasing power saving.
80# Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
81CPU_HWP_ON_AC=balance_performance
82CPU_HWP_ON_BAT=balance_power
83
84# Set Intel P-state performance: 0..100 (%).
85# Limit the max/min P-state to control the power dissipation of the CPU.
86# Values are stated as a percentage of the available performance.
87# Requires an Intel Core i processor with intel_pstate driver.
88#CPU_MIN_PERF_ON_AC=0
89#CPU_MAX_PERF_ON_AC=100
90#CPU_MIN_PERF_ON_BAT=0
91#CPU_MAX_PERF_ON_BAT=30
92
93# Set the CPU "turbo boost" feature: 0=disable, 1=allow
94# Requires an Intel Core i processor.
95# Important:
96# - This may conflict with your distribution's governor settings
97# - A value of 1 does *not* activate boosting, it just allows it
98#CPU_BOOST_ON_AC=1
99#CPU_BOOST_ON_BAT=0
100
101# Minimize number of used CPU cores/hyper-threads under light load conditions:
102# 0=disable, 1=enable.
103SCHED_POWERSAVE_ON_AC=0
104SCHED_POWERSAVE_ON_BAT=1
105
106# Kernel NMI Watchdog:
107# 0=disable (default, saves power), 1=enable (for kernel debugging only).
108NMI_WATCHDOG=0
109
110# Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
111# Frequency voltage pairs are written to:
112# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
113# CAUTION: only use this, if you thoroughly understand what you are doing!
114#PHC_CONTROLS="F:V F:V F:V F:V"
115
116# Set CPU performance versus energy savings policy:
117# performance, balance-performance, default, balance-power, power.
118# Values are given in order of increasing power saving.
119# Requires kernel module msr and x86_energy_perf_policy from linux-tools.
120ENERGY_PERF_POLICY_ON_AC=performance
121ENERGY_PERF_POLICY_ON_BAT=balance-power
122
123# Disk devices; separate multiple devices with spaces (default: sda).
124# Devices can be specified by disk ID also (lookup with: tlp diskid).
125DISK_DEVICES="sda sdb"
126
127# Disk advanced power management level: 1..254, 255 (max saving, min, off).
128# Levels 1..127 may spin down the disk; 255 allowable on most drives.
129# Separate values for multiple disks with spaces. Use the special value 'keep'
130# to keep the hardware default for the particular disk.
131DISK_APM_LEVEL_ON_AC="254 254"
132DISK_APM_LEVEL_ON_BAT="128 128"
133
134# Hard disk spin down timeout:
135# 0: spin down disabled
136# 1..240: timeouts from 5s to 20min (in units of 5s)
137# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
138# See 'man hdparm' for details.
139# Separate values for multiple disks with spaces. Use the special value 'keep'
140# to keep the hardware default for the particular disk.
141#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
142#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
143
144# Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
145# Separate values for multiple disks with spaces. Use the special value 'keep'
146# to keep the kernel default scheduler for the particular disk.
147#DISK_IOSCHED="cfq cfq"
148
149# AHCI link power management (ALPM) for disk devices:
150# min_power, med_power_with_dipm(*), medium_power, max_performance.
151# (*) Kernel >= 4.15 required, then recommended.
152# Multiple values separated with spaces are tried sequentially until success.
153SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
154SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
155
156# Exclude host devices from AHCI link power management.
157# Separate multiple hosts with spaces.
158#SATA_LINKPWR_BLACKLIST="host1"
159
160# Runtime Power Management for AHCI host and disks devices:
161# on=disable, auto=enable.
162# EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
163#AHCI_RUNTIME_PM_ON_AC=on
164#AHCI_RUNTIME_PM_ON_BAT=on
165
166# Seconds of inactivity before disk is suspended.
167AHCI_RUNTIME_PM_TIMEOUT=15
168
169# PCI Express Active State Power Management (PCIe ASPM):
170# default, performance, powersave.
171PCIE_ASPM_ON_AC=performance
172PCIE_ASPM_ON_BAT=powersave
173
174# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
175# auto = mid on BAT, high on AC; default = use hardware defaults.
176RADEON_POWER_PROFILE_ON_AC=high
177RADEON_POWER_PROFILE_ON_BAT=low
178
179# Radeon dynamic power management method (DPM): battery, performance.
180RADEON_DPM_STATE_ON_AC=performance
181RADEON_DPM_STATE_ON_BAT=battery
182
183# Radeon DPM performance level: auto, low, high; auto is recommended.
184RADEON_DPM_PERF_LEVEL_ON_AC=auto
185RADEON_DPM_PERF_LEVEL_ON_BAT=auto
186
187# WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
188WIFI_PWR_ON_AC=off
189WIFI_PWR_ON_BAT=on
190
191# Disable wake on LAN: Y/N.
192WOL_DISABLE=Y
193
194# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
195# A value of 0 disables, >=1 enables power saving (recommended: 1).
196SOUND_POWER_SAVE_ON_AC=0
197SOUND_POWER_SAVE_ON_BAT=0
198
199# Disable controller too (HDA only): Y/N.
200SOUND_POWER_SAVE_CONTROLLER=N
201
202# Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
203# Drive can be powered on again by releasing (and reinserting) the eject lever
204# or by pressing the disc eject button on newer models.
205# Note: an UltraBay/MediaBay hard disk is never powered off.
206BAY_POWEROFF_ON_AC=0
207BAY_POWEROFF_ON_BAT=0
208# Optical drive device to power off (default sr0).
209BAY_DEVICE="sr0"
210
211# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
212RUNTIME_PM_ON_AC=on
213RUNTIME_PM_ON_BAT=auto
214
215# Exclude PCI(e) device adresses the following list from Runtime PM
216# (separate with spaces). Use lspci to get the adresses (1st column).
217#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
218RUNTIME_PM_BLACKLIST="01:00.0"
219
220# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
221# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
222# prevents accidential power-on of dGPU in hybrid graphics setups.
223# Use "" to disable the feature completely.
224# Separate multiple drivers with spaces.
225#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
226
227# Set to 0 to disable, 1 to enable USB autosuspend feature.
228USB_AUTOSUSPEND=1
229
230# Exclude listed devices from USB autosuspend (separate with spaces).
231# Use lsusb to get the ids.
232# Note: input devices (usbhid) are excluded automatically
233#USB_BLACKLIST="1111:2222 3333:4444"
234
235# Bluetooth devices are excluded from USB autosuspend:
236# 0=do not exclude, 1=exclude.
237USB_BLACKLIST_BTUSB=0
238
239# Phone devices are excluded from USB autosuspend:
240# 0=do not exclude, 1=exclude (enable charging).
241USB_BLACKLIST_PHONE=0
242
243# Printers are excluded from USB autosuspend:
244# 0=do not exclude, 1=exclude.
245USB_BLACKLIST_PRINTER=1
246
247# WWAN devices are excluded from USB autosuspend:
248# 0=do not exclude, 1=exclude.
249USB_BLACKLIST_WWAN=1
250
251# Include listed devices into USB autosuspend even if already excluded
252# by the blacklists above (separate with spaces).
253# Use lsusb to get the ids.
254#USB_WHITELIST="1111:2222 3333:4444"
255
256# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
257# (workaround for USB devices that cause shutdown problems).
258#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
259
260# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
261# on system startup: 0=disable, 1=enable.
262# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
263# are ignored when this is enabled!
264#RESTORE_DEVICE_STATE_ON_STARTUP=0
265RESTORE_DEVICE_STATE_ON_STARTUP=1
266
267# Radio devices to disable on startup: bluetooth, wifi, wwan.
268# Separate multiple devices with spaces.
269#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
270
271# Radio devices to enable on startup: bluetooth, wifi, wwan.
272# Separate multiple devices with spaces.
273#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
274
275# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
276# (workaround for devices that are blocking shutdown).
277#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
278
279# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
280# (to prevent other operating systems from missing radios).
281#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
282
283# Radio devices to enable on AC: bluetooth, wifi, wwan.
284#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
285
286# Radio devices to disable on battery: bluetooth, wifi, wwan.
287#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
288
289# Radio devices to disable on battery when not in use (not connected):
290# bluetooth, wifi, wwan.
291#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
292
293# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
294# required). Charging starts when the remaining capacity falls below the
295# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
296# Main / Internal battery (values in %)
297#START_CHARGE_THRESH_BAT0=75
298#STOP_CHARGE_THRESH_BAT0=80
299# Ultrabay / Slice / Replaceable battery (values in %)
300#START_CHARGE_THRESH_BAT1=75
301#STOP_CHARGE_THRESH_BAT1=80
302
303# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
304#RESTORE_THRESHOLDS_ON_BAT=1
305
306# ------------------------------------------------------------------------------
307# tlp-rdw - Parameters for the radio device wizard
308# Possible devices: bluetooth, wifi, wwan.
309
310# Hints:
311# - Parameters are disabled by default, remove the leading # to enable them
312# - Separate multiple radio devices with spaces
313
314# Radio devices to disable on connect.
315#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
316#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
317#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
318
319# Radio devices to enable on disconnect.
320#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
321#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
322#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
323
324# Radio devices to enable/disable when docked.
325#DEVICES_TO_ENABLE_ON_DOCK=""
326#DEVICES_TO_DISABLE_ON_DOCK=""
327
328# Radio devices to enable/disable when undocked.
329#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
330#DEVICES_TO_DISABLE_ON_UNDOCK=""
331#+end_src
332