Bug 891973

Summary: SDL with xorg-server-1.7 cannot set gamma
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: SDLAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: ppisar
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://bugzilla.libsdl.org/show_bug.cgi?id=1680
Whiteboard:
Fixed In Version: SDL-1.2.15-5.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-12 12:52:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed fix none

Description Petr Pisar 2013-01-04 17:07:08 UTC
Created attachment 672492 [details]
Proposed fix

SDL_SetGamma() allows to change screen gamma. Problem is it has no effect since xorg-server-1.7 (almost three years back). Try to run any SDL application, games usually supports setting gamma, or compile test/testgamma.c demo from libsdl tar ball (run it and press Up or Down to change gamma value).

SDL supports two methods how to change gamma: Directly and changing color palette. SDL_SetGamma() prefers changing palette but this is broken in Xorg server, so it does not change colors neither signal failure. This is problem in Xorg, but it's not likely to be fixed. See <https://bugs.freedesktop.org/show_bug.cgi?id=27222> for more details.

Attached patch fixes this problem on SDL side.

Comment 1 Petr Pisar 2013-01-23 16:19:35 UTC
With this patch it's possible to change gamma, but it the effect takes only on one monitor of multi-head screen. I believe this is better state than no gamma settings, so I'm going to push this patch into F≥17.

Comment 2 Fedora Update System 2013-01-23 16:31:53 UTC
SDL-1.2.15-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/SDL-1.2.15-3.fc18

Comment 3 Fedora Update System 2013-01-23 16:34:07 UTC
SDL-1.2.14-17.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/SDL-1.2.14-17.fc17

Comment 4 Fedora Update System 2013-02-01 16:34:54 UTC
SDL-1.2.15-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2013-02-02 04:23:32 UTC
SDL-1.2.14-17.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Petr Pisar 2017-01-10 14:45:02 UTC
xorg-server-1.19.0 fixed palette programming <https://bugs.freedesktop.org/show_bug.cgi?id=27222>, the gamma patch will be removed from SDL in Fedora ≥ 25.