Commit graph

74 commits

Author SHA1 Message Date
kitakar5525 54247faf82 sleep-script: IPTS: fix paths change
Fixes file paths in accordance with linux-surface/kernel@b7c60a63bd
2020-01-18 11:33:58 +09:00
Blaž Hrastnik cdfdf4ac56 Remove Surface Go and SP4 workarounds. (Fixes #37)
Surface Go nowadays works without the touchscreen workaround.

The SP4 rule will run on all devices, breaking IPTS on Surface Go for
example. Therefore we moved it to the device's quirk page, requiring the
user to manually add the file if necessary.
2020-01-08 11:23:40 +09:00
Blaž Hrastnik a53b87cf91 Delete snd-hda-intel.conf, SB2 works correctly without it nowadays. 2020-01-03 10:13:20 +09:00
Dorian Stoll 394b0d603b Use a single surface.rules file for udev
Using a single file with a generic names allows us to easily remove
rules later. If we use specialized filenames we couldn't easily remove
them, we would have to replace them with an empty file.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:13:20 +09:00
Dorian Stoll b184bf438d Make the sleep script executable by default
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:13:20 +09:00
Dorian Stoll 4f47a913ca Remove unloading of mwifiex from the sleep script
As of recently, this is handled in the kernel directly. I have been
running the patch + this script for some time and couldn't notice any
regressions.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:13:20 +09:00
Dorian Stoll 974707aa44 Improve readability of the sleep script a bit
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:13:20 +09:00
Blaž Hrastnik d046546376 Remove soc-button-array.conf (was addressed upstream). 2020-01-03 10:11:02 +09:00
Dorian Stoll daf69af19c Use systemd for Surface Go touch power management
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
Dorian Stoll 581bb34d5c Remove initramfs-tools config
This is a bit of a guess. I am not 100% sure if this has any impact. But I haven't
found any way to make it an independent config file (i.e. it doesn't overwrite a
default one), and it won't work on Arch or any non-debian distro anyways.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
Dorian Stoll 2ffb1a8a5f Use conf.d for the NetworkManager config
This moves the parts of the NetworkManager config that appear to be important
to a surface-specific file in conf.d. That way, no config is overwritten when
installing the files.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
Dorian Stoll 656439fbf6 Remove example X11 config
Same as with the pulseaudio configs: They are not needed and the setup script even
asks if you want to delete them.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
Dorian Stoll 4ef8ec4007 Remove pulseaudio example files
Those don't seem to be neccessary - the setup script itself asks if you
want to delete them

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
Dorian Stoll 8836218417 Remove udev rules for touchscreen / pen
With the revert of the HID changes that IPTS did, those rules are already dead,
since they rely on the "Touchscreen" / "Pen" suffix to detect devices. Those
are not added anymore, and since nothing seems to be broken, it should be safe
to remove them.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
Dorian Stoll 3179ce3622 Removed systemd configs
They only contain values that are the default anyways, and potentially overwrite
custom stuff that was set by the user.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2020-01-03 10:11:02 +09:00
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