YoCodingMonster / OpenFreezeCenter

For Those running Linux Distro on MSI laptops. This is the Graphic User Interface application meant for Fan control in Linux.
GNU Affero General Public License v3.0
363 stars 61 forks source link

Nothing happens. [GF63 8RD] [Pop OS 22.04 ] #165

Closed Alcartez closed 1 year ago

Alcartez commented 1 year ago

$ sudo ./at_startup.sh

Nothing happens after installing the dependencies using install_deps.sh

$ python3 indicator.py >/dev/null 2>&1 & exit

Nothing happens after this either

YoCodingMonster commented 1 year ago

Disable secure boot

Run the following commands to create /etc/modules-load.d/ec_sys.conf and /etc/modprobe.d/ec_sys.conf and rebooted

OpenFreezeCenter-main$ sudo -- bash OpenFreezeCenter-main# cat ./etc/modules-load.d/ec_sys.conf >> /etc/modules-load.d/ec_sys.conf OpenFreezeCenter-main# cat ./etc/modprobe.d/ec_sys.conf >> /etc/modprobe.d/ec_sys.conf

Try installing dependencies manually

Alcartez commented 1 year ago

etc/modprobe.d and etc/modules-load.d is ec enabled.

No grub in Pop OS! any alternative for systemd-boot

YoCodingMonster commented 1 year ago

OpenFreezeCenter-main$ sudo -- bash

OpenFreezeCenter-main# cat ./etc/modules-load.d/ec_sys.conf >> /etc/modules-load.d/ec_sys.conf

OpenFreezeCenter-main# cat ./etc/modprobe.d/ec_sys.conf >> /etc/modprobe.d/ec_sys.conf

Alcartez commented 1 year ago

Still nothing happens. Sending ss on whatsapp.

Alcartez commented 1 year ago

I fixed the code

Indicator.py

def install_package(package_name):

    if dist == "debian" or dist == "ubuntu" or dist == "pop":
        cmd = ["sudo", "apt", "install", package_name, "-y"]
    elif dist == "fedora" or dist == "centos" or dist == "rhel":
        cmd = ["sudo", "dnf", "install", package_name, "-y"]
    elif dist == "opensuse" or dist == "sles":
        cmd = ["sudo", "zypper", "install", package_name, "-y"]
    elif dist == "arch":
        cmd = ["sudo", "pacman", "-S", package_name, "--noconfirm"]
    else:
        raise Exception("Unsupported distribution")

    subprocess.check_call(cmd)

Also Appindicator3-0.1 isn't in the default dependency installation

Here's the command to install it.

sudo apt-get install gir1.2-appindicator3-0.1

Alcartez commented 1 year ago

A little more generic code for indicator.py

import platform
import subprocess

def install_package(package_name):
    dist = platform.linux_distribution()[0].lower()
    if dist in ["debian", "ubuntu", "pop", "linuxmint", "kali", "mx", "pureos"]:
        cmd = ["sudo", "apt", "install", package_name, "-y"]
    elif dist in ["fedora", "centos", "rhel"]:
        cmd = ["sudo", "dnf", "install", package_name, "-y"]
    elif dist in ["opensuse", "sles"]:
        cmd = ["sudo", "zypper", "install", package_name, "-y"]
    elif dist in ["arch", "garuda", "manjaro"]:
        cmd = ["sudo", "pacman", "-S", package_name, "--noconfirm"]
    else:
        raise Exception("Unsupported distribution")

    subprocess.check_call(cmd)