Mouse cursor shape changes then I can't click

I have a weird issue every day with Zorin.
I have a Lenovo laptop and when I am working on vs code software, I don't know which keys I accidentally press, that suddenly after that I can't click on any icon. I mean the click does not work at all on anything.

After this happens when I hover on Mozilla, Terminal, or other icons the cursor shape changes to a hand, like hovering on a link. It is strange because by default my cursor shape is a pointer.

The only way I could get out of this mess is opening the terminal by keyboard and then typing: reboot

I do appreciate if you could help me.
Thanks

Cursor changing shape from pointer to hand (forefinger pointing) is normal, and same in Windows. That does not explain why nothing happens when you mouse click.

Have you visited Settings/Mouse & Trackpad and tested your mouse there?

Is it only when working on vs code software?

Thanks.
I upload 3 images that shows my mouse and touchpad settings I hope it helps. Please take a look.
1
2
3

The problem occurs only in vs code but I am not sure whether it is related only to this software, because I use the keyboard a lot only in vs code.
I guess I press combination of some keys that cursor changes but I couldn't figure out which keys causes this change.

Only after typing this problem occurs.

I am not aware of any keyboard shortcut that changes the mouse cursor.

This looks to me like VS Code is Crashing, resulting in the VS Code default cursor being frozen on the screen.

Did you install VS code with:

sudo apt install code

?

Thanks.
If it is related to vs code why mouse click does not work on anything else like browsers, softwares, start menu icon, etc?
I am unable even to close my browser by clicking.

I guess so but I am not sure because I installed it 6 months ago and it worked fine until this week.

I have a Dell laptop too and I haven't seen such a problem there.

You can check with
terminal:

flatpak list

or

snap list

to see if it is listed as either of those packages.

If it is crashed, your Desktop could be unable to respond.

I am guessing based on the available information... doesn't mean I am on target.

Yes it is listed there.

Snap and Flatpak both sandbox all their applications. This means that both are effectively double sandboxed (unnecessarily).
Another user recently had this issue and @zenzen figured out that the users trouble was that it was installed as a Flatpak - so it could not properly access all the files on the system since it was isolated from them.
Recommend that you

snap remove code

and completely uninstall VS Code.
Then install from APT with the terminal:

sudo apt install code

Or if you prefer using the Software app, click the Source button on the VS Code page and check the option for Zorin OS instead of Snap or Flatpak.

Thanks a lot.
I uninstalled code easily but when I run

sudo apt install code

it shows me this error:

No apt package "code", but there is a snap with that name.
Try "snap install code"

Then I followed the instruction here:
https://www.codegrepper.com/code-examples/shell/how+to+download+vs+code+on+zorin+os
This time

sudo apt install code

Works fine and I installed it again.
Am I correct or is there something wrong in installation process?

4 Likes

You are correct. I had forgotten that VS Code was not in the Main Universe repository and that you need to add the repository from MS.
I haven't used VS Code in several months by this point...

I suppose it's more elegant to add a (trusted) ppa for this type of issues since you get updates to the packages you install from there. Do you also get updates when installing the .deb package directly?

Sorry I can't remember how I received vs code updates and what do you mean by trusted ppa? You mean that my installation process is not from a trusted source?
If you have any suggestion for installing vs code please let me know.
Thanks

Actually my previous comment was meant for Aravisian, just trying to clear a doubt about installing .deb packages directly.

PPA means personal package archive. You added Microsoft's repository, in order to be able to install VS Code, as per the instructions on the solution that you shared. There's nothing wrong with that so no worries :+1:

2 Likes

I have yet to encounter a malicious third-party PPA.
Part of my own bias is that I know exactly what goes into a person creating a PPA for debian based systems, so I retain confidence of their security due to that experience.

Software uploaded on launchpad, for example, is test-installed on a virtual machine by launchpad and must pass through Lintian.

The biggest issue with third party PPA's is not one of security against malicious software, as much as confidence against compatibility and maintenance.
Which is in itself a pretty low risk.

1 Like

Hi everyone.
I just wanted to share the result.
The problem does not occur as much as before but 2 days ago while I was working with vs code then suddenly mouse click didn't work and everything was frozen.
Today something strange happens. When I was typing in Firefox the same problem happens 3 times and I was unable to click and I rebooted to get out of the mess.
Do you have any idea how I could solve this persistent problem?
@Aravisian @zenzen

Very strange issue, and is sounds like it's somehow related to the keyboard rather than a particular program like VS Code? Any chance you can use an external keyboard for a few days to see if this happens again?

When this happens, can you still open and access programs via the keyboard only i.e., using the Super key to navigate to another program and use it normally? Just trying to make sure the issue affects only the pointer.

NOTE: Wait for someone with more experience to confirm the following method or try at your own risk.

Another option that comes to mind, but I'm not entirely sure how it will affect the system is to restart the display manager. I don't know if it'll close running applications so it may lead to data loss if you haven't saved those changes. Although I know that VSCode in particular does a good job at preserving sessions even with unsaved documents.

1 Like

Thanks.
I could use keyboard. I mean I press ctrl+alt+t to open terminal and I write reboot there but I could not type in firefox or other frozen programs.
I guess window key on my keyboard opens the starter menu too.

Normally when Firefox and other programs crash there's a prompt short after asking if you want to keep waiting. Did this ever show up? I'd be curious to see if the program shows up on the System Monitor or by running htop on the terminal...

You also mentioned that rebooting fixed the issue but have you tried to simply log out and log back in? In my previous comment I mentioned restarting the display manager but actually this is more like what I was referring to: Refresh Zorin OS desktop without logging out

Maybe you can try this and if it doesn't work, log out instead. But even if this does work, I must admit that I have no idea what could be causing that behavior...

1 Like

My (past) experience of lockup's could be fixed simply by initiating, but not completing, a session logout. i.e. doing a Ctrl-alt-del then reversing out of the logout.
That always fixed freezing for me. I have not had the problem of late, so I can't confirm that solution still works. Also I am on Z15.3, but that should not matter.

2 Likes

Thanks. It worked I logout a few minutes ago from frozen desktop after that everything was fine. But it is annoying why it happens.