kbumsik / VirtScreen

Make your iPad/tablet/computer into a secondary monitor on Linux.
GNU General Public License v3.0
1.67k stars 111 forks source link

VIRTUAL 1 is not working for AMD Radeon #110

Open bogdanmitsevski opened 2 years ago

bogdanmitsevski commented 2 years ago

Hello. I have a problem. I downloaded VirtScreen and don't see "VIRTUAL 1" option. I saw, that there are configuration for Intel, NVIDIA, but I have AMD configuration. I tried to use solution for NVIDIA and Intel, but it doesn't work. Also I tried to add virtual screen option to my graphic card, using this solution, but it's not working(https://github.com/kbumsik/VirtScreen/issues/16#issuecomment-649480599). Please, can you help me find right configuration? IMG_4655 IMG_4654 Thanks

MErenB commented 2 years ago

TL;DR VirtScreen was not working for me. I manually adjusted the second monitor setup myself using HDMI-1-1 port instead of VIRTUAL1. After that, VirtScreen started working with HDMI-1-1 port without any errors.

Hello @bogdanmitsevski. I have Nvidia graphics card in my laptop and I don't have the VIRTUAL1 option as well.

image

You can see the available display outputs for me. I tried them one by one and selecting every one of them resulted in some long error. You can see it below.

image

I manually extend my monitor without VirtScreen. After that, magically VirtScreen started working. Maybe the VirtScreen runs these commands with additional flags and they cause the error, I don't know.

I suggest that ignore any error message and proceed. It worked for me despite a lot of error messages.

  1. Obtain the required information about the resolution. Change the 1920 1080 resolution values if you like. $ cvt 1920 1080

  2. Copy the part of the cvt output and paste it shown below. This will make the output named "1920x1080_60.00" accessible. $ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

  3. Add this new mode to one of the available display outputs. (HDMI-0 or DVI-0 for your case.) $ xrandr --addmode HDMI-0 1920x1080_60.00

  4. Finally place the new screen relative to the main screen. $ xrandr --output HDMI-0 --mode 1920x1080_60.00 --left-of eDP-1-1

To find what is your main screen: $ xrandr -q and in the output find the one that says connected primary bla bla..

  1. At this step, download the arandr, open it and see if HDMI-0 (or which output you choose) is there. $ sudo apt-get install arandr $ arandr

image ARandR is the GUI for these stuff. We can see HDMI-1-1 there!

  1. Run the x11vnc and test if the system works. $ x11vnc -repeat -forever -nopw -multiptr

Now try to connect from your tablet. x11vnc uses port 5900 as default.

This comment contains the knowledge I gathered after I was unable to make VirtScreen work. Hope it helps you or anyone interested :)

AminBlg commented 1 year ago

your trick used to work but probably after some updates or idk, it no longer works, i had this handy script which i used:

sudo xrandr --newmode "2400x1080_60.00"  216.00  2400 2552 2808 3216  1080 1083 1093 1120 -hsync +vsync
sudo xrandr --addmode HDMI-A-0 2400x1080_60.00
sudo xrandr --output HDMI-A-0 --mode 2400x1080_60.00 --left-of eDP

but now whenever i try to run it, the whole system crashes, i get a frozen screen and journalctl shows the following

Jun 30 03:19:13 T14Station sudo[55139]:    sotch : TTY=pts/0 ; PWD=/home/sotch ; USER=root ; COMMAND=>
Jun 30 03:19:13 T14Station sudo[55139]: pam_unix(sudo:session): session opened for user root(uid=0) b>
Jun 30 03:19:14 T14Station sudo[55139]: pam_unix(sudo:session): session closed for user root
Jun 30 03:19:14 T14Station kernel: BUG: kernel NULL pointer dereference, address: 0000000000000054
Jun 30 03:19:14 T14Station kernel: #PF: supervisor read access in kernel mode
Jun 30 03:19:14 T14Station kernel: #PF: error_code(0x0000) - not-present page
Jun 30 03:19:14 T14Station kernel: PGD 0 P4D 0 
Jun 30 03:19:14 T14Station kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
Jun 30 03:19:14 T14Station kernel: CPU: 8 PID: 39298 Comm: kworker/u32:5 Tainted: G           OE     >
Jun 30 03:19:14 T14Station kernel: Hardware name: LENOVO 20XGS05S03/20XGS05S03, BIOS R1NET50W (1.20) >
Jun 30 03:19:14 T14Station kernel: Workqueue: events_unbound commit_work

Any idea? Thanks