Jump to content

I made a solution to the f.lux bug. =3


Soto Hax
 Share

You are about to reply to a thread that has been inactive for 2345 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

tl;dr: Launch SL using this AHK script below from now on to fix that stupid f.lux black/rainbow screen bug. Modify paths as needed.

So there's this weird bug where every single time you exit Second Life while running f.lux, the screen goes black or goes all crazy rainbow colours. The mouse pointer remains visible. For some reason, right clicking on the f.lux system tray icon and then clicking somewhere else on the screen fixes it.

Now before you start chiming in with all sorts of ideas about how to fix this problem, let me just point out that I've seen this bug consistently on multiple machines, multiple video cards of both nVidia and ATI make, and multiple video drivers. No, f.lux safe mode doesn't fix it. Please. Spare me. =p

I've gotten quite good at knowing precisely where on my screen the f.lux icon is, so I can click it blind to fix the screen most of the time. This is a real pain in the ass though. What's worse, there's a focus-stealing yes/no dialog box that pops up when the default viewer wants to do an automatic update installation, so you have to press the correct arrow key to highlight the yes button and hit enter, THEN find the damn f.lux icon.

You could of course just uninstall f.lux, but I for one am unwilling to do that. f.lux is a wonderful program that reduces eye strain and (allegedly) improves sleep patterns, so I'm not going to give that up.

There's a better solution: AutoHotKey.

AutoHotKey (AHK) is a very powerful operating system automation script engine. You can write scripts to automate all sorts of complicated tasks in Windows, Mac and Linux with a variety of triggers and conditions. 

I've written an AHK script that does the following:

1.) Launch Second Life.
2.) Wait until the Second Life process has terminated.
3.) Launch f.lux.
4.) Wait until a window titled "f.lux" exists.
5.) Hide the f.lux window.
6.) Exit script.

Here is the code:

RunWait, SecondLifeViewer.exe, C:\Program Files (x86)\SecondLifeViewer
Run, flux.exe, C:\Users\user\AppData\Local\FluxSoftware\Flux
WinWait, f.lux
WinHide
Exit

This has the exact same effect as the manual solution, but is infinitely more convenient and error proof. So install AHK and run this script instead of launching Second Life directly from now on. Just make sure you edit the paths in the script to match your particular setup/environment first. I also made a desktop shortcut to the script and changed the shortcut icon to the Second Life logo, just so it doesn't feel weird.

I haven't tested this script in other environments or during a default viewer automatic update, so let me know if you find any bugs. Again, make sure you change the file paths in the script to match your own setup.

  • Like 1
Link to comment
Share on other sites

I'm finding it fails on rare occasion. I've added a one second delay to see if that fixes it.

RunWait, SecondLifeViewer.exe, C:\Program Files (x86)\SecondLifeViewer
Run, flux.exe, C:\Users\user\AppData\Local\FluxSoftware\Flux
WinWait, f.lux
Sleep, 1000
WinHide
Exit

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
You are about to reply to a thread that has been inactive for 2345 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...