Skip to content
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 Pen / Stylus not working on Opensuse Tumbleweed #183

Open
woiwoiwoiwoi opened this issue Dec 5, 2024 · 5 comments
Open

Surface Pen / Stylus not working on Opensuse Tumbleweed #183

woiwoiwoiwoi opened this issue Dec 5, 2024 · 5 comments

Comments

@woiwoiwoiwoi
Copy link

I've been running linux-surface on my Surface Pro 7 Opensuse Tumbleweed for a while now and it works really well, including touch, screen rotation, etc. One thing I never got to work though is the stylus / Surface Pen. Unfortunately, I would actually need it now, but can't get it to work.

Here's what I tried:

  1. install libwacom-surface-data-2.13.0-2.fc41.noarch.rpm
  2. install libwacom-surface-utils-2.13.0-2.fc41.x86_64.rpm
  3. install libwacom-surface-2.13.0-2.fc41.x86_64.rpm
  4. try to install iptsd-3-1.fc41.x86_64.rpm, but missing dependency libspdlog.so.1.14()(64bit)

What can I do?

Environment

  • Hardware model: Surface Pro 7
  • Kernel version: 6.8.9-49-default (the latest one available for Opensuse Tumbleweed
  • Distribution: Opensuse Tumbleweed
@MadZero80
Copy link

Hi woiwoiwoi,
i have updated Kernel-Surface, libwacom and iptsd with Opensuse Build Service.
take a look here:
https://build.opensuse.org/project/show/home:MadZero:Surface

I have tested on a Surface Pro 8, with Tumbleweed, KDE Wayland. I have no Pen, by default it works the "Intel Touch Hostcontroller" and it feels good.
I'm still missing the last step for multitouch, maybe you can help me with that.
I also don't have enough time. My next point is Hibernate with secure boot enabled.

@woiwoiwoiwoi
Copy link
Author

Hey @MadZero80

Cool to hear you're working on this! Not sure I can help much, but will try. :-)

Regarding hibernation: I did get it to work, with Secure Boot disabled. But that's not what you're looking for, is it?

Multi Touch indeed is not working, look at that! Totally didn't notice. I was pretty sure it did work before, but maybe that was a different distro or something. This device is mostly my "play-around-toy".

Regarding my original question, however, just to make sure I understand how to go about it: I would add your linked repo and then install the kernel, libwacom, and iptsd from there, right? Would be so cool if that worked!

@MadZero80
Copy link

Today I was able to test kernel 6.12.9 with iptsd and libwacom (from my repo) in detail and multi-touch gestures work in Firefox and with images (tested zoom with two fingers). The only thing that still bothers me is that you need more finger space for the touchscreen. It feels better with the Intel Touch Host Controller, which started automatically for me. I hope this is a calibration thing ...

$libwacom-list-local-devices 
/dev/input/event6 is a tablet but not supported by libwacom
devices:
- name: 'Microsoft Surface Pro 8'
  bus: 'unknown'
  vid: '0x045e'
  pid: '0x0c37'
  nodes: 
  - /dev/input/event9: 'IPTSD Virtual Stylus 045E:0C37'
  styli:
   - id: 0xffffe
     name: 'General Pen Eraser'
     type: 'general'
     axes: ['x', 'y' , 'tilt', 'distance', 'pressure']
     buttons: 2
     is_eraser: 'true'
     eraser_type: 'invert'
   - id: 0xfffff
     name: 'General Pen'
     type: 'general'
     axes: ['x', 'y' , 'tilt', 'distance', 'pressure']
     buttons: 2
     erasers: [0xffffe]

sudo iptsd-check-device /dev/hidraw0 
[sudo] Passwort für root: 
[13:26:53.708] [info] Loading config /etc/iptsd.conf.
[13:26:53.708] [info] Loading config /etc/iptsd.d/91-calibration-045E-0C37.conf.
[13:26:53.708] [info] Connected to device 045E:0C37
[13:26:53.708] [info] Running in Touchscreen mode
[13:26:53.708] [info] /dev/hidraw0 is an IPTS device!
dmesg | grep IPTS
[   14.417852] [   T1733] input: IPTSD Virtual Touchscreen 045E:0C37 as /devices/virtual/input/input26
[   14.418124] [   T1733] input: IPTSD Virtual Stylus 045E:0C37 as /devices/virtual/input/input27

Regarding hibernation: I did get it to work, with Secure Boot disabled. But that's not what you're looking for, is it?

Yes, with Secure Boot disabled it works for me too.
Does it take that long for you to return from hibernation until you can use the desktop (KDE) again?

@woiwoiwoiwoi
Copy link
Author

kernel 6.12.9 with iptsd and libwacom (from my repo)

Cool, will test that! Might not get to it over the next few days though.

Does it take that long for you to return from hibernation until you can use the desktop (KDE) again?

I'm on Gnome - which probably is irrelevant. I also have full disk encryption enabled and grub takes quite a long time to decrypt that. I also configured hibernation on my desktop running Tumbleweed and checked its power consumption, which is pretty identical when in suspend or in hibernation. With the delay due to full disk encryption in mind, I stopped using hibernation entirely on my desktop. My Surface Book 6, however, only supports a pretty bad suspend state (checked that at some point) that still uses quite a lot of battery, so hibernation would actually be nice. Except full disk encryption still causes a delay and Firefox often-times prevents hibernation - so I end up never really using it. I'm also trying out Aeon on another machine, which doesn't use grub but systemd (as far as I know), which means that disk decryption is super fast. It's not a tinkering-inviting distro, however, so I didn't even try to get linux-surface to work.

@MadZero80
Copy link

I use systemd-boot with full disk and swap encryption. It feels fast and doesn't cause any problems. For the keyboard when entering the password, I make the following modification (see: (Disk-Encryption) )
Example for Surface Pro 8 and systemd-boot in tumbleweed:

sudo sh -c 'echo -e "add_drivers+=\042 surface_hid_core surface_hid surface_aggregator_registry surface_aggregator surface_aggregator_hub intel_lpss intel_lpss_pci pinctrl_tigerlake \042" > /etc/dracut.conf.d/surface.conf'
sudo sdbootutil add-all-kernels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants