SDL 2 full screen mode changes broken with nvidia-340

Bug #1671954 reported by Boris Gjenero
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libsdl2 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

I have a GeForce 8600GT card and am using nvidia-340 drivers, version 340.101-0ubuntu0.16.10.1. Going into full screen mode results in a mode smaller than the displayed area, where the mouse can be used to scroll the screen viewport around. Returning from full screen mode does not reset things back to the desktop mode, and instead leaves it in the same mode. Both of these behaviours seem broken.

SDL 1 mode changes work. Also xrandr mode changes work. That's why I'm reporting this as an SDL 2 bug, not an nvidia-340 bug. Earlier I dealt with an nvidia-340 bug https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1671920 but that is solved and I don't think that's why this is failing.

I'm attaching a small program which can be used to examine this behaviour. It can be built for SDL 1 and SDL 2 by supplying appropriate -I directory and -l libary, as in:
gcc -I/usr/include/SDL sdl_togglefullscreen.c -lSDL -o sdl_togglefullscreen1
gcc -I/usr/include/SDL2 sdl_togglefullscreen.c -lSDL2 -o sdl_togglefullscreen2

If reproducing this bug make sure xrandr is installed so you can go back to your desired resolution if SDL 2 fails to go back to it. Use something like xrandr --output DVI-I-2 --mode 1600x1200

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: libsdl2-2.0-0 2.0.4+dfsg2-1ubuntu1
ProcVersionSignature: Ubuntu 4.8.0-41.44-generic 4.8.17
Uname: Linux 4.8.0-41-generic x86_64
ApportVersion: 2.20.3-0ubuntu8.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Mar 10 17:09:30 2017
SourcePackage: libsdl2
UpgradeStatus: Upgraded to yakkety on 2016-10-13 (148 days ago)

Revision history for this message
Boris Gjenero (boris-gjenero) wrote :
Revision history for this message
Boris Gjenero (boris-gjenero) wrote :

SDL 2 is able to go back to the proper desktop resolution when exiting full screen if and only if the top left corner of the current viewport is at the top left of the displayed area. In other words, if I don't scroll the viewport right or down by going to those edges with the mouse, or if I scroll it and then scroll back to the left and top limits, only then do I go back to the proper resolution in desktop mode.

Revision history for this message
stsp (stsp-0) wrote :

Fullscreen switching in sdl2 is currently broken:
https://bugzilla.libsdl.org/show_bug.cgi?id=1859
This ticket has the patch that fixes it:
https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1715
I tested the patch and it works for me.
Would be nice if ubuntu can apply it, as
it seems sdl devs are ignoring the bugzilla
completely.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libsdl2 (Ubuntu):
status: New → Confirmed
Revision history for this message
stsp (stsp-0) wrote :

The fix was just applied to sdl mainline:
https://hg.libsdl.org/SDL/rev/f931db466859
Would be very nice if ubuntu can take this
up as this is a real show-stopper for the
full-screen apps.

Revision history for this message
Boris Gjenero (boris-gjenero) wrote :

https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1715 does not fix the issue I reported. I still can't get full screen mode to work properly. Normally I still get the large scrolling virtual desktop issue, and with SDL_VIDEO_X11_XRANDR=0 set in the environment things are even worse.

Revision history for this message
stsp (stsp-0) wrote :

OK, sorry then.
I just have the same problem and didn't want
to create a duplicate ticket...
Will do now.

no longer affects: libsdl
Revision history for this message
dino99 (9d9) wrote :

This is an unsupported release now. Please think to install the next LTS 'Bionic 18.04'

http://cdimage.ubuntu.com/ubuntu-next/daily-live/current/
https://www.omgubuntu.co.uk/2018/02/ubuntu-18-04-minimal-install-option

Changed in libsdl2 (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Marking as Invalid because the release is EOL is not correct. Marking as Incomplete. Also, 18.04 is (at the time of writing) still in development, and you should expect some breakage.
https://wiki.ubuntu.com/Bugs/Responses#Release_has_reached_End_of_Life_.28EOL.29

Reporter, is this still present on 17.10 or 16.04?

Changed in libsdl2 (Ubuntu):
status: Invalid → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.