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

Ubuntu 22.04 mouse position doesn't update #1659

Open
asaph96 opened this issue Apr 25, 2022 · 39 comments
Open

Ubuntu 22.04 mouse position doesn't update #1659

asaph96 opened this issue Apr 25, 2022 · 39 comments

Comments

@asaph96
Copy link

asaph96 commented Apr 25, 2022

What happened?

My previous setup worked flawlessly, it was a Windows 11 as a server and a Ubuntu 20.04 as a client, both using the latest 2.4.0 build, but after updating my client to Ubuntu 22.04 LTS, the mouse position on the client stopped working. I know that the mouse position is being transmitted when setting the log level to DEBUG2, but it doesn't move on the client's screen

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

Client: Snap
Server: EXE Installer from Github releases

What OSes are you seeing the problem on? (Check all that apply)

Linux, Windows

What OS versions are you using?

Client: Ubuntu 22.04 LTS
Server: Windows 11

Relevant log output

  • Client
[2022-04-25T20:14:50] DEBUG2: readf: read 2 byte integer: 2670 (0xa6e)
[2022-04-25T20:14:50] DEBUG2: readf: read 2 byte integer: 706 (0x2c2)
[2022-04-25T20:14:50] DEBUG2: recv mouse move 2670,706
[2022-04-25T20:14:50] DEBUG2: writef(CNOP)
[2022-04-25T20:14:50] DEBUG2: wrote 4 bytes
[2022-04-25T20:14:50] DEBUG2: msg from server: DMMV
[2022-04-25T20:14:50] DEBUG2: readf(%2i%2i)
[2022-04-25T20:14:50] DEBUG2: readf: read 2 byte integer: 2684 (0xa7c)
[2022-04-25T20:14:50] DEBUG2: readf: read 2 byte integer: 705 (0x2c1)
[2022-04-25T20:14:50] DEBUG2: recv mouse move 2684,705
[2022-04-25T20:14:50] DEBUG2: writef(CNOP)
[2022-04-25T20:14:50] DEBUG2: wrote 4 bytes
[2022-04-25T20:14:50] DEBUG2: msg from server: DMMV
[2022-04-25T20:14:50] DEBUG2: readf(%2i%2i)
[2022-04-25T20:14:50] DEBUG2: readf: read 2 byte integer: 2697 (0xa89)
[2022-04-25T20:14:50] DEBUG2: readf: read 2 byte integer: 704 (0x2c0)
[2022-04-25T20:14:50] DEBUG2: recv mouse move 2697,704
[2022-04-25T20:14:50] DEBUG2: writef(CNOP)
[2022-04-25T20:14:50] DEBUG2: wrote 4 bytes
[2022-04-25T20:14:50] DEBUG2: msg from server: DMMV
[2022-04-25T20:14:50] DEBUG2: readf(%2i%2i)
  • Server
2022-04-25T20:14:50] DEBUG2: msg from "NB-SBDEV-1397": CNOP
[2022-04-25T20:14:50] DEBUG2: no-op from
[2022-04-25T20:14:50] DEBUG2: onMouseMoveSecondary -3,-1
[2022-04-25T20:14:50] DEBUG2: move on NB-SBDEV-1397 to 2648,832
[2022-04-25T20:14:50] DEBUG2: send mouse move to "NB-SBDEV-1397" 2648,832
[2022-04-25T20:14:50] DEBUG2: writef(DMMV%2i%2i)
[2022-04-25T20:14:50] DEBUG2: wrote 8 bytes
[2022-04-25T20:14:50] DEBUG2: msg from "NB-SBDEV-1397": CNOP
[2022-04-25T20:14:50] DEBUG2: no-op from
[2022-04-25T20:14:50] DEBUG2: onMouseMoveSecondary -3,+0
[2022-04-25T20:14:50] DEBUG2: move on NB-SBDEV-1397 to 2645,832
[2022-04-25T20:14:50] DEBUG2: send mouse move to "NB-SBDEV-1397" 2645,832
[2022-04-25T20:14:50] DEBUG2: writef(DMMV%2i%2i)
[2022-04-25T20:14:50] DEBUG2: wrote 8 bytes
[2022-04-25T20:14:50] DEBUG2: msg from "NB-SBDEV-1397": CNOP
[2022-04-25T20:14:50] DEBUG2: no-op from
[2022-04-25T20:14:50] DEBUG2: onMouseMoveSecondary -3,-2
[2022-04-25T20:14:50] DEBUG2: move on NB-SBDEV-1397 to 2642,830
[2022-04-25T20:14:50] DEBUG2: send mouse move to "NB-SBDEV-1397" 2642,830
[2022-04-25T20:14:50] DEBUG2: writef(DMMV%2i%2i)
[2022-04-25T20:14:50] DEBUG2: wrote 8 bytes
[2022-04-25T20:14:50] DEBUG2: msg from "NB-SBDEV-1397": CNOP
[2022-04-25T20:14:50] DEBUG2: no-op from
[2022-04-25T20:14:50] DEBUG2: onMouseMoveSecondary -2,-2
[2022-04-25T20:14:50] DEBUG2: move on NB-SBDEV-1397 to 2640,828
[2022-04-25T20:14:50] DEBUG2: send mouse move to "NB-SBDEV-1397" 2640,828
[2022-04-25T20:14:50] DEBUG2: writef(DMMV%2i%2i)
[2022-04-25T20:14:50] DEBUG2: wrote 8 bytes
[2022-04-25T20:14:50] DEBUG2: msg from "NB-SBDEV-1397": CNOP
[2022-04-25T20:14:50] DEBUG2: no-op from
[2022-04-25T20:14:50] DEBUG2: onMouseMoveSecondary -2,-3
[2022-04-25T20:14:50] DEBUG2: move on NB-SBDEV-1397 to 2638,825
[2022-04-25T20:14:50] DEBUG2: send mouse move to "NB-SBDEV-1397" 2638,825
[2022-04-25T20:14:50] DEBUG2: writef(DMMV%2i%2i)
[2022-04-25T20:14:50] DEBUG2: wrote 8 bytes
[2022-04-25T20:14:50] DEBUG2: msg from "NB-SBDEV-1397": CNOP
[2022-04-25T20:14:50] DEBUG2: no-op from
[2022-04-25T20:14:50] DEBUG2: onMouseMoveSecondary -2,-2
[2022-04-25T20:14:50] DEBUG2: move on NB-SBDEV-1397 to 2636,823
[2022-04-25T20:14:50] DEBUG2: send mouse move to "NB-SBDEV-1397" 2636,823
[2022-04-25T20:14:50] DEBUG2: writef(DMMV%2i%2i)
[2022-04-25T20:14:50] DEBUG2: wrote 8 bytes

Any other information

No response

@CransNeighbour
Copy link

As far as I know Ubuntu 22.04 LTS is now using wayland as default, whereas x11 was used in earlier versions. Barrier does not work with wayland.
Run echo $XDG_SESSION_TYPE to see what you are using. It should be possible to switch back to x11 before you log in.

@mcurrie-scs
Copy link

Can confirm, have Ubuntu 22.04 installed and the $XDG_SESSION_TYPE is wayland, barrier does not work.

@ptolios
Copy link

ptolios commented Apr 27, 2022

Same here.
You can tell that the mouse is moving because you can see the hover effects on the apps, but there is no mouse pointer.

@JuanTorchia
Copy link

JuanTorchia commented Apr 28, 2022

Can confirm too, the same problem with Ubuntu 22.04, see the hover effects, but not mouse pointer.

Edit: in the login screen change to Xorg and work fine

image

@dr1ver1
Copy link

dr1ver1 commented May 1, 2022

Similar issue here - the mouse disappears when I move it to the client, and then I can't move it back to the server - I have to stop Barrier on the client. Mouse buttons work and the keyboard works.
Everything was working fine until a few days ago.

Client: Ubuntu 20.04.4 LTS, Barrier v2.4.0-release-ac5a1bfd, installed from Ubuntu Software Centre
Server Windows 10 Home, Barrier v.2.4.0-release-3e0d758b, I think I installed it from Github

echo $XDG_SESSION_TYPE returns x11

@obsidiangroup
Copy link

Can confirm this affects not only barrier, but Synergy as well and the same fix works

@dr1ver1
Copy link

dr1ver1 commented May 3, 2022

Similar issue here - the mouse disappears when I move it to the client, and then I can't move it back to the server - I have to stop Barrier on the client. Mouse buttons work and the keyboard works. Everything was working fine until a few days ago.

Client: Ubuntu 20.04.4 LTS, Barrier v2.4.0-release-ac5a1bfd, installed from Ubuntu Software Centre Server Windows 10 Home, Barrier v.2.4.0-release-3e0d758b, I think I installed it from Github

echo $XDG_SESSION_TYPE returns x11

Just to emphasise: my Ubuntu is using x11, not Wayland, and has the issue

@evadeflow
Copy link

Just to emphasize: my Ubuntu is using x11, not Wayland, and has the issue

Same here. I'm using X11 with Ubuntu 20.04 (not 22.04) as a client and Windows 10 as the host, and the mouse pointer disappears after switching to Ubuntu. The buttons, however, do respond, but I can't see which window has the focus, so... it's pretty useless at the moment.

In case it helps, I'm running Barrier 2.4.0-release-50899421 on Ubuntu [built from source], and Barrier 2.4.0-release-3e0d758b on Windows.

@long2ice
Copy link

long2ice commented May 5, 2022

Same here, could you please fix it?

@Tampa
Copy link

Tampa commented May 7, 2022

I noticed the cursor under wayland goes away after you leave it for a certain amount of time, I suspect it isn't hardware rendered, but only exists in software with the actual position and input being hardware handled. Similar to some games that have a software and hardware method for capturing mouse input.

This decoupled behavior allows for some things like hiding the cursor or capturing it to a window, which is something previously not possible, but it likely breaks the way barrier creates the cursor as a virtual input device as wayland ties it strictly to the connected mouse instead. I connected a mouse to the machine and when I moved that while barrier was active the cursor showed up where I had moved it, but immediately disappeared when no more input came in and barrier reclaimed the mouse input.

I looked in the wayland config, but there doesn't seem to be any switch to disable the cursor hiding functionality. It might be possible to change this behavior some other way if barrier is active, might have to poke some of the wayland devs for help on this.

@filipetomita
Copy link

Just change from Wayland to X11 and will work and wait wayland team fix it

@MrJoyming
Copy link

Ubuntu 22.04 LTS
vim /etc/gdm3/custom.conf
find #WaylandEnable=false delete #
:wq
reboot

@draekko
Copy link

draekko commented Jun 9, 2022

Unfortunately going back to X11 is not an option for some of us, doing so in my case is impossible due to bugs in the graphics display driver / firmware / kernel causing system lockups using it (when doing video related activities or heavy 3D usage) and forced into using Wayland only since it doesn't trigger them as much for my setup.

@micter59
Copy link

echo $XDG_SESSION_TYPE returns x11 for me also, but barrier won't work :-(
Same here :-(
Server is Windows 10, Ubuntu is 22.04.
The change i've made was to update Ubuntu from 20.04 to 22.04
And now it's not working anymore.

I've made the change from wayland to x11, and echo $XDG_SESSION_TYPE now returns x11.
But this does not solve the problem.

Just for information, if I reverse the config, with Ubuntu being the server, and W10 the client, it's working.
In my case it's not the best configuration, but if this or nothing, I take this.

@Haprog
Copy link

Haprog commented Jul 9, 2022

I'm on Pop!_OS 22.04 (based on Ubuntu) and have no problems with Barrier when using X11. I tried Wayland once (after upgrading from 21.10 to 22.04), but with Wayland it doesn't work at all so I just wen't back to X11 and everything is working as before.

My setup:

  • Host:
    • OS: Windows 10 Pro version 21H2
    • Barrier 2.4.0
  • Client:
    • Hardware: Dell XPS 13 (9310) laptop with Intel Iris Xe Graphics
    • OS: Pop!_OS 22.04 with X11
    • Desktop environment: GNOME 42.2
    • Barrier 2.4.0

@maoyj
Copy link

maoyj commented Jul 14, 2022

Probably it's the windows' (barrier server) problem.
I have same problem recently.

Case 1:

  • Host: barrier 2.4.0 on Win10 21H2
  • Client: barrier 2.4.0 on Win7 Ultimate
    The keyboard works on client, but mouse position do not update (mouse click works).

Case 2:

  • Host: barrier 2.4.0 on Win10 21H2, same hardware in case1 server;
  • Client: barrier 2.4.0 on Manjaro KDE with kernel 5.15.53-1, same hardware in case1 client.
    Same problem, just mouse position do not update.

Case 3:

  • Host: barrier 2.4.0 on Manjaro KDE , just switch the host and the client
  • Client: barrier 2.4.0 on Win10 21H2
    EVERYTHING WORKS PERFECTLY.

You can try case 3, it may helps

@mgodani
Copy link

mgodani commented Jul 29, 2022

I just installed Ubuntu 22.04.1 LTS, installed barrier (snap) and got here because, using this installation as the host and a windows 10 client I couldn't get my mouse across screens. $XDG_SESSION_TYPE throws "wayland" and before changing it to x11 as some of you suggested, I tried changing the Dock "position on screen" to "bottom" in Settings -> Appearance. It immediately started working. I didn't even have to restart barrier since it was configured properly already.
I hope this helps somebody out there.

@oussamazerrouki
Copy link

oussamazerrouki commented Aug 1, 2022

Pop OS 22.04 same issue.
$XDG_SESSION_TYPE=x11
DISTRIB_ID=Pop
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Pop!_OS 22.04 LTS"
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
NAME="Pop!_OS"
VERSION="22.04 LTS"

@pandruszkow
Copy link

pandruszkow commented Aug 29, 2022

I recently upgraded 18.04->22.04.1 and my system is exhibiting the same issue.

Barrier server: Ubuntu 22.04.1 (freshly installed), barrier 2.4.0+dfsg-2 (non-snap)
Barrier client: Ubuntu 20.04, barrier 2.3.2+dfsg-1build1 (non-snap)

In Wayland mode, Barrier registers updates to mouse position (according to a DEBUG2 log), but refuses to move the cursor to the other machine. In X11 mode, Barrier functions as normal.

Workarounds I tried:

  • changing the Dock "position on screen" to "bottom" in Settings -> Appearance (in Wayland mode): did not work for me. Same behaviour as earlier.
  • launching Firefox (in Wayland mode): Barrier suddenly started working. I was able to move the mouse to a different screen. When I closed Firefox, it stopped working again. When I launched Firefox once more, it started working once more.

I have not tested this further as I decided to switch back to X.org on this machine, but I am happy to test it upon request.

@tari3x
Copy link

tari3x commented Sep 14, 2022

My XDG_SESSION_TYPE=x11. Ubuntu 22.04 server, qemu built-in client with Win11. Keyboard works fine, but mouse in Windows is not visible and does not move - if I right click, the menu drops down exactly in the middle.

Sounds like Wayland is a red herring?

@Casper042
Copy link

Casper042 commented Sep 15, 2022

Having similar problems here.
Was on Ubuntu 20 and working well
Updated to 22 and noticed the Ghost Cursor issue.

Updated Windows 10 Server from 2.2 or 2.3 (can't remember) to 2.4
Now when I try to move cursor from Windows 10 (server) to Ubuntu 22 (client) the cursor just bounces back but maybe 200 pixels to the right.
So if I keep pushing the mouse up, the cursor just jumps right until it hits the top right corner.

I tried the WaylandEnable=False as mentioned above, no change (aside from Ubuntu now looks ugly, the colors are all off)
I also confirmed XDG_SESSION_TYPE = x11

Logs and Server Config attached.
In Log (Debug1) I had just rebooted the Ubuntu client again so you can see it's full handshake and then the attempt to change screens.
Only thing that jumps out at me is something about "DEBUG: dropped bogus delta motion: [-768,-437"

BarrierLog.txt
BarrierConfig.sgc.txt

@nickkontos
Copy link

I recently upgraded 18.04->22.04.1 and my system is exhibiting the same issue.

Barrier server: Ubuntu 22.04.1 (freshly installed), barrier 2.4.0+dfsg-2 (non-snap) Barrier client: Ubuntu 20.04, barrier 2.3.2+dfsg-1build1 (non-snap)

In Wayland mode, Barrier registers updates to mouse position (according to a DEBUG2 log), but refuses to move the cursor to the other machine. In X11 mode, Barrier functions as normal.

Workarounds I tried:

  • changing the Dock "position on screen" to "bottom" in Settings -> Appearance (in Wayland mode): did not work for me. Same behaviour as earlier.
  • launching Firefox (in Wayland mode): Barrier suddenly started working. I was able to move the mouse to a different screen. When I closed Firefox, it stopped working again. When I launched Firefox once more, it started working once more.

I have not tested this further as I decided to switch back to X.org on this machine, but I am happy to test it upon request.

I can confirm, opening firefox seems to work for me too. Closing it has the same effect. Cannot switch back to xorg due to driver issues.

@gastonking
Copy link

gastonking commented Nov 4, 2022

Hi I just dissabled the wayland like this:
Ubuntu
sudo nano /etc/gdm3/custom.conf
add if not exist this line:
WaylandEnable=false
then restart
sudo systemctl restart gdm3

Fedora 38

sudo nano /etc/gdm/custom.conf
add if not exist this line:
WaylandEnable=false
then restart
sudo systemctl restart gdm

Best Regards.

This work for me!

@alifgufron
Copy link

Hi Im using Windows 10 as Server Barrier and ubuntu 22 jammy as client and have same problem.

i try disable wayland on ubuntu and it works.

  1. nano /etc/gdm3/custom.conf
  2. remove # on WaylandEnable=false
  3. save and exit
  4. systemctl restart gdm3
  5. then try barrier again

This Work for me!!

@SoftCafe
Copy link

SoftCafe commented Nov 20, 2022

Have same "Missing Mouse Cursor" problem, but in TTY mode.
I have installed Ubuntu 22.04.1 Live Server in VirtualBox on Win 7, no GUI (yet).
The mouse cursor disappears when I move from my Win 7 VirtualBox Host to my Ubuntu 22.04.1 Guest server.
echo $XDG_SESSION_TYPE=tty

When I cloned Ubuntu 20.04 and performed a "do-release-upgrade", the mouse cursor worked OK as expected in the Ubuntu 22.04.1 upgrade.

  1. The lesson here, the bug occurs in TTY mode, before "ubuntu-desktop" is installed.

A few hours later...
2) Installed ubuntu-desktop. Problem exacerbated. VirtualBox Guest Ubuntu 22.04.1 cannot see mouse, cursor or keyboard key presses. Must reset Guest via VBox menu to get Ubuntu's attention.
I removed Ubuntu from VirtualBox and cloned a working Ubuntu 22.04 VBox Guest, then ran do-release-upgrade.
All seems to be well.

  • DrDon

@AdolfFiliusGatara
Copy link

I had the same issue,
I am not sure whether this is relevant or not,
But after changing my Server's display scale to 100%
the cursor moves as expected on the client side

Previously

Server Spec:
OS: Windows 11 v22H2
Barrier vers: 2.4.0
Resolution: 2560x1440, on the native laptop screen
Display Scale: 125%, later I changed it to 100%

Client:
OS: Ubuntu 22.04.1 LTS
Barrier vers: 2.4.0
Resolution: 2560x1440, on external monitor
Display Scale: 100%

@tari3x
Copy link

tari3x commented Dec 18, 2022

My display scale is 100% yet I still have the issue. @AdolfFiliusGatara: to make sure it's not a coincidence, does your issue reliably come back if you set display scale back to 125%?

@gankyui
Copy link

gankyui commented Dec 29, 2022

Hi Im using Windows 10 as Server Barrier and ubuntu 22 jammy as client and have same problem.

i try disable wayland on ubuntu and it works.

  1. nano /etc/gdm3/custom.conf
  2. remove # on WaylandEnable=false
  3. save and exit
  4. systemctl restart gdm3
  5. then try barrier again

This Work for me!!

sry, my English suck..
i mean after that, i try to set the MAIN display 100% scale, this work for me..

laptop1: win11, barrier-server, main display, 1920*1080 with a monitor(extended mode)
laptop2: ubuntu 22.04.1

@ignatiusmadee
Copy link

My server Win 10 set 125% scale and change it to 100% and it works.
My cursor in client Ubuntu 22.04 finally appeared.

@Michelangelo-Foresta
Copy link

Hi I just dissabled the wayland like this: sudo nano /etc/gdm3/custom.conf add if not exist this line: WaylandEnable=false then restart sudo systemctl restart gdm3

This work for me!

this worked for me !

@pizour
Copy link

pizour commented Mar 22, 2023

have tried all the suggested fixed. Changing scale back to 100% works for me

@paulstelian97
Copy link

Another one: changing server (Windows) scale to 100% fixes Barrier, but, well, makes things too small on this screen.

@umarmughal824
Copy link

I also got this issue now.

Suddenly touchpad and mouse stopped working. It works before login but doesn't work after login.

I have been using this OS for 3 months but I didn't face that issues before but I don't know why it suddenly stopped working.

@paulstelian97
Copy link

I also got this issue now.

Suddenly touchpad and mouse stopped working. It works before login but doesn't work after login.

I have been using this OS for 3 months but I didn't face that issues before but I don't know why it suddenly stopped working.

Wayland is not supported, you need to ensure the Linux system is on Xorg.

@tomk235
Copy link

tomk235 commented Sep 5, 2023

same here: no cursor when barrier server on win10 with 125% scale. worked after setting scale to 100% (right click on win10 desktop->display settings->scale and layout/change the size of text, apps and other items)

thanks to AdolfFiliusGatara!

@Pnalson
Copy link

Pnalson commented Oct 13, 2023

Downgrade windows version to 2.3.4 helps

@TheKvc
Copy link

TheKvc commented Jan 12, 2024

i try disable wayland on ubuntu and it works.

nano /etc/gdm3/custom.conf
remove # on WaylandEnable=false
save and exit
systemctl restart gdm3
then try barrier again

even after disabling wayland, it was not working for me... then from here https://itsfoss.community/t/cannot-get-barrier-to-work/5012 i came to know, that something related to VPN in windows machine can also cause issues...

i searched VPN in my win 11 laptop and disabled everything related to VPN. and then restarted barrier service on both "ubuntu 22.04 (server) and win11 (client)"

also, note i disabled 'auto-cofig' option from 'windows 11 laptop (client)' and then it startd working again for me.

it consumed 2 hours of my time though. :| hopefully, this will help you too.

@Tampa
Copy link

Tampa commented Jan 12, 2024

Wayland is the future...
Wayland isn't supported...

Strange thing is, the cursor is there, you can click on things and all, but you just don't physically see it on screen. Disabling what's meant to finally save the linux desktop isn't exactly a great option either. Especially if Wayland is set as default now more and more will run into it. Ain't there a software-based renderer for the cursor anyways, as in "providing your own" rather than taking over the system cursor(which we only need for the position, which works fine)?

@hatrd
Copy link

hatrd commented Apr 1, 2024

Windows server, Ubuntu client, the cursor would be moved to right bottom in ubuntu. Changing Windows scale to 100% fixes, but makes screen too small. Downgrading windows server version to 2.3.4 is a nice workaround.

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