Commit graph

436 commits

Author SHA1 Message Date
Maximilian Luz 70bd694119
Merge pull request #18 from PaulBatchelor/master
Fixed udev rules for type cover
2019-12-02 19:49:26 +01:00
Maximilian Luz 663dde1858
Remove outdated configs in favor of config repo 2019-12-02 19:45:45 +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
Maximilian Luz b75f5ef30e
Update patches via kernel repo
- Improve HID precision touchpad detection
- IPTS cleanup
- surface-acpi restructuring and fixes
2019-11-10 23:40:16 +01:00
Maximilian Luz 2d34af8e14
Add fix for intel_lpss on Pro 7 and Laptop 3
On the Pro 7 and Laptop 3, intel_lpss_pci fails to probe and thus keeps
the system from booting. Add a patch to fix this.

Note: The added patch is on it's way upstream.
See: https://lkml.org/lkml/2019/10/16/1230
2019-11-03 01:04:48 +01:00
Maximilian Luz eb80db2cb1
Merge pull request #16 from GrayHatter/patch-1
Remove funding section
2019-10-23 16:02:56 +02:00
Gregory Mullen e98cbb95cf
Remove funding section
There's no need to support someone who's not maintaining anything anymore. IIRC qzed isn't looking for donations, but IMO he's well worthy of them! So I'd suggest you replace this with your own qzed!
2019-10-22 13:24:30 -07:00
Maximilian Luz 3172322f64
Update surface-acpi
- Rename Kconfig options (SURFACE_ACPI_XXX -> SURFACE_SAM_XXX)
- Rename identifiers/functions.
- Split into multiple modules (surface_sam_ssh, surface_sam_san, ...)
2019-10-21 00:10:47 +02:00
Maximilian Luz dcf51e95e7
Update patches via qzed/linux-surface-kernel
- Fix missing Kconfig dependency of IPTS on DRM_I915
- Add IPTS firmware declarations
- Update button patch based on upstreaming changes
2019-10-17 22:01:18 +02:00
Maximilian Luz 0984748ad5
Merge pull request #15 from StollD/bugfix/disabled-bluetooth
sleep-script: Prevent bluetoothctl from timing out
2019-10-12 00:34:47 +02: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
Maximilian Luz a6c6b97da2
Drop original firmware for MSHW0079
The patched firmware seems to work as intended. As it is a direct
replacement and should not cause any further issues, we can drop the
backup of the original firmware. In case any unforseen issues arise, we
can always get it from the official driver/firmware packages again.

See: https://github.com/jakeday/linux-surface/issues/574
2019-10-03 12:19:16 +02:00
Maximilian Luz c02c4b2f93
Update surface-acpi 2019-10-02 22:44:15 +02:00
Maximilian Luz e6a110e42e
Run cleanpatch 2019-10-02 22:39:02 +02:00
Maximilian Luz 042d83a93a
Update firmware README for patched HID descriptor 2019-10-02 16:54:11 +02:00
Maximilian Luz eac0e5e7e3
Fix HID descriptor for Surface Laptops
The HID descriptor on the Surface Laptops defines the contact count
incorrectly, causing Linux to read a contact count of zero and thus not
producing any touch events. The HID descriptor claims that the contact
count is reported 4 times as one byte value, whereas it is only reported
one time but followed by 3 padding bytes.

See also: https://github.com/qzed/linux-surface-kernel/wiki/IPTS-Firmware#bogus-hid-descriptor-for-surface-laptops-mshw0079
2019-10-02 16:44:08 +02:00
Maximilian Luz bf1f4b3216
Merge pull request #14 from StollD/feature/update-libwacom
Update included libwacom package
2019-10-02 14:50:16 +02:00
Dorian Stoll 3b654b3af0
Update included libwacom package to the latest build by qzed
See: ef078e3fb8

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-10-02 13:33:08 +02:00
Maximilian Luz f12bf96670
Merge pull request #12 from StollD/bugfix/touch-surface-laptop
Fix touch input on Surface Laptop
2019-10-01 15:44:21 +02:00
Maximilian Luz 063d65b985
Merge pull request #13 from StollD/feature/sleep-without-systemd
Remove hard systemd dependency from the sleep script
2019-10-01 15:40:54 +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 cd9cced2fd
Add some documentation about the IPTS driver firmware
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-10-01 12:05:00 +02:00
Dorian Stoll 80788a3386
Replace the HID descriptor for MSHW0079 with MSHW0137
See: https://github.com/jakeday/linux-surface/issues/574

As long as that issue exist, and noone of us understands how to work
with HID descriptors and fix them, replace the file with the one from
MSHW0137 which is confirmed to be working properly.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-10-01 12:04:40 +02:00
Maximilian Luz 293f8214f6
Keep v5.2 patches around for now 2019-09-28 03:32:53 +02:00
Maximilian Luz ffbc925692
Add GPG key 2019-09-28 03:27:11 +02:00
qzed 982ba582f1
Run cleanpatch 2019-09-28 03:27:11 +02:00
qzed e1748122e9
Update surface-acpi for v5.3
This should fix the remaining issues in jakeday#473.
2019-09-28 03:27:11 +02:00
qzed 7f460186ff
Update surface-acpi for v4.19
This should fix the remaining issues in #473.
2019-09-28 03:27:10 +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
qzed acbe43fca4
Add secure boot DER certificate 2019-09-28 03:27:10 +02:00
qzed a9681ee2ac
Add patches for v5.3 2019-09-28 03:26:33 +02:00
kitakar5525 f0ffd413fa
suspend.patch-4.19: Update NVMe part
This commit will update suspend.patch for 4.19

Backported these two patches:
- torvalds/linux@4eaefe8c62
  (nvme-pci: Allow PCI bus-level PM to be used if ASPM is disabled)
- torvalds/linux@accd2dd72c
  (PCI/ASPM: Add pcie_aspm_enabled())

on top of these patches that are already backported by commit
qzed/linux-surface@e8a3d85b22
(Update NVMe part of suspend.patch):
- torvalds/linux@d916b1be94
  (nvme-pci: use host managed power state for suspend)
- torvalds/linux@1a87ee657c
  (nvme: export get and set features)
- torvalds/linux@d6135c3a1e
  (nvme-pci: Sync queues on reset)

Tested and confirmed that suspend is working on Surface Book 1 with
THNSN5512GPU7 TOSHIBA NVMe SSD which has issue resuming from suspend
with PCI bus-level PM.

Link to issue: https://github.com/jakeday/linux-surface/issues/123
(Surface Book with Performance Base: NVMe SSD breaks suspend (s2idle))
2019-09-28 03:26:32 +02:00
Dorian Stoll 6f7679b00b
Seperate firmware and configs 2019-09-28 03:26:32 +02:00
Dorian Stoll 77cf8159e1
Point the setup script at qzed's repository.
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
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 8c3acded2d
Move the no_feedback option into ipts-params.c
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-09-28 03:26:32 +02:00
Dorian Stoll de86889877
Add the ability to load different IPTS firmware per model
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
2019-09-28 03:26:31 +02:00
qzed 292b082b29
Remove unnecessary changes in ACPI/serdev patches 2019-09-28 03:26:31 +02:00
kitakar5525 03e4a8dff3 ipts-5.2: fix crash after some use
- ipts: fix crash caused by calling ipts_send_feedback() repeatedly
(v2-ipts-fix-crash-caused-by-calling-ipts_send_feedback-.patch from kitakar5525/ipts-fix-crash)
2019-09-10 21:55:39 +09:00
kitakar5525 d8b26bd3b7 ipts-4.19: backport changes from 5.2 / fix crash after some use
- ipts: fix crash caused by calling ipts_send_feedback() repeatedly
(v2-ipts-fix-crash-caused-by-calling-ipts_send_feedback-.patch from kitakar5525/ipts-fix-crash)
- i915: ipts: add destroy_doorbell() when disabling ipts guc submission
(https://github.com/jakeday/linux-surface/issues/544#issuecomment-517626511)
- IPTS: Enable debug prints (qzed/linux-surface@a5e6433)
- IPTS: Do not call intel_ipts_cleanup on suspend (qzed/linux-surface@f52dae4)
- IPTS: Add device link for PM (qzed/linux-surface@cf887d8)
- Fix RCS0 GPU hang on module removing
(0001-Fix-RCS0-GPU-hang-on-module-removing.patch from kitakar5525/linux-surface-patches)
2019-09-10 21:53:44 +09: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
kitakar5525 e8a3d85b22 Update NVMe part of suspend.patch
Note:
NVMe part will be merged into Linux 5.3. Remove the part in
0002-suspend.patch when it arrives.

For 5.2
- (Reverted NVMe part of 0002-suspend.patch to apply following patch set)
- nvme: export get and set features · torvalds/linux@1a87ee6
torvalds/linux@1a87ee6
- nvme-pci: use host managed power state for suspend · torvalds/linux@d916b1b
torvalds/linux@d916b1b#diff-bc4c090f021c046a7d256a3fcf86b7da

For 4.19, this patch is also applied
- nvme-pci: Sync queues on reset · torvalds/linux@d6135c3
torvalds/linux@d6135c3#diff-bc4c090f021c046a7d256a3fcf86b7da

See
- Surface Book with Performance Base: NVMe SSD breaks suspend (s2idle) · Issue jakeday#123 · jakeday/linux-surface
jakeday#123
2019-08-26 01:00:45 +02:00
kitakar5525 360a2b1c45 IPTS: Add debugfs entries 2019-08-26 00:58:14 +02:00
qzed a5e6433117 IPTS: Enable debug prints 2019-08-26 00:58:14 +02:00
qzed f52dae4ec1 IPTS: Do not call intel_ipts_cleanup on suspend
Revert a3a3ed3: "updating 4.19 patches to fix touch and suspend".

Calling intel_ipts_cleanup during suspend causes destroy_doorbell to
fail. Furthermore, removing intel_ipts_cleanup from suspend does not
seem to cause any issues on the Surface Book 1 and 2, and the
introduction of the device link in the previous commit may have fixed
some of the edge-cases/race conditions that may have made this call
necessary in the past. If any issue arises from this, we will deal with
it later in a more subtle way.

See https://github.com/jakeday/linux-surface/issues/544 for an
exhaustive discussion on this.
2019-08-26 00:58:13 +02:00
qzed cf887d8c46 IPTS: Add device link for PM 2019-08-26 00:58:13 +02:00
qzed 9cf56369b0 Update patches for v5.2 2019-08-26 00:56:25 +02:00
qzed 21508168a7 Fix GPE interrupt setup for Surface Book 1 2019-08-26 00:54:14 +02:00
qzed 51c7f7a234 Update button patches (v3-upstreaming) 2019-07-27 18:27:19 +02:00