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

About the fluency of the mouse on window and ubuntu. #1452

Closed
625781186 opened this issue Sep 1, 2021 · 37 comments
Closed

About the fluency of the mouse on window and ubuntu. #1452

625781186 opened this issue Sep 1, 2021 · 37 comments
Labels

Comments

@625781186
Copy link

625781186 commented Sep 1, 2021

On win10 , Its mouse fluency is perfect .
On Ubuntu1804 , click and scroll lose or become dull.
jdfw3-w
jdfw3-u

On win10 , WheelUp is right ;
On Ubuntu1804 , WheelDown and WheelUp seem error , became Button4Pressed,
image
image

@625781186
Copy link
Author

625781186 commented Sep 1, 2021

I'm not sure if it has anything to do with my Ubuntu in vmware?

@625781186
Copy link
Author

Mouse move Test.
jdfw4

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

I'm not sure if it has anything to do with my Ubuntu in vmware?

I don't think so, because it runs better in a virtual machine than in the WSL2.
The development on Linux was with the most recent versions. You are using 18.04, try using the 20.04 version.

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

Another observation is the font type you are using. You can see that the ScrollView arrows occupies two columns. The Rune.ColumnWidth always returns 1, for those unicodes, no matter the font are used. This is a problem that I struggle to discover the column width based on font types in a console application, but without success. So you can be clicking on the wrong side of the column, worth trying.

@625781186
Copy link
Author

On unbuntu 20.04 ,
Mouse scroll is ok ,
But scrollview scrollbar drag event is failure.
jdfw5

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

@tznind can you confirm that, please? With my laptop touchpad I have no issue like this one.

@tznind
Copy link
Collaborator

tznind commented Sep 1, 2021

Mouse wheel (on touchpad) is working great as is clicking on the up and down scroll arrows.

Currently there does seem to be an issue with the scrolling via dragging the indicator but it could be related to the issues fixed in:
#1448

scrolling

Drag scrolling was unpredictable and bit messed up. Its like once you start dragging the scroll bar and lift up the mouse on another control it misses that and keeps on thinking you are dragging scroll around even though no mouse buttons are pressed.

Edit: Have tried on your clipboard-fix branch and not seeing different behavior so probably not related to that PR

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

On touchpad it's needed to do a double click to anchor the mouse and then move up and down.

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

Which driver are you using in this video?

@tznind
Copy link
Collaborator

tznind commented Sep 1, 2021

Which driver are you using in this video?

This was the CursesDriver ( or are you talking to 625?)

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

Sorry, I was talking to you @tznind.

@BDisp
Copy link
Collaborator

BDisp commented Sep 1, 2021

On touchpad it's needed to do a double click to anchor the mouse and then move up and down.

Did you did this @tznind ?

@tznind
Copy link
Collaborator

tznind commented Sep 1, 2021

On touchpad it's needed to do a double click to anchor the mouse and then move up and down.

Did you did this @tznind ?

Ok have tried double click, it works sometimes. It seems to want to click on exactly the edge of the scroll indicator (if the scroll indicator covers 4-5 lines only 1 of those console cells will trigger the dragging working).

Also it feels a bit unatural to have to double click but I appreciate that it is a limitation of curses/linux that causes this.

To me click and drag is a 'nice to have' not a must have. There are always going to be environments and setups where it doesn't work properly.

@BDisp
Copy link
Collaborator

BDisp commented Sep 2, 2021

@tznind do you know why I'm getting the following error if running dotnet without sudo on Ubuntu?
cannot snap-exec: cannot exec "/snap/dotnet-sdk/137/snap/command-chain/snapcraft-runner": permission denied

@tznind
Copy link
Collaborator

tznind commented Sep 2, 2021

Could be this? dotnet/core#4446

@BDisp
Copy link
Collaborator

BDisp commented Sep 2, 2021

Well, for me the Ubuntu is finished with the backdoor that allows applications run as root without the user knowledge. Even uninstalling snapd we can't install the dotnet-sdk through apt. I'll install the Debian version.

@BDisp
Copy link
Collaborator

BDisp commented Sep 3, 2021

@tznind I also having the same issue on Debian, but instead of the snap, is with the /usr/share/dotnet/. Only on the second time doing dotnet build, builds successfully. I'm using VirtualBox shared folders.

/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(464,5): error NETSDK1029: Unable to use '/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64/5.0.9/runtimes/linux-x64/native/apphost' as application host executable as it does not contain the expected placeholder byte sequence '63-33-61-62-38-66-66-31-33-37-32-30-65-38-61-64-39-30-34-37-64-64-33-39-34-36-36-62-33-63-38-39-37-34-65-35-39-32-63-32-66-61-33-38-33-64-34-61-33-39-36-30-37-31-34-63-61-65-66-30-63-34-66-32' that would mark where the application name would be written.

When I do a dotnet run inside the UICatalog folder I get the following error, but if I do a sudo dotnet run I get the above error, meaning they are related.

This executable is not bound to a managed DLL to execute. The binding value is: 'c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2'
A fatal error was encountered. This executable was not bound to load a managed DLL.

I know it's recommended to clone the repository into Linux, but with shared folders is more easily to maintaining the same changes on both, Windows and Linux. If I clone into Linux how can I have synchronized changes without to commit to Github? With shared folders when I change on Linux the changes are reflected on my Windows folder and if I change in Windows the changes are also reflected in Linux. What the best way to work with cross platforms with a centralized code? Thanks.

@tznind
Copy link
Collaborator

tznind commented Sep 4, 2021

Hmn... Its possible there are stale files. Have you tried dotnet clean before building?

Its also possible that nuget is restoring the 'wrong' OS files if your nuget cache is also in the project/shared folder (See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-locals for clearing that).

If I clone into Linux how can I have synchronized changes without to commit to Github?

Your solution sounds cool if you can get it to work. Otherwise you could use the git patch system to avoid having to commit to your fork. But it would be a bit of a pain.

You might also run into issues with line endings currently where linux will use \n and windows uses \r\n. Normally that is sorted out on checkout by git. So if you checkout the project you can [actually get different files] depending ont he OS you check it out under (https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings) (as git standardises line endings for your OS).

@BDisp
Copy link
Collaborator

BDisp commented Sep 4, 2021

Thanks for your feedback.

Hmn... Its possible there are stale files. Have you tried dotnet clean before building?

I do a clean always I changing from Windows to Linux or vice versa. For this testing I'm always doing dotnet clean before the dotnet build. The first build always fails and only have successfully at the second build.

Its also possible that nuget is restoring the 'wrong' OS files if your nuget cache is also in the project/shared folder (See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-locals for clearing that).

This issue is only happening with the current dotnet version 5.0.404. Using the tool to clean all the cache takes more time to build, because it is downloading the packages again. The main difference is it successfully build at first time, but do again a clean and a build, the error persists. But I never can do a dotnet run, as it is always giving the same error. This part is intriguing me a lot. I have a Linux Mint distro on the VirtualBox, which have several dotnet-sdks versions installed and doesn't gives none of this errors.

Your solution sounds cool if you can get it to work. Otherwise you could use the git patch system to avoid having to commit to your fork. But it would be a bit of a pain.

I already have seen that but it is painful to maintain, because sometimes I'm doing changes from Windows and Linux all the time, and for sure that something will be lost.

You might also run into issues with line endings currently where linux will use \n and windows uses \r\n. Normally that is sorted out on checkout by git. So if you checkout the project you can [actually get different files] depending ont he OS you check it out under (https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings) (as git standardises line endings for your OS).

This is minor of the problem because git normalize that and we could ignoring too.

My guessing:
I think there is something on how the dotnet is reading the build files, reading from the file when that changes are in the OS memory and yet not been written to the disk.

@tznind
Copy link
Collaborator

tznind commented Sep 4, 2021

Have you tried building to a fresh directory e.g.

dotnet build -o Z:\temp\out2

If the output directory is completely seperate and not a shared location that might help?

I'd also make sure theres nothing in the Windows machine that might be looking at the folder while it is building in linux (make sure file explorer isn't in that folder or any powershell/terminals have that as current directory). I imagine if antivirus too was watching the disk while it is building in another OS that could cause issues. You could try running procmon or a similar tool to watch for file activity in the folders from windows while it was building in linux.

But since it only happens with a specific version of the dotnet sdk it could be some kind of race condition or parallel build issue. Does it happen using dotnet build at the root of the project only? or are you able to replicate it building in the UICatalog or Terminal.Gui projects on their own?

@BDisp
Copy link
Collaborator

BDisp commented Sep 4, 2021

Have you tried building to a fresh directory e.g.

dotnet build -o Z:\temp\out2

If the output directory is completely seperate and not a shared location that might help?

You indicated a Windows output folder, but I think you was referring to a Linux output folder. So, I did dotnet build -o /Temp/out and after fixed some permissions issues, it ended up with the same errors.

I'd also make sure theres nothing in the Windows machine that might be looking at the folder while it is building in linux (make sure file explorer isn't in that folder or any powershell/terminals have that as current directory).

No I haven't nothing in the Windows side that could be blocking the shared folder.

I imagine if antivirus too was watching the disk while it is building in another OS that could cause issues. You could try running procmon or a similar tool to watch for file activity in the folders from windows while it was building in linux.

I already seen in the antivirus log and hasn't nothing indicating it was blocked something. So, I think there is no need to install some monitoring for that.

But since it only happens with a specific version of the dotnet sdk it could be some kind of race condition or parallel build issue.

I think so too. The problems related with this issue I seen on the internet is from the 5.0.404 version.

Does it happen using dotnet build at the root of the project only? or are you able to replicate it building in the UICatalog or Terminal.Gui projects on their own?

I can build inside each project but executing dotnet run always gives the error.

For now I cloned my own gui.cs repository in the Linux and I'll do all the changes related with Linux. The problem is when in the same fixes I need to made changes to common code related with Windows and Linux, but I'll worry about this problem later.

@BDisp
Copy link
Collaborator

BDisp commented Sep 4, 2021

@tznind can you confirm that the mouse movement is not working on the clipboard-fix. In the WSL2 with debian is working and in the VirtualBox with debian too, is not working.
Maybe I messed my keyboard configuration. Can you check what configuration you have on yours, please?
Use the sudo dpkg-reconfigure keyboard-configuration

@tznind
Copy link
Collaborator

tznind commented Sep 4, 2021

@tznind can you confirm that the mouse movement is not working on the clipboard-fix.

For me everything mouse is working on that branch. Scroll bar dragging (with or double-click or mouse down and drag) is working too but can be a bit hit or miss (sometimes it flashes a bit, sometimes it doesn't seem to want to scroll). But I think its basically fine.

Maybe I messed my keyboard configuration. Can you check what configuration you have on yours, please?
Use the sudo dpkg-reconfigure keyboard-configuration

My keyboard is Generic 105-key PC (intl.) but it is a laptop so might differ from yours.

@BDisp
Copy link
Collaborator

BDisp commented Sep 4, 2021

I reinstalled the Debian in the VirtualBox and the keyboard configuration is equal to yours. Did you needed to do any configuration to your mouse after installation?

@BDisp
Copy link
Collaborator

BDisp commented Sep 4, 2021

@tznind I installed the Debian 11 version. Will it be this version that is causing these problems all?

Edit:
Mouse is working fine with the distro. It only not working properly with the UICatalog.

@BDisp
Copy link
Collaborator

BDisp commented Sep 4, 2021

Do you have Mono installed?

@tznind
Copy link
Collaborator

tznind commented Sep 5, 2021

Do you have Mono installed?

Nope I don't have Mono installed

@BDisp
Copy link
Collaborator

BDisp commented Sep 5, 2021

Did you needed to do any configuration to your mouse after installation?

I still having this issue running the UICatalog, the mouse movement isn't detected. In the linux interface is working fine.

@BDisp
Copy link
Collaborator

BDisp commented Sep 5, 2021

Finally I figured out the Ubuntu dotnet issue, see dotnet/core#4446 (comment).

@BDisp
Copy link
Collaborator

BDisp commented Sep 5, 2021

About the Debian mouse behavior I couldn't figure it yet.

@BDisp
Copy link
Collaborator

BDisp commented Sep 5, 2021

The mouse scrolling on the UICatalog on the Ubuntu is working fine to me with a touchpad.

With one finger do a double click and without release it move the finger up and down.
scroll-one-finger

By clicking the left button and with another finger move up and down. In the case the mouse is being outside from the console window, the driver stops responding. So, try moving always inside the console window.
scroll-left-button-finger

Edit:
Just to stress that was used the CursesDriver. With the NetDriver isn't so perfect, maybe because is more slower than CursesDriver.

@tig tig added the bug label Oct 5, 2021
@BDisp
Copy link
Collaborator

BDisp commented Nov 2, 2021

@625781186 do you still have this issue with the current main branch?

@tig
Copy link
Collaborator

tig commented Feb 6, 2022

Closing due to lack of response from @625781186

@tig tig closed this as completed Feb 6, 2022
@625781186
Copy link
Author

@625781186 do you still have this issue with the current main branch?

No , the problem still exists.
You can run test in vm machine with ubuntu 2004 virtual images.

@tig tig reopened this Feb 15, 2022
@BDisp
Copy link
Collaborator

BDisp commented Feb 21, 2022

On CursesDriver two or three soft mouse clicks on a touchpad without pressing doesn't work anymore to simulate a double and triple click. So my suggestion is remove this feature and use only the double and triple click by really pressing, listening clicking.
Can anyone confirm please.

Edit:
The above is related running Ubuntu on a virtual machine.

With WSL is more complicated because nothing work, only the button pressed and the single click, by double clicking.
I'm using Windows 11.

@625781186
Copy link
Author

625781186 commented Feb 24, 2022

@BDisp
Sorry , There was a problem with the click position when I tested it last time (
The problem caused by the position of the scroll bar arrow is a little offset).

At present, this bug has been fixed,

but the following problems still exist :

  1. High frequency clicks on the arrow only take effect the last time ;
  2. The scroll bar cannot be dragged;
  3. Enhancements to arrow hover and click styles .

@BDisp
Copy link
Collaborator

BDisp commented Feb 24, 2022

Are you using a mouse or the laptop touchpad?

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

No branches or pull requests

4 participants