Commit graph

19 commits

Author SHA1 Message Date
Dorian Stoll 6abd8bbc86
sleep-script: Prevent bluetoothctl from timing out
If bluetooth is disabled in the BIOS, the bluetoothd process won't be
running. bluetoothctl waits for that process to launch, which means it
timeouts indefinitly, breaking suspend entirely.

By checking if bluetoothd is running before calling bluetoothctl suspend
works fine even if bluetooth is disabled in the BIOS.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-10-12 00:30:24 +02:00
Dorian Stoll aee8e310e0
Remove hard systemd dependency from the sleep script
By using nmcli, users who don't use a systemd based distribution (Gentoo etc.),
can run the sleep script manually, or hook it up to their service manager manually.

This also removes the forced restart if people willingly disabled NetworkManager.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-10-01 12:13:59 +02:00
Dorian Stoll b74befa0ca
Disable bluetooth when suspending without anything connected.
On Surface Book 2 it is not possible to archive stable S0ix while bluetooth is
enabled but no device is connected. Either S0ix fails completely, or the
residency is pretty bad. When bluetooth is disabled, or a device such as the pen
is connected, S0ix works fine and residency is great again.

By disabling bluetooth when no device is connected, we get proper S0ix in all
situations. And since no device is connected, the reset won't really matter.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-09-28 03:27:10 +02:00
Dorian Stoll 83e67e4a27 Improve wifi reliability after resuming from suspend
Using the old script I regulary	had the	problem, that after resuming
from suspend (or hibernate) the wifi would just break. The only way
to fix it was to restart network manager, or disable it in the GNOME
network settings.

I am not a 100% sure *why*, but this change greatly improved the wifi
stability after resume. I am running this for like 5 days now and
didn't see the wifi breaking once. I suppose, that `modprobe` vs
`modprobe -i` is what makes the difference.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-08-26 01:00:45 +02:00
qzed fadf055d5f Update systemd-sleep script for IPTS changes
Integrate the changes discussed in [1] as proposed by @kitakar5525 in
[2]. The IPTS suspend/resume mechanism should work without the need for
unloading/reloading the corresponding modules, so we comment-out and
update the workaround and will handle any issues coming from that via
the IPTS drivers. The workaround is not completely removed yet as want
to provide an easy-to-apply temporary fix in case anything goes wrong.

[1]: https://github.com/jakeday/linux-surface/issues/544
[2]: https://github.com/jakeday/linux-surface/issues/544#issuecomment-519126757
2019-08-26 01:00:45 +02:00
Jake Day bd4eecf710 Revert "sleep script no longer needs to unload and reload modules"
This reverts commit 787756bd11.
2019-02-07 07:58:07 -05:00
Jake Day 787756bd11 sleep script no longer needs to unload and reload modules 2019-01-31 07:14:47 -05:00
Jake Day bcc46bc1e1 updating sleep script to fix resume issues 2018-06-24 13:28:16 -04:00
Jake Day b48d1d2f94 add lines, commented out, for setting d3cold_allowed flag 2018-04-01 13:36:50 -04:00
Jake Day f562512115 adding rescan to post in hibernate script 2018-04-01 13:26:25 -04:00
Jake Day e0e1fddf53 rename hibernate script 2018-04-01 13:23:07 -04:00
Zyfarok 58a2720a85
Tabs to space in hibernate.sh
Fix inconsistent use of space and tabs in hibernate.sh
2018-03-27 15:19:57 +02:00
Jake Day 45c79c046c fix for hibernate script 2018-03-08 22:21:01 -05:00
Jake Day 61c6bf8a73 resets are not needed for hibernate 2017-12-10 12:46:24 -05:00
casainho fd97d2cd27 Added hibernate.sh that is needed for wifi working after booting from hibernation 2017-11-22 10:39:56 +00:00
Jake Day 8fa5610374 removing unwanted script 2017-11-18 10:12:23 -05:00
Jake Day a2e1d27509 update script for reloading mwifiex_pice module on wake 2017-09-06 20:25:47 -04:00
Jake Day e6ec6b1cdb updating wifi interface names 2017-08-22 20:10:55 -04:00
Jake Day 5afd0ad3ba adding config files and moving kernel source 2017-08-20 19:28:05 -04:00