Open max-spam opened 4 years ago
I haven't used this code in quite a while, but I see no reason it shouldn't still work.
Try adding:
#include <stdint.h>
To the very top of evdi-vnc.c. If that fixes this then I'll update the repo.
I didn't run as sudo, as I couldn't boot any more after I tried to compile
To the commands above I use, I also added, adb command to open bVNC on the tablet, still checking how to get right profile launched as well. If evdi-vnc would work, that would be great, because you are supposed to be able to add upto to 5 displays
` adb reverse tcp:5900 tcp:5900;
adb shell monkey -p com.iiordanov.freebVNC -c android.intent.category.LAUNCHER 1;
xrandr --addmode HDMI-A-0 1920x1080_60.00;
xrandr --output HDMI-A-0 --mode 1920x1080_60.00 --right-of DVI;
x11vnc -rfbauth ~/.vnc/passwd -clip 1920x1080+1920+0; ` this works but then the HDMI is blocked.
make
cc -Wall -g -c evdi-vnc.c -o evdi-vnc.o -Ievdi/library/
evdi-vnc.c:12:10: fatal error: rfb/rfb.h: Datei oder Verzeichnis nicht gefunden
12 | #include <rfb/rfb.h>
| ^~~
compilation terminated.
make: *** [Makefile:7: evdi-vnc.o] Fehler 1`
solved with --> sudo apt-get install libvncserver-dev
but unfortunatly:
make cc -Wall -g -c evdi-vnc.c -o evdi-vnc.o -Ievdi/library/ evdi-vnc.c:53:1: error: unknown type name ‘evdi_buffer’; use ‘struct’ keyword to refer to the type 53 | evdi_buffer buffer; | ^ |
struct evdi-vnc.c:54:1: error: unknown type name ‘evdi_mode’; use ‘struct’ keyword to refer to the type 54 | evdi_mode currentMode; | ^ |
struct evdi-vnc.c:55:1: error: unknown type name ‘evdi_rect’; use ‘struct’ keyword to refer to the type 55 | evdi_rect rects[MAX_RECTS]; | ^ |
struct evdi-vnc.c: In function ‘allocateVncFramebuffer’: evdi-vnc.c:97:16: error: request for member ‘buffer’ in something not a structure or union 97 | return buffer.buffer; | ^ evdi-vnc.c: In function ‘startVncServer’: evdi-vnc.c:104:66: error: request for member ‘width’ in something not a structure or union 104 | rfbScreenInfoPtr screen = rfbGetScreen(&argc, argv, currentMode.width, | ^ evdi-vnc.c:105:18: error: request for member ‘height’ in something not a structure or union 105 | currentMode.height, 8, 3, currentMode.bits_per_pixel/8); | ^ evdi-vnc.c:105:44: error: request for member ‘bits_per_pixel’ in something not a structure or union 105 | currentMode.height, 8, 3, currentMode.bits_per_pixel/8); | ^ evdi-vnc.c: At top level: evdi-vnc.c:133:25: error: unknown type name ‘evdi_mode’; did you mean ‘evdi_handle’? 133 | void modeChangedHandler(evdi_mode mode, void *userData) { | ^ |
evdi_handle evdi-vnc.c: In function ‘updateReadyHandler’: evdi-vnc.c:169:30: warning: passing argument 2 of ‘evdi_grab_pixels’ from incompatible pointer type [-Wincompatible-pointer-types] 169 | evdi_grab_pixels(evdiNode, rects, &nRects); | ^~~~~ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
int * |
In file included from evdi-vnc.c:11: evdi/library/evdi_lib.h:113:27: note: expected ‘struct evdi_rect ’ but argument is of type ‘int ’ 113 | struct evdi_rect *rects, | for (int y = rects[i].y1; y <= rects[i].y2; y++) { | ^ evdi-vnc.c:172:44: error: request for member ‘y2’ in something not a structure or union 172 | for (int y = rects[i].y1; y <= rects[i].y2; y++) { | ^ evdi-vnc.c:173:45: error: request for member ‘x1’ in something not a structure or union 173 | rfbMarkRectAsModified(screen, rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); | ^ evdi-vnc.c:173:58: error: request for member ‘y1’ in something not a structure or union 173 | rfbMarkRectAsModified(screen, rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); | ^ evdi-vnc.c:173:71: error: request for member ‘x2’ in something not a structure or union 173 | rfbMarkRectAsModified(screen, rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); | ^ evdi-vnc.c:173:84: error: request for member ‘y2’ in something not a structure or union 173 | rfbMarkRectAsModified(screen, rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); | ^ evdi-vnc.c: In function ‘findAvailableEvdiNode’: evdi-vnc.c:212:3: error: unknown type name ‘evdi_device_status’; use ‘enum’ keyword to refer to the type 212 | evdi_device_status status = UNRECOGNIZED; | ^ |
enum evdi-vnc.c: In function ‘connectToEvdiNode’: evdi-vnc.c:257:3: error: too few arguments to function ‘evdi_connect’ 257 | evdi_connect(nodeHandle, EDID, sizeof(EDID)); | ^ |
void evdi_connect(evdi_handle handle, const unsigned char *edid, | ^ |
evdi_event_context evdiCtx; | ^ |
struct evdi-vnc.c:281:10: error: request for member ‘dpms_handler’ in something not a structure or union 281 | evdiCtx.dpms_handler = dpmsHandler; | ^ evdi-vnc.c:282:10: error: request for member ‘mode_changed_handler’ in something not a structure or union 282 | evdiCtx.mode_changed_handler = modeChangedHandler; | ^ evdi-vnc.c:282:34: error: ‘modeChangedHandler’ undeclared (first use in this function) 282 | evdiCtx.mode_changed_handler = modeChangedHandler; | ^ |
evdiCtx.update_ready_handler = updateReadyHandler; | ^ evdi-vnc.c:284:10: error: request for member ‘crtc_state_handler’ in something not a structure or union 284 | evdiCtx.crtc_state_handler = crtcStateHandler; | ^ evdi-vnc.c:288:21: error: request for member ‘width’ in something not a structure or union 288 | while (currentMode.width == 0) { | ^ evdi-vnc.c:291:36: warning: passing argument 2 of ‘evdi_handle_events’ from incompatible pointer type [-Wincompatible-pointer-types] 291 | evdi_handle_events(evdiNode, &evdiCtx); | ^ |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
int * |
In file included from evdi-vnc.c:11: evdi/library/evdi_lib.h:122:72: note: expected ‘struct evdi_event_context ’ but argument is of type ‘int ’ 122 | void evdi_handle_events(evdi_handle handle, struct evdi_event_context *evtctx); | while (evdi_request_update(evdiNode, buffer.id)) { | ^ evdi-vnc.c:314:32: error: request for member ‘id’ in something not a structure or union 314 | updateReadyHandler(buffer.id, NULL); | ^ evdi-vnc.c:319:36: warning: passing argument 2 of ‘evdi_handle_events’ from incompatible pointer type [-Wincompatible-pointer-types] 319 | evdi_handle_events(evdiNode, &evdiCtx); | ^ |
|
---|---|---|---|---|---|---|---|---|
int * |
In file included from evdi-vnc.c:11:
evdi/library/evdi_lib.h:122:72: note: expected ‘struct evdi_event_context ’ but argument is of type ‘int ’
122 | void evdi_handle_events(evdi_handle handle, struct evdi_event_context *evtctx);
| ~~~~~^~~~
evdi-vnc.c:322:43: error: request for member ‘refresh_rate’ in something not a structure or union
322 | int timeoutMicros = (1e6 / currentMode.refresh_rate) - 1000;
| ^
evdi-vnc.c: In function ‘allocateVncFramebuffer’:
evdi-vnc.c:98:1: warning: control reaches end of non-void function [-Wreturn-type]
98 | }
| ^
make: *** [Makefile:7: evdi-vnc.o] Fehler 1
systemctl start displaylink sudo modprobe evdi ahead of make, doesn't change anything
If your code could get to work again and merged with this project, that would be awesome
https://github.com/kbumsik/VirtScreen
Virtscreen uses intel virtual screen which doesn't work with amd or nvdia. I try to get the adb commands added as well,
Hello, is this still active?
Just found it, tried to compile it. The instructions are unclear,
if you donwload the ZIP, it doesn't include the evdi folder. That need to be downloades separatly and put into the evdi folder.
compiling exit with failure:
make cc -Wall -g -c evdi-vnc.c -o evdi-vnc.o -Ievdi/library/ In file included from evdi-vnc.c:10: evdi/library/evdi_lib.h:60:2: error: unknown type name ‘uint32_t’ 60 | uint32_t width; | ^
~~~ evdi/library/evdi_lib.h:61:2: error: unknown type name ‘uint32_t’ 61 | uint32_t height; | ^~~~ evdi/library/evdi_lib.h:62:2: error: unknown type name ‘uint8_t’ 62 | uint8_t enabled; | ^~~ evdi/library/evdi_lib.h:63:2: error: unknown type name ‘uint32_t’ 63 | uint32_t buffer_length; | ^~~~ evdi/library/evdi_lib.h:64:2: error: unknown type name ‘uint32_t’ 64 | uint32_t buffer; | ^~~~ evdi/library/evdi_lib.h:65:2: error: unknown type name ‘uint32_t’ 65 | uint32_t pixel_format; | ^~~~ evdi/library/evdi_lib.h:66:2: error: unknown type name ‘uint32_t’ 66 | uint32_t stride; | ^~~~ evdi/library/evdi_lib.h:75:2: error: unknown type name ‘uint16_t’ 75 | uint16_t address; | ^~~~ evdi/library/evdi_lib.h:76:2: error: unknown type name ‘uint16_t’ 76 | uint16_t flags; | ^~~~ evdi/library/evdi_lib.h:77:2: error: unknown type name ‘uint32_t’ 77 | uint32_t buffer_length; | ^~~~ evdi/library/evdi_lib.h:78:2: error: unknown type name ‘uint8_t’ 78 | uint8_t buffer; | ^~~ evdi/library/evdi_lib.h:108:11: error: unknown type name ‘uint32_t’ 108 | const uint32_t sku_area_limit); | ^~~~ evdi/library/evdi_lib.h:119:9: error: unknown type name ‘uint32_t’ 119 | const uint32_t buffer_length, | ^~~~ evdi-vnc.c:11:10: fatal error: rfb/rfb.h: Datei oder Verzeichnis nicht gefunden 11 | #include <rfb/rfb.h> | ^~~compilation terminated. make: *** [Makefile:7: evdi-vnc.o] Fehler 1evdi-vnc is a non inclusive name. would have called it virtual screen extension for android using evdi.
Also adding adb command: adb reverse tcp:5900 tcp:5900
should increase the speed, as you can use USB connection.
and with the adb command "adb shell wm size"
theoretically mixing this should make possible to get ta plug an play solution.
ATM I use the following commands to get the screen extended to my android tablet.
adb reverse tcp:5900 tcp:5900 xrandr --newmode "1920x1080_60.00" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -HSync +Vsync xrandr --addmode HDMI-A-0 1920x1080_60.00 xrandr --output HDMI-A-0 --mode 1920x1080_60.00 --right-of DVI x11vnc -rfbauth ~/.vnc/passwd -clip 1920x1080+1920+0
But this takes away the monitor connection and I would extend the screen even more, I thought about evdi, can't get it running yet.