← Back to team overview

elementary-dev-community team mailing list archive

Re: 5 ideas that every desktop OS should borrow

 

Hi Cassidy, thanks for your reply!

Yeah, priority by focus is a great idea. And so simple. Ingenious things
are always simple :D
I have a proof-of-concept implementation, but it conflicts with
prioritizing apps by default with ulatencyd because it sets priority to
higher-than-normal value on focus and resets it back to normal on unfocus,
regardless of the previous priority of the process. Well, that can be fixed
in theory, but the real problem is that it's not setuid-safe - shell
scripts in Linux can't be setuid-safe, there's always an exploitable race
condition, so I'll need somebody to rewrite it in C or Vala. Shouldn't be
hard to implement with libwnck.

By the way, looks like ulatencyd implements something like that already.
I'm fiddling with its configs right now, it's mostly for item #4 on the
list (prioritizing apps by default) though. It has Xorg as one of data
providers and decides priorities depending on all the data it collects, but
in my experiments it considers several apps to be the current active app...
weird. By the way, anybody familiar with Lua in here? That's what ulatencyd
uses for decision-making code.

Using ulatencyd I've already prevented app installation and system updates
from gobbling up resources I need for foreground apps, gave screencasters
higher priority so they don't drop frames that hard, increased priority for
media apps, etc. Looks like we'll be able to ship it with proper configs in
Luna (but no promises!).

--
Sergey "Shnatsel" Davidoff

References