-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
ERROR: Could not initialize SDL video: No available video device #4361
Comments
From which graphical environment do you start scrcpy? |
from Guake Terminal. I also start |
echo $XDG_SESSION_TYPE |
|
OK, and: echo $DISPLAY |
|
Is it correct? export DISPLAY=:0
scrcpy Does it work better? |
unfortunately not. Tried with
returns the same error
Then tried with
The same error keeps throwing. |
is the display of the Linux system, right? |
Yes, Install xeyes, then run: DISPLAY=:0 xeyes
DISPLAY=:1 xeyes Does it work? |
the first command says I couldn't change the display id of |
OK, so Forget about Create a file #include <SDL2/SDL.h>
int main(void) {
if (SDL_Init(SDL_INIT_VIDEO) == -1) {
fprintf(stderr, "SDL error: %s\n", SDL_GetError());
return 1;
}
SDL_Quit();
printf("ok\n");
return 0;
} Compile it: gcc sample.c -lSDL -o sample And run it: ./sample What is the result? |
|
How did you install SDL2? Are you sure it is compiled with x11 support? |
[UPDATE]: I made a mistake by exporting:
to recompile the SDL from the source code. |
Environment
Describe the bug
I have installed all the prerequisites as required from the
Readme.MD
, additionally, I installed dev libraries ofx11
andXorg
The command
scrcpy --version
showsI have set
scrcpy --display=0
becausescrcpy --list-displays
showsI also exported with
export SDL_VIDEODRIVER=x11
which again the same error occurredNot sure if this has anything to do with
adb
butadb --version
isand
adb devices
I tried also over
tcpip
.The text was updated successfully, but these errors were encountered: