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

Vertical scroll speed too fast (xrdpMouse) #150

Closed
fabwu opened this issue Sep 18, 2019 · 32 comments · Fixed by #234
Closed

Vertical scroll speed too fast (xrdpMouse) #150

fabwu opened this issue Sep 18, 2019 · 32 comments · Fixed by #234
Labels
confirmed confirmed reproduction

Comments

@fabwu
Copy link

fabwu commented Sep 18, 2019

I'm using xrdp with Hyper-V to run Ubuntu 18.04 in a VM and the vertical scroll speed of the mouse is too fast.

I couldn't find any options in the xrdpMouse driver so I wanted to asked you if it is possible to adjust the scroll sensitivity?

@bmcmullin
Copy link

bmcmullin commented Jan 10, 2020

Same issue, but on Linux Mint xfce 19.3 (layered on Ununtu 18.04 anyway). Quite frustrating, as the VM is otherwise almost fully usable for everyday work, but this is sadly very close to a showstopper. Current workaround is just ignore touchpad and plug in a USB mouse but would be much nicer if touchpad could be properly configured.

FWIW: I did find this discussion of installing xserver-xorg-input-synaptics-hwe-18.04 (also mentioned in the Mint 19.3 release notes); but that driver doesn't seem to load under xrdp - I assume because in that case, the VM lacks direct hardware access to recognise/identify the touchpad). So we need something that "native" to xrdp?

@Marchen
Copy link

Marchen commented Feb 18, 2020

Same issue, on Kubuntu 18.04 connecting from MacOS.

@dblaber
Copy link

dblaber commented May 25, 2020

I am also having this issue, macbook pro, tigervnc viewer+server works fine, but xrdp + xorgxrdp and xrdp+Xvnc scroll too fast, almost unusable mouse scrolling. Anyone have any work around?

@bmcmullin
Copy link

Only workaround for the moment seems to be to use an external mouse in place of the trackpad...

@dblaber
Copy link

dblaber commented May 25, 2020

@bmcmullin Do you also have a mac trackpad?

I am thinking this is an xrdp issue, not an xorgxrdp issue, as Xvnc +xrdp also has same issue. Doesn't Xvnc use its own virtual devices?

@bmcmullin
Copy link

"Do I have a mac trackpad?" - No: currently working on PC laptop hardware only - so can't personally vouch for this as a workaround on Mac or anything else. Would be useful to have a report on that of course.

@elixd
Copy link

elixd commented Aug 8, 2020

Same using macOS trackpad. Scrolling is too fast to the point of being unusable

@xpusostomos
Copy link

You think it's bad with a trackpad, with a trackpoint it's an absolute disaaster. Is nobody able to fix this?

@dblaber
Copy link

dblaber commented Aug 23, 2020

I think someone has to identify why trackpad is being a problem before it can be fixed. I have yet to try with a regular mouse, but I have a feeling it as something to do with wheel acceleration being passed through, if there was a way to disable that, wonder if it woudl work. anyone else have any ideas?

@rbreaves
Copy link

This does need addressing - finding a way to adjust the scroll speed of an xrdpmouse is important.

@jituce
Copy link

jituce commented Jul 28, 2021

same issue with linux mint , any one got any solution yet?

@pauloabeck
Copy link

Same issue with xfce4, Ubuntu 20.04, RDP. Tweaking mouse properties does not help.

@metalefty metalefty added the confirmed confirmed reproduction label Sep 22, 2021
@metalefty
Copy link
Member

I confirmed it is actually an issue. It needs to be addressed.

@aerobinsonIV
Copy link

Same issue here, Dell Precision 7760/Windows 10 Host, Ubuntu 20.04 Guest.

@zp4rker
Copy link

zp4rker commented Mar 7, 2022

Would love to see this fixed. I'd attempt it myself but I don't even know where to start; if someone could offer some guidance, I could try to get something going.

@andro42
Copy link

andro42 commented Jun 23, 2022

Using MS RDP Client to connect to Linux Mint machine (xRDP). I have same problem. Anybody found any workaround?

@rbreaves
Copy link

Use ssh and x11vnc?

@chrisbitmead
Copy link

Personally I don't consider vnc a solution because it sucks so much with multiple monitors, whereas rdp is fantastic with multiple monitors.

@andro42
Copy link

andro42 commented Jun 24, 2022

Personally I don't consider vnc a solution because it sucks so much with multiple monitors, whereas rdp is fantastic with multiple monitors.

I agree.

I was testing it with "xinput test ". And got "Pressed Button 5" or "Pressed Button 4" when scrolling with 2 finger on touchpad (Synaptics). The same happens when using hardware mouse wheel, but this is more controllable compared to touchpad. Did not found any setting to change this behavior.

@rbreaves
Copy link

rbreaves commented Jun 30, 2022

Personally I don't consider vnc a solution because it sucks so much with multiple monitors, whereas rdp is fantastic with multiple monitors.

Why I use separate user sessions.. and a terminal that can access a shared tmux session. And that is whether I use RDP or VNC.. currently I use both, and I do not mean layered inside of xrdp. I straight up use vnc over ssh on Linux and rdp from Windows.

There are other good and valid reasons to break up things even with 2 separate rdp sessions imho. Virtual desktops can then be per monitor instead of workspace.. which is annoying.

@seflerZ
Copy link
Contributor

seflerZ commented Jul 6, 2022

This is because xrdp doesn't have a touchpad driver and simulate the touchpad as mouse. In the xorgxrdp source code there're only mouse and keyborad event. When scrolling in touchpad, xrdp translate the event as mouse scrolling which will be too many (because touchpad is continous scrolling).

sefler@ubuntu:~$ xinput --list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ xrdpMouse                               	id=6	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ xrdpKeyboard                            	id=7	[slave  keyboard (3)]

According to Xorg documentation, touchpad event should be triggered by method called "xf86PostTouchEvent()", but currently xorgxrdp lib has only "xf86PostButtonEvent".

A hack solution would be adding a threshold in wheel scroll event which event_msg_ids are 107,108(UP) 109,110(DOWN). The threshold can be placed in "rdpInput.c" like:

int
rdpInputMouseEvent(rdpPtr dev, int msg,
                   long param1, long param2,
                   long param3, long param4)
{
    dev->last_event_time_ms = GetTimeInMillis();
    + if (msg == 108 || msg == 110 || msg == 107 || msg == 109) {
    +   if (dev->last_event_time_ms - dev->last_wheel_time_ms < 50)
    +    {
    +       return 0;
    +    }
    + }

    + if (msg == 107 || msg == 109) {
    +   dev->last_wheel_time_ms = dev->last_event_time_ms;
    + }

    if (g_input_proc[1].proc != 0)
    {
        return g_input_proc[1].proc(dev, msg, param1, param2, param3, param4);
    }
    return 0;
}

I've compiled it and tested to be okay.

@metalefty
Copy link
Member

@seflerZ Thanks for the help!

@Bappy1988
Copy link

I wonder if this fix could be plugged into the main driver branch under a toggle called "slow down touchpad scrolling" ? It's a tricky one because you'd probably have to manually select it on and off depending on whether you've plugged in an external mouse or not as under xrdp the input hardware is abstracted by the host device.

@realgreef
Copy link

The fixed worked for me, but, I had to declare last_wheel_time_ms in rdp.h.
Running Slackware 15.0 and XFCE. xrdp 0.9.12, xorgxrdp 0.2.12.

    CARD32 last_event_time_ms;
+   CARD32 last_wheel_time_ms;

    int conNumber;

@seflerZ
Copy link
Contributor

seflerZ commented Aug 31, 2022

I wonder if this fix could be plugged into the main driver branch under a toggle called "slow down touchpad scrolling" ? It's a tricky one because you'd probably have to manually select it on and off depending on whether you've plugged in an external mouse or not as under xrdp the input hardware is abstracted by the host device.

This is a hack solution and will not merge into the master. The best way is adding a touchpad driver and call the touchpad functions. I'll do some research when I got time.

@metalefty
Copy link
Member

@seflerZ I'm working on merging your workaround until we get the best fix because your fix actually works and is effective. Thank you for your work. I'd appreciate it if you could keep researching.

metalefty added a commit to metalefty/xorgxrdp that referenced this issue Aug 31, 2022
metalefty added a commit to metalefty/xorgxrdp that referenced this issue Sep 5, 2022
@metalefty
Copy link
Member

Hello everyone, I've release xorgxrdp v0.9.19 that includes a workaround to mitigate too fast scroll.

This workaround is provided by @seflerZ and as he says, this is a hack solution but useful to mitigate too fast scroll.

Thanks @seflerZ !

@seflerZ
Copy link
Contributor

seflerZ commented Sep 9, 2022

@metalefty It's my pleasure. I'm intended to implement fully inertial scrolling and did make some progress. Later I'll share it.

@zobi
Copy link

zobi commented Jul 28, 2023

Hello everyone, I've release xorgxrdp v0.9.19 that includes a workaround to mitigate too fast scroll.

This workaround is provided by @seflerZ and as he says, this is a hack solution but useful to mitigate too fast scroll.

Thanks @seflerZ !

Hello i use xrdp 0.9.21.1 and i still have the same issue with macbookair connect with xrdp to a kali vm.
I try :
XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes in sesman.ini
But it didn't work for me ...
Have you an idea ?
Thanks a lot

@seflerZ
Copy link
Contributor

seflerZ commented Jul 28, 2023 via email

@furrnace
Copy link

I have vertical scrolling issues (too fast) on macOS RDP with these packages on Debian bookworm:

Package: xorgxrdp
Version: 1:0.9.19-1

Package: xrdp
Version: 0.9.21.1-1

Package: xorg
Version: 1:7.7+23

/etc/xrdp/sesman.ini:

[SessionVariables]
PULSE_SCRIPT=/etc/xrdp/pulse/default.pa
XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes

This should in theory work fine with the above versions?

@metalefty
Copy link
Member

Sudddenly 3 people @dropwhile @zobi @furrnace has reported XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes is not wokring with macOS RDP in a month.

I certainly confirmed the fix mitigates too fast scroll speed before making a release. It is definitely a working mitigation a year ago. So I guess something has changed in macOS RDP client and it disables the mitigation.

@neutrinolabs neutrinolabs locked as resolved and limited conversation to collaborators Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
confirmed confirmed reproduction
Projects
None yet
Development

Successfully merging a pull request may close this issue.