Tyrrrz / LightBulb

Reduces eye strain by adjusting screen gamma based on the current time
MIT License
2.23k stars 141 forks source link

Latest (2.3.1) update slows down computer/skips frames #198

Closed vondyhaar closed 3 years ago

vondyhaar commented 3 years ago

My computer seems to not like the latest update, the system looks as if it's stuttering/low on fps. Task Manager shows nothing out of the ordinary. 2.2 and below work nicely. I'm on Windows 10 1607.

weiw11 commented 3 years ago

Have the same issue as well. When using VLC to play videos, it also causes audio de-sync.

ARDEACT commented 3 years ago

THIS THIS THIS. I've been finding out all day what is causing my PC to have audio crackling and stuttering, I remembered I updated lightbulb this morning. When I terminated the process, all normal! Something happened on this update, please fix!

Tyrrrz commented 3 years ago

That sounds bad :/

Note that you can revert back to 2.3.0 by:

  1. Disabling autoupdates in settings
  2. Downloading and installing the previous version from releases

It looks like the more aggressive gamma invalidation that was added in the last version doesn't bode well with some of the users. The release was tested by a few people (including myself) and it worked well. Will have to take a look into it.

svenbit commented 3 years ago

I have the same issue with version 2.3.1, it causes slow down and audio to stutter.

Task Manager also shows that dwm.exe (Desktop Window Manager) seems to be using higher CPU usage than usual when LightBulb is open/enabled. CPU usage for dwm.exe seems to be back to normal when LightBulb is closed (exit), disable doesn't seems to work.

ARDEACT commented 3 years ago

I should state that I'm using a Ryzen system with a DAC: Ryzen 7 2700 and Focusrite Scarlett Solo

odensc commented 3 years ago

Same issue here since 2.3.1, frames stuttering on desktop/in-game, and audio crackling.

If anyone with the issue can post the same info we may be able to see if there's a common thread (e.g. NVIDIA GPU / AMD CPU).

ARDEACT commented 3 years ago

Those poor individuals who haven't realized that Lightbulb is the culprit are probably going crazy.

weiw11 commented 3 years ago

@Tyrrrz I uninstalled V2.3.0 and installed V2.3.1 directly from the release page and it's working fine for me right now. Will update if I experience similar issues.

Maybe it's an issue with the configuration file from the update or an issue with the auto update feature?

Tyrrrz commented 3 years ago

@Tyrrrz I uninstalled V2.3.0 and installed V2.3.1 directly from the release page and it's working fine for me right now. Will update if I experience similar issues.

Maybe it's an issue with the configuration file from the update or an issue with the auto update feature?

I really doubt it.

Can you also post your specs please?

weiw11 commented 3 years ago

8700k 1070Ti Windows 10 64-bit 20H2

After testing it a bit more, there is still some stutter in games, but the audio issue is gone though.

There's also a reddit thread almost a week ago saying that windows have trouble with accent color changes? I'm not sure if warming the screen affects that.

I'm using Wallpaper Engine as well as RTSS but previous versions of LightBulb had no issues.

ljrafols commented 3 years ago

I can corroborate with previous comments about 2.3.1 causing stuttering issues. Uninstalling that version and reinstalling 2.3.0 with autoupdate disabled seems to have fixed the issue for now. Seems to be independent of drivers, as rolling back from the latest (461.92) to the previous drivers I used (460.79) and 460.89 had no change to the stuttering problem.

RE: accent colour changes, I did not change my accent colour nor have it set to automatically change based on background, so I do not believe the problem explicitly lies there.

Specs as followed. Ryzen 5 3600, Stock MSI GTX 1080, Stock Windows 10 x64 1909/19H2

weiw11 commented 3 years ago

What I meant was maybe the screen warming with the latest update by forcing it to repeatedly force refresh gamma for a short period creates the same issue as the accent color change. This would kind of make sense as the frame time spikes once in a while based on the chart provided by RTSS, but it's just my speculation.

AlessandroDiGioacchino commented 3 years ago

I remember having a similar issue with 2.3.0, but I didn't even suspect LightBulb to be the culprit in my case, I get audio crackling especially during night, when LightBulb has changed the screen brightness and temperature.

My laptop is pretty old.

Intel i3 M 380 Nvidia GT 540M Windows 7 x64

I also had the same symptoms on Windows 10

d3xMachina commented 3 years ago

I'm having this issue too. I'm on windows 20H2. Lightbulb (latest version) worked like a charm for a few months and then my computer started to stutter. I didn't update lightbulb nor my graphics drivers. So I tried to update my nvidia driver and it didn't change anything. I tried to exit all third-party programs running on my computer to find the culprit and I pinned it down to lightbulb. Lightbulb makes my dwm.exe (the processus for desktop composition) go from 0% CPU to a steady 3% (it's a lot since I have a ryzen 3900x) which causes the stutter. Also, gamma polling is disabled in my options.

Edit : I just saw there was an autoupdate of lightbulb a few days ago, I guess that's the cause.

vekuda commented 3 years ago

Have the same issue as well. When using VLC to play videos, it also causes audio de-sync.

Same here: I have been experiencing it on mpv and YouTube as well. After 5-6 minutes of playback it happens that sound and footage go completely out of sync.

I have been lucky enough to remember that I had updated LightBulb a few days ago...

eXmendiC commented 3 years ago

Same for me: Ryzen 5900X + GeForce GTX 1080. I didn't even notice a high CPU or GPU usage with version 2.3.1. I had many frame drops with mpv and also lags in Genshin Impact. I already thought that maybe my GPU slowly conks out. It's really a relieve that this isn't the case. I really wonder how an update can affect it that bad. Anyway, imo the best solution would be to release a 2.3.2 with the changes reverted. It took me hours to figure out why the lags happen, that would spare other people wasting hours into this or thinking something is wrong with their CPU/GPU.

djcyrax commented 3 years ago

I've been going crazy trying to figure out why my audio was stuttering and crackling. finally I decided to close LightBulb and it went away. Please fix this issue.

M-O-Marmalade commented 3 years ago

Happening to me too. I was installing Windows Updates, graphics driver updates, unplugging external HDDs and such, then finally killed some processes (which should have been the first step lol), and upon killing Lightbulb, lag immediately gone :open_mouth:

Kyuhaku commented 3 years ago

Interesting, I was suffering from this as well. I was thinking it was NVidia Drivers as I was using LatencyMon and that was usually the main cause (nvlddmkm.sys). Weird thing is if the GPU drivers are disabled in device manager or using Microsoft Basic Adapter, I don't see any issues when using Lightbulb even on version 2.3.1

Ryzen 5 3600 | NVidia RTX 3060 Ti Windows 10 20H2

deskilln commented 3 years ago

it all makes sense now

aaaaaaaaaaaaaa

bulhi commented 3 years ago

To add my two cents, I have an older laptop with Windows 8 which is mostly used just by my girlfriend for web browsing, and it was actually the "Client Server Runtime Process" that suddenly started eating around 5-10% of CPU. Same as others here, after fiddling with stuff, drivers, blaming my poor gf for infecting the computer with a virus etc. I eventually found out killing Lightbulb sent it back to zero :relieved: Downgrading to 2.3 helped.

edscript commented 3 years ago

ivers as I

Same, I re-installed the drivers, now everything makes sense!

PanoptesDreams commented 3 years ago

Same issue. CPU - Intel Pentium G4560 GPU - GTX 1060 3GB 20GB RAM Win 10 - 20H2 LightBulb 2.3.1

(msg/reply if other details wanted)

Edit: 2.3 also causes minor stuttering while running as well, however it's nowhere near as bad

Tyrrrz commented 3 years ago

Judging by the comments (thanks btw), it seems that this issue only manifests with Nvidia GPUs. Which would explain why I don't experience it myself, given that I have a Radeon GPU.

image image image image image image image

Now, seeing as everyone said that it only happens on the very last version, the only culprit seems to be this specific commit: https://github.com/Tyrrrz/LightBulb/commit/772a12a66e314ac0f49b21d0668d2ef775ca2854

My guess is that something about Nvidia drivers makes LightBulb think that the gamma or device context is constantly invalidated, which makes it constantly force-refresh gamma at a very high rate, causing stutter. I'll see if I can figure this out in the blind, otherwise I'll have to find an Nvidia GPU somewhere to debug.

Tyrrrz commented 3 years ago

Can someone try this CI build? https://github.com/Tyrrrz/LightBulb/actions/runs/789537034

Portable: https://github.com/Tyrrrz/LightBulb/suites/2594951280/artifacts/56703031 Installer: https://github.com/Tyrrrz/LightBulb/suites/2594951280/artifacts/56703032

Edit: changed links

lu-p-us commented 3 years ago

Installed the build, but I don't know how to exactly trigger the described behaviour. Hence, it will take some days to report back.

odensc commented 3 years ago

@Tyrrrz I don't see any stuttering/frame drops with this version. With 2.3.1 those effects would start immediately upon opening LightBulb. Seems fixed to me.

PanoptesDreams commented 3 years ago

Can someone try this CI build? https://github.com/Tyrrrz/LightBulb/actions/runs/789537034

Portable: https://github.com/Tyrrrz/LightBulb/suites/2594951280/artifacts/56703031 Installer: https://github.com/Tyrrrz/LightBulb/suites/2594951280/artifacts/56703032

Edit: changed links

Tried the portable build, seems to work fine. Will keep it running and report back if there are any issues.

joscha999 commented 3 years ago

To add to this thread I also just noticed this - had lags since the last few days. I think this is a mix of a Handle/Memory leak but I'm not quite sure (at least for the Handles part).

I just killed the app with about 50GB of RAM usage - this was paged RAM so it didn't show up on the normal task manager but checking via the resource monitor showed ~51GB and closing the app released all of it. I also noticed a specific service reaching the Handle limit of Windows (~16 million), can't remember the name but I think it was something started by or with LightBulb.

Note: I usually let my PC run for several days and only hibernate it at night - this may make this whole problem worse (or really only be the reason it shows up for some and not others).

Now switched to 2.3.0, I'll let ya'll know if this also happens on that version. Hope this information may help you finding the issue @Tyrrrz, thanks for the work on LightBulb!

lu-p-us commented 3 years ago

Installed the build, but I don't know how to exactly trigger the described behaviour. Hence, it will take some days to report back.

So far, looks good for me. No more stutter with https://github.com/Tyrrrz/LightBulb/suites/2594951280/artifacts/56703032

DinushaJ commented 3 years ago

Those poor individuals who haven't realized that Lightbulb is the culprit are probably going crazy.

I only just figured it out after this whole time... Was actually about to reset my system.

Had awful audio stuttering and high CPU usage by dwm.exe. Mouse was stuttering moving around the desktop and occasionally got video stuttering too. All gone after disabling lightbulb.

Hamish-GJP commented 3 years ago

I was severely impacted by this issue. Tracking down the source caused me to tunnel through to my reptilian brain with a Phillips head screwdriver.

After several days running the CI build, I'm happy to report that all is well, even when working with demanding Cubase projects using ASIO.

My head hurts.

Versette commented 3 years ago

OH MY GOD, I was trying to figure this out for the past ~2 weeks, I even contacted Microsoft because of it. It has affected me A LOT. The issue started around 2 hours from boot up, and I found the cause by manually terminating each process that wasn't windows related until it stopped... The program is great, but please fix this!

Edit: My specs are i7 10700k, RTX 2080 Super and 32GB RAM

Tyrrrz commented 3 years ago

Released a new version. Sorry it took so long, was blocked by a dependency that I needed to get into this version.