bkw777 / mainline

Install mainline kernel packages from kernel.ubuntu.com
GNU General Public License v3.0
1.04k stars 72 forks source link

broken name/version matching for installed non-mainline packages #141

Closed ejgutierrez74 closed 1 year ago

ejgutierrez74 commented 2 years ago

Hi, im trying your software, i have an ubuntu 20.04.4 LTS with latest updates, and id like to pass to newer kernels. I have two 5.4.0* kernels and a "new" 5.15 which i use.

eduardo@MiPcLinux:~$ sudo mainline-gtk
mainline 1.0.15
Distribución: Ubuntu 20.04.4 LTS
Arquitectura del sistema: amd64
Running kernel: 5.15.0-25-generic
Recuperando índice de kernel.ubuntu.com…
OK

Recuperando índice...

▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100 % 

----------------------------------------------------------------------
Found installed: 5.15.0-25.25~20.04.2
Found installed: 5.4.0.121.122
Found installed: 5.4.0-121.137
----------------------------------------------------------------------
----------------------------------------------------------------------

(mainline-gtk:143573): GLib-WARNING **: 17:22:30.324: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
Recuperando índice de kernel.ubuntu.com…
OK
----------------------------------------------------------------------
Found installed: 5.15.0-25.25~20.04.2
Found installed: 5.4.0.121.122
Found installed: 5.4.0-121.137
----------------------------------------------------------------------
----------------------------------------------------------------------

(mainline-gtk:143573): GLib-WARNING **: 17:24:44.387: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
Recuperando índice de kernel.ubuntu.com…
OK
----------------------------------------------------------------------
Found installed: 5.15.0-25.25~20.04.2
Found installed: 5.4.0.121.122
Found installed: 5.4.0-121.137
----------------------------------------------------------------------
----------------------------------------------------------------------
Running Firefox as root in a regular user's session is not supported.  ($XAUTHORITY is /run/user/1001/gdm/Xauthority which is owned by eduardo.)
Running Firefox as root in a regular user's session is not supported.  ($XAUTHORITY is /run/user/1001/gdm/Xauthority which is owned by eduardo.)

But when i execute the programa and want to uninstall old kernels i got an error:

imagen

Dont know why...

Also would be nice that you can add an option like conserve the "actual kernel" and two, three more.... I had a very bad experience once that i updated my kernel, and because of drivers problem i couldnt reboot and i almost loose all my system....

Thanks in advance

bkw777 commented 2 years ago

Where did the running kernel come from? If it wasn't a .deb package installed from either the mainline-ppa site or a regular kernel package from the main repos, then the app won't touch it out of safety. However even if it came from a normal source like the official repo, there could still be a problem with the app failing to recognize it because ultimately the version strings are actually all free-form, follow no rules, change over time, change from source to source, change from platform/options to platform/options, and are very difficult to parse reliably because of that.

In this case it can't "see" it because "5.15.0-25-generic" does not match "5.15.0-25.25~20.04.2"

"5.15.0-25-generic" looks like the output from uname, while "5.15.0-25.25~20.04.2" looks like an ubuntu repo package name from a 20.04 repo. I'm not sure why it's not matching up but it looks like maybe the running kernel is not the one from the installed package? Like did you compile it? or install it in some other way besides dpkg/apt? Could you just select any new kernel, install it, boot into it, and then run the app and see what it shows then?

bkw777 commented 2 years ago

It does look like a parsing bug though. I think even though the full strings don't match, in this case I think it is supposed to only try to match "5.15.0-25" "5.15.0-25". It will depend on where the actual running kernel came from, like is it really from that 20.04 package found in yopur apt db, or is it just a kernel of the same version that you built.

ejgutierrez74 commented 2 years ago

Where did the running kernel come from? If it wasn't a .deb package installed from either the mainline-ppa site or a regular kernel package from the main repos, then the app won't touch it out of safety. However even if it came from a normal source like the official repo, there could still be a problem with the app failing to recognize it because ultimately the version strings are actually all free-form, follow no rules, change over time, change from source to source, change from platform/options to platform/options, and are very difficult to parse reliably because of that.

5.4.0 came from official repos... As i need newer kernels as i have bought a usb soundcard Focusrite Scarlett 4i4 3d gen, i have to install 5.15 or newer kernel...So i have to search in internet and download .deb packages following this tutorial: https://www.linuxcapable.com/how-to-install-linux-kernel-5-15-on-ubuntu-20-04/

Thanks for you help

ejgutierrez74 commented 2 years ago

The problem for now is that i select that kernel 5.4.0.121.122 and click uninstall old, and as shown in firts post, it doesnt work...Seems that mainline recognises the kernel but somehow it cant uninstall it.

Same happens with 5.4.0.121.137

bkw777 commented 1 year ago

Fixed in 059b602 (v1.1.4)