Kernel + drivers management / update is flaky
Closed, ResolvedPublic

"Party Time" token, awarded by m-delvalle."Party Time" token, awarded by baimafeima."Party Time" token, awarded by euoar."Love" token, awarded by Botanium.
Assigned To
Authored By
ikey, Jan 8 2017


Currently the Solus kernel management is highly limited and very flaky.

In essence, we have a single kernel package (along with kernel-modules subpackage) that contains the entire target filesystem as it would be when installed.
Effectively, this limits us to hardcoded paths, and a single kernel type.

Additionally, this has the disastrous effect that upon upgrading the kernel to a new release/version, the existing kernel and modules are permanently removed from the filesystem.
This makes kernel upgrades entirely one way. Due to the current setup, we have various triggers running in several packages in what we hope is a sane order, which also results in breaking
the update-grub process. This is usually down to the fact that the ntfs kernel support is no longer present, so the Windows partition cannot be scanned. (If the module is already loaded then it continues fine.)

The proposal is to remove the current broken system, and implement clr-boot-manager.

kernel-modules and kernel will be replaced, on upgrade, to linux-lts (At 4.9.1)
A single new package will be provided for the integration triggers, which will invoke clr-boot-manager upgrade, and also linux-driver-manager when it is done.
Important to note is that the modules + kernel objects are tagged with permanent="True" in the metadata, so that they are not removed on
upgrade. They move into clr-boot-manager's domain.

Resolving this will unblock numerous issues, subtasked as appropriate.

ikey created this task.Jan 8 2017, 9:13 PM
ikey triaged this task as Unbreak Now! priority.
ikey updated the task description. (Show Details)
ikey added a comment.Jan 8 2017, 9:16 PM

Should also be noted this change will permit parallel kernel type installation, with LTS planned first, and mainline later in the year (4.10 series).
gl-driver-switch will be dropped from Solus, and the mesa driver + nvidia packages will make use of /usr/share/defaults/etc/*.conf files
to "switch" the GL implementation. LDM will then be invoked to write the appropriate xorg.conf and lightdm.conf changes, which will in turn
be the first enabling of Optimus in Solus.

ikey added a comment.Jan 9 2017, 3:27 AM

Stage #1 of the enabling is now put up for initial review, going to take 2 rounds and testing to get this finished

ben added a subscriber: ben.Jan 9 2017, 3:27 AM

GLVND may be another option to look into regarding multiple installed GL implementations

ikey added a comment.Jan 9 2017, 3:30 AM

GLVND isn't an option for Solus, we support legacy NVIDIA drivers and need a standard, stable option. GLVND is none of those yet, and doesn't support 304/xx340xx

ikey changed the task status from Open to In Progress.Jan 9 2017, 4:25 AM
W-Floyd added a subscriber: W-Floyd.Jan 9 2017, 4:27 AM
ikey added a comment.Jan 9 2017, 4:37 PM

Next stage, adding permanent support to ypkg:

Once this is done I'll install my 4.9.1 kernel, and then install the 4.9.2 upgrade, to demonstrate that the
system is sane.

cybre added a subscriber: cybre.Jan 9 2017, 5:20 PM
ikey added a comment.Jan 10 2017, 12:14 AM

Permanent paths have now landed in ypkg, enabling the next steps (need to rebase PR on CBM)

ikey added a comment.Jan 10 2017, 4:31 PM

New PR now in flight to address basic configuration of CBM:
Then we can do the initrd/grub stuff separate (complexity++)

ikey added a comment.Jan 10 2017, 11:23 PM

OK that PR is now merged, progress++

BearzR added a subscriber: BearzR.Jan 11 2017, 12:11 PM
ikey added a comment.Jan 11 2017, 5:30 PM

Second part of unblocking a minor release is now in:

Full Solus support scoped for a v2:

Solus will be using this before its released, obv, because we need this like yesterday

ikey added a comment.Jan 11 2017, 5:54 PM

PR in flight to unblock new release of 1.x branch:

ikey added a comment.Jan 11 2017, 6:18 PM

PR 32 now merged unblocking a 1.x release

Thisuu added a subscriber: Thisuu.Jan 14 2017, 7:52 AM
Botanium added a subscriber: Botanium.
ikey added a comment.Jan 16 2017, 3:15 PM

New PR now in flight for initrd functionality

ikey added a comment.Jan 17 2017, 8:10 PM

1.2 unblocked and released

PR 35 in second revision, going to merge shortly to form basis of 2.x

ikey added a comment.Jan 17 2017, 8:40 PM

PR35 merged for 2.x basis

Riokei added a subscriber: Riokei.Jan 19 2017, 9:50 PM
ikey added a comment.Jan 24 2017, 6:14 PM

New PR37 in flight for enabling MBR & GPT, and automatic LUKS support:

ikey added a comment.Jan 26 2017, 2:55 AM

PR37 is now merged

Tearow added a subscriber: Tearow.Jan 30 2017, 6:41 PM
skmlcd added a subscriber: skmlcd.Jan 31 2017, 12:40 AM
ikey added a comment.Feb 7 2017, 5:41 PM

Alright we're unblocked on that again

Not merging this PR yet, needs more to it, but Travis tests work again and UEFI is fully mocked

ikey added a comment.Feb 11 2017, 7:20 AM

PR46 now merged
This allows us to now add GRUB given we can actually test it.

ikey added a comment.Feb 11 2017, 8:48 AM

Threw another tiny PR in to get coverage up another 2.8% before I start GRUB, so we can at least swallow any 1/2% coverage drop from its introduction

ikey added a comment.Mar 22 2017, 7:42 PM

GRUB2 support is now in git - we just need to get this integrated and tested in Solus now

ikey added a comment.Mar 26 2017, 2:19 PM

OK CBM is in Solus repos now, time to actually make things "work"

Can't wait to see how it goes :D

ikey closed this task as Resolved.Mar 26 2017, 4:52 PM

Very happy to finally resolve this :)