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

Some enhancement / feature request #13

Open
Pairman opened this issue Aug 1, 2022 · 35 comments
Open

Some enhancement / feature request #13

Pairman opened this issue Aug 1, 2022 · 35 comments

Comments

@Pairman
Copy link

Pairman commented Aug 1, 2022

The driver has been working nicely in most cases. There's still some annoying issues.

  1. Neither the driver nor the system provide any option to disable touch inputs while using the pen.
  2. The side buttons (for selecting areas) on the surface pen are not working properly. Idk if it's softwares' lacking these functions or if it's not implemented yet in this driver.
  3. Chrome browser recognizes this pen as selecting words rather than scrolling. I think it's Chrome's issue.

Hope you can fix this issue soon.

@NP-chaonay
Copy link

  1. I think this have to do implementation on libinput or/and what app control input device from libinput
  2. idk if you experience same as Surface Slim Pen 2 may have mis-behaviour on side key and soft pressure of bottom button #5 if yes then maybe it is driver issues
  3. It is not issues IMO, however, this is just different behaviour from what Chrome Windows does. TBH, Chrome can separate pen/touch event when website support both, so I think there is some controversial/discussion about the different behaviour on Win vs Linux, but IMO, I prefer Linux behaviour. As when you do pen, you should doing fine-precision action, if you do touch, you should doing courase action, so if pen is not for select then imaging how you can copy text without touchpad. IMO I suggest Chrome team to allow pen for selecting.

@StollD
Copy link

StollD commented Aug 1, 2022

  1. Neither the driver nor the system provide any option to disable touch inputs while using the pen.
[Stylus]
DisableTouch = True

Put this in /etc/ipts.conf

3. Chrome browser recognizes this pen as selecting words rather than scrolling. I think it's Chrome's issue.

This will probably be difficult, because as far as Linux is concerned, the Pen is a mouse pointer. It might be possible to have iptsd expose it as a multitouch device, but that might break the actual pen functionality. I will try experimenting with this.

@NP-chaonay
Copy link

@ StollD

yeah 1) may done this at driver level, however it is better to do the implementation on libinput/or app using that. As role of driver is only to get data / interpret / and send to input system. So I find this as good workaround but not good for long-term

  1. "but that might break the actual pen functionality. I will try experimenting with this.": IMO, no good reason to do this, the only experiment and should be better than that IMO, is to adapt Chrome source code to have some specific behaviour by pen/touch.

@Pairman
Copy link
Author

Pairman commented Aug 1, 2022

Thanks for all replies. I found a better solution for 1) disabling touch when using pen. I found this under the original iptsd repo. Just modify /etc/ipts.conf :

[Config]
BlockOnPalm = True

@StollD
Copy link

StollD commented Aug 1, 2022

IMO, no good reason to do this, the only experiment and should be better than that IMO, is to adapt Chrome source code to have some specific behaviour by pen/touch.

This is not just a chrome issue. I havent used Windows for ages, but if I understand this correctly, under windows, the pen behaves like a finger, meaning you can scroll with it by swiping. Under linux, we send the data as if it was a mouse, so you need to grab the scrollbar and drag it around.

If its possible to send the data as if it was a finger, you could use it like that in any app that supports swiping to scroll.

@NP-chaonay
Copy link

NP-chaonay commented Aug 1, 2022

oh I see what you mean, yeah almost apps in Linux is treat pen as mouse (just alike not 100%, depends on usage context)

however almost on Windows, it is treat alike touching, but however pressing side key make it to be like selecting/mouse dragging, but the addition with right click after untouch.

@NP-chaonay
Copy link

ok I think I guess correct. You're going to say despite of my opinion on default behaviour, there is thing wrong in UI tookit (idk? maybe related if not), that make all apps treat pen like mouse, and it is not same as Windows.

(TBH i dont know how to express this in good wording, but it seem to be some abnormal behaviour that Linux is not same as Windows.)

@NP-chaonay
Copy link

or it is about Wayland vs X11?

@NP-chaonay
Copy link

NP-chaonay commented Aug 1, 2022

I think you are also mean that 100% pen == mouse (not including event that treat pen == pen). And that is the problem. So desipte of my IMO on default behaviour, yeah is may true that it copied 100% of mouse behaviour when using pen (not apply for what context that make use of pen as pen for example drawing online in chrome with pen support)

@NP-chaonay
Copy link

NP-chaonay commented Aug 1, 2022

Ok here is the test result for Linux and Windows (edit inplace later)

-https://openprocessing.org/sketch/591905/ : Pen Pressure support/ mouse drag does constant pressure/ touch does error
-https://tecagile.com/touch-results/: only Touch is shown

For Windows, top website, Touch work (with error) too / mouse and touch does constant pressure / pen pressure works
In bottom website touch and pen work as touch. Click wont work

@Pairman
Copy link
Author

Pairman commented Aug 1, 2022

I'm using the old pen. The side keys have completely no functions rather than misbehaving.

  1. I think this have to do implementation on libinput or/and what app control input device from libinput
  2. idk if you experience same as Surface Slim Pen 2 may have mis-behaviour on side key and soft pressure of bottom button #5 if yes then maybe it is driver issues
  3. It is not issues IMO, however, this is just different behaviour from what Chrome Windows does. TBH, Chrome can separate pen/touch event when website support both, so I think there is some controversial/discussion about the different behaviour on Win vs Linux, but IMO, I prefer Linux behaviour. As when you do pen, you should doing fine-precision action, if you do touch, you should doing courase action, so if pen is not for select then imaging how you can copy text without touchpad. IMO I suggest Chrome team to allow pen for selecting.

@NP-chaonay
Copy link

I'm using the old pen. The side keys have completely no functions rather than misbehaving.

  1. I think this have to do implementation on libinput or/and what app control input device from libinput
  2. idk if you experience same as Surface Slim Pen 2 may have mis-behaviour on side key and soft pressure of bottom button #5 if yes then maybe it is driver issues
  3. It is not issues IMO, however, this is just different behaviour from what Chrome Windows does. TBH, Chrome can separate pen/touch event when website support both, so I think there is some controversial/discussion about the different behaviour on Win vs Linux, but IMO, I prefer Linux behaviour. As when you do pen, you should doing fine-precision action, if you do touch, you should doing courase action, so if pen is not for select then imaging how you can copy text without touchpad. IMO I suggest Chrome team to allow pen for selecting.

so maybe driver is not implement function for that pen. So maybe it is better to note down pen model

@Pairman
Copy link
Author

Pairman commented Aug 2, 2022

I'm using the old pen. The side keys have completely no functions rather than misbehaving.

  1. I think this have to do implementation on libinput or/and what app control input device from libinput
  2. idk if you experience same as Surface Slim Pen 2 may have mis-behaviour on side key and soft pressure of bottom button #5 if yes then maybe it is driver issues
  3. It is not issues IMO, however, this is just different behaviour from what Chrome Windows does. TBH, Chrome can separate pen/touch event when website support both, so I think there is some controversial/discussion about the different behaviour on Win vs Linux, but IMO, I prefer Linux behaviour. As when you do pen, you should doing fine-precision action, if you do touch, you should doing courase action, so if pen is not for select then imaging how you can copy text without touchpad. IMO I suggest Chrome team to allow pen for selecting.

so maybe driver is not implement function for that pen. So maybe it is better to note down pen model

Idk how to name it. Just the old model.
image

@m1nicrusher
Copy link

  1. Chrome browser recognizes this pen as selecting words rather than scrolling. I think it's Chrome's issue.

This is not just a chrome issue. I havent used Windows for ages,

It is true that Linux interprets pen input differently as Windows. However as I Chrome lover I had to give up using Chrome on Linux because there are just too many things that Chrome doesn't properly support.
Take some examples:

  1. Chrome on Linux doesn't support dark mode whereas on Windows it supports. (On Linux it doesn't detect system theme, but you can force it to use dark mode, but it's weird. It seems Chrome just reverses all the colours.)
  2. Chrome on Linux doesn't support touchpad gestures where as on Windows it does (At first I thought my touchpad didn't support multi-finger. Then I found I can pinch zoom on Firefox by accident)
  3. On Linux, if you scroll your mouse wheel on tabs, it will switch tabs whereas on Windows it's not like this by default. I remember a lot of people asking how to disable such features for ages. I believe it was only very recent that Google provide a flag to disable this "scroll on tab" thing.

Anyway, my point is, Google doesn't seem to care about Linux users. So if something went wrong, maybe try other browser to see if it's Chrome's fault?

@m1nicrusher
Copy link

m1nicrusher commented Aug 27, 2022

The side buttons (for selecting areas) on the surface pen are not working properly. Idk if it's softwares' lacking these functions or if it's not implemented yet in this driver.

I'm using SP8 + Slim Pen 2. The side key is behaving differently on Windows but it's working properly for me.

  • For right click, on Windows, you hover the pen to the area and click the side key for a right key. On Linux, you hold the side key, use the pen tip to touch the area (as if it was a normal click) to trigger a right key. It was like this couple of weeks ago but now it's the same on Windows. (I can't remember what I had done)
  • For selecting area (on Xournal++), first you'll need to go into "Preference" -- "Stylus" and set "Button 2" to "Select region".
    Then to select a region, on Windows you hold the side key, hover/touch (I can't remember if you need to touch or not) on the region you like to select, then release the side key to finish selecting. On Linux you'll need to hold the side key, touch the region, lift up the pen tip (while holding the side key) to finish selecting. If you release the side key before you lift up your pen, it will not select but start drawing.

I'm using the old pen. The side keys have completely no functions rather than misbehaving.

EDIT: Also, my old Surface Pen is also working the same as my Slim Pen 2

@m1nicrusher
Copy link

m1nicrusher commented Aug 27, 2022

I do notice that when the tablet is charging, the pen ink is not stable.
stylus

Update: I think old Surface Pen doesn't have this issue. I'll try the most obvious possibility first: charging my Slim Pen 2

@NP-chaonay
Copy link

NP-chaonay commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

. (On Linux it doesn't detect system theme, but you can force it to use dark mode, but it's weird. It seems Chrome just reverses all the colours.)

it has the way to do without reverse all the colour (i know what you mean but now it has native Dark mode using another program arg switch, will tell later in-place editing)

google-chrome --enable-features=WebUIDarkMode --force-dark-mode

  • the most important is force-dark-mode: this will force dark mode to website CSS/HTML appearance
  • --enable-features=WebUIDarkMode must be use with force-dark-mode to make Chrome Internal page and something else to respect above settings
  • noted that both/either of them dont respect user settings, so it is not change according to user theme, only GTK theme on Chrome theme is affected from changing user theme, chrome itnernal pages + website +etc. dont affected

Chrome on Linux doesn't support touchpad gestures where as on Windows it does (At first I thought my touchpad didn't support multi-finger. Then I found I can pinch zoom on Firefox by accident)

this have nothing to do with Chrome, if I not remember it wrong Only Wayland apps support touchpad gesture, that is why GNOME-shell X11 / firefox X11 dont support it, but it work when running on Wayland. So just encourage chromium dev on Wayland then we will make use of it. (sorry, that I missed the update that they already make it on Wayland, see below)

@NP-chaonay
Copy link

NP-chaonay commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

On Linux, if you scroll your mouse wheel on tabs, it will switch tabs whereas on Windows it's not like this by default. I remember a lot of people asking how to disable such features for ages. I believe it was only very recent that Google provide a flag to disable this "scroll on tab" thing.

could you expands the defination of this especially "scroll on tab", I afriad that I not understand it correctly

Anyway, my point is, Google doesn't seem to care about Linux users. So if something went wrong, maybe try other browser to see if it's Chrome's fault?

Agree, also HW accelerated video render/decode.

I do notice that when the tablet is charging, the pen ink is not stable.

let me try this, and report in-place sorry I have opt-out the test. but 50% full charge (battery limie mode) work well for me (SLS Ubuntu 22.04 quo/iptsd quo/ithc Surface Slim Pen 2)

For right click, on Windows, you hover the pen to the area and click the side key for a right key. On Linux, you hold the side key, use the pen tip to touch the area (as if it was a normal click) to trigger a right key. It was like this couple of weeks ago but now it's the same on Windows. (I can't remember what I had done)

For Windows: idk for earlier but for recent, it requires hold side key then touch to make right click

For linux let me update in-place

you could see my issue #5 , there is werid thing happens but I decided to close the issue to retest on new iptsd (linux-surface/iptsd which have pull merge from this recently deprecated quo/iptsd, yeah it deprecated because it already push to that new iptsd)

@m1nicrusher
Copy link

So just encourage chromium dev on Wayland then we will make use of it.

Oh that's news for me, I thought Chrome supported Wayland a long time ago. 😞

But yeah, it seems that slim pen is "more unstable" than old pen for me.

On my SP8, when not charging, pen ink is fine on both pens.

When charging, slim pen almost always results in discontinuing ink whereas old pen is a lot better (sometimes still happens)

@m1nicrusher

This comment was marked as off-topic.

@m1nicrusher
Copy link

google-chrome --enable-features=WebUIDarkMode --force-dark-mode

Thanks for the suggestion, I saw this before but I didn't tried because I thought it "forces" everything to be dark, like, making everything reverse. Blame the name, it's confusing.

So instead, I used this flag:

Auto Dark Mode for Web Contents
Automatically render all web contents using a dark theme. – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

#enable-force-dark

I thought this was more of what I need. But I tried your command line, it works!
It is exactly the other way around! "force" dark mode won't force but will use dark mode. "Auto dark mode" will not use dark mode CSS but will "force" everything into dark mode by reversing the colour!

@NP-chaonay
Copy link

NP-chaonay commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

3. On Linux, if you scroll your mouse wheel on tabs, it will switch tabs whereas on Windows it's not like this by default. I remember a lot of people asking how to disable such features for ages. I believe it was only very recent that Google provide a flag to disable this "scroll on tab" thing.

ok I see it, so I'm quite neutral on this.

@Pairman
Copy link
Author

Pairman commented Aug 27, 2022

  1. Chrome on Linux doesn't support touchpad gestures where as on Windows it does (At first I thought my touchpad didn't support multi-finger. Then I found I can pinch zoom on Firefox by accident)

This can be configured by using the right compositor in Chrome flags. Default is X11, but switching to Wayland can enable pinch to zoom on my Fedora 36.
image

@m1nicrusher

This comment was marked as off-topic.

@m1nicrusher

This comment was marked as off-topic.

@Pairman
Copy link
Author

Pairman commented Aug 27, 2022

This can be configured by using the right compositor in Chrome flags. Default is X11, but switching to Wayland can enable pinch to zoom on my Fedora 36.

That's very helpful. Thank you! Again, this name is so confusing. rofl (why ozone?)

Update: I also notice that on Chrome Wayland, the touchpad scrolling speed is normal (sightly faster than X11 but within acceptable range), because on Firefox Wayland, touchpad scrolling speed is extremely fast. (See: https://bugzilla.mozilla.org/show_bug.cgi?id=1610477)

And there's an issue when using keys to resize and align the window. The window can't align the left half(or right half) screen normally, and even keeps getting smaller if repeating the process. I think it's caused by setting to Wayland.
image

@NP-chaonay
Copy link

NP-chaonay commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

Yeah I'm ok with it as well. My point is, Chrome on Linux and Chrome on Windows, they should have the same functions, behave the same way. If one have something enabled by default, the other should as well. If they decided to add something, at least tell users how to disable it in case someone doesn't like it.

agree on you all for almost cases.

This can be configured by using the right compositor in Chrome flags. Default is X11, but switching to Wayland can enable pinch to zoom on my Fedora 36.

Thanks ahead, I have not known that for real, I think it will work too

(why ozone?)

seem it is joke of chromium devs, just like one of Native Client (If I not wrong, it is like WebAssembly where web can execute thing like binary program but excutaion work in the well sandbox/isolation) it would shorten to NaCl, also Portable Native Client it would shorten as PNaCl or Potassium Sodium Chloride, idk if this is accident but when I see it make PNaCl and see the usage of abbv. "NaCl" instead of NC, I'm quite sure that it is joke.

because on Firefox Wayland, touchpad scrolling speed is extremely fast

but for Ubuntu 22.04 Surface Laptop Sutdio, Firefox Wayland pinch zoom so less speed/range tbh. But for scrolling idk. maybe normal like X11 (just guess)

@Pairman
Copy link
Author

Pairman commented Aug 27, 2022

  • For selecting area (on Xournal++), first you'll need to go into "Preference" -- "Stylus" and set "Button 2" to "Select region".

Thanks. I didn't know xournalpp before and only used krita to test things. Now I have a note taking app.

@NP-chaonay
Copy link

NP-chaonay commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

And there's an issue when using keys to resize and align the window. The window can't align the left half(or right half) screen normally, and even keeps getting smaller if repeating the process. I think it's caused by setting to Wayland.

I have further test, pen stopped working on Chrome Wayland

@Pairman
Copy link
Author

Pairman commented Aug 27, 2022

And there's an issue when using keys to resize and align the window. The window can't align the left half(or right half) screen normally, and even keeps getting smaller if repeating the process. I think it's caused by setting to Wayland.

I have further test, pen stopped working on Chrome Wayland

Me too. And ibus stopped working properly for chrome. I can't input in other languages since it's not showing an input prompt. Fortunately, this can be solved by installing gtk4 , ibus-gtk4 and use GTK_IM_MODULE=ibus google-chrome-stable --gtk-version=4 to start chrome.

@m1nicrusher

This comment was marked as off-topic.

@m1nicrusher

This comment was marked as off-topic.

@Pairman
Copy link
Author

Pairman commented Aug 27, 2022

And there's an issue when using keys to resize and align the window. The window can't align the left half(or right half) screen normally, and even keeps getting smaller if repeating the process. I think it's caused by setting to Wayland.

I have further test, pen stopped working on Chrome Wayland

Me too. And ibus stopped working properly for chrome. I can't input in other languages since it's not showing an input prompt. Fortunately, this can be solved by installing gtk4 , ibus-gtk4 and use GTK_IM_MODULE=ibus google-chrome-stable --gtk-version=4 to start chrome.

Yeah there are just too many issues on Chrome on Linux. I'm pretty sure with some very minimal effort, such huge company is able to fix them. They just don't give a Shift.

Soo, better stick to Firefox then. It's completely opensource as well.

True. I use chrome only for syncing bookmarks with my android. I've already been stranded in google's ecosystem and it's too hard and late now.

@NP-chaonay
Copy link

NP-chaonay commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

And there's an issue when using keys to resize and align the window. The window can't align the left half(or right half) screen normally, and even keeps getting smaller if repeating the process. I think it's caused by setting to Wayland.

Hmmm, I don't have this issue. Weird.

For me it has, but it not just insane as that.

in my case, sometime frequent switching side of half snapping, cause windows not in full size of half like in the pict.

But when resnap, it solve. also note that it seem to using significant delay when do half snapping. compared to X11 version

@m1nicrusher
Copy link

m1nicrusher commented Aug 27, 2022

(it is not direct related to the issue topic, so let collapse)

Good idea, I've hidden some of my off-topic comments as well.

True. I use chrome only for syncing bookmarks with my android. I've already been stranded in google's ecosystem and it's too hard and late now.

But I still wanna suggest, maybe you could use Firefox on your phones as well. You can import bookmarks, history, passwords from Chrome to your Firefox account (have them both installed on your PC and run a wizard on Firefox). Also you can change your autofill service to Firefox as well so you can still enjoy saved app password on your phone.

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

4 participants