Bug 430934 - Nice/Ionice Not Being Honored In .desktop Exec
Summary: Nice/Ionice Not Being Honored In .desktop Exec
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.77.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-29 07:15 UTC by vindicator
Modified: 2021-03-03 06:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vindicator 2020-12-29 07:15:32 UTC
SUMMARY
Niceness of a running application launched from the Application Launcher is not being applied.

STEPS TO REPRODUCE
1. Right-mouse application in Application Launcher and "Edit application"
2. Go to application tab and prepend "Command" with "nice" and "ionice" values (-n 15 & -c 3). Save.
3. Run that application from the launcher.

OBSERVED RESULT
The niceness for the process is the default.

EXPECTED RESULT
The niceness should reflect what was stated in the command.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
If you copy/paste that niced command in the terminal and then look at the niceness of the running process, that will show the change.
Yet the same command used in the Launcher will not.

EG. Exec(comment)= nice -n 15 ionice -c 3 <pathTo>/code-insiders (visual studio code/vscode)

If you iotop to view that process PRIO, when it was run by the Launcher, you'll see it is the default "be/4", which is incorrect.

But if you run that same command in the terminal and view the iotop for that process, it shows "idle", which would be correct.
Comment 1 vindicator 2020-12-29 07:21:11 UTC
Oh, and in case you're wondering the "why" behind doing it like that, the child process cpptools for the c++ extension plays havoc with the usability of my system.

Yes, I also about the c++ setting for the extension related to it's niceness.

Also, even with everything set to low/idle, usability can still be tough with up to 10 seconds delay with actions like even just typing this message, I can type a full sentence before it shows up.
It's surely related to I/O and not cpu as I'm watching htop at the same time and cpu usage is very low, but my mechanical drive is thrashing. And I have plenty of free memory.
Comment 2 vindicator 2021-03-03 06:28:58 UTC
I dunno, but it looks fixed to me (kio 5.79.0-1) even though there's no other comments for this, so I'll just close it.