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

Cursor gets stuck at the border (does not move to the other screen) #61

Open
egll-tech opened this issue Apr 23, 2020 · 7 comments
Open

Comments

@egll-tech
Copy link

I have searched everywhere on what to do but nothing is working.
Every time I try to move the mouse to the other screen (using my android tablet), it can't move forward, obviously this blocks the possibility of dragging the windows and stuff.
My setup:

  • OS: Pop OS 19.10 (Ubuntu 64-bits)
  • GPU: Hybrid Nvidia GTX 1060 / Intel (I mostly use the NVIDIA driver)
  • x11vnc version: 0.9.16

Tablet:

  • RCA Galileo Pro (Android 6)
  • VNC Client: bVNC

I have setup the 30-virtscreen.conf as suggested in another thread, it shows virtual 1, but I can't use the mouse at all, or the touch screen.

@seffs
Copy link

seffs commented Jun 6, 2020

So I figured out the (weird) behaviour of Nvidia drivers (Boy was I wrong)

If you really need to use Nvidia drivers, then you could follow this guide:

https://sangams.com.np/using-android-pc-as-a-second-monitor-in-linux/

The trick involves forcing the HDMI output. Before continuing, pay extra attention to both your host and the VNC client display resolution. Keep in mind you'd be "occupying" the HDMI port; connecting a real monitor while using VNC will almost certainly mess with your display settings. Highly experimental

This should make the "HDMI" option appear inside VirtScreen. I've switched to integrated Intel drivers since then so I can't tell.

@seffs
Copy link

seffs commented Jun 12, 2020

After messing around with the X configuration files I've arrived to a permanent solution alongside Virtscreen :)

Reminder: This setup assumes you're using a hybrid iGPU/dGPU system and Nvidia drivers are installed. You can read more about it here. Even if your system is not PRIME, you could fix this "invisible wall" issue anyways by adding the "ConstrainCursor" option in the relevant *.conf file located in /usr/share/X11/xorg.conf.d or /etc/X11.

Make sure to paste it under the "Device" Section with the nvidia driver.

# WARNING: System might become unbootable. Always make a backup first :)
# nvidia/nouveau/amdgpu device comes before Intel GPU 
Section "Device"
	Identifier "nvidiagpu0"
	Driver     "nvidia"
	Option     "ConstrainCursor" "off"     # You need this one
EndSection

# Intel iGPU
Section "Device"
	Identifier "intelgpu0"
	Driver     "intel"
	Option     "VirtualHeads" "1"
	Option     "DRI" "3"           # Optional: I was getting artifacts without this one
        Option     "TearFree" "true"   # Optional: Force tearing fix
EndSection

For other configurations see #16

EDIT: Wording and formatting

@Shubodh
Copy link

Shubodh commented Dec 31, 2020

@seffs Hey, thanks for the answer. Adding "ConstrainCursor" off option works!

Finally everything works, except one issue: I am unable to see the mouse pointer on the iPad.

(Not sure if this is because of the iPad app but adding more details anyway: The app I am using on iPad is VNC viewer. I tried using other apps like AnyDesk but AnyDesk isn't even able to connect to the server.)

Let me know how I can fix that. Thank you.

@seffs
Copy link

seffs commented Sep 18, 2021

Hey @Shubodh, glad it worked for you!

I remember overriding the command used by x11vnc in the GUI version, I think that was on the second tab. This gives you plenty of power to mess around. -cursor and -overlay were involved. Again, try combining different settings.

Note: I abandoned this endeavor a long time ago, after dealing with constant regressions inside the Nvidia drivers. A lot of projects have been moving forward in the Linux space since then, such as Wayland and its native virtual monitor support., yet they remain untested. Even Nvidia itself has started paying attention and contributing to FOSS in the last couple of months, time will tell if wayland + nvidia might be where projects like this one can be finally reimplemented

@Shubodh
Copy link

Shubodh commented Oct 6, 2021

Thanks for the reply @seffs . But I just bought a multi-device mouse instead :P

@Vai838
Copy link

Vai838 commented May 22, 2024

After messing around with the X configuration files I've arrived to a permanent solution alongside Virtscreen :)

Reminder: This setup assumes you're using a hybrid iGPU/dGPU system and Nvidia drivers are installed. You can read more about it here. Even if your system is not PRIME, you could fix this "invisible wall" issue anyways by adding the "ConstrainCursor" option in the relevant *.conf file located in /usr/share/X11/xorg.conf.d or /etc/X11.

Make sure to paste it under the "Device" Section with the nvidia driver.

# WARNING: System might become unbootable. Always make a backup first :)
# nvidia/nouveau/amdgpu device comes before Intel GPU 
Section "Device"
	Identifier "nvidiagpu0"
	Driver     "nvidia"
	Option     "ConstrainCursor" "off"     # You need this one
EndSection

# Intel iGPU
Section "Device"
	Identifier "intelgpu0"
	Driver     "intel"
	Option     "VirtualHeads" "1"
	Option     "DRI" "3"           # Optional: I was getting artifacts without this one
        Option     "TearFree" "true"   # Optional: Force tearing fix
EndSection

For other configurations see #16

EDIT: Wording and formatting

Hellooo

I have made the changes as @seffs have mentioned still my cursor is stuck behind an invisible wall

My 30-virtscreen.conf file has the following:

#nvidia/nouveau/amdgpu device should be configured first before Intel GPU
Section "Device"
        Identifier "nvidiagpu0"
        Driver     "nvidia" #Because you are using Nvidia proprietary driver. >
        Option  "ConstrainCursor"  "off"
EndSection

#Then configure intel internal GPU
Section "Device"
        Identifier "intelgpu0"
        Driver     "intel"
        Option     "VirtualHeads" "1"
        Option     "DRI" "3"           #Optional: I was getting artifacts witho>
        Option     "TearFree" "true"   #Optional: Force tearing fix
        Option  "ConstrainCursor"  "off"
    #You may put Option "VirtualHeads" "1" here but it seem you don't need to p>
EndSection

Any solutions?

@seffs
Copy link

seffs commented May 26, 2024

I haven't used X11 in years @Vai838

My setup now consists of Wayland and GNOME's RDP Virtual Monitor

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

4 participants