We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 268

Summary: SDL_FULLSCREEN is broken with latest NVIDIA drivers
Product: SDL Reporter: Haakon Riiser <haakon.riiser>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.9   
Hardware: x86   
OS: Linux   
Attachments: Test program that reproduces the bug

Description Haakon Riiser 2006-06-28 15:13:12 UTC
The following is more likely a bug with the latest NVIDIA
drivers than a problem with SDL, but just to be sure, I've
created this bugzilla report containing the mail I sent
to <linux-bugs@nvidia.com>:

-----
I recently noticed that after upgrading from NVIDIA driver
1.0-8178, I could no longer change resolution on-the-fly using
SDL (a popular graphics library commonly used for Linux games).
Both of the two latest driver versions (1.0-8756 and 1.0-8762)
are broken in this way.

I've attached a simple test program (sdl-nvidia-bug.c) that
reproduces the bug.  Assuming that you have SDL installed, you
can compile this program with the following command:

  gcc sdl-nvidia-bug.c `sdl-config --cflags --libs`

What it tries to do is to change the resolution to 640x480 @ 32 bpp,
and then sleep for 5 seconds after doing so, making it easy to see
if the resolution changed or not.

When using the last working driver (1.0-8178), the screen goes
black but you can see from the size of the mouse cursor that
the resolution changes.  When using the latest driver versions,
the screen also goes black, but the resolution does not change.

I have also attached two outputs from nvidia-bug-report.sh:  One
generated after running sdl-nvidia-bug with driver 8178, and one
with driver 8762.

Finally, here are some hardware specs for my system:

  Graphics card: POV GeForce 7800 GT 256MB PCIe
  Mainboard: Asus A8N-SLI Premium nForce4 SLI S-939
  CPU: Athlon X2 3800+
-----

If NVIDIA takes the blame for this, I'll let you know and
close this bug. :)
Comment 1 Haakon Riiser 2006-06-28 15:14:24 UTC
Created attachment 144 [details]
Test program that reproduces the bug
Comment 2 Haakon Riiser 2006-06-29 04:07:42 UTC
NVIDIA immediately recognized this problem.  After driver 8178,
NVIDIA disabled all resolutions except those explicitly requested
(i.e., appended to the "Modes" lines) in xorg.conf .  That means
that, for 8756 and 8762, you need to add every resolution you're
going to use to the appropriate (depending on color depth)
Modes lines.

Luckily, future driver releases will have an option (on by default)
to use implicit modes, just like 8178 and older drivers, but this
will only work for single-screen displays.  I'm told the reason
is that they are concerned with populating the modepool with too
many modes (all possible combinations of resolutions for the two
displays apparently count as a mode, making the totalt number of
modes grow as O(n^2) where n is the number of single-screen modes).

Long story short, this is not a bug in SDL, so I'm closing this
one now. :)