Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

CAP_SYS_NICE

Discussion in 'Linux Editor' started by KatSerf, Jun 19, 2018.

  1. KatSerf

    KatSerf

    Joined:
    Mar 19, 2018
    Posts:
    8
    Hi all,

    Just installed Unity 2018.2.0b7 on Ubuntu 18.04 LTS, and in console it says:

    Failed setting thread niceness (priority) to 0 due to EACCESS (errno 13) violation. Lowering niceness (raising priority) requires CAP_SYS_NICE or supervisor.

    Was curious what the recommended steps are to fix this? Tried to ask Google and while it answered in general was hoping to get the "preferred" answer.

    Thanks!
     
  2. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    939
    The message itself is just a warning that the system isn't letting us raise the priority of a thread above the default. This won't break anything, it just means that we tried to raise the priority of a thread and weren't allowed.

    If you really want to allow this, I don't have anything to offer beyond what you'll find on google (limits.conf, setcap, etc.).
     
  3. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    433
    Being pedantic, 0 is the default niceness, so it might be worth double checking the intent of the code causing this issue. 'Set the niceness to default' seems a little redundant :)

    Failed setting thread niceness (priority) to 0 due to EACCES (errno 13) violation. Lowering niceness (raising priority) requires CAP_SYS_NICE or superuser.
    (Filename: /home/builduser/buildslave/unity/build/PlatformDependent/Linux/PlatformThread.cpp Line: 131)
     
  4. robi_combi

    robi_combi

    Joined:
    Apr 25, 2017
    Posts:
    2
    I just want to say: Thank you very much for supporting Unity in Linux!
     
  5. Helladah

    Helladah

    Joined:
    May 5, 2018
    Posts:
    153
    But what we can do to fix it, i just started a new froject and a floder with scripts about unity adware and other stuffs are there, may it be causing the bug?
     
    Last edited: Oct 21, 2018
  6. latiscool

    latiscool

    Joined:
    Oct 21, 2018
    Posts:
    1
    Hi,
    You can fix it by making a launcher with gksu

    Obviously. it will consume at like 5% more of ram also cpu. It's depends of the process
     
    Helladah likes this.
  7. Ainumortis

    Ainumortis

    Joined:
    Nov 25, 2018
    Posts:
    2
    GKSU was removed from repository in Debian and Ubuntu, you can use admin:// to fix this.

    Open the folder where you have Unity Binary file.

    Open a terminal and type this: (you can use Gedit or nano to create this file)

    $ gedit launcher.sh

    Put this code inside the launcher.sh file

    #!/bin/bash
    ./Unity admin://


    Save and then type next in the bash terminal:

    chmod +x launcher.sh

    Finally launch the launcher.sh instead Unity binary

    $ ./launcher.sh

    Sorry for my bad english ;)
     
  8. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    433
    Running with root access isn't a fix, it's a security vulnerability.
     
    VitruvianStickFigure and jimmack like this.