falkTX / Cadence

Collection of tools useful for audio production
GNU General Public License v2.0
369 stars 80 forks source link

Warning icon near kernel version #337

Open antonio-petricca opened 2 years ago

antonio-petricca commented 2 years ago

Hi, I would waht the warning icon near the kernel version represents:

image

I have a PREEMP kernel too, and in that case it reports 5.15.5 Latency instead of 5.15.5 Linux, but the warning icon is still present.

Thank you!

trebmuh commented 2 years ago

Probably a duplicate of #125

antonio-petricca commented 2 years ago

Yes, it is.

Now I would know which setting should I enabled in order to get a fully RT kernel.

antonio-petricca commented 2 years ago

COuld somebody suggest how to compile my kernel in order to make the waning icon a green success icon?

antonio-petricca commented 2 years ago

HI found my answer in code:

class CadenceSystemCheck_kernel(CadenceSystemCheck):
    def __init__(self):
        CadenceSystemCheck.__init__(self)

        self.name = self.tr("Current kernel")

        uname3 = os.uname()[2]

        versionInt   = []
        versionStr   = uname3.split("-",1)[0]
        versionSplit = versionStr.split(".")

        for split in versionSplit:
            if split.isdigit():
                versionInt.append(int(split))
            else:
                versionInt = [0, 0, 0]
                break

        self.result = versionStr + " "

        if "-" not in uname3:
            self.icon     = self.ICON_WARN
            self.result  += self.tr("Vanilla")
            self.moreInfo = None

        else:
            if uname3.endswith("-pae"):
                kernelType   = uname3.split("-")[-2].lower()
                self.result += kernelType.title() + " (PAE)"
            else:
                kernelType   = uname3.split("-")[-1].lower()
                self.result += kernelType.title()

            if kernelType in ("rt", "realtime") or (kernelType == "lowlatency" and versionInt >= [2, 6, 39]):
                self.icon     = self.ICON_OK
                self.moreInfo = None
            elif versionInt >= [2, 6, 39]:
                self.icon     = self.ICON_WARN
                self.moreInfo = None
            else:
                self.icon     = self.ICON_ERROR
                self.moreInfo = None