Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 449692 - media-libs/libsdl-1.2.15 with >=x11-base/xorg-server-1.7 - cannot set gamma
Summary: media-libs/libsdl-1.2.15 with >=x11-base/xorg-server-1.7 - cannot set gamma
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
Depends on:
Reported: 2013-01-01 20:58 UTC by Petr Pisar
Modified: 2023-01-02 20:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

SDL fix (libsdl-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch,1.37 KB, patch)
2013-01-01 20:58 UTC, Petr Pisar
Details | Diff
SDL fix 2 (libsdl-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch,1.39 KB, patch)
2013-01-03 21:04 UTC, Petr Pisar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisar 2013-01-01 20:58:47 UTC
Created attachment 333968 [details, diff]
SDL 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 <> for more details.

Attached patch fixes this problem on SDL side. Tested with media-libs/libsdl-1.2.15-r2 and x11-base/xorg-server-1.13.1 on amd64.
Comment 1 Petr Pisar 2013-01-03 21:04:54 UTC
Created attachment 334240 [details, diff]
SDL fix 2

This patch removes unneeded SDL_ClearError() call in addition.
Comment 2 Petr Pisar 2013-01-04 17:19:02 UTC
Upstream bug report <>.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2013-05-10 06:23:10 UTC
in portage.  thanks for the bug report and patch.