santiagofdezg / linux-extend-screen

Turn your Android tablet into a second monitor on Linux (extend screen)
MIT License
293 stars 25 forks source link

Connection is always mirrored #4

Open Captain-Wet-Beard opened 2 years ago

Captain-Wet-Beard commented 2 years ago

For some reason my second display is always mirroring the 1st, and my display manager doesn't show a second monitor existing. I'm setting xrandr to put the second display left of or right of, and there's a bit more desktop available on the second monitor since it's a wider resolution, but it's basically mirrored rather than an extended desktop. Any ideas for something I can try to fix this? I'm out of ideas :/

santiagofdezg commented 2 years ago

I've never found that problem. Have you tried to use a different unused output port when executing the commands xrandr --addmode and xrandr --output? Try taking a look at the xrandr documentation.

Searching the internet I found a forum where someone suggested to use arandr (a GUI for xrandr) to face this problem:

Type arandr in a terminal window, it will start the GUI for xrandr. You will see your two monitors (they may be overlapping). With your mouse arrange them as you want them to be positioned. When you are satisfied with the result, Choose Layout from the menu and click on Apply. Then, choose Layout again and Save As. Save the resulting layout with any name you like in ~/.screenlayout directory. Logout and login.

Source: https://www.linuxquestions.org/questions/linux-hardware-18/extended-display-on-to-another-monitor-4175576117/#post5524510

khaiyichin commented 2 years ago

I'm encountering the same issue with the USB connection. arandr shows only one screen. Have you had any luck with this @Captain-Wet-Beard?

I tried 2 different displays for xrandr --addmode ... and ... --output ... but to no avail.

Captain-Wet-Beard commented 2 years ago

I'm encountering the same issue with the USB connection. arandr shows only one screen. Have you had any luck with this @Captain-Wet-Beard?

I tried 2 different displays for xrandr --addmode ... and ... --output ... but to no avail.

I ended up giving up on this and decided to just use scrcpy for what I was trying to do, I tried both of the options you did along with a few other settings I found in some forum posts (can't remember specifics though, sorry.)

khaiyichin commented 2 years ago

I see. Well for anyone that comes by in the future, hopefully the following helps:

By no means a display expert here, but I figured that screen extending was not possible because the virtual display was not setup properly, so I found a workaround using a (physical) virtual HDMI adapter (something like this).

Essentially plugging that in gave me a new "display" in my settings and xrandr. Then I just followed the steps to setup the adb and x11vnc stuff and I got an extended screen (basically everything else besides adding and creating new modes).

The inspiration for that workaround came from me trying out Deskreen. I would've stuck with that but their USB stuff wasn't quite working for me, only WiFi.

Tip: You can change the resolution of the extended screen in your system's Display settings and clip to the resolution accordingly (do xrandr to get the updated values).