juv / vibranceGUI

A Windows Utility that automates NVIDIAs Digitial Vibrance Control and AMDs Saturation for Games, e.g. Counter-Strike: Global Offensive
http://vibrancegui.com/
409 stars 48 forks source link

Vibrance still applied after CSGO exit, as well as with frequent alt-tabbing. #95

Open maiiiiixo opened 4 years ago

maiiiiixo commented 4 years ago

I have VibranceGUI 2.3.1.1 set to 70% Vibrance for CSGO.exe only, and have it at 50% in the Windows Vibrance levels. However, I often face an issue whereby the vibrance is not removed after exiting CSGO, and stays at the CSGO.exe's 70% Vibrance. This also happens when I shift-tab and press my second monitor to go to my desktop (since I have alt-tab & win key disabled for obvious reasons), where the vibrance is not removed and persists, and sometimes even persists on the desktop, but going back into CSGO then removes it!

I have a 1080ti on the latest drivers (451.48, DCH), although this has happened for multiple driver releases. Furthermore, when the vibrance is at 70% on the desktop, NVIDIA control panel still reports 50% vibrance, despite the fact is obviously isn't, and closing the program sets it back to 50%. I also have all 3 checkboxes ticked in the program: Autostart, Primary Only & Never change resolutions, although I've done testing with various configurations of these being ticked and un-ticked, and it doesn't change anything. I use 1280x960 4:3 Stretched in-game, which could be the cause of the issue but I am yet to test if 16:9 is affected. Lastly, it's worth mentioning I use DisplayCAL Profile Loader for my ICC profile, but there shouldn't be any conflict as manually setting the vibrance through NVIDIA control panel doesn't seem to conflict with the ICC profile.

juv commented 4 years ago

@TheBliTzzzzzz is it only happening when you have a second monitor attached to your pc?

maiiiiixo commented 4 years ago

@juv I have not checked without my second monitor attatched. Should I try that?

juv commented 4 years ago

@TheBliTzzzzzz yes, please give it a try just so we can try to pin down the problem a bit more

maiiiiixo commented 4 years ago

@juv Is the expected behaviour of using the vibrance with a specific program to display the vibrance as long as the process is running, regardless of whether you are actually "using" (focused?) the program or not? If so, that would change the second part of my issue, as the vibrance still being there while on the desktop is correct, since CSGO.exe is still open, just not full-screened. Instead, the issue then becomes it being wrongfully removed while CSGO is open, and still occurs without the second monitor being attached. The first issue of it being there while exiting CSGO I can't replicate consistently, sometimes it removes it instantly, other times it takes a minute or two, I think it just depends on what I actually press, like if I go straight to firefox versus browsing the desktop from what I've noticed.

juv commented 4 years ago

@TheBliTzzzzzz I'm not having the setup to test this thoroughly at the moment, but there is a slight chance that vibranceGUI is not registering Windows events where you restore a minimized application back to the active state. Apparently Windows handles a special case where minimized applications are restored to be the new foreground window. Right now, vibranceGUI handles the EVENT_SYSTEM_FOREGROUND event:

The foreground window has changed. The system sends this event even if the foreground window has changed to another window in the same thread. Server applications never send this event.For this event, the WinEventProc callback function's hwnd parameter is the handle to the window that is in the foreground, the idObject parameter is OBJID_WINDOW, and the idChild parameter is CHILDID_SELF.

Upon receiving this event, vibranceGUI performs its check on the GPU whether the current vibrance level is matching the expected vibrance level. When this event is not received, vibranceGUI can not realiably function. The whole purpose here is to work in a event driven way and gaining the most performance, while saving some cpu cycles by not checking the vibrance level in a loop (e.g. once every second).

There is another event called EVENT_SYSTEM_MINIMIZEEND, which might conflict in terms of vibranceGUIs expected behaviour, as this event will "mask" the EVENT_SYSTEM_FOREGROUND event:

A window object is about to be restored. This event is sent by the system, never by servers.

  This might cause some hiccups that the colors are not reliably changed. Unfortunately, due to Corona, I do not have access to my main workstation at this time and will not have until end of august.

maiiiiixo commented 4 years ago

@juv Interesting, thanks for having a look into this.

ImOnMars commented 3 years ago

I seem to be having this issue too: when I alt tab in and out of CS over time, it seems to sometimes get out of sync and I'll have to alt tab out and back into the game a second time to restore the vibrance.

juv commented 3 years ago

@TheBliTzzzzzz @ImOnMars can you take a look at this release and see if the problem is fixed?

vibrance.GUI-2.4.0.0.zip

maiiiiixo commented 3 years ago

@juv I'll take a look now.

maiiiiixo commented 3 years ago

@juv I've been running around for about half an hour and I'm yet to fool it, seems to be working much better. Also did the same with the old version, and it immediately had problems. However, this new version has been fine, whether I'm alt-tabbing, clicking onto my second monitor, or using the Windows key. It also seems as though the "Affect Primary Monitor Only" is working better too compared to the last version (whether that was intended or not), where it would sometimes flash onto my second monitor even when I had it enabled. Oh, and when I exit CS:GO the vibrance doesn't stay like it sometimes did like the last version. Overall, very good.

ImOnMars commented 3 years ago

@juv @TheBliTzzzzzz I haven't tested it yet, might be a little while before I have the chance, but the changes you noticed sound promising, as I've had this issue occurring for years on varying hardware, after Windows, game, and VibranceGUI reinstalls, etc. so it seemed like behavior that should be affecting all/most users.

juv commented 3 years ago

@TheBliTzzzzzz thanks for trying it out! I'm waiting for @ImOnMars to comment on this as well and then I'll push this as the new beta release on the website and see if someone complains on twitter

maiiiiixo commented 3 years ago

@ImOnMars You had a chance to try this yet? Seems like getting the new version out there would be awesome.

maiiiiixo commented 3 years ago

@juv So, there seems to have a been an Nvidia Driver update, and it's made my alt-tabs incredibly quick which is awesome. As a result of me switching res to 4:3, they were a lot slower, but that seems to have been fixed. But, it seems that even the lastest VibranceGUI Beta is struggling again. It just applied to my second monitor, despite me having the "Apply to primary monitor on only" enabled, and being able to switch in and out of CSGO again has caused it to lose vibrance despite being in the game again. It isn't as bad as it was before, but it is still fairly frequent.