LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 05-11-2015, 11:37 PM   #1
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Rep: Reputation: Disabled
Is SDL buggy?


I notice that games that use SDL in recent times have issues when switching desktop resolution internally. I have one PC with the nvidia driver, and whenever a game tries to change the resolution, the 'game screen' looks offset, and you can scroll around the viewing area by moving the mouse. It's as if you are zoomed into a part of the old desktop, but the old dimensions remain. Then when exiting, often it doesn't change back to the desktop resolution, and then you have to restart X.

On intel video, the problem has to do with vsync. When you let a game switch the resolution, vsync doesn't work correctly in the switched resolution.

I notice that when you switch resolutions manually (with xrandr), this doesn't happen. This is why I believe it's an SDL issue, or at the very least related to it. It could also be that it's only SDL2 causing this but I am not sure, since I don't know which steam games use which SDL version. Yet another possibility is that of the two issues above, one might only relate to SDL2 and the other to both versions of SDL.

Anybody else notice these problems? It seems like switching resolutions for games is all but extinct, with everyone simply playing at native resolution. This might be why it's going under the radar?
 
Old 05-11-2015, 11:54 PM   #2
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Quote:
Originally Posted by xyzone View Post
I have one PC with the nvidia driver, and whenever a game tries to change the resolution, the 'game screen' looks offset, and you can scroll around the viewing area by moving the mouse. It's as if you are zoomed into a part of the old desktop, but the old dimensions remain. Then when exiting, often it doesn't change back to the desktop resolution, and then you have to restart X.
Hi...

If I remember correctly, I had this exact issue when I was running Ubuntu 10.04 with a game called Powermanga. It didn't happen a lot but I would just restart the system when it did. I'm not sure if the game used SDL or not. I know Super Maryo Chronicles does and I've never had a problem with it, regardless of the brand of video chip.

Regards...
 
Old 05-12-2015, 01:16 AM   #3
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ardvark71 View Post
Hi...

If I remember correctly, I had this exact issue when I was running Ubuntu 10.04 with a game called Powermanga. It didn't happen a lot but I would just restart the system when it did. I'm not sure if the game used SDL or not. I know Super Maryo Chronicles does and I've never had a problem with it, regardless of the brand of video chip.

Regards...
Were you selecting non-desktop resolutions in-game on Maryo on intel video? Did vsync work if you did?

edit: I just tried the maryo game. I installed from the distro repos. It starts in 640x480 fullscreen by default. I tried on intel video and vsync does not work correctly unless you use xrandr to switch resolutions before starting the game.

Last edited by xyzone; 05-12-2015 at 01:48 AM.
 
Old 05-12-2015, 02:44 AM   #4
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Quote:
Originally Posted by xyzone View Post
Were you selecting non-desktop resolutions in-game on Maryo on intel video? Did vsync work if you did?

edit: I just tried the maryo game. I installed from the distro repos. It starts in 640x480 fullscreen by default. I tried on intel video and vsync does not work correctly unless you use xrandr to switch resolutions before starting the game.
Hi...

Whooops, I forgot that the system I own with the Intel graphics has Windows XP installed, so I'm using the Windows version of SMC. My laptop is the one running Linux and it has a GeForce 8600M GS, which SMC does fine on, either with the proprietary or the nouveau drivers.

Just as a thought, if you haven't already, you might want to file a bug, or in some other way, have a chat with folks over at SDL to see if there is something they can do.

Regards...

Last edited by ardvark71; 05-12-2015 at 02:45 AM. Reason: Correction.
 
Old 05-12-2015, 05:48 AM   #5
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Original Poster
Rep: Reputation: Disabled
Yeah, I might file a bug report, even if I'm a little worried of being yelled at by devs, which is why I want to confirm that it's repeatable, and not just some weird cosmic coincidence happening only on my devices.

Although it's not just an intel video problem, or there's two separate SDL bugs. Like I said previously, the nvidia problem seems to be more severe. There are so many steam games that fail to change (and change back) the resolution correctly on the nvidia driver that it seems like an SDL2 problem. I also suspect this because there is a game emulator called mednafen that uses SDL-1.2 which does not suffer either problem on an nvidia card, but another emulator called mame does suffer from the floppy screen issue, and mame uses sdl2 at this point. I suspect that a change in Xorg which SDL did not account for is causing these problems.

At any rate, the workaround for now is to make a wrapper script with xrandr commands. Although on steam that causes other problems with the GUI (this is already known by the steam devs).

Last edited by xyzone; 05-12-2015 at 05:55 AM.
 
Old 05-12-2015, 12:28 PM   #6
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Quote:
Originally Posted by xyzone View Post
Yeah, I might file a bug report, even if I'm a little worried of being yelled at by devs, which is why I want to confirm that it's repeatable, and not just some weird cosmic coincidence happening only on my devices.
Hi...

You could broach the issue first in their forum and see what their thoughts are. Perhaps some folks could help you with confirmation. Sorry I can't help you out more with the details, I'm more of a hardware guy.

Regards...

Last edited by ardvark71; 05-12-2015 at 12:30 PM. Reason: Added information.
 
Old 05-12-2015, 03:48 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
it is not that SDL_??? is buggy

but new developers tended to HARD CODE the x/y coordinates of things for 600x800 desktops
by using say on a 600x800 screen as the location
x=100 px
y=100 px

instead of using percentages


because buried deep in some .c or .h file is a hard codded location and the size of the object

this makes UPDATING programs a "ROYAL PAIN IN THE 'rear end' "
you have to not only change the location but HOW big it is


so MUCH of a pain in the rear that i gave up on modernizing some of the games

Last edited by John VV; 05-12-2015 at 03:50 PM.
 
Old 05-12-2015, 05:30 PM   #8
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
it is not that SDL_??? is buggy

but new developers tended to HARD CODE the x/y coordinates of things for 600x800 desktops
by using say on a 600x800 screen as the location
x=100 px
y=100 px

instead of using percentages


because buried deep in some .c or .h file is a hard codded location and the size of the object

this makes UPDATING programs a "ROYAL PAIN IN THE 'rear end' "
you have to not only change the location but HOW big it is


so MUCH of a pain in the rear that i gave up on modernizing some of the games
That is interesting. But some time ago I didn't notice it happening with some of the very same SDL applications that it's happening with now. That's why I think it's some kind of issue that stems from a Xorg change (at least in the case of the vsync issue on intel). Would it be difficult to have them switch resolutions with xrandr if Linux is detected?

Last edited by xyzone; 05-12-2015 at 05:32 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C: Minimalist SDL Presentation (SDL SDL_ttf) Xeratul Programming 0 12-23-2013 11:44 AM
Is dpkg buggy or what? dipuasks Ubuntu 4 08-03-2008 06:24 AM
SDL is installed, included and linked, but will not compile SDL code mansizerooster Programming 10 05-31-2006 04:18 AM
Sourcecompiling Problem...The sdl-config script installed by SDL could not be found. deepclutch Debian 1 12-15-2005 12:15 PM
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration