Commit graph

59 commits

Author SHA1 Message Date
Maximilian Luz 04c59f410c
sleep-script: bluetooth: Add note to disable bluetooth completely
In some instances, bluetooth devices can prevent the device from going
to sleep or cause spurious wake-ups. Add a note to the sleep script on
how bluetooth can be turned off completely during suspend.
2019-12-22 15:56:41 +01:00
kitakar5525 7f139b7c4f sleep-script: IPTS: fix module unloading on newer kernels
On a recent version of kernels, "intel_ipts" module will be used by companion
driver "ipts_surface". So, unload the module first on unloading whole IPTS
modules and load the module last on loading whole IPTS modules.
Otherwise, unloading "intel_ipts" will fail.

Unloading the module will automatically unload "intel_ipts" module but
I did not remove the line for clarity and for kernels that don't have
the companion driver ("ipts_surface").

On my 5.3 kernel:
$ lsmod | grep -e "Used by" -e "ipts"
Module                  Size  Used by
ipts_surface           16384  0
intel_ipts             45056  1 ipts_surface
hid                   143360  6 i2c_hid,usbhid,hid_multitouch,hid_sensor_hub,intel_ipts,hid_generic
mei                   122880  5 mei_hdcp,intel_ipts,mei_me
i915                 2273280  18 intel_ipts

Tested on kernel 5.3.12 and 4.19.85 that use the "ipts_surface" companion driver with IPTS lines
uncommented on sleep script.
2019-12-03 06:09:10 +09:00
Maximilian Luz d065c13cca
Fix surface-acpi module names for initramfs-tools 2019-12-02 19:56:41 +01:00
Maximilian Luz 15bf4e4f1c
Remove outdated udev rules for Surface Book 2
Instead of relying on udev rules targeted specifically at the nouveau
driver, users should consider installing and customizing the Surface DTX
daemon. This daemon is specifically intended to dispatch all necessary
related to clipboard detachment/attachment.
2019-12-02 19:51:01 +01:00
Paul Batchelor 38aa664ee1 Fixed udev rules for type cover.
These are adjustments needed in order for the type cover to work properly:

ATTR -> ATTRS

SUBSYSTEMS -> SUBSYSTEM

{iProduct} -> {product}

The initial sleep command was causing things to not work, so this was removed as well.
2019-12-01 20:59:11 -05:00
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 6f7679b00b
Seperate firmware and configs 2019-09-28 03:26:32 +02:00
Dorian Stoll 4d026f53b9
Update and clean up bundled firmware 2019-09-28 03:26:32 +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
Sam Doshi 51d4546450 adding touchscreen and pen udev rules for SP6 2019-04-25 18:39:49 +01:00
Jake Day e71356f50e updating sound config 2019-03-13 13:08:29 -04:00
Jake Day d4e5ab5670 adding config file for button fixes 2019-03-07 15:01:35 -05:00
Jake Day 12eac38efc adding config file for sound fixes 2019-03-07 15:01:21 -05: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 7beb288014 fix surface type cover udev rule 2019-02-07 07:54:59 -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 148e917631 change pulse audio config files to be examples 2019-01-28 11:51:03 -05:00
Jake Day a5c410e28b adding surface_acpi module to initramfs 2019-01-22 08:31:08 -05:00
Jake Day ca5f445101 update default lid switch handling 2019-01-01 13:11:40 -05:00
Jake Day f72425b324 re-purpose xorg.conf intel file as example 2018-10-23 10:01:17 -04:00
Jake Day 0286c60be2 adding support for surface go 2018-09-10 12:33:19 -04:00
Jake Day bcc46bc1e1 updating sleep script to fix resume issues 2018-06-24 13:28:16 -04:00
Jake Day d01c7a5bbe fix pulseaudio default.pa 2018-06-07 17:45:03 -04:00
Jake Day bcf42082f7 adding override for wifi powersave 2018-06-06 22:26:03 -04:00
Jake Day 7f879ac02c use interrupt driven scheduling instead of timer based for pulse 2018-06-06 22:15:43 -04:00
Jake Day 0c4424db8e update udev rule for undocking SB2 2018-04-18 19:02:24 -04:00
Jake Day 72725d75e6 renamed ipts rules to touchscreen rules and add SP3 support 2018-04-15 11:43:25 -04:00
Jake Day a377dd8945 updating udev rules 2018-04-10 22:09:07 -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 0bc2f0748e updating pulse daemon settings 2018-03-10 17:42:16 -05:00
Jake Day 45c79c046c fix for hibernate script 2018-03-08 22:21:01 -05:00
Jake Day fe3fc0975f adding config for modules to load in initramfs 2018-02-17 15:40:43 -05:00
Jake Day 95d56cd460 adding udev rule for docking/undocking keyboards (SP4/SB2) 2018-02-07 21:07:20 -05:00
Jake Day 5841eb24dd add wifi powersave option to networkmanager.conf 2018-02-06 18:36:40 -05:00
Jake Day 4acfbb1cc3 change dri to true in intel graphics X11 conf 2018-01-19 19:57:34 -05:00
Jake Day f9a69b0a2a adding xorg config file for intel graphics 2018-01-12 08:25:54 -05:00
Jake Day 61c6bf8a73 resets are not needed for hibernate 2017-12-10 12:46:24 -05:00
Jake Day 09f78e1f82 remove i915 options from modprobe
While these help with sb2, they cause issues with other devices. We will
get support in the newer kernel updates.
2017-12-05 11:28:45 -05:00
Jake Day 1951fb39c2 add conf file for i915 options
these options should help screen tearing and allow touch usage after
being undocked on the surface book 2
2017-11-26 18:08:47 -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 ab5f988135 adding udev rule for touchscreen and pen for surface book 2 2017-11-16 21:56:12 -05:00
Jake Day 3fc64a8b35 removing unwanted file 2017-11-16 21:18:38 -05:00
Jake Day b278e5dc81 updating udev rules for touchscreens on pen for SP4, SP2017 and SB 2017-11-08 21:58:54 -05:00