Commit graph

451 commits

Author SHA1 Message Date
Blaž Hrastnik 0d3e0c975a
Add an issue template. 2019-12-30 21:01:58 +09:00
Maximilian Luz 289f9d67e3
Update links due to repo move 2019-12-28 22:57:43 +01:00
Maximilian Luz b931b147da
Update patches from kernel repo
- surface-acpi:
  - integrate dGPU hot-plug system
  - fix MODULE_ALIAS definitions for auto-loading SID battery and ac
    drivers

- disable DMA for surface3-spi touchscreen driver

- new wifi suspend patch (only 5.3/5.4)

- ipts:
  - do not automatically switch sensor modes (only 5.3)
2019-12-28 00:54:14 +01: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
Maximilian Luz 9e132617b8
Add preliminary v5.4 patches 2019-12-10 01:26:31 +01:00
Maximilian Luz 51ba311b8e
Update README 2019-12-09 21:59:38 +01:00
Maximilian Luz d2445656d9
Fix model output in setup script 2019-12-09 12:13:36 +01:00
Maximilian Luz 969a0197f6
surface-acpi: SID support for AC/Battery and HID
Add support for Surface Laptop 3 keyboard as well as Surface Laptop 3
and Surface Pro 7 Battery/AC.
2019-12-06 02:43:19 +01:00
Maximilian Luz 1d7d649d59
Remove SIGNING.md in favor of wiki entry 2019-12-02 22:20:10 +01:00
Maximilian Luz a7601f96d8
Merge pull request #19 from kitakar5525/sleep-script-ipts
sleep-script: IPTS: fix module unloading on newer kernels
2019-12-02 22:15:49 +01:00
Maximilian Luz 2b8cf4001c
Get libwacom-surface from GitHub releases
Automatically download libwacom-surface from its GitHub release page [1]
and remove the package from this repository.

[1]: https://github.com/qzed/libwacom-surface-deb/releases
2019-12-02 22:12:49 +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 e4176a0057
Fix shellcheck warnings in setup.sh
Fix linter warnings in setup.sh, outpu info about files added, removed
or changed via verbose flags. Re-format console output for readability.
2019-12-02 22:01:59 +01: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
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