Bug 240199 - Could not initialize SDL (/dev/fb0 missing)
Could not initialize SDL (/dev/fb0 missing)
Product: Fedora
Classification: Fedora
Component: SDL (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Depends On:
  Show dependency treegraph
Reported: 2007-05-15 14:55 EDT by Christian Weiss
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-22 08:10:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace with "old" SDL-package; working (54.46 KB, application/octet-stream)
2007-05-16 14:49 EDT, Christian Weiss
no flags Details
strace "new" SDL-package; not working (9.40 KB, application/octet-stream)
2007-05-16 14:50 EDT, Christian Weiss
no flags Details
SDL_Init() example for testing purpose (486 bytes, text/x-csrc)
2007-05-16 14:51 EDT, Christian Weiss
no flags Details

  None (edit)
Description Christian Weiss 2007-05-15 14:55:56 EDT
Description of problem:
I done a "yum update" and got SDL-1.2.9-6.
Now, normal SDL_Init() don't work ("No available video device.") strace shows it
is because of /dev/fb0:
write(1, "Initializing SDL.\n", 18)     = 18
open("/dev/fb0", O_RDWR)                = -1 ENOENT (No such file or directory)
brk(0)                                  = 0x8467000
brk(0x8488000)                          = 0x8488000
write(1, "Could not initialize SDL: No ava"..., 53) = 53
exit_group(-1)                          = ?

After downgrading SDL to SDL-1.2.9-5.2.1 (initial version FC5) all works fine again!

Version-Release number of selected component (if applicable):

How reproducible:
Update to SDL-1.2.9-6 and use the SDL_Init() example from

Steps to Reproduce:
1. Update to SDL-1.2.9-6
2. Use SDL_Init() example from
   gcc -lSDL -o SDL_Init SDL_Init.c
   "Initializing SDL.
   Could not initialize SDL: No available video device."
3. Downgrade to SDL-1.2.9-5.2.1
   rpm -Uhv --force ...
4. Run #2 (SDL_Init())
   "Initializing SDL.
   SDL initialized.
   Quiting SDL.
   Now strace shows it is using
   connect(3, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 19) = 0

Actual results:
SDL don't work.
"Could not initialize SDL: No available video device."

Expected results:
SDL_Init() should work. ;-)

Additional info:
I realize this broken behavior trying to use qemu.
Comment 1 Thomas Woerner 2007-05-16 07:45:24 EDT
Can you please check if the old package is able to use /dev/fb0 for you?
You can use strace for this.
Comment 2 Christian Weiss 2007-05-16 14:49:36 EDT
Created attachment 154859 [details]
strace with "old" SDL-package; working
Comment 3 Christian Weiss 2007-05-16 14:50:19 EDT
Created attachment 154860 [details]
strace "new" SDL-package; not working
Comment 4 Christian Weiss 2007-05-16 14:51:10 EDT
Created attachment 154861 [details]
SDL_Init() example for testing purpose
Comment 5 Christian Weiss 2007-05-16 14:52:11 EDT
I forget to mention that I don't have /dev/fb0.
$ ls -l /dev/fb*
ls: /dev/fb*: No such file or directory
Comment 6 Christian Weiss 2007-05-16 15:08:45 EDT
The old package don't access /dev/fb0.
Comment 7 Bruno Wolff III 2007-05-18 09:33:53 EDT
I am seeing the same problem when playing wesnoth (built from source, not the rpm).
It is broken for SDL-1.2.9-6.i386.rpm and SDL-devel-1.2.9-6.i386.rpm and works
when I fall back to SDL-1.2.9-5.2.1.i386.rpm and SDL-devel-1.2.9-5.2.1.i386.rpm .

The message I get from Wesnoth is:
Battle for Wesnoth v1.3.2+svn
Started on Fri May 18 08:25:57 2007

started game: 2673718298
error display: Could not initialize SDL: No available video device
Could not initialize video. Exiting.

I do not have a /dev/fb* on my machine either.
Comment 8 Christian Weiss 2007-05-18 12:10:16 EDT
I think we've got an additional requirement here:
BuildRequires: libXt-devel

I played a little with the sources and compared SDL-1.2.9-5.2.1.src.rpm with
SDL-1.2.9-6.src.rpm. No differences in source code, except of the SPEC file as
you mentioned in changelog: "added missing (build) requires for GL and GLU."

So where's the difference?

Size of .so:
-rwxr-xr-x 1 root  root  467040 Feb 13  2006 libSDL-1.2.so.0.7.2  <- SDL-1.2.9-5.2.1
-rwxr-xr-x 1 root  root  354664 May  7 16:55 libSDL-1.2.so.0.7.2  <- SDL-1.2.9-6

$ ldd libSDL-1.2.so.0.7.2
        linux-gate.so.1 =>  (0x0043c000)
        libm.so.6 => /lib/libm.so.6 (0x00381000)
        libdl.so.2 => /lib/libdl.so.2 (0x0031f000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x0043d000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x00c73000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00f8f000)
        libc.so.6 => /lib/libc.so.6 (0x0053b000)
        /lib/ld-linux.so.2 (0x80000000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00258000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00110000)

$ ldd libSDL-1.2.so.0.7.2
        linux-gate.so.1 =>  (0x00ded000)
        libm.so.6 => /lib/libm.so.6 (0x00ac3000)
        libdl.so.2 => /lib/libdl.so.2 (0x00aea000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00c23000)
        libc.so.6 => /lib/libc.so.6 (0x0098e000)
        /lib/ld-linux.so.2 (0x80000000)

So there are some X-Libraries missing?
I run a ./configure on my very base Fedora 5 test installation and learned in
config.log X11 capabilities are checked with /usr/include/X11/Intrinsic.h.
Well it's missing on my test box. I done a "yum install libXt-devel" and got
libXt-devel-1.0.0-2.2 plus some dependencies.

$ rpmbuild -bc SDL.spec
$ cd ../BUILD/SDL-1.2.9/src/.libs
$ ln -s libSDL-1.2.so.0.7.2 libSDL-1.2.so.0
$ export LD_LIBRARY_PATH=.
$ ~/tmp/SDL_init
Initializing SDL.
SDL initialized.
Quiting SDL.

Looks good!
While building the rpm - do you have libXt-devel installed?
Comment 9 Fedora Update System 2007-05-21 18:42:43 EDT
SDL-1.2.9-6.1 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.