Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

CAP_SYS_NICE

Discussion in 'Linux' started by PlayBoxTech, Jun 19, 2018.

  1. PlayBoxTech

    PlayBoxTech

    Joined:
    Mar 19, 2018
    Posts:
    11
    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

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    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:
    460
    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. jnmnmz

    jnmnmz

    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:
    254
    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:
    460
    Running with root access isn't a fix, it's a security vulnerability.