Open egll-tech opened 4 years ago
~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.
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
@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.
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
Thanks for the reply @seffs . But I just bought a multi-device mouse instead :P
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?
I haven't used X11 in years @Vai838
My setup now consists of Wayland and GNOME's RDP Virtual Monitor
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:
Tablet:
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.