Bug 891973 - SDL with xorg-server-1.7 cannot set gamma
SDL with xorg-server-1.7 cannot set gamma
Product: Fedora
Classification: Fedora
Component: SDL (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Pisar
Fedora Extras Quality Assurance
: Patch
Depends On:
  Show dependency treegraph
Reported: 2013-01-04 12:07 EST by Petr Pisar
Modified: 2017-01-10 09:46 EST (History)
1 user (show)

See Also:
Fixed In Version: SDL-1.2.15-5.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-12 08:52:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed fix (1.39 KB, patch)
2013-01-04 12:07 EST, Petr Pisar
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 27222 None None None 2017-01-10 09:45 EST
SDL Simple Directmedia Layer 1680 None None None 2017-01-10 09:46 EST

  None (edit)
Description Petr Pisar 2013-01-04 12:07:08 EST
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 11:19:35 EST
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 11:31:53 EST
SDL-1.2.15-3.fc18 has been submitted as an update for Fedora 18.
Comment 3 Fedora Update System 2013-01-23 11:34:07 EST
SDL-1.2.14-17.fc17 has been submitted as an update for Fedora 17.
Comment 4 Fedora Update System 2013-02-01 11:34:54 EST
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-01 23:23:32 EST
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 09:45:02 EST
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.

Note You need to log in before you can comment on or make changes to this bug.