Giter Site home page Giter Site logo

archlinux-kernel-manager's Introduction

Arch Linux Kernel Manager

A GTK4 Python application which installs and removes Linux Kernels on Arch Linux based systems.

Installation and removal of Kernels is carried out using Pacman.

Kernel packages are sourced from the Arch Linux Archive (ALA)

Both official and un-official community based Kernels are supported.

Official Kernels

  • linux
  • linux-lts
  • linux-zen
  • linux-hardened
  • linux-rt
  • linux-rt-lts

Since the ALA has a lot of kernel packages any versions found older than 2 years or more are ignored. These kernels are considerably out of date and have shown to fail to install properly with issues related to missing modules.

Official kernels

What happens if a kernel installation fails

The application will show a message that it has encountered an issue, and the log inside the progress window, should have the information required to understand why. In the event of a failure, the application will attempt to reinstall the kernel using the version previously installed.

Community based kernels

As long as the necessary Pacman repositories are configured these are supported.

  • linux-xanmod
  • linux-xanmod-lts
  • linux-cachyos
  • linux-lqx
  • linux-clear
  • linux-amd
  • linux-nitrous

Most of these are sourced from the Chaotic AUR

See updating the configuration file for adding new kernels.

Community kernels

Installed kernels

Installed kernels

Progress window

Progress window

Bootloader

Only Grub and systemd-boot bootloaders are supported.

After a successful install/removal of a kernel the relevant bootloader entries are updated. By default, the application will use bootctl to distinguish which bootloader (Grub/systemd-boot) is currently being used.

Grub

grub-mkconfig is run to update the grub.cfg file.

Advanced settings

Bootloader settings

The bootloader settings can be overridden using the Advanced settings window. Or you can manually update the configuration file (see the custom bootloader example).

Advanced settings

Latest kernel versions

Based on the latest information taken from the configured pacman mirrors.

Kernel versions

Default configuration file

This file can be found inside $HOME/.config/archlinux-kernel-manager

title = "ArchLinux Kernel Manager Settings"

[kernels]

# Kernels which are sourced from the ALA (Arch Linux Archive) https://archive.archlinux.org
official = [
    { name = "linux", description = "The Linux kernel and modules (Stable)", headers = "linux-headers" },
    { name = "linux-lts", description = "The LTS Linux kernel and modules (Longterm)", headers = "linux-lts-headers" },
    { name = "linux-zen", description = "The Linux ZEN kernel and modules (Zen)", headers = "linux-zen-headers" },
    { name = "linux-hardened", description = "The Security-Hardened Linux kernel and modules (Hardened)", headers = "linux-hardened-headers" },
    { name = "linux-rt", description = "The Linux RT kernel and modules (Realtime)", headers = "linux-rt-headers" },
    { name = "linux-rt-lts", description = "The Linux RT LTS kernel and modules (Realtime Longterm)", headers = "linux-rt-lts-headers" },
]

# Kernels which are sourced from unofficial repositories, these won't work if you haven't updated your pacman configuration
# https://wiki.archlinux.org/title/Unofficial_user_repositories
community = [
    { name = "linux-xanmod", description = "The Linux kernel and modules with Xanmod patches", headers = "linux-xanmod-headers", repository = "chaotic-aur" },
    { name = "linux-xanmod-lts", description = "The Linux kernel and modules with Xanmod patches", headers = "linux-xanmod-lts-headers", repository = "chaotic-aur" },
    { name = "linux-amd", description = "Linux kernel aimed at the ZNVER4/MZEN4 AMD Ryzen CPU based hardware", headers = "linux-amd-headers", repository = "chaotic-aur" },
    { name = "linux-cachyos", description = "The Linux EEVDF-BORE scheduler Kernel by CachyOS with other patches and improvements kernel and modules", headers = "linux-cachyos-headers", repository = "chaotic-aur" },
    { name = "linux-ck", description = "The Linux kernel and modules with ck's hrtimer patches", headers = "linux-ck-headers", repository = "repo-ck" },
    { name = "linux-clear", description = "The Clear Linux kernel and modules", headers = "linux-clear-headers", repository = "chaotic-aur" },
    { name = "linux-lts-tkg-bmq", description = "The Linux-tkg kernel and modules", headers = "linux-lts-tkg-bmq-headers", repository = "chaotic-aur" },
    { name = "linux-tkg-pds", description = "The Linux-tkg kernel and modules", headers = "linux-tkg-pds-headers", repository = "chaotic-aur" },
    { name = "linux-lqx", description = "The Linux Liquorix kernel and modules", headers = "linux-lqx-headers", repository = "chaotic-aur" },
    { name = "linux-nitrous", description = "Modified Linux kernel optimized for Skylake and newer, compiled using clang", headers = "linux-nitrous-headers", repository = "chaotic-aur" },
]

[logging]
# Logging is either info or debug
loglevel = "info"

# custom bootloader example
#[bootloader]
#name = "grub"
#grub_config = "/boot/grub/grub.cfg"

Adding new community based kernels

Further Kernels can be added using the same format.

When adding new community based un-official kernels, the repository name should match the one defined inside the pacman /etc/pacman.conf file under [repo-name]. Further details on un-official kernels can be found on https://wiki.archlinux.org/title/Kernel#Unofficial_kernels

Cache

Kernel data retrieved from the ALA is stored inside a toml based file inside $HOME/.cache/archlinux-kernel-manager/kernels.toml

This cached file is updated automatically every 5 days to ensure the application is kept up to date with the latest kernels. Using the Update switch inside Advanced Settings, will force the application to update the cache.

This cache file may take a little while to generate since archived Arch kernel package data is being retrieved from the ALA.

Once the cache file is in place, the application also queries the RESTful API using https://archlinux.org/packages/search/json to search for package updates. It extracts the last_update and compares it against the cache timestamp.

That way the application will include the latest kernel versions.

Logs

Logs can be found inside /var/log/archlinux-kernel-manager

Required Python modules

  • python-tomlkit

  • python-gobject

  • python-requests

  • python-distro

  • python-psutil

Running the application

Run akm or archlinux-kernel-manager to launch the application.

archlinux-kernel-manager's People

Contributors

arcolinuxz avatar

Watchers

 avatar

Forkers

bfitzgit23

archlinux-kernel-manager's Issues

Exception in get_official_kernels()

On the first start of akm I always had an error
Exception in get_official_kernels(): time data '05-Mar-2019 21:46' does not match format '%d-%b-%Y %H:%M'
After a few debug sessions I came to the conclusion that it has to do with my locale that can't parse the March (because Januar and Februar Kernels where fine).

To fix this I suggest to use locale.setlocale(locale.LC_ALL, "en_US.UTF-8") before parsing the dates in line 700, functions.py.

Thanks for your work Erik!

P.S. Same for Kernel.py lines 17 & 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.