Due to maintenance, our forum will be offline for a short while on Monday June 1st, around 22:00 UTC.

Linux Setting nice level of Kodi on Ubuntu 15.04
#1
I am currently starting Kodi 15.2 after autologin by starting the xserver.

Code:
[email protected]:~$ cat .bash_profile
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
    startx -- -bs
fi

Code:
[email protected]:~$ cat .xinitrc
nice -n -20 kodi

But for some reason, kodi doesn't take the nice level it should, because

Code:
[email protected]:~$ ps -elf | grep kodi
0 S main      1823  1822  0  80   0 -  1118 wait   00:52 tty1     00:00:00 /bin/sh /usr/bin/kodi
0 R main      1825  1823 32  80   0 - 833132 -     00:52 tty1     03:57:31 /usr/lib/kodi/kodi.bin

shows a nice level of 0 (8th column of the output of "ps -elf"). Any ideas what I am doing wrong? Has anybody succeeded in changing the nice level?

Thanks!
Reply
#2
might be a permission issue?
setting the nice level requires root privileges i think.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Ah, thanks, I read somewhere else that only root can set nice levels lower than zero.
Reply
#4
Thanks to ronie's help, I figured out that it was the sudo issue. A fix would be to call nice with sudo, making

Code:
[email protected]:~$ cat .xinitrc
sudo nice -n -15 sudo -u $USER kodi

But this would ask for my sudo password in .xinit, therefore do a "sudo visudo", and add

Code:
%sudo   ALL = (ALL) NOPASSWD: /usr/bin/nice,/usr/bin/renice

at the end of the file, which allows main to run nice and renice without asking for superuser pw.

Thanks, case closed.
Reply
#5
See: /etc/security/limits.conf in 231955 (thread)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Setting nice level of Kodi on Ubuntu 15.0400
This forum uses Lukasz Tkacz MyBB addons.