Bug 891973 - SDL with xorg-server-1.7 cannot set gamma
Summary: SDL with xorg-server-1.7 cannot set gamma
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: SDL
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: http://bugzilla.libsdl.org/show_bug.c...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-04 17:07 UTC by Petr Pisar
Modified: 2017-01-10 14:46 UTC (History)
1 user (show)

Fixed In Version: SDL-1.2.15-5.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 12:52:58 UTC


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


Links
System ID Priority Status Summary Last Updated
SDL Simple Directmedia Layer 1680 None None None 2017-01-10 14:46:36 UTC
FreeDesktop.org 27222 None None None 2017-01-10 14:45:33 UTC

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.


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