Android Tablet as Second Monitor

samTopaz

Member

Reaction score: 4
Messages: 27

Hello,

I've recently gotten an android tablet and I would like to use it as a second monitor for my laptop (over USB.)
I have made some progress towards this goal. However I have encountered two issues. I have been following this guide https://blog.8bitbuddhism.com/2019/12/01/how-to-use-your-android-tablet-as-second-monitor/ and so far I've managed to connect my tablet using ADB and set up a VNC session.

The first problem is that the session disconnects after about 30 seconds or so (I'm aware this part of the question isn't related to X.Org.) I have a suspicion that this is because the tablet is using USB 3 (at least I think it is. It is a Samsung Tab A 10.1 2019 and uses a USB type C connector. Also my laptop is a Thinkpad t480.) When I use the adb command after this to see what devices are connected I can no longer see my tablet and have to physically reconnect it. So my first question is how would I force a USB port on my laptop to work in USB 2.0 mode. I've looked up how to do this on FreeBSD but all I could seem to find was how to do it on GNU+Linux.

The second problem I have is related to X.Org. One of the steps in the guide is to create a virtual output device (I tried just creating some custom settings for an unused HDMI connector in my device using Xrandr as some other tutorials on this subject suggest and it really doesn't work!)
I can't figure out how to do this. I've tried creating the file 20-virtual.conf and using i915kms as the driver but from the log it looks like X is trying to use this as the main display device and on top of that it says that i915kms doesn't exist (or something to that effect) and as a result X fails to start. I definitely am using i915kms as when I do kldstat I can see that it is loaded.
I'm not actually sure where / when I'm loading i915kms.ko but I know it's not in /usr/local/etc/X11/xorg.conf.d/ as I don't have any config files in there and It's also not in /boot/loader.conf.
Anyway I don't have a very good idea of what I am doing with the config files in /usr/local/etc/X11/xorg.conf.d/ I gather that what I need to do is create one for the hardware in my laptop and then also create one for the virtual display on top of that but I've tried quite a few different things and configurations and I haven't really gotten anywhere with it. So any help any one could offer would be very much appreciated

Sincerely

Sam
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

In general i sadly can't help you with this but depending on what you plan to do with your external monitor you might get away with using VNC. From what i hear there is a couple VNC clients for Android and among them is probably at least one that can switch to fullscreen. Now all you'd have to do is run a VNC server on your laptop ( x11vnc?) and connect using your Tablet. The most simple configuration would just mirror your laptop but if you rather want an additional display you could also use xvfb to have an X server backed by a virtual framebuffer. Just a thought though. I fully understand if you want to have it working the way you described it or if VNC simply doesn't cut it for your usecase.
 
OP
samTopaz

samTopaz

Member

Reaction score: 4
Messages: 27

Um well the way I described it I actually am using VNC. If you have a look at the guide basically what their doing is sending the VNC traffic to the ADB process and then that is communicating with the tablet and the tablet runs a VNC client. The reason I want to do it using ADB is because I want to be able to do it when I'm not connected to a network. However your answer may have helped me quite a bit if this xvfb program you write of can help me to use the VNC connection for a second display. Then the only problem I would have would be that ADB is disconnecting from my tablet and I think that is because it's using USB 3 as I have already stated. Anyway thanks for your replay :)
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

Haha, no, i had not looked at the guide but now that i did i realize what i wrote is somewhat redundant. Glad at least the mention of xvfb was useful. I can't really help with ADB but i understand how port forwarding this way is an advantage. Hope you get it to work (maybe you can force USB2.0 in your BIOS - not exactly nice but if it works you have at least confirmed your theory).
 
OP
samTopaz

samTopaz

Member

Reaction score: 4
Messages: 27

Haha, no, i had not looked at the guide but now that i did i realize what i wrote is somewhat redundant. Glad at least the mention of xvfb was useful. I can't really help with ADB but i understand how port forwarding this way is an advantage. Hope you get it to work (maybe you can force USB2.0 in your BIOS - not exactly nice but if it works you have at least confirmed your theory).
Hmm I haden't thought about seeing if I could do it in the BIOS. I'll have to check it out. Thanks :). I don't have that many USB 3 devices so I wouldn't mind it that much if I could do it in the BIOS (that is if I can just dissable 1 port. All ports would be a bit more annoying.)
 
Top