-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surface Pro 4: IPTSD fails with "iptsd.service: Main process exited, code=exited, status=237/KEYRING" #44
Comments
I am having exactly the same issue with the linux-surface 5.15.5-1 kernel release on Ubuntu 20.04. Has there been any progression on fixes or temporary workarounds? Edit: I have tried everything mentioned above to try fix it without success, and I have most the same situation of that |
I experience the same issue on my freshly installed Ubuntu 21.10 with linux-surface |
I just tried downgrading to linux-surface 5.14.16 and this fixes the issue for me so actually it might be a different issue to what you are having. |
I'm getting this on the Tigerlake Surface Laptop 4 as well; the IPTS devices exist, yet it fails momentarily after starting. I'm running NixOS unstable. I'm not sure how to debug this further. dmesg doesn't appear to have anything relevant. Is there anything I can do? |
could you output the command of |
Sure!
For good measure, here is
|
Tigerlake devices don't have IPTS. The module shouldn't even load on its own. You need ITHC (https://github.com/quo/ithc-linux) and a development build of iptsd from its master branch (https://github.com/linux-surface/iptsd). |
Ahh, sorry to waste your time; this is simply my mistake. I'll give that a try. If I have any problems I'll definitely open a new issue to avoid cluttering this unrelated one further. edit: If anyone happens to get here via Google, here's how I'm able to use the newest ithc module with nixos-unstable and nixos-hardware. { config, pkgs, ... }:
{
imports = [
<nixos-hardware/microsoft/surface>
];
boot.extraModulePackages = [
config.boot.kernelPackages.ithc
];
boot.initrd.kernelModules = [
"surface_hid_core"
"surface_hid"
"surface_aggregator_registry"
"surface_aggregator"
"8250_dw"
"pinctrl_tigerlake"
"intel_lpss"
"intel_lpss_pci"
];
boot.kernelPatches = [{ name = "ipts-hid"; patch = builtins.fetchurl "https://patch-diff.githubusercontent.com/raw/linux-surface/kernel/pull/132.diff"; }];
nixpkgs.overlays = [
(self: super: {
iptsd = super.iptsd.overrideDerivation (attrs: {
version = "66bd7c4d386c6bf4c77e008bb974ddcb8a52874e";
src = pkgs.fetchFromGitHub {
owner = "linux-surface";
repo = "iptsd";
rev = "66bd7c4d386c6bf4c77e008bb974ddcb8a52874e";
sha256 = "uDt2V7FD8hafZQ22iQUjJACXV9/DiFAfLnpsEqmZTAI=";
};
nativeBuildInputs = attrs.nativeBuildInputs ++ [
pkgs.cmake
];
buildInputs = attrs.buildInputs ++ [
pkgs.cli11
pkgs.fmt_8.dev
pkgs.spdlog.dev
pkgs.microsoft_gsl
pkgs.hidrd
pkgs.SDL2.dev
pkgs.cairomm.dev
];
mesonFlags = [
"-Dsample_config=false"
"-Ddebug_tools=[]"
"-Db_lto=false"
];
postPatch = ''
substituteInPlace etc/meson.build \
--replace "install_dir: unitdir" "install_dir: datadir" \
--replace "install_dir: rulesdir" "install_dir: datadir" \
'';
});
})
];
boot.extraModprobeConfig = ''
options ithc hid=1
'';
systemd.services.iptsd = {
description = "IPTSD";
script = "${pkgs.iptsd}/bin/iptsd ''$(${pkgs.iptsd}/bin/iptsd-find-hidraw)";
serviceConfig.Restart = "always";
wantedBy = [
"multi-user.target"
];
};
} |
the so could you test that command, the scripting inside the script file is not complex, you can using that for starting debug if something is differ from your system and broke the script working. |
Don't want to clutter this unrelated thread too much, but basically what happened was, instead of installing quo/ithc-linux, I applied the patch from linux-surface/kernel#132. Even though |
The systemd service override in the nixos config above did not have an effect. Using that config + running the |
I'm not sure why the systemd override didn't work for you, but if you figure out why please let me know. I'd be happy to help with updating nixos-hardware, but the override above is using unreleased patches and code. Before we update nixos-hardware, we should wait until:
It could be a bit tricky. Someone knowledgeable correct me if I am wrong, but new iptsd will probably, at least temporarily, need a new Nixpkgs attribute, because it's neither backwards nor forwards compatible with current iptsd. (It'd also be really, really cool if we could get some of the Linux Surface patches upstreamed. Not sure how I could help with that. If I spot any oopses or panics in kernel, or segfaults in iptsd, I'll be sure to investigate. Thankfully, it's all been fairly stable for me :) ) |
I replaced the serviceConfig.ExecStart = lib.mkForce "${pkgs.bash}/bin/bash -c '${pkgs.iptsd}/bin/iptsd $(${pkgs.iptsd}/bin/iptsd-find-hidraw)'"; and it may not be pretty but all is well now. |
This issue seems to be related to: #35 (where I have also posted, but that bug report is closed).
Unlike that bug, however, adding a swapfile does not alleviate the issue, though it does appear as though it does. After manually mounting the swapfile and restarting
iptsd
, systemctl states that it is currently running. However, there is still no touch input, and upon checking again, it appears as thoughiptsd
reverts back to the original fail state with theiptsd.service: Main process exited, code=exited, status=237/KEYRING
line. Also, this unit has had plenty of reboots, so unfortunately unable to waive it away as a curse this time :PThis unit is a model
1724
.Touch input works perfectly on UEFI and on rEFInd screen, but once Linux is booted,
iptsd
is unable to launch./dev/ipts/0
and other items in that directory exist and are detected on boot.output of
sudo systemctl status iptsd
:output of
neofetch
Output of
/boot/refind_linux.conf
(first line is auto-selected at boot):Output of
ls -la /boot/
:Output of
sudo dmesg
:Output of
sudo lspci
:output of
sudo lsusb
:(mouse is a Logitech G600 I had in my closet, keyboard is an RK68 that acts as an apple keyboard for some reason, plugged into a basic USB hub in the port).
If there is any other output or information you need, please let me know. I am going to be rebooting to grab UEFI driver strings.
As a side note: I tried using the
fwupd
method you guys provide, and it worked, but it said everything I had installed was newer than what Microsoft offers on their webpage. Half-tempted to flash the driver for the Surface Pro 5, since I have one of those as well and it's perfectly working with this exact same setup.I also have made sure to install:
intel-ucode
iptsd
iio-sensor-proxy
And the hail mary starts here after installing:
libwacom-surface
libinput
xf86-input-libinput
xf86-input-evdev
xf86-input-synaptics
xf86-input-wacom
xf86-video-intel
(note: I am running this primarily in Wayland, but it does not work even on SDDM/Kwin-X11)
I am not sure if this is a traditionally acceptable thing to do on GitHub, but there seems to be another person struggling with this issue on Reddit, with the active thread being here: https://old.reddit.com/r/SurfaceLinux/comments/qizu1w/surface_4_pro_no_touchscreen_ipts_not_running/
The text was updated successfully, but these errors were encountered: