-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustdesk not working when connected screen is turned off #7037
Comments
This is not vnc |
I know that this is not VNC - the hint was just for reference. This is not a duplicate of #4296 This is also not a headless system as described in #7032 In my case, the screen is updated because the X11 screen still exists and can be interacted with. |
I did some analysis: rustdesk/libs/scrap/src/x11/iter.rs Line 20 in c97cc15
I've created a minimum example to show that the screen is actually available: #include <stdio.h>
#include <stdlib.h>
#include <xcb/xcb.h>
int main(void) {
/* Establish a connection to the X server */
xcb_connection_t *connection = xcb_connect(NULL, NULL);
if (xcb_connection_has_error(connection)) {
fprintf(stderr, "Error: Cannot open display\n");
exit(1);
}
/* Retrieve the setup data */
const xcb_setup_t *setup = xcb_get_setup(connection);
if (!setup) {
fprintf(stderr, "Error: Cannot retrieve setup information\n");
xcb_disconnect(connection);
exit(1);
}
/* Use xcb_setup_roots_iterator to iterate through screens */
xcb_screen_iterator_t iter = xcb_setup_roots_iterator(setup);
int screen_num = 0;
for (; iter.rem; xcb_screen_next(&iter), screen_num++) {
xcb_screen_t *screen = iter.data;
printf("Screen %d: %dx%d\n", screen_num, screen->width_in_pixels, screen->height_in_pixels);
}
/* Clean up and close the connection */
xcb_disconnect(connection);
return 0;
} compile using: gcc -o list_screens list_screens.c $(pkg-config --cflags --libs xcb) this prints: Maybe the issue is somewhere here? rustdesk/libs/scrap/src/common/x11.rs Lines 89 to 93 in c97cc15
|
Thanks a lot for your bug report - otherwise I never would have thought that the (sort of) solution to this problem really can be to turn on the monitor of the machine I want to control remotely. Of course this is no real solution because that monitor now consumes power without any use than to avoid the "Remote Error"/"No Display" errors. But the connection works at least. Really astonishing this bug got closed though you even provided demo code and a hint regarding where the code looking for displays might fail. 🤷 |
I was also quite surprised. |
Bug Description
When connecting to a Linux PC with which has a monitor attached that's powered-off, I get: "Remote Error" "No Display"
How to Reproduce
Start rustdesk.
Remove power cable from monitor.
Try to connect --> error
Expected Behavior
Connection is working
Operating system(s) on local side and remote side
Ubuntu 23.10 -> Ubuntu 23.10
RustDesk Version(s) on local side and remote side
1.2.3 -> 1.2.3
Screenshots
Error message:
Working connection via x11vnc:
Additional Context
The corresponding X11 screen exists and should be used by rustdesk.
xrandr output:
The same use case works, when using x11vnc - while using the existing screen
:0
(see screenshot)You can even see that rustdesk is running when connecting via vnc
The text was updated successfully, but these errors were encountered: