Bug 392169

Summary: Flickering and degraded performance with redshift enabled
Product: [Plasma] plasmashell Reporter: Rokas Kupstys <rokupstys>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.12.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Rokas Kupstys 2018-03-22 11:01:21 UTC
As of 5.12 upgrade having redshift enabled causes screen flickering at some interval. As if redshift would get disabled for split second and get reenabled again. This also appears to cause performance issues for 3D applications.

Consider following snippet:

```
SDL_Event evt;
while (SDL_PollEvent(&evt))
    HandleSDLEvent(&evt);
```

At some interval (like 5 seconds or so) SDL_PollEvent takes over 40ms to return on my machine. Then application processes SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_TAKE_FOCUS events.

Also at seemingly regular but longer intervals there is a notable slowdown when 3D application is clearing screen (see code in question: https://github.com/urho3d/Urho3D/blob/master/Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp#L662-L712 ).

All mentioned problems go away when redshift is disabled.
Comment 1 Rokas Kupstys 2018-03-22 12:14:13 UTC
Possibly redshift bug.

https://github.com/jonls/redshift/issues/221
https://github.com/jonls/redshift/issues/588