diff options
author | Mike Crute <mike@crute.us> | 2022-10-08 10:36:55 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2022-10-08 10:36:55 -0700 |
commit | a59a3486fbe17703df401d7153841268a604da6d (patch) | |
tree | c03d68f7f5d275991a34163e5d6b1da711a1b5eb | |
parent | 055d93af8a33ade8b40784e098d69964e74a75b5 (diff) | |
download | dotfiles-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.conf | 13 | ||||
-rw-r--r-- | .linux/etc/systemd/sleep.conf.d/fix-9310.conf | 2 | ||||
-rw-r--r-- | .linux/etc/systemd/system/ath11k-resume.service | 13 | ||||
-rw-r--r-- | .linux/etc/systemd/system/ath11k-suspend.service | 12 |
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] |
2 | HandlePowerKey=suspend-then-hibernate | 2 | # This config is what should be used for laptops with S3 support |
3 | HandleLidSwitch=suspend-then-hibernate | 3 | #HandlePowerKey=suspend-then-hibernate |
4 | HandleLidSwitchExternalPower=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. | ||
9 | HandlePowerKey=hybrid-sleep | ||
10 | HandleLidSwitch=hybrid-sleep | ||
11 | HandleLidSwitchExternalPower=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] | ||
2 | HibernateMode=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] | ||
2 | Description=Resume: modprobe ath11k_pci | ||
3 | After=suspend.target | ||
4 | After=hibernate.target | ||
5 | |||
6 | [Service] | ||
7 | Type=oneshot | ||
8 | ExecStartPre=/usr/bin/sleep 3 | ||
9 | ExecStart=/usr/sbin/modprobe ath11k_pci | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=suspend.target | ||
13 | WantedBy=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] | ||
2 | Description=Suspend: rmmod ath11k_pci | ||
3 | Before=sleep.target | ||
4 | Before=hibernate.target | ||
5 | |||
6 | [Service] | ||
7 | Type=oneshot | ||
8 | ExecStart=/usr/sbin/rmmod ath11k_pci | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=sleep.target | ||
12 | WantedBy=hibernate.target | ||