bkw777 / mainline Goto Github PK
View Code? Open in Web Editor NEWThis project forked from shg8/ukuu
Install mainline kernel packages from kernel.ubuntu.com
License: GNU General Public License v3.0
This project forked from shg8/ukuu
Install mainline kernel packages from kernel.ubuntu.com
License: GNU General Public License v3.0
Would be really helpful to have an option for selecting the kernel you want to boot with. I fairly often need to jump between kernel versions for software compatibility, but there's no way I know of to select one persistently. Not sure how difficult this would be to implement.
Right now, when I'm booting Pop!_OS it's either boot normally and run the most up-to-date kernel currently installed, or run "old kernel" which the behaviour is inconsistent and requires selecting this at every boot.
I also often have to purge all old kernels to be able to get the one I want to boot (i.e. if running 5.7 but want to boot 5.6.12, I first purge everything, then only reinstall 5.6.12, then reboot and try to select old kernel. Not a clean process)
Is there any chance of making Mainline also support low-latency kernels? I see only the generic ones.
Really appreciate the continuation of this project as a GPL licensed software.
Add a donate button please, I'll send you 20$.
I met the error with running mainline:
E: Internet connection is not active
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
-> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format
where could I configure the proxy? Thank you very much.
New bug I definitely introduced just recently with all these changes I just made in the last few days.
its actually get_user_id_from_username() doing it
This is not working on system using NIS or LDAP or any other system that has the user information not in the /etc/passwd file. The user do not exist and the string in empty then mainline is trying to open/use the cache in / instead of in ~/ the home directory of the user.
you have to use the glibc function getpwuid() getpwnam() for this to work correctly on all linux systems.
Downloading: 'linux-image-unsigned-5.3.7-050307-generic_5.3.7-050307.201910171955_amd64.deb'...
ERROR
Downloading: 'linux-modules-5.3.7-050307-generic_5.3.7-050307.201910171955_amd64.deb'...
ERROR
Downloading: 'linux-headers-5.3.7-050307_5.3.7-050307.201910171955_all.deb'...
ERROR
Downloading: 'linux-headers-5.3.7-050307-generic_5.3.7-050307.201910171955_amd64.deb'...
ERROR
The following error appears when try to compile mainline with "make" in ubuntu 16.04 xenial.
src/Utility/TeeJee.ProcessHelper.vala:149.28-149.39: error: The name
Signal' does not exist in the context of
Posix'
Posix.kill (process_pid, Posix.Signal.TERM);
^^^^^^^^^^^^
src/Utility/TeeJee.ProcessHelper.vala:155.27-155.38: error: The nameSignal' does not exist in the context of
Posix'
Posix.kill (childPid, Posix.Signal.TERM);
^^^^^^^^^^^^
Compilation failed: 2 error(s), 3 warning(s)
I tried a fix by changing:
For example, the Xanmod or Liqourice kernels. Or even the Zen kernels. The realtime kernels would be good too. I don't see a place to add any of these or a way to do it. I think it would be a good feature.
Would be cool to display a changelog of selected kernel version in sidebar or a new view.
Operating System: KDE Neon LTS (Ubuntu 20.04 Focal)
https://packages.ubuntu.com/search?keywords=libjson-glib&searchon=names
I tried cleaning cache but even after removing everything and reinstalling package doesn't show newer kernels.
I just installed the app, I see that the Purge button is clickable already, yet Remove is not.
Hi
I can't install the latest kernel version 5.7, I tried downloading it manually from the website using the browser and it works.
Debug Log
$ mainline --install-latest --debug --yes > error_mainline_5.7.log
error_mainline_5.7.log
(just changed my home dir with $HOME)
If you need more info just ask
Bye
rr:10 http://ppa.launchpad.net/cappelikan/ppa/ubuntu groovy Release
404 Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/cappelikan/ppa/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Cache: /home/bkw/.cache/mainline
Temp: /root/.temp/mainline/AGn2mhQf
...
E: Error moving file /root/.temp/mainline/AGn2mhQf/54hX7Qtl/index.html: No such file or directory
E: Failed to move file: '/root/.temp/mainline/AGn2mhQf/54hX7Qtl/index.html' → '/home/bkw/.cache/mainline/index.html'
Heya.
Thanks for the great work!
Starting with version 5.9.8, it's no longer updating on my machine (HP ProBook 445 G7, Ubuntu 20.04).
I can see the entries (all the way to 5.9.11), I don't get any error, it's downloading and everything, but the new kernel is not available to boot from or present in /boot.
Here's what Mainline tells me:
Enough free space on all partitions, including /boot...
Any ideas? Where can I find some logs?
src/Gtk/TerminalWindow.vala:212.19-212.29: error: Argument 1: Cannot convert from char[]' to
unowned uint8[]?'
term.feed_child(c.to_utf8());
^^^^^^^^^^^
bkw@negre:~/src/mainline$ mainline --clean-cache mainline v1.0.6 E: Error creating directory /tmp/mainline/CnLmbwrH: Permission denied E: Failed to create dir: /tmp/mainline/CnLmbwrH Distribution: Ubuntu 19.10 Architecture: amd64 Running kernel: 5.6.7-050607-generic Kernel version: 5.6.7-050607-generic Cache: /home/bkw/.cache/mainline Temp: /home/bkw/.temp/mainline/BK5nHwIi bkw@negre:~/src/mainline$ du -sh ~/.cache/ 2.8G /home/bkw/.cache/ bkw@negre:~/src/mainline$ du -sh ~/.cache/mainline/ 700M /home/bkw/.cache/mainline/ bkw@negre:~/src/mainline$ du -sh ~/.cache/mainline/* 70M /home/bkw/.cache/mainline/v5.5.13 70M /home/bkw/.cache/mainline/v5.5.4 70M /home/bkw/.cache/mainline/v5.5.6 70M /home/bkw/.cache/mainline/v5.5.7 70M /home/bkw/.cache/mainline/v5.5.8 71M /home/bkw/.cache/mainline/v5.6.1 71M /home/bkw/.cache/mainline/v5.6.2 71M /home/bkw/.cache/mainline/v5.6.4 71M /home/bkw/.cache/mainline/v5.6.5 71M /home/bkw/.cache/mainline/v5.6.7 bkw@negre:~/src/mainline$
Is it possible to get linux-tools installed for the mainline kernels?
purge not remove selected kernel but all (without running and latest)...
if i select example "5.7.6" and click to "Purge" button, then is not purge only "5.7.6",
but ask for remove all kernel without one running and latest (if is newer that running)...
if i use Remove button then work fine, remove selected kernel, but of course keep is listed as "^rc" in "dpkg -l"
output from Purge:
mainline 1.0.12
Distribution: Ubuntu 18.04.4 LTS
Architecture: amd64
Running kernel: 5.7.8-050708-generic
----------------------------------------------------------------------
Found installed: 5.3.0.62.115
Found installed: 5.3.18-050318.201912181133
Found installed: 5.7.8-050708.202007090835
Found installed: 5.7.9-050709.202007160732
Found installed: 5.7.6-050706.202006241631
Found installed: 5.3.0-62.56~18.04.1
Found installed: 5.7.7-050707.202007010943
----------------------------------------------------------------------
----------------------------------------------------------------------
The following kernels will be removed::
▰ 5.7.7
▰ 5.7.6
▰ 5.3.18
▰ 5.3.0.62.56
▰ 5.3.0.62
Continue ? (y/n):
Several of the latest mainline kernels don't have all files getting listed and as a result, I'm unable to install them.
e.g.:
5.9.13
5.9.11
5.9.9
5.9.5
I can for example install 5.9.12 but can't install 5.9.11 nor 5.9.13.
If you log out of your desktop without rebooting, and log in again, the new desktop session starts up a new instance of the background process that generates the desktop notifications, but the old process is still there too. If you log out and in again, they just keep on accumulating.
try
"ps -ef |grep mainline"
log out (not reboot or shutdown, just log out)
look at the ps command again.
Meson is now a standard for Gtk apps.
src/Gtk/TerminalWindow.vala:215.19-215.29: error: Argument 1: Cannot convert from char[]' to
unowned string'
term.feed_child(c.to_utf8());
^^^^^^^^^^^
I'd love to have a way to filter the list so it will only show me, for example:
Essentially I'd love to see like a tree view that has those things visible by default, and other versions show up with a filter. Something like the below, visible all at once in the main pane:
5.9 (latest, not installed)
- 5.9.12 (mainline, latest)
5.8
- 5.8.18 (mainline, latest)
- 5.8.0-31.33 (official, running)
5.4
- 5.4.81 (mainline, latest)
- 5.4.72 (mainline)
- 5.4.0-56.62 (official)
- 5.4.0-56.60 (official)
I never care about versions I haven't installed that aren't latest in their Major.minor, really.
It'd be a good idea to give Mainline a more unique name. This will allow users to better reference it outside of the project (such as the well known "UKUU" it's forked from).
A more unique name will bring more users, and hopefully more contributors.
5 second ideas:
-KernelPop? (like popcorn)
-UMKU: Ubuntu Mainline Kernel Updater
-FUKUU: Forked Ubuntu Kernel Update Utility
Using Ubuntu 20.04.1 LTS installed with zfs on root.
Tried to install the latest kernel (5.8.1) but it did not create a boot entry nor did it update an existing one.
Now running lintian mainline_1.0.1ubuntu1_source.changes ...
E: mainline source: build-depends-on-essential-package-without-using-version build-depends: bash
W: mainline source: missing-license-paragraph-in-dep5-copyright gpl-3 (paragraph at line 5)
Finished running lintian.
Background:
The latest version uses notify-send.sh instead of notify-send to generate the desktop notifications.
https://github.com/vlevit/notify-send.sh
This allows a few things:
The notification looks better, it says "mainline" instead of "notify-send".
The notification can now have one or more action buttons right in the notification itself. This is neater than the old way with both a desktop notification AND a redundant popup window just to supply an "Install" button (which didn't even work at least for me).
So initially, notifications now include a "Show" button, which just launches mainline-gtk.
It allows multiple buttons, so we can add more buttons for "Install" or "Cancel" or maybe even "Blacklist" later. There is also an option for a default action from clicking anywhere on the notification instead of having a button.
The problem is:
This button DOES work, but only if you press it fairly soon after the notification was generated. Once the notification is some number of seconds old, the button no longer has any effect.
I have partially debugged it, just enough to show that it's something in notify-send.sh or notify-action.sh that stops working. I can say that the action command is not attempted, meaning, it's NOT that the action command is attempted but it crashes or exist for some environmental reason. It's never attepted at all.
I'm not 100% clear on how the interaction between notify-send.sh and notify-action.sh is supposed to work yet, but it seems like notify-send.sh runs notify-action.sh as a kind of background co-process to sit and wait and listen for a dbus event from the notification button, and the monitor process is either exiting or it's failing to receive the dbus event. For whatever reason not known yet, it never tries to run the specified action command. It never tries, not that it tries and the command fails.
So this is probably a bug in notify-send.sh and I probably need to submit an issue there. Looking at their repo, the action feature seems fairly new, so maybe it just needs a little more work.
Hey everyone,
Although my issue is probably not directly related to the Mainline Kernel Installer, i am hoping to find some help over here.
Main issue:
I am running Ubuntu 20.04LTS in Dual Boot with Windows and trying to install the Kernel 5.7.0. Installation works fine and i can select the new Kernel in the advanced option Menu when rebooting but then i always get the error:
Loading Linux 5.7.0-050700-generic …
error: /boot/vmlinuz-5.7.0-050700-generic has invalid signature.
Loading initial ramdisk …
error: you need to load the kernel first.
Press any key to continue…_
I already tried out different Kernels but always getting the same message. Maybe someone more experienced can help me out?
Would really appreciate it!
Thanks for the continuation of the project.
Would you be able to add an option to automatically sign the installed kernel for UEFI? Currently all the kernels I install are generating the below error. This error would be fine but the issue is it comes up every time I interact with apt. Additionally, it requires Secure Boot to be disabled, which I don't really like.
debian wants to depreciate debian/compat level 9, but compat level 10 fails when trying to build the deb package.
"make" and "make install" work fine, only "make deb" or "make release_deb" fails.
with debian/compat = 9:
builds fine.
with debian/compat = 10:
two vala files are ignored, for no reason I can fathom
cc1: fatal error: /build/mainline-1.0.14/src/Utility/TeeJee.ProcessHelper.vala.c: No such file or directory
compilation terminated.
cc1: fatal error: /build/mainline-1.0.14/src/Utility/TeeJee.System.vala.c: No such file or directory
compilation terminated.
These two files are listed as sources in Makefile the same way as the other files which are built normally.
Relevant excerpts from Makefile:
common_vala_files := src/Common/*.vala src/Utility/*.vala
...
valac ... $(common_vala_files) $(gui_vala_files) -o $(@)
...
valac ... $(common_vala_files) $(tui_vala_files) -o $(@)
The .vala files that generate the missing .vala.c files are included in the globbing pattern in common_vala_files, and are included on the valac command line for both the commandline and -gtk targets.
The full build log does not show any earlier error where the .vala files were found and tried but failed to generate their .vala.c file. The two .vala.c files are missing because the two .vala files were simply ignored for some reason.
And of course, the app has already been building just fine for years, so that would seem to prove that the Makefile is correct.
Only when setting debian/compat to 10, it fails like this.
Given
rex_header_all = new Regex("(?:" + NATIVE_ARCH + """/|>)?linux-headers-[a-zA-Z0-9.\-_]*_all.deb""");
Where NATIVE_ARCH = 'arm64' and the expression equals:
(?:arm64/|>)?linux-headers-[a-zA-Z0-9.\-_]*_all.deb
Should not match the following :
<a href="amd64/linux-headers-5.8.12-050812_5.8.12-050812.202009261732_all.deb">amd64/linux-headers-5.8.12-050812_5.8.12-050812.202009261732_all.deb</a><br>
However it does!
Because arm64 does not equal amd64. Otherwise why bother explicitly providing NATIVE_ARCH?
That would be useful to add a clear cache button for when "cache poisoning" happens, like with #43
Maybe not top priority as the tool targets power users but still quite practical I think
Edit: I just realized there is a "--clean-cache" command but I still think it would be nice to have a button
Possible enhancement.
Re-impliment notify-loop.sh, notify-send.sh, and notify-action.sh all in vala in the app itself and get rid of the shell scripts.
This is just an idea. I have no idea if I can figure out how to actually do it, or if it's even a good idea. I just want to write it down somewhere for consideration and/or to serve as a back burner TODO/Wishlist item for reference.
The scripts are now working MUCH better than originally, but notify-loop.sh still has a problem that I just don't know if there is any proper fix for. The problem is it keeps running after the user logs out of their desktop session. I have it now killing it's predecessor each time a new instance starts up, so there is generally only one un-wanted instance running all the time, but it's still basically wrong for it to keep running after the session logs out.
Apparently reason it keeps running is that it's not actually started by the desktop environment. It's started by systemd-logind.
You CAN tell systemd to kill all the processes it started up by putting KillUserProcesses=true in /etc/systemd/logind.conf
That would kill it at log-out, but there are several problems with that:
It's wong for any app to require the user to make that kind of system level config in order for the app to work. If your distribution doesn't already have that option set by default, or if you have intentionally set that option the way you want it, it's not some dinky little apps place to expect you to change that for it's convenience.
That setting affects ALL forms of user login session, including ssh logins, and kills "screen" sessions or any other intentionally forked background task that you might have intentionally started. Systemd provides a special command that you can use to prevent it from killing a particular process, but I find that annoying and unreasonable. I already did all I should have to do to make a process live after ending it's parent process, just by using "screen" or tmux or nohup or setsid etc in the first place. Now I have to also do some arcane systemctl command that I will have to google up to remember what it is every damned time...
So, I don't consider that an acceptable official answer for how to use mainline, and none of the other desktop session components need any such crap to close at the end of the session.
But the other desktop components that ARE started by the desktop environment itself, and so, killed by the desktop environment rather than by systemd, there seems to be no good standard for how those are defined or managed.
~/.conf/autostart/*.desktop works for any desktop, but if I wanted the LXQT equivalent of that, then it's an LXQT-specific config file that means nothing to any other desktop environment. Gnome has something else, KDE has something else... I don't really want to try to support a handfull of different desktops with their own custom methods, especially when I don't run them and am not testing them, and then also necessarily simply failing to support all other desktops.
So I'm thinking a possible answer is to keep using systemd to launch the process, but instead of the simple notify-loop.sh, have it start an executable that connects to dbus and/or an X display, and then that app could reliably close itself based on dbus messages and/or loss of X connection. That would be mainline or mainline-gtk itself with some kind of new applet mode, probably invoked by a "--applet" flag.
It'd be nice to be able to clear out old mainline kernels only, leaving the ones that are in the ubuntu-desktop
and hwe
dependency chains.
Thanks for taking on the project!
I'm getting a seg fault when running --check
or --install
Here's the gdb output with strace:
write(1, "Running kernel: 4.15.0-117-gener"..., 35Running kernel: 4.15.0-117-generic
) = 35
futex(0x7ffff72f4f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
pipe2([3, 4], 0) = 0
pipe2([5, 6], 0) = 0
pipe2([7, 8], O_CLOEXEC) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ffff7fe5750) = 214546
close(4) = 0
close(6) = 0
close(8) = 0
read(3, "", 8) = 0
close(3) = 0
select(8, [5 7], NULL, NULL, NULL) = 2 (in [5 7])
read(5, "", 4096) = 0
close(5) = 0
read(7, "", 4096) = 0
close(7) = 0
wait4(214546, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 214546
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=214546, si_uid=0, si_status=0, si_utime=2, si_stime=0} ---
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ffff3b7f000
mprotect(0x7ffff3b80000, 8388608, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7ffff437ee70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ffff437f9d0, tls=0x7ffff437f700, child_tidptr=0x7ffff437f9d0) = 214547
futex(0x7ffff72f4f18, FUTEX_WAKE_PRIVATE, 1D: query_thread() App.show_prev_majors: 0
D: query_thread() App.hide_unstable: true
) = 1
nanosleep({tv_sec=0, tv_nsec=500000000}, D: highest_maj = 5
D: check_installed()
----------------------------------------------------------------------
D: query_installed_packages()
D: dir_create(/tmp/.mainline_6lZDkZDJ)
D: Created directory: /tmp/.mainline_6lZDkZDJ
0x7fffffffe450) = 0
nanosleep({tv_sec=0, tv_nsec=500000000}, 0x7fffffffe450) = 0
nanosleep({tv_sec=0, tv_nsec=500000000}, D: file_write(/tmp/.mainline_6lZDkZDJ/15997310454283254965)
D: file_parent(/tmp/.mainline_6lZDkZDJ/15997310454283254965)
D: dir_create(/tmp/.mainline_6lZDkZDJ)
D: File saved:/tmp/.mainline_6lZDkZDJ/15997310454283254965
D: File deleted: /tmp/.mainline_6lZDkZDJ/15997310454283254965
D: dir_delete():Deleted: /tmp/.mainline_6lZDkZDJ
Found installed: 4.15.0.117.104
D: Package: linux-headers-generic
D: Package: linux-image-generic
D: Package: linux-generic
Found installed: 4.15.0-117.118
D: Package: linux-modules-extra-4.15.0-117-generic
D: Package: linux-image-4.15.0-117-generic
D: Package: linux-libc-dev
D: Package: linux-headers-4.15.0-117
D: Package: linux-modules-4.15.0-117-generic
D: Package: linux-headers-4.15.0-117-generic
----------------------------------------------------------------------
----------------------------------------------------------------------
D: check_updates()
<unfinished ...>) = ?
+++ killed by SIGSEGV +++
Thread 2 "mainline" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff437f700 (LWP 222817)]
0x0000555555562d25 in linux_kernel_check_updates ()
Here's the stack:
#0 0x0000555555562d25 in linux_kernel_check_updates ()
#1 0x0000555555560465 in linux_kernel_query_thread ()
#2 0x000055555555eb17 in _linux_kernel_query_thread_gthread_func ()
#3 0x00007ffff7053175 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff6a296db in start_thread (arg=0x7ffff437f700) at pthread_create.c:463
#5 0x00007ffff6752a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
kernel.ubuntu.com mainline-ppa no longer supplies these changelog summaries:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6.17/CHANGES
Same info is available from upstream:
https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.6.17
Change the Changes button to load that instead.
all_proxy=socks5h://127.0.0.1:1080 mainline --check
mainline 1.0.12
Distribution: Ubuntu 20.04.1 LTS
Architecture: amd64
Running kernel: 5.9.0-050900-generic
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
-> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format
E: Internet connection is not active
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
-> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format
E: Internet connection is not active
Fetching index from kernel.ubuntu.com...
OK
Preparing to install '5.8.8'
/ust/bin/env/: cannot change directory to'/home/anibyl/.cache/mainline/5.8.8/amd64': No such file or directory
E: Installation completed with errors
Mainline 1.0.12, Ubuntu 20.04, Linux 5.8.7
5.8.8 amd64 build is available in Ubuntu kernels: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8.8/
While this is not really an issue, you might want to mention that mainline kernels are unsigned, and break your system if you use Secure Boot. To prevent this from happening, I wrote a small shell script as a kernel-install hook. Should not hurt, though YMMV. https://gist.github.com/maxried/796d1f3101b3a03ca153fa09d3af8a11
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.