LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Could not initialize SDL Video subsystem: (https://www.linuxquestions.org/questions/debian-26/could-not-initialize-sdl-video-subsystem-572275/)

farslayer 07-25-2007 07:37 PM

Could not initialize SDL Video subsystem:
 
I'm not sure what I'm missing or if there is a bug in unstable..
Several of my games will no longer run since my last update (such as bzflag)
when I attempt to launch them from the command line I get the following error
Quote:

default@debian:~$ bzflag
Could not initialize SDL Video subsystem: No available video device.
Any idea how to fix this ? I'm at a loss as to what is missing or broken here..
sdl is installed, as are my nvidia graphics drivers..

Code:

default@debian:~$ aptitude search sdl | grep -F 'i '
i  libsdl-gfx1.2-4                - drawing and graphical effects extension fo
i  libsdl-gfx1.2-dev              - development files for SDL_gfx           
i  libsdl-image1.2                - image loading library for Simple DirectMed
i  libsdl-image1.2-dev            - development files for SDL 1.2 image loadin
i  libsdl-mixer1.2                - mixer library for Simple DirectMedia Layer
i  libsdl-net1.2                  - network library for Simple DirectMedia Lay
i  libsdl-net1.2-dev              - Development files for SDL network library
i  libsdl-sound1.2                - Decoder of several sound file formats for
i  libsdl-sound1.2-dev            - Development files for SDL_sound         
i  libsdl-ttf2.0-0                - ttf library for Simple DirectMedia Layer w
i  libsdl-ttf2.0-dev              - development files for SDL ttf library (ver
i  libsdl1.2-dev                  - Simple DirectMedia Layer development files
i  libsdl1.2debian                - Simple DirectMedia Layer                 
i  libsdl1.2debian-alsa            - Simple DirectMedia Layer (with X11 and ALS
i  vlc-plugin-sdl                  - SDL video and audio output plugin for VLC
p  xmess-sdl                      - SDL binaries for the Multi Emulator Super
i A xpilot-ng-client-sdl            - Client for XPilot NG

Code:

debian:/var/log# cat Xorg.0.log | grep WW
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
(WW) Warning, couldn't open module type1
(WW) NVIDIA(GPU-0): Unable to read EDID for display device CRT-1
(WW) *** WARNING the legacy keyboard driver "keyboard" is deprecated
(WW) *** Using the new "kbd" driver for "Generic Keyboard".


debian:/var/log# cat Xorg.0.log | grep EE
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(II) Loading extension MIT-SCREEN-SAVER
(EE) Failed to load module "type1" (module does not exist, 0)

Code:

default@debian:~$ lsmod | grep nvidia
nvidiafb              44540  0
fb_ddc                  2592  1 nvidiafb
i2c_algo_bit            5892  1 nvidiafb
vgastate                8256  1 nvidiafb
nvidia              7248948  24
agpgart                31912  2 nvidia,intel_agp
i2c_core              23552  8 eeprom,lm85,lm83,nvidiafb,fb_ddc,i2c_algo_bit,nvidia,i2c_i801

Code:

debian:~# apt-cache policy nvidia-glx
nvidia-glx:
  Installed: 100.14.11-1
  Candidate: 100.14.11-1

debian:~# apt-cache policy libsdl1.2debian
libsdl1.2debian:
  Installed: 1.2.11-9
  Candidate: 1.2.11-9

Code:

debian:~# slocate libSDL-1.2.so.0

/usr/share/nwn/SDL-1.2.5/SDL-1.2.5/src/.libs/libSDL-1.2.so.0.0.5
/usr/share/nwn/SDL-1.2.5/SDL-1.2.5/src/.libs/libSDL-1.2.so.0
/usr/share/nwn/lib_/libSDL-1.2.so.0
/usr/share/nwn/lib_/libSDL-1.2.so.0.0.5
/usr/lib/libSDL-1.2.so.0.11.0
/usr/lib/libSDL-1.2.so.0
/usr/local/games/ut2004/System/libSDL-1.2.so.0
/usr/local/lib/libSDL-1.2.so.0.0.5
/usr/local/lib/libSDL-1.2.so.0


Any pointers would be appreciated..

Dutch Master 07-25-2007 08:07 PM

The SDL homepage: http://www.libsdl.org/ Includes some tuts, docs and other interesting stuff
Article on SDL in Linux Journal

The error is in your first codesnippit: "No available video device". That means that SDL is installed and configured, but it's default link to video devices doesn't match those on your system. Figure out where these devices are on your system, where SDL expects them (docs!) and if possible, sym-link these locations. Otherwise, recompile SDL using the device nodes your system uses for video devices.

No, I won't rant about why Unstable is named Unstable :p

farslayer 07-25-2007 08:10 PM

Quote:

Originally Posted by Dutch Master

No, I won't rant about why Unstable is named Unstable :p

so true.. :)


Ugh some new bug listings that weren't there when I updated... (at least I don't recall seeing them at the time.. )

Code:

grave bugs of nvidia-kernel-source (100.14.11-1 -> 100.14.11-1) <pending>
 #434379 - nvidia-kernel-source: Various errors when compiling the module with 2.6.22 (Debian supplied)
 #432746 - nvidia-kernel-source: module build fails with error message
 #432182 - nvidia-kernel-source: System unexpected freezes
Summary:
 nvidia-kernel-source(3 bugs)

I'm going to guess my problem lies in there with the module compile...

Maybe I'll just boot back to 2.6.18 for the time being.

albertz 03-24-2009 09:04 AM

SDL will try to detect automatically the best video driver for you and can fail sometimes if that one doesn't work.

You can force some other mode.

E.g., the following should always work:

Code:

SDL_VIDEODRIVER=x11 bzflag
Whereby the X11 video driver is probably slow.

albertz 03-24-2009 09:04 AM

Here is a full list:
http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars

Can you respond which of these worked for you? (I am one of the developers of the game OpenLieroX which also uses SDL; and we could builtin some fallbacks if the default video mode doesn't work.)

Dutch Master 03-24-2009 09:58 AM

Although the question is now nearly 2 yrs old and not even mine, you may want to check the video driver designated in xorg.conf to use as default. That way you know the driver is present and at a pre-defined location (provided the user did a standard install).

farslayer 03-24-2009 10:55 AM

Wow. It's been so long I don't even recall how this got worked out. Probably was a bug I suffered from for a limited time between updates.

I've certainly played enough bzflag in the last two years, to know it's been addressed.


OpenLieroX - Worms like clone (sorta).. Looks interesting ,I see it's not in the Debian repositories, but there is a .deb available for Download.. I'll have to take a look :)

albertz 03-25-2009 03:22 AM

An SDL mailinglist user refered to this problem here, that's why I thought I'll post a possibility here. I didn't really noticed that it is that old. :) Anyway, perhaps it helps some other Google-user who stumbles to this entry.

iochinome 04-26-2009 09:11 PM

I have this same problem! (but for luvcview, which uses SDL)

it tells me this:

Couldnt initialize SDL: No available video device

when i try to start it up. i have no idea what to do here, i am still a linux novice. any ideas?

thanks!

albertz 04-27-2009 02:37 AM

Quote:

Originally Posted by iochinome (Post 3521916)
I have this same problem! (but for luvcview, which uses SDL)

it tells me this:

Couldnt initialize SDL: No available video device

when i try to start it up. i have no idea what to do here, i am still a linux novice. any ideas?

thanks!

Have you read and tried the previous suggestions?

Esp, take a look here:
http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars

And try to specify some environment variables. Most important for you (for this problem) is SDL_VIDEODRIVER. If you set it to x11, it should always work.


All times are GMT -5. The time now is 02:09 PM.