summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2022-10-08 10:36:55 -0700
committerMike Crute <mike@crute.us>2022-10-08 10:36:55 -0700
commita59a3486fbe17703df401d7153841268a604da6d (patch)
treec03d68f7f5d275991a34163e5d6b1da711a1b5eb
parent055d93af8a33ade8b40784e098d69964e74a75b5 (diff)
downloaddotfiles-a59a3486fbe17703df401d7153841268a604da6d.tar.bz2
dotfiles-a59a3486fbe17703df401d7153841268a604da6d.tar.xz
dotfiles-a59a3486fbe17703df401d7153841268a604da6d.zip
Fixup systemd for XPS 9310
-rw-r--r--.linux/etc/systemd/logind.conf.d/hybrid-sleep.conf13
-rw-r--r--.linux/etc/systemd/sleep.conf.d/fix-9310.conf2
-rw-r--r--.linux/etc/systemd/system/ath11k-resume.service13
-rw-r--r--.linux/etc/systemd/system/ath11k-suspend.service12
4 files changed, 37 insertions, 3 deletions
diff --git a/.linux/etc/systemd/logind.conf.d/hybrid-sleep.conf b/.linux/etc/systemd/logind.conf.d/hybrid-sleep.conf
index 47e8b77..4bdee52 100644
--- a/.linux/etc/systemd/logind.conf.d/hybrid-sleep.conf
+++ b/.linux/etc/systemd/logind.conf.d/hybrid-sleep.conf
@@ -1,4 +1,11 @@
1[Login] 1[Login]
2HandlePowerKey=suspend-then-hibernate 2# This config is what should be used for laptops with S3 support
3HandleLidSwitch=suspend-then-hibernate 3#HandlePowerKey=suspend-then-hibernate
4HandleLidSwitchExternalPower=suspend-then-hibernate 4#HandleLidSwitch=suspend-then-hibernate
5#HandleLidSwitchExternalPower=suspend-then-hibernate
6
7# But in their infinite wisdom Dell removed S3 support from the 9310, so
8# this is needed to make sure the laptop actually sleeps well.
9HandlePowerKey=hybrid-sleep
10HandleLidSwitch=hybrid-sleep
11HandleLidSwitchExternalPower=hybrid-sleep
diff --git a/.linux/etc/systemd/sleep.conf.d/fix-9310.conf b/.linux/etc/systemd/sleep.conf.d/fix-9310.conf
new file mode 100644
index 0000000..e18032c
--- /dev/null
+++ b/.linux/etc/systemd/sleep.conf.d/fix-9310.conf
@@ -0,0 +1,2 @@
1[Sleep]
2HibernateMode=shutdown
diff --git a/.linux/etc/systemd/system/ath11k-resume.service b/.linux/etc/systemd/system/ath11k-resume.service
new file mode 100644
index 0000000..0b32151
--- /dev/null
+++ b/.linux/etc/systemd/system/ath11k-resume.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=Resume: modprobe ath11k_pci
3After=suspend.target
4After=hibernate.target
5
6[Service]
7Type=oneshot
8ExecStartPre=/usr/bin/sleep 3
9ExecStart=/usr/sbin/modprobe ath11k_pci
10
11[Install]
12WantedBy=suspend.target
13WantedBy=hibernate.target
diff --git a/.linux/etc/systemd/system/ath11k-suspend.service b/.linux/etc/systemd/system/ath11k-suspend.service
new file mode 100644
index 0000000..adf0957
--- /dev/null
+++ b/.linux/etc/systemd/system/ath11k-suspend.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Suspend: rmmod ath11k_pci
3Before=sleep.target
4Before=hibernate.target
5
6[Service]
7Type=oneshot
8ExecStart=/usr/sbin/rmmod ath11k_pci
9
10[Install]
11WantedBy=sleep.target
12WantedBy=hibernate.target