Opened 10 years ago

Closed 8 years ago

#4779 closed bug (fixed)

Resolution not properly reset after returning from fullscreen mode

Reported by: scottmc Owned by: pulkomandy
Priority: normal Milestone: R1
Component: Servers/app_server Version: R1/Development
Keywords: Cc: mdisreali@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

When running some tests using libsdl I've seen some cases where I start in 1600x1200 mode and then run the test which goes to full screen and when it ends dumps me into 1024x768 mode. After returning from fullscreen mode the system will sometimes then crash into gdb and lock up.

Attachments (4)

fire (35.0 KB ) - added by scottmc 10 years ago.
binary of sdl fire demo
fire-1.0.tar.gz (26.2 KB ) - added by scottmc 10 years ago.
source code for the sdl fire demo
quake3-gcc2_r37440-4h_blackscreen_then_exit.txt (1.0 KB ) - added by Disreali 9 years ago.
quake3-gcc4_r37440-4h_blankscreen_then_exit.txt (12.5 KB ) - added by Disreali 9 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 by scottmc, 10 years ago

Component: - GeneralSystem

You can get the latest build of libsdl for Haiku here: http://www.haiku-ports.de/packages/media-libs/libsdl/

by scottmc, 10 years ago

Attachment: fire added

binary of sdl fire demo

by scottmc, 10 years ago

Attachment: fire-1.0.tar.gz added

source code for the sdl fire demo

comment:2 by scottmc, 10 years ago

Component: SystemServers/app_server
Owner: changed from nobody to axeld

comment:3 by scottmc, 9 years ago

Updated libsdl can now be found here: http://ports-space.haiku-files.org/media-libs/

comment:4 by Disreali, 9 years ago

Cc: mdisreali@… added
Version: R1/alpha1R1/Development

Experiencing this when I try to run Quake3 on hrev37440-4h. Using the most recent sdl libs as of 2010-06-11. Screen goes from 1024x768 to 640x480. I have to use Cmd+Fn to get to another workspace and then re-run Screen to reset my resolutions.

comment:5 by scottmc, 9 years ago

try running it from the command line and then attach the output you get in the terminal from start to finish

comment:6 by Disreali, 9 years ago

Attaching output when running quake3 from cmd line.

comment:7 by scottmc, 8 years ago

Owner: changed from axeld to pulkomandy
Status: newassigned

This seems to be related to sdl and/or the gamekit? Perhaps pulkomandy and GSoC student Nathan can look into it? This may or may not have been fixed with our sdl port changes made in late 2010.

comment:8 by pulkomandy, 8 years ago

It's likely a bug in SDL, which saves the current video mode at start and tries to restore it at exit. The restoring may not always work. Also, it looks like it doesn't always fail.

Last edited 8 years ago by pulkomandy (previous) (diff)

comment:9 by scottmc, 8 years ago

Resolution: fixed
Status: assignedclosed

This appears to be fixed now. If anyone still sees this happening, please provide details on how to reproduce the issue.

comment:10 by pulkomandy, 8 years ago

Well I saw it happen by running the fire demo above just yesterday. Not sure this qualifies as fixed ?

comment:11 by scottmc, 8 years ago

Which haiku version were you using? Which version of sdl were you using?

I tested using the fire demo as well, it goes to 640x480 while it's running and when it ends it went back to the previously set resolution, which in my case was 1600x1200. I tested on hrev42458 gcc2hybrid, with the libsdl-1.2-hg build. Before when I'd run this test it would switch to 1024x768, instead of the resolution I was running prior to running the demo.

comment:12 by pulkomandy, 8 years ago

This is hrev42532, not sure about the SDL version; how do I check ?

sdl-config --version
1.2.14

comment:13 by scottmc, 8 years ago

Resolution: fixed
Status: closedreopened

I just checked with the libsdl-1.3-gsoc WIP build and built the fire demo and it is showing the resizing issue still, so re-opening for now.

Note, this is what I used for building the fire demo, unzip the source and then run:

gcc -o fire fire.c -g -O2 -I/boot/common/include/SDL -DHAVE_OPENGL -L/boot/common/lib -lSDL -lGL -lroot -lbe -lmedia -lgame -ldevice -ltextencoding

comment:14 by axeld, 8 years ago

FWIW I tested "fire" on hrev40260 (from January), and it restores the resolution after being quit. However, it doesn't manage to restore it 100%, ie. the app_server will now switch the resolution (to the same, but obviously with different timings/flags/whatever) when switching workspaces which is quite a bit annoying.

comment:15 by pulkomandy, 8 years ago

axeld: this may be a known bug in intel_extreme, where it will not compare modes when setting. So, switching workspace trigger a mode change that should be intercpted as a no-op in the driver, but isn't. There's a todo somewhere in the code about it.

comment:16 by axeld, 8 years ago

The test system indeed has an intel_extreme chipset, but I don't find it entirely convincing, as the app_server doesn't usually do that on a workspace switch. At the very least, that shouldn't be the only problem there is.

comment:17 by scottmc, 8 years ago

I don't think it's just intel_extreme as I was seeing this happen in VMware where the display adapter shows up at VGA compatible controller vendor 15ad: VMware, device 0405 SVGA II Adapter

comment:18 by pulkomandy, 8 years ago

I tried the latest build of SDL1.2 at haiku ports, and this one doesn't have the bug.

I'm wondering what Nathan based his port on, I'm not sure if he used plain SDL1.2 sources or the ones with patches we had not upstreamed yet. This means some bugs may be back in the 1.3 port now...

comment:19 by pulkomandy, 8 years ago

Resolution: fixed
Status: reopenedclosed

Not an Haiku bug anyway. Move to SDL bugtracker if needed.

Note: See TracTickets for help on using tickets.