SDL_FullScreen on Intel 945GM graphics

Hello all,

I have a Lenovo 3000 N100 laptop with a Intel 945GM graphics chip.
The display is 1280x800 only, 24-bit only.
I use linux.

I have tried running several SDL apps in full screen, only to have the
machine display nothing but vertical lines and lock up tight.

For example, any of the nehe example programs at gamedev.net will run
great windowed (640x480x16), but they all crash when switching to full
screen. I can fix the full screen crash by editing the source code as
follows:

/* screen width, height, and bit depth */
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 800
#define SCREEN_BPP 24

where later this is set:

surface = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,
videoFlags );

videoFlags = SDL_OPENGL;
videoFlags |= SDL_GL_DOUBLEBUFFER;
videoFlags |= SDL_HWPALETTE;
videoFlags |= SDL_RESIZABLE;

Any other screen resolution or color depth crashes. I guess it is not
sdl’s problem that my machine can only operate at one resolution and
depth, but is there a way I can keep sdl from locking up tight? I’ve
been trying to get ut2004 working by editing the ini files, but so far
no good.

Perhaps there is an environmental variable I can set to “fix” this?

Thanks

Chris

Perhaps there is an environmental variable I can set to “fix” this?

Nope, your video card’s drivers suck and this isn’t a SDL issue at all.On Thursday 31 May 2007 12:36:25 pm Chris Pemberton wrote:

Thanks

Chris


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


Patrick McFarland || http://AdTerrasPerAspera.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids,
we’d all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." – Kristian Wilson, Nintendo,
Inc, 1989

Patrick McFarland wrote:> On Thursday 31 May 2007 12:36:25 pm Chris Pemberton wrote:

Perhaps there is an environmental variable I can set to “fix” this?

Nope, your video card’s drivers suck and this isn’t a SDL issue at all.

Thanks

Chris


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

Pat, are speaking from a point of expertise, or are you just trying to
waste of my time?

Expertise. I’ve forgotten more about Linux than you’ll ever know.On Thursday 31 May 2007 01:25:08 pm Chris Pemberton wrote:

Pat, are speaking from a point of expertise, or are you just trying to
waste of my time?


Patrick McFarland || http://AdTerrasPerAspera.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids,
we’d all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." – Kristian Wilson, Nintendo,
Inc, 1989

Just to stop the flame war, I’ll clarify:
This is most likely an X server bug, and the Intel drivers are, as far as
I remember, not as robust as some other drivers. You might try swapping
video cards and see if you have the same problem.

D3, be nice.

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

Just to stop the flame war, I’ll clarify:
This is most likely an X server bug, and the Intel drivers are, as far as
I remember, not as robust as some other drivers. You might try swapping
video cards and see if you have the same problem.

D3, be nice.

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment


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

Wish I could swap, but it is a laptop…

I’ll head over to intel and see if anything can be done.

Anybody here having SDL fullscreen success/failure with 945 graphics in
Windows?

I’d be interested to know if it is a driver or hardware limitation.

Chris

Sam Lantinga wrote:

Just to stop the flame war, I’ll clarify:
This is most likely an X server bug, and the Intel drivers are, as far as
I remember, not as robust as some other drivers. You might try swapping
video cards and see if you have the same problem.

D3, be nice.

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment


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

Wish I could swap, but it is a laptop…

I’ll head over to intel and see if anything can be done.

Anybody here having SDL fullscreen success/failure with 945 graphics in
Windows?

I have a laptop with that same graphics chipset and that same screen
resolution, and it gives me no problems in Linux.

I’d be interested to know if it is a driver or hardware limitation.

I agree with Sam that it’s most likely an Xorg problem, probably
something misconfigured…

RegardsOn 5/31/07, Chris Pemberton wrote:

Chris Pemberton wrote:

Sam Lantinga wrote:

Just to stop the flame war, I’ll clarify:
This is most likely an X server bug, and the Intel drivers are, as far as
I remember, not as robust as some other drivers. You might try swapping
video cards and see if you have the same problem.

D3, be nice.

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment


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

Wish I could swap, but it is a laptop…

I’ll head over to intel and see if anything can be done.

Anybody here having SDL fullscreen success/failure with 945 graphics in
Windows?

I’d be interested to know if it is a driver or hardware limitation.

I’ve never head about such an issue with intel chipsets. I’d suggest
upgrading your graphics drivers and if the problem is still there,
report a bug at bugs.freedesktop.org

FWIW, SDL does nothing when you use OpenGL except hiding the window
creation and swapbuffer calls as system-independent. So it probably has
nothing to do with SDL.

Stephane

Chris Pemberton wrote:

Hello all,

I have a Lenovo 3000 N100 laptop with a Intel 945GM graphics chip.
The display is 1280x800 only, 24-bit only.
I use linux.

I have tried running several SDL apps in full screen, only to have the
machine display nothing but vertical lines and lock up tight.

For example, any of the nehe example programs at gamedev.net will run
great windowed (640x480x16), but they all crash when switching to full
screen. I can fix the full screen crash by editing the source code as
follows:

/* screen width, height, and bit depth */
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 800
#define SCREEN_BPP 24

where later this is set:

surface = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,
videoFlags );

videoFlags = SDL_OPENGL;
videoFlags |= SDL_GL_DOUBLEBUFFER;
videoFlags |= SDL_HWPALETTE;
videoFlags |= SDL_RESIZABLE;

Oh, also, those flags (SDL_GL_DOUBLEBUFFER and SDL_HWPALETTE) are of no
use with opengl.

Double buffer with opengl is gottten with SDL_GL_SetAttribute().

Stephane

I’d be interested to know if it is a driver or hardware limitation.

Likely a driver bug…I’ve run ut2004 on Linux and Windows with the
Intel drivers on a Sony Vaio in the past (although not at any playable
speed), so it’s possible that it’s been fixed/broken since the version
you’re using.

I don’t have any specifics beyond “it worked at one point,” though.

–ryan.

Ryan C. Gordon wrote:

I’d be interested to know if it is a driver or hardware limitation.

Likely a driver bug…I’ve run ut2004 on Linux and Windows with the
Intel drivers on a Sony Vaio in the past (although not at any playable
speed), so it’s possible that it’s been fixed/broken since the version
you’re using.

I don’t have any specifics beyond “it worked at one point,” though.

–ryan.


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

Do you remember the Vaio’s screen resolution and color depth? Or the
Vaio model?

Juanval wrote:> On 5/31/07, Chris Pemberton <@Chris_Pemberton> wrote:

Sam Lantinga wrote:

Just to stop the flame war, I’ll clarify:
This is most likely an X server bug, and the Intel drivers are, as far as
I remember, not as robust as some other drivers. You might try swapping
video cards and see if you have the same problem.

D3, be nice.

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment


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

Wish I could swap, but it is a laptop…

I’ll head over to intel and see if anything can be done.

Anybody here having SDL fullscreen success/failure with 945 graphics in
Windows?

I have a laptop with that same graphics chipset and that same screen
resolution, and it gives me no problems in Linux.

I’d be interested to know if it is a driver or hardware limitation.

I agree with Sam that it’s most likely an Xorg problem, probably
something misconfigured…

Regards


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

Could you please attach your xorg.conf and the output of lspci -vv.

Thank you,

Chris

Stephane Marchesin wrote:

Chris Pemberton wrote:

Hello all,

I have a Lenovo 3000 N100 laptop with a Intel 945GM graphics chip.
The display is 1280x800 only, 24-bit only.
I use linux.

I have tried running several SDL apps in full screen, only to have the
machine display nothing but vertical lines and lock up tight.

For example, any of the nehe example programs at gamedev.net will run
great windowed (640x480x16), but they all crash when switching to full
screen. I can fix the full screen crash by editing the source code as
follows:

/* screen width, height, and bit depth */
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 800
#define SCREEN_BPP 24

where later this is set:

surface = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,
videoFlags );

videoFlags = SDL_OPENGL;
videoFlags |= SDL_GL_DOUBLEBUFFER;
videoFlags |= SDL_HWPALETTE;
videoFlags |= SDL_RESIZABLE;

Oh, also, those flags (SDL_GL_DOUBLEBUFFER and SDL_HWPALETTE) are of no
use with opengl.

Double buffer with opengl is gottten with SDL_GL_SetAttribute().

Stephane


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

Thank you for both responses Stephane.

Drivers: I have the latest drivers, but perhaps I have made a bad
assumption in my xorg.conf. I was under the impression that this laptop
could only do 1280x800x24, so that is the only mode I specify in
xorg.conf. I’ll bug Intel and Lenovo to find out if this is the case.

So, if I understand correctly, an SDL program will attempt full screen
at whatever resolution and color depth the program wants and it is up to
the X server to provide that surface. I believe that is my problem: the
program wants a surface my X server cannot provide and the machine locks
up tight.

Thanks again,

Chris

El jue, 31-05-2007 a las 11:36 -0500, Chris Pemberton escribi?:

I have tried running several SDL apps in full screen, only to have the machine display nothing but vertical lines and lock up tight.

I’m having similar issues - same chip in a Compaq Presario V6000. It
doesn’t lock here, it segfaults inside the OpenGL Driver. Here’s the
stack trace :

#0 0x00e31260 in ?? ()
#1 0x00b01661 in __glXInitialize () from /usr/lib/libGL.so.1
#2 0x00afd11d in glXQueryVersion () from /usr/lib/libGL.so.1
#3 0x00afee0a in glXChooseVisual () from /usr/lib/libGL.so.1
#4 0x003d447f in X11_GL_GetVisual (this=0x91eb898)
at ./src/video/x11/SDL_x11gl.c:197
#5 0x003d9b96 in X11_SetVideoMode (this=0x91eb898, current=0x92452a0,
width=800, height=600, bpp=32, flags=)
at ./src/video/x11/SDL_x11video.c:783
#6 0x003c8013 in SDL_SetVideoMode (width=800, height=600, bpp=32,
flags=2415919106) at ./src/video/SDL_video.c:667

This happens when I toggle from windowed to fullscreen. If I start
fullscreen, the game starts up and works (the screen looks stretched
though - 800x600 in a widescreen mode). If I then toggle to windowed,
the game disappears (ie the desktop is shown again), no window appears,
and the game hangs. I have to CTRL-Z it to get out.

Some more info. Upon startup (windowed) I get this message in the
console : “libGL warning: 3D driver claims to not support visual 0x5b”.
This doesn’t cause any problem AFAIK, everything works fine windowed.

Another interesting fact is that something in this machine doesn’t
support 1280x800x24 so to get that mode working I have to use an utility
called 915resolution to patch some in-memory table and add support for
that mode so X can use it. I use mode 0x38 though, not 0x5b.

--Gabriel________________________________________________________________________

Gabriel Gambetta
Mystery Studio - http://www.mysterystudio.com
Gabriel’s Stuff - http://www.mysterystudio.com/gabriel

Hello !

I have tried running several SDL apps in full screen, only to have the
machine display nothing but vertical lines and lock up tight.

Have you tried the little examples that come with SDL ?
testsprite, testbitmap, testgl and so on ?

What shows for example testsprite ?

CU

Hello !

Some more info. Upon startup (windowed) I get this message in the
console : “libGL warning: 3D driver claims to not support visual 0x5b”.
This doesn’t cause any problem AFAIK, everything works fine windowed.

Another interesting fact is that something in this machine doesn’t
support 1280x800x24 so to get that mode working I have to use an utility
called 915resolution to patch some in-memory table and add support for
that mode so X can use it. I use mode 0x38 though, not 0x5b.

About bad drivers, was it not Intel that
released the sources for their drivers to the
Open Source Community ? ( Or was this just an idea
from them ? )

CU

Do you remember the Vaio’s screen resolution and color depth?

I don’t, except it was some widescreen thing that needed a video BIOS
hack to make the X server use the full resolution.

Or the Vaio model?

PCG-TR3A.

–ryan.

Gabriel Gambetta wrote:

El jue, 31-05-2007 a las 11:36 -0500, Chris Pemberton escribi??:

I have tried running several SDL apps in full screen, only to have the machine display nothing but vertical lines and lock up tight.

I’m having similar issues - same chip in a Compaq Presario V6000. It
doesn’t lock here, it segfaults inside the OpenGL Driver. Here’s the
stack trace :

#0 0x00e31260 in ?? ()
#1 0x00b01661 in __glXInitialize () from /usr/lib/libGL.so.1
#2 0x00afd11d in glXQueryVersion () from /usr/lib/libGL.so.1
#3 0x00afee0a in glXChooseVisual () from /usr/lib/libGL.so.1
#4 0x003d447f in X11_GL_GetVisual (this=0x91eb898)
at ./src/video/x11/SDL_x11gl.c:197
#5 0x003d9b96 in X11_SetVideoMode (this=0x91eb898, current=0x92452a0,
width=800, height=600, bpp=32, flags=)
at ./src/video/x11/SDL_x11video.c:783
#6 0x003c8013 in SDL_SetVideoMode (width=800, height=600, bpp=32,
flags=2415919106) at ./src/video/SDL_video.c:667

This happens when I toggle from windowed to fullscreen. If I start
fullscreen, the game starts up and works (the screen looks stretched
though - 800x600 in a widescreen mode). If I then toggle to windowed,
the game disappears (ie the desktop is shown again), no window appears,
and the game hangs. I have to CTRL-Z it to get out.

Some more info. Upon startup (windowed) I get this message in the
console : “libGL warning: 3D driver claims to not support visual 0x5b”.
This doesn’t cause any problem AFAIK, everything works fine windowed.

Another interesting fact is that something in this machine doesn’t
support 1280x800x24 so to get that mode working I have to use an utility
called 915resolution to patch some in-memory table and add support for
that mode so X can use it. I use mode 0x38 though, not 0x5b.

–Gabriel


Gabriel Gambetta
Mystery Studio - http://www.mysterystudio.com
Gabriel’s Stuff - http://www.mysterystudio.com/gabriel


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

The latest intel driver:
xf86-video-intel-2.0.0.tar.bz2
fixes the 1280x800 issue. I no longer need 915resolution. I just have
to use “intel” instead of “i810” in the xorg file to get it working.

Chris

Ryan C. Gordon wrote:

Do you remember the Vaio’s screen resolution and color depth?

I don’t, except it was some widescreen thing that needed a video BIOS
hack to make the X server use the full resolution.

Or the Vaio model?

PCG-TR3A.

–ryan.


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

Thanks for the info.

I use the latest intel driver:
xf86-video-intel-2.0.0.tar.bz2
which fixes the video bios hack 915resolution. You just have to install
it and change “i810” in xorg to “intel” and 915resolution is no longer
necessary.

Chris

Torsten Giebl wrote:

Hello !

I have tried running several SDL apps in full screen, only to have the
machine display nothing but vertical lines and lock up tight.

Have you tried the little examples that come with SDL ?
testsprite, testbitmap, testgl and so on ?

What shows for example testsprite ?

CU


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

testsprite and others lock up fullscreen, so here are the results of
running them windowed:

$ ./testsprite
Screen is at 32 bits per pixel
Screen is in system memory
Sprite is in system memory
Sprite blit uses RLE acceleration
392.01 frames per second

$ ./testoverlay
Created 64x88x1 hardware YUY2 overlay
plane 0: pitch=128

$ ./testgl
No OpenGL support on this system

I don’t know why it shows no OpenGL support as glxgears runs at over
1500 fps and glxinfo reports that direct rendering is enabled.

Chris