7 ms·
F.lux for iOS devices now available
Hidden in the comments on the f.lux website is an announcement:
"Hey guys, if you have a jailbroken iPad or iPhone, f.lux is now available for iOS. Go to Cydia > Manage > Sources > Edit > Add: flux.herf.org > Search for "f.lux". Install! It's nice on phones, but amazing on iPads. Let us know how you like it!"
After the install, you can configure it in Settings. I tried it out; it works really well but right now it has just three options:
Choose lighting: At night: [Candle | Incandescent | Halogen | Fluorescent]
Disabled for older devices: Long transition: [ON | OFF]
Turn off for color-sensitive work: Enabled: [ON | OFF]
Unfortunately there's no way to configure the daytime color temperature or the duration of night, so you have to keep resetting the clock if you want a reddish screen during the day.
You might be wondering how it works; a disassembly reveals that it uses these functions:
_IOMobileFramebufferGetGammaTable
_IOMobileFramebufferSetGammaTable
_IOMobileFramebufferGetMainDisplay
- saurik 15y agoI worked with Herf on this: I spent a few hours at Foo Camp reversing those functions, and then he told me enough about how gamma works (he seriously seems to think in terms of exponential hex color shifts... it's sick) to get the stuff working. The code for iomfsetgamma is available in the uikittools package: git://git.saurik.com/uikittools.git; if that version of uikittools isn't released yet, then it will be about when iOS 5 hits. (Note: any developers using these functions /need/ to coordinate using the /tmp gamma cache so we don't lose the pristine gamma information. F.lux was based on the code for iomfsetgamma, and thereby does this.) The idea, btw, is that f.lux will be in a Cydia default repository, but as of yesterday the depiction was still being finalized (it needed to get a mention that it doesn't work on 2G/3G devices). I will check on the status of that again today. ;P (edit: oh yeah, I forgot that Herf found a simpler way to get the framebuffer, which I haven't added to iomfsetgamma yet.)
- deleted 15y ago[deleted]
- ivank 15y agoThanks! After seeing mobile f.lux I was looking for a way to set my own gamma ramps. This should come in really handy.
- herf 15y ago"Get" gamma ramp calls simply don't work on 2g/3g devices, so we have to ignore Apple's calibration and just use the native display gamma. Apple is using decent backlights on these, so it doesn't look terrible and this is now in the 0.93 build.
- herf 15y agoAlso, I had found the hardware registers through some hacking, so I asked Jay how to write to kernel memory...he pointed out that Apple had added this API as a PrivateFramework already.
- superchink 15y agoDoes it work on the iOS 5 GM yet? This may be the only thing holding me back from upgrading…
- superchink 15y agoTo answer my own question in case anyone else comes across this: yes. I'm on iOS 5 and f.lux works great.
- achompas 15y agoI might jailbreak my iPhone just for this.
- jpitz 15y agoBackground for those unfamiliar with f.lux - it is a utility for adjusting the color temperature of your display at night to warmer temps. I'm quite fond of it.
- veyron 15y agolink: http://stereopsis.com/flux/ http://stereopsis.com/flux/
- wh-uws 15y agoAny word on an android version? I recently discovered the program for desktop and I'm so thankful for how much better sleep I've been getting
- herf 15y agoCyanogenmod has incorporated Jeff Sharkey's "surfaceflinger" patch to make the compositor do a tint all the time. I have a private boot ROM that fully implements f.lux, but it's impossible to ship that way...trying to get Google to incorporate this patch so it can be used more generally. Also, for calibration you'd want all Android devices to have a full gamma LUT. It's not obvious if there's standard hardware in all the android devices...some platforms like Snapdragon have one, but I couldn't find code for it on all the rest. The OpenGL solution Jeff uses works everywhere.