No available video device

Hello, all. SDL newbie Mike here.

You might think it’s cheese to attempt running SDL (and Mesa!) on an
obsolete Dell Latitude XP (100MHz 486, 20MB) w/Debian, but cheese or
not, the convenience of developing code anywhere is just too nice to
ignore and I can still learn a lot from it.

I’ve installed SDL 1.2.2 from source and it compiles fine, as do the
test programs. Running testvidinfo fails at the SDL_Init() call when it
tries to init the video subsystem, and the program exits with the error
"Couldn’t initialize SDL: no available video device."

On the SDL site, I found in the Linux FAQ portion that I should try
exporting DISPLAY=:0, which I have done. This corrected the exact same
problem on one of my other machines, and SDL works great there. But the
laptop still fails.

Here comes the newbie questions.

Slinking through the code, I see that src/SDL.c is doing an
SDL_VideoInit(getenv(“SDL_VIDEODRIVER”)). This indicates to me that
I could set an environment variable named SDL_VIDEODRIVER to the name of
my video driver, but I cannot seem to find any docs indicating this
possibility. If it does mean that, how do I know which driver the
system uses so I can let SDL know of it? For what it’s worth, X seems
to think the chipset is a wd90c24 and X runs fine. And I don’t know if
this matters, but XF86Config lists the following in its "Driver"
sections: Accel, SVGA, VGA16, VGA2.

Is there a particular driver I should be informing SDL of, and where
would that be located on my system?

I hope I’m not SOL with SDL. Thank you for any help.

Mike

On the SDL site, I found in the Linux FAQ portion that I should try
exporting DISPLAY=:0, which I have done. This corrected the exact same
problem on one of my other machines, and SDL works great there. But the
laptop still fails.

It could be that your laptop come without the development packages to
compile a SDL driver. When running the configure script, SDL checks for
the availability on your system of all the video drivers it knows. But
for a driver to be compiled, you also need the development package to be
installed on your system. For example, there is a xfree86-devel (name
vary with the distribution) package which allows you to compile programs
using X (like SDL). If you have none of these development packages
installed, SDL will be built without any video driver, which is quite
ennoying. >:p So check for these packages (how to do depends of your
distribution) and whether SDL find them at configure time, or install a
SDL precompiled package that is available for download on SDL website.

Slinking through the code, I see that src/SDL.c is doing an
SDL_VideoInit(getenv(“SDL_VIDEODRIVER”)). This indicates to me that
I could set an environment variable named SDL_VIDEODRIVER to the name of
my video driver, but I cannot seem to find any docs indicating this
possibility. If it does mean that, how do I know which driver the
system uses so I can let SDL know of it? For what it’s worth, X seems
to think the chipset is a wd90c24 and X runs fine. And I don’t know if
this matters, but XF86Config lists the following in its "Driver"
sections: Accel, SVGA, VGA16, VGA2.

You missed the FAQ. See
http://www.libsdl.org/faq/FAQ-General.html#GENERAL_VIDEODRIVER for a
complete information about the different video drivers.

See you,
Alex.

I know there is a section in the FAQ concerning No Available video
device, but the thing is, my tiny little sample program was working just
fine. I then threw the SDL_Init( SDL_INIT_VIDEO ) into an if statement
instead of having it on its own, and it stopped working. I knew it was
working because I was able to get a blank 640 x 480 xterm window to come
up. The only thing I can think of is that I did not exit out of the
session properly. CTRL+C wasn’t working to kill the program, so I simply
closed the console session.

I’m really at a loss as to why it would stop working all of the sudden.
I even tried restarting the console, and nothing seems to fix the
problem.

Thanks,

Ryan

Hello,
testwin quits with the following message:
“Couldn’t initialize SDL: No available video device”

Environment: Linux RedHat kernel: 2.4.20
X11 4.3.0, driver=vesa
SDL version: 1.2.7

Thanks
Huy

Huy Vo wrote:

Hello,

testwin quits with the following message:

“Couldn’t initialize SDL: No available video device”

Environment: Linux RedHat kernel: 2.4.20

X11 4.3.0, driver=vesa

SDL version: 1.2.7

Hi,

It seems SDL is not compiled with support for X11. Did you compile SDL
by yourself ? If so, try to install the X11 development headers first
and go through the building process again.

Stephane

Hi everyone,

When I call SDL_CreateWindow() it returns null and SDL_GetError() returns
"No available video device." Not sure how to troubleshoot this. Details: I
have a GeForce 8800 with nVidia propertietary drivers on 64-bit
Ubuntu 13.10. Steam and a handful of games are installed and work fine. Any
advice would be greatly appreciated.

Thanks,
Tim

I seem to have fixed it by installing “libxext-dev” and rebuilding.On Tue, Dec 10, 2013 at 11:41 PM, Tim Rieder <@Tim_Rieder> wrote:

Hi everyone,

When I call SDL_CreateWindow() it returns null and SDL_GetError() returns
"No available video device." Not sure how to troubleshoot this. Details: I
have a GeForce 8800 with nVidia propertietary drivers on 64-bit
Ubuntu 13.10. Steam and a handful of games are installed and work fine. Any
advice would be greatly appreciated.

Thanks,
Tim

If you’re using a Debian based distro you can always solve dependencies by
running 'apt-get build-dep <package/lib>'On Dec 11, 2013 12:53 AM, “Tim Rieder” wrote:

I seem to have fixed it by installing “libxext-dev” and rebuilding.

On Tue, Dec 10, 2013 at 11:41 PM, Tim Rieder wrote:

Hi everyone,

When I call SDL_CreateWindow() it returns null and SDL_GetError() returns
"No available video device." Not sure how to troubleshoot this. Details: I
have a GeForce 8800 with nVidia propertietary drivers on 64-bit
Ubuntu 13.10. Steam and a handful of games are installed and work fine. Any
advice would be greatly appreciated.

Thanks,
Tim


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org