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 37

Summary: [PATCH] fbcon needs to save/restore the screeninfo for vc switches
Product: SDL Reporter: bartoldeman
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.9   
Hardware: x86   
OS: Linux   
Attachments: fix for bug 37

Description bartoldeman 2006-01-09 22:32:48 UTC
I observed that the original resolution is lost when I flip consoles back and forth using the alt-fn keys. This is using Linux kernel 2.6.14, radeonfb. The patch below fixes this. Perhaps this isn't meant to be used, and it's a kernel bug, but then it just works around a kernel bug ;)

By the way, does anyone know why SDL freezes the application when switched away using fbcon? It could catch a signal for flipping back, and provide a fake frame buffer at a fixed position so that the application can work in the background.

Using ctrl-alt-fn for flipping instead of alt-fn may help a few games that actually use that key combination. Would such a patch be accepted, or should something like that be configurable (environment
variable?)
Comment 1 bartoldeman 2006-01-09 22:36:55 UTC
Created attachment 19 [details]
fix for bug 37
Comment 2 Ryan C. Gordon 2006-01-10 15:46:19 UTC
(In reply to comment #0)
> I observed that the original resolution is lost when I flip consoles back and
> forth using the alt-fn keys. This is using Linux kernel 2.6.14, radeonfb. The
> patch below fixes this. Perhaps this isn't meant to be used, and it's a kernel
> bug, but then it just works around a kernel bug ;)

This is an SDL bug, although the whole VT system is a broken mechanism in my opinion for requiring things like this. I'll look at the patch and probably apply it soon.

> By the way, does anyone know why SDL freezes the application when switched away
> using fbcon? It could catch a signal for flipping back, and provide a fake
> frame buffer at a fixed position so that the application can work in the
> background.

I think that's a good idea; but we should manage that in a seperate bug (since this one will be flagged RESOLVED when I apply the patch in Attachment #19 [details].

> Using ctrl-alt-fn for flipping instead of alt-fn may help a few games that
> actually use that key combination. Would such a patch be accepted, or should
> something like that be configurable (environment
> variable?)

Do normal VTs that aren't running an SDL app use ALT-fn? I thought it was ctrl-alt-fn, which would mean this change would make very good sense. Otherwise, I'm inclined to leave it be for now.

--ryan.

Comment 3 Ryan C. Gordon 2006-01-10 15:53:22 UTC
Patch is now in CVS...thanks!

Please open new bug entries for the dummy framebuffer and ctrl-alt-fn issues, if you like.

--ryan.

Comment 4 Ryan C. Gordon 2006-01-19 04:08:23 UTC
Following up, I've created seperate bug entries for the other issues in Bug #49 and Bug #50.

--ryan.

Comment 5 Ryan C. Gordon 2006-01-27 11:23:11 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.