Hi there,
I am running Zorin18_core on a Acer Switch 5 convertible 2-in-1 laptop.
When removing the keyboard and going into tablet mode all is fine, as long as I stay with screen in landscape.
Whenever I turn the screen to vertical or portrait mode the display visualisation changes but only the look. The mouse movement is still in horizontal or landscape. Meaning if I move the mouse up/down it will move left/right.
So the behavior of the screen is not rotating. Only the look.
Anybody and idea?
(with Z17.3 it was the same)
So, moving the mouse left and right actually makes the cursor go up and down?
As usual with these sort of things, it's worth checking if the same issue persists when logging into your account using an X11 as well as a Wayland session.
You can switch between the two at the login screen; there should be a cog wheel icon on the lower right corner.
And just to narrow this down further:
-
First and foremost: does the mouse cursor actually work when you click around on icons, launchers, etc?
-
When you revert back the orientation of the screen to landscape, does the cursor continue to work as before?
-
If you boot your system in portrait orientation and then switch to landscape, do you see the same behavior (where the mouse behaves as if the orientation never changed)?
Well, sometimes the solutions are simple but still complicated.
I ran last days on X11 as I wanted to used the dock Plank (although KDE it worked, with installation came surprisingly also a KDE desktop)
So, I switch to Wayland and the screen rotation is not an issue anymore.
...
But the touchpad works worse and Plank-dock is gone.
...
One death one has to die
Strangely, once I managed to get the cursor on the right position, the click on a button worked. E.g. maximise a window.
Yes, that was not an issue.
Have not tried this one at all.
Plank is not well supported in Wayland. You can use Plank when you add those variables to the command (you can e.g. create an autostart entry or edit the command for the launcher in start menu)
env XDG_SESSION_TYPE=x11 GDK_BACKEND=x11 plank
But it takes a while until Plank is loaded (on my live session around 30 seconds), that is not so good, but then it works.
Ok, one more question: does the cursor go off-screen when you keep scrolling towards the sides? And likewise, does it "stop" moving vertically in either direction in the middle of the screen?
I imagine this is not the case or you would've probably noticed by now, but is good to ask. And if so, then it's likely a simple matter of the mouse not being informed that it needs to move in the right direction.
As you're using Xorg, you can update this setting manually by running a command in the terminal. Looking at this Ubuntu documentation page you can see an explanation as to what we need to do, with some examples of what it would look like if we rotated our screen as in your case.
I know it looks like a lot, especially if you are not used to using the terminal, but here's the gist of it. Just go through it slowly and let me know if you have any questions.
-
Launch a terminal
Either look for "terminal" in the application's menu, or press Ctrl+Alt+T.
-
Install "xinput" to query and update properties on input devices:
sudo apt install xinput -
List all detected input devices:
xinput listLocate your mouse and make a note of its name or ID. I prefer to use the ID as it's easier to type, but keep in mind that this changes between reboots (and probably also if you plug/unplug it).
As an example, here's my output:
⎡ Virtual core pointer id=3 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech ERGO M575 id=9 [slave pointer (2)] ⎜ ↳ hfd.cn USB DEVICE id=11 [slave pointer (2)] ⎜ ↳ FTCS1000:00 2808:0101 Mouse id=12 [slave pointer (2)] ⎜ ↳ FTCS1000:00 2808:0101 Touchpad id=13 [slave pointer (2)] ⎜ ↳ ImPS/2 Logitech Wheel Mouse id=16 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Video Bus id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ hfd.cn USB DEVICE id=10 [slave keyboard (3)] ↳ Intel HID events id=14 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)] ↳ hfd.cn USB DEVICE id=17 [slave keyboard (3)]I can see my Logitech mouse listed in there, but do note that the wheel and the pointer are considered different devices, so be sure to use the right one. In my case, that's ID 9.
-
Update the coordinate matrix:
xinput set-prop 9 "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1It's a little cumbersome to see visually, so you can also separate each row from the matrix into its own line:
xinput set-prop 9 "Coordinate Transformation Matrix" \ 1 0 0 \ 0 1 0 \ 0 0 1This should be the default matrix, but as per that documentation page, you'll have to use a different matrix if you're rotating the screen one way or the other. Give that a try:
Clockwise:
xinput set-prop 9 "Coordinate Transformation Matrix" \ 0 -1 1 \ 1 0 0 \ 0 0 1Counterclockwise:
xinput set-prop 9 "Coordinate Transformation Matrix" \ 0 1 0 \ -1 0 1 \ 0 0 1To revert this when you rotate the screen back to landscape mode, run the first matrix above which is the default.
-
Create an alias to make this easier:
Of course, it would be ideal if this were detected and applied automatically, but you can create an alias in your terminal to make this much faster, too.
Edit the shell configuration file located at in your home directory. You'll have to toggle the visibility of hidden files by pressing Ctrl + H. The file is called
.bashrc. At the bottom of this file add the following lines:alias leftrotate='xinput set-prop "Logitech ERGO M575" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1' alias rightrotate='xinput set-prop "Logitech ERGO M575" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1' alias resetrotate='xinput set-prop "Logitech ERGO M575" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1'Feel free to choose whatever names make more sense to you. Rotating clockwise to me means rotating right, so I called this one "rightrotate", and so on.
Do note that I'm not using the ID number for my device anymore. As I mentioned earlier this will change between reboots, and so for a permanent alias it best to copy and paste the name of your device, instead.
Give this one a try and see if it works
Oh, and we can also create keyboard shortcuts for this, if you want. Let me know if you need any help with that.