-
Notifications
You must be signed in to change notification settings - Fork 72
/
README.md.src
218 lines (167 loc) · 11.4 KB
/
README.md.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# BRANDING_LONGNAME
A tool for installing [Ubuntu Mainline Kernel Builds](https://wiki.ubuntu.com/Kernel/MainlineBuilds) onto debian-based distributions.
![Main window screenshot](6.4_boot_hang_note.jpg)
![Main window screenshot](main_window.png)
Sort by the Lock column to collect all the locked kernels together
![sort by locked](sort_by_locked.png)
Sort by the Status column to collect all the installed kernels together
![sort by status](sort_by_status.png)
Sort by the Notes column to see all kernels with any remarks
![sort_by_notes](sort_by_notes.png)
## About
BRANDING_SHORTNAME is a fork of [ukuu](https://github.com/teejee2008/ukuu)
## Changes
* Changed name from "ukuu" to "BRANDING_SHORTNAME"
* Removed all GRUB / bootloader options
* Removed all donate buttons, links, dialogs
* Removed all unused & unrelated code
* Removed all TeeJee lib code
* Better cache management
* Rewrote all exec() commands not to use temp files, temp bash scripts, and temp directories
* Rewrote the desktop notification scripts to be more reliable
* Reduced dependencies
* Per-kernel user notes
* Pinning/locking kernels
* Verify .deb file downloads with the sha256 hashes in the CHECKSUMS files
* Customizable external commands for the terminal window and for root access
* Support the alternative flavors besides "generic", ex: lowlatency, generic-64k, server, virtual, etc
## Features
* Download the list of available kernels from the [Ubuntu Mainline PPA](http://kernel.ubuntu.com/mainline/)
* Display, install, and uninstall mainline-ppa kernels conveniently, gui and cli
* For each kernel the associated headers & modules packages are downloaded, installed, or uninstalled together
* .deb file downloads are verified with the sha256 hashes from the CHECKSUMS files
* Optionally monitor and send desktop notifications when new kernels become available
## Not Features
* Care if the kernels run or boot or work well or are compatible with your system. The kernel deb packages are produced by someone else, and with no warranty. When they work, great, when they don't, don't use them. This app intentionally does not even touch a single grub or bootloader file itself. All it does is download .deb packages that the ubuntu kernel team produces, and runs dpkg to install them the same way you would manually.
See the [comment by "setuid"](https://ubuntuhandbook.org/index.php/2020/08/mainline-install-latest-kernel-ubuntu-linux-mint/):
> Note that these kernel packages are missing quite a bit that would be needed on most systems, and many dkms modules and other tools won’t work with them (NVIDIA drivers, VMware modules, etc.).
>
> These packages also will not install nor boot on ARM64 (RPi4 for example), despite being spun for those architectures because they lack DTBs and correctly aligned headers.
>
> On AMD64, you’ll find that the cloud tools and tools packages are missing, and installing them would try to bring in libssl3 and an incompatible libc6 from a newer release of Ubuntu, which will most-certainly break userland.
>
> You have been warned.
This is all true.
Additionally the kernels are unsigned, and so they won't boot on a system with secure boot enabled.
The libssl & libc issue they mention were transient issues that naturally passed as time went on and most users systems caught up, but new examples of the same kind of issue are bound to appear again from time to time as the kernel.ubuntu.com team updates their build environment ahead of most users.
That said, I have been running these daily for several years. I just don't need any nvidia or vmware kernel modules nor do I use secure boot.
# Install
The [PPA](https://code.launchpad.net/~cappelikan/+archive/ubuntu/ppa) is kindly maintained by [cappelikan](https://github.com/cappelikan)
```
sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install BRANDING_SHORTNAME
```
There are also .deb packages in [releases](../../releases/latest), generated by `make release_deb`
# Build
```
sudo apt install libgee-0.8-dev libjson-glib-dev libvte-2.91-dev valac aria2 lsb-release make gettext dpkg-dev
git clone BRANDING_GITREPO
cd BRANDING_SHORTNAME
make
sudo make install
```
# Usage
Look for System -> BRANDING_LONGNAME in your desktop's Applications/Start menu.
Otherwise:
CLI
```
$ BRANDING_SHORTNAME --help
$ BRANDING_SHORTNAME
```
GUI
```
$ BRANDING_SHORTNAME-gtk
```
Note that neither of those commands invoked sudo or pkexec or other su-alike.
The app runs as the user and uses pkexec internally just for the dpkg command.
## Buttons
**\[ Install \]** - downloads and installs the selected kernel
**\[ Uninstall \]** - uninstalls the selected kernel(1)
**\[ PPA \]** - launches your default https:// handler to the web page for the selected kernel
If no kernels are selected (when first launching the app before clicking on any) launches the main page listing all the kernels.
Use this to see the build summary and CHANGES files.
**\[ Uninstall Old \]** - uninstalls all installed kernels below the latest installed version(1)
**\[ Reload \]** - deletes, re-downloads, and re-reads the local cached copies of all the index.html's from the mainline-ppa web site, and regenerates the displayed list.
**\[ Settings \]** - access the [settings](settings.md) dialog to configure various options
**\[ About \]** - basic info and credits
**\[ Exit \]** - order pizza
(1) The currently running kernel and any locked kernels are protected and ignored.
## Pinning / Locking
The Lock checkboxes serve as both whitelist and blacklist.
A locked kernel will be frozen in whatever state it was in when you locked it.
If it was installed, it will now stay installed.
If it was not installed, it will now stay uninstalled.
All forms of install/uninstall commands & methods are affected.
The gui "Install" and "Uninstall" buttons are inactive on that kernel.
The cli "--install" and "--uninstall" commands ignore that kernel.
The gui "Uninstall Old" button and the cli "--uninstall-old" command ignore that kernel.
The cli "--install-latest" and "--notify" for the background notification ignore that kernel.
The kernel is still visible, you can still write notes and pull up the PPA info page and toggle the lock to unlock it.
This can be handy to keep a stock distribution kernel from being uninstalled by "Uninstall Old", or prevent a known buggy kernel from being installed by "--install-latest" and prevent "--notify" from generating a notification to install it.
## Notes
Clicking on the Notes field allows to attach arbitrary note text to a kernel.
## Display Sorting
All column headers are clickable to re-sort the list.
The "Kernel" coulumn sorts by the special kernel version number sort where "1.2.3-rc3" is higher than "1.2.3-rc2", yet "1.2.3" is higher than "1.2.3-rc3".
Sorting on the "Lock" column is a way to see all locked kernels together.
Sorting on the "Status" column is a way to see all installed kernels together.
Sorting on the "Notes" column is a way to see all kernels that have any notes together.
# Help / FAQ
## [MainlineBuilds WIKI](https://wiki.ubuntu.com/Kernel/MainlineBuilds)
## General debugging
The `-v` or `-v #` option, or the environment variable `VERBOSE=#`, enables increasing levels of verbosity.
Example: `$ BRANDING_SHORTNAME-gtk -v 3` or `$ VERBOSE=3 mainline-gtk`
The -v option may also be used alone or repeated. The default with no `-v` is the same as `-v 1`.
Each additional `-v` is like adding 1. ie: `-v -v -v` is like `-v 4` or `VERBOSE=4`
0 = silence all output
1 = normal output (default)
2 = same as --debug
3 = more verbose
4 = even more
5+ mostly just for uncommenting things in the code and recompiling, not really useful in the release builds
A few lines of output are printed before the commandline has been parsed, so `-v 0` doesn't silence them.
The environment variable is read earlier in the process and can silence all output.
`VERBOSE=0 BRANDING_SHORTNAME install-latest --yes`
The exit value is also meaningful.
`VERBOSE=0 ;BRANDING_SHORTNAME install-latest --yes && BRANDING_SHORTNAME uninstall-old --yes`
## If **Uninstall Old** doesn't remove some distribution kernel packages
Use your normal package manager like apt or synaptic to remove the parent meta-package:
`$ sudo apt remove linux-image-generic`
Then **Uninstall Old** should successfully remove everything.
## Secure Boot
Possibly useful, I have not tried:
https://github.com/M-P-P-C/Signing-a-Linux-Kernel-for-Secure-Boot
## Kernels with broken dependencies
The build environment that builds the kernels is newer than most installed systems, and so the built kernels occasionally but regularly break compatibility with all current release and older systems.
The only convenient, practical, clean, safe resolution is "Update your system to the level that includes those dependencies naturally.".
And don't install any newer kernels until that is possible. And if that means the next version of Ubuntu isn't even due to be released for another 6 months, so be it.
Otherwise, here are some hack options you may amuse yourself with (substitute "libssl3" for whatever is actually broken for you today): [Install libssl3](../../wiki/Install-libssl3)
TLDR: monkey with apt configs to add beta repos and use priority settings and pinning to try to only let certain packages auto update from them, or manually download specific .deb files from the beta repos and install them with dpkg.
See [Not Features](#not-features)
## Missing kernels
Only viable installable kernels are shown by default. Failed or incomplete builds for your platform/arch are not shown unless the "Hide Invalid" setting is un-selected.
If you think the list is missing a kernel, press the "PPA" button to jump to the mainline-ppa web site where the .deb packages come from, and look at the build results for the missing kernel, and you will usually find that it is a failed or incomplete build for your arch (ex: amd64), and can not be installed.
# TODO & WIP
* Replace Process.spawn_async_with_pipes("aria2c ...",...) with libcurl
* Make the background process for notifications detect when the user logs out of the desktop session and exit itself
* Move the notification/dbus code from the current shell script into the app and make an "applet" mode
* Combine the gtk and cli apps into one, or, make the gtk app into a pure front-end for the cli app, either way
* Replace the commandline parser
* Toggles to show/hide the rc or invalid kernels in the main ui instead of going to settings
* Right-click menu for more functions for a given kernel, such as reloading the cache just for a single kernel to check for new build status etc, without adding 18 buttons all over the ui.
* Properly handle when a kernel has multiple builds like 5.16
# hints
* cron job to always have the latest kernel installed.
If you install this, you should disable the notifications in settings.
```
$ sudo -i
# cat >/etc/cron.d/mainline <<-%EOF
# Check for new kernels on kernel.ubuntu.com every 4 hours, randomize over ~2.8 hours
1 */4 * * * root sleep ${RANDOM:0:4} ;VERBOSE=0 ;BRANDING_SHORTNAME --install-latest --yes && { BRANDING_SHORTNAME --uninstall-old --yes ;for a in /home/*/.Xauthority ;do echo [[ -s $a ]] && DISPLAY=:0.0 XAUTHORITY=$a notify-send -t 0 -a BRANDING_SHORTNAME -i BRANDING_SHORTNAME "BRANDING_LONGNAME" "New kernel installed" ;done ; }
%EOF
```
* external terminal app
`sudo apt install cool-retro-term`
![settings](settings.jpg)
![cool-retro-term](cool-retro-term.jpg)