leifliddy / asahi-fedora-builder

Builds a minimal Fedora image to run on Apple M-series systems
MIT License
242 stars 12 forks source link

dnf failing to update kernel-modules-core #23

Closed onkoe closed 1 year ago

onkoe commented 1 year ago

Hi! Yesterday, I updated my Asahi'd Fedora 37 system to have the newest version of all packages. I rebooted since I didn't see all the kernel packages, and I really didn't expect it to boot. It did boot, though, so I ran dnf check-update to see if any new packages were available. I saw another kernel package, so I updated again and rebooted. No idea how it booted again, but it did.

And for that reason, I now have a weird kernel package that's newer/different than the others:

Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
barrett@canopy ~> sudo dnf update -y
[sudo] password for barrett: 
Copr repo for bottom owned by atim        16 kB/s | 3.3 kB     00:00    
ProtonVPN Fedora Stable repository       1.4 kB/s | 659  B     00:00    
RPM Fusion for Fedora 37 - Free - Update 4.7 kB/s | 2.9 kB     00:00    
RPM Fusion for Fedora 37 - Nonfree - Upd  13 kB/s | 5.8 kB     00:00    
Visual Studio Code                        11 kB/s | 1.5 kB     00:00    
Dependencies resolved.

 Problem 1: package kernel-modules-core-6.2.7-200.fc37.aarch64 requires kernel-uname-r = 6.2.7-200.fc37.aarch64, but none of the providers can be installed
  - cannot install the best update candidate for package kernel-modules-core-6.2.0-100.asahi6.1.fc37.aarch64
  - package kernel-core-6.2.7-200.fc37.aarch64 is filtered out by exclude filtering
 Problem 2: package kernel-modules-core-6.2.7-200.fc37.aarch64 requires kernel-uname-r = 6.2.7-200.fc37.aarch64, but none of the providers can be installed
  - cannot install the best update candidate for package kernel-modules-core-6.2.0-100.asahi10.1.fc37.aarch64
  - package kernel-core-6.2.7-200.fc37.aarch64 is filtered out by exclude filtering
 Problem 3: package kernel-modules-core-6.2.7-200.fc37.aarch64 requires kernel-uname-r = 6.2.7-200.fc37.aarch64, but none of the providers can be installed
  - cannot install the best update candidate for package kernel-modules-core-6.2.0-100.asahi11.1.fc37.aarch64
  - package kernel-core-6.2.7-200.fc37.aarch64 is filtered out by exclude filtering
=========================================================================
 Package                Arch       Version              Repository  Size
=========================================================================
Skipping packages with broken dependencies:
 kernel-modules-core    aarch64    6.2.7-200.fc37       updates     39 M

Transaction Summary
=========================================================================
Skip  1 Package

Nothing to do.
Complete!

As you can see, I'm stuck on this one modern kernel package, but the others seem to be older..? Here's a listing of all my "kernel" packages:

Type help for instructions on how to use fish
barrett@canopy ~> dnf list --installed | grep "kernel"
kernel.aarch64                                     6.2.0-100.asahi6.1.fc37              @asahi-linux                               
kernel.aarch64                                     6.2.0-100.asahi10.1.fc37             @asahi-linux                               
kernel.aarch64                                     6.2.0-100.asahi11.1.fc37             @asahi-linux                               
kernel-core.aarch64                                6.2.0-100.asahi6.1.fc37              @asahi-linux                               
kernel-core.aarch64                                6.2.0-100.asahi10.1.fc37             @asahi-linux                               
kernel-core.aarch64                                6.2.0-100.asahi11.1.fc37             @asahi-linux                               
kernel-devel.aarch64                               6.2.0-100.asahi6.1.fc37              @asahi-linux                               
kernel-devel.aarch64                               6.2.0-100.asahi10.1.fc37             @asahi-linux                               
kernel-devel.aarch64                               6.2.0-100.asahi11.1.fc37             @asahi-linux                               
kernel-headers.aarch64                             6.2.0-100.asahi11.1.fc37             @asahi-linux                               
kernel-modules.aarch64                             6.2.0-100.asahi6.1.fc37              @asahi-linux                               
kernel-modules.aarch64                             6.2.0-100.asahi10.1.fc37             @asahi-linux                               
kernel-modules.aarch64                             6.2.0-100.asahi11.1.fc37             @asahi-linux                               
kernel-modules-core.aarch64                        6.2.0-100.asahi6.1.fc37              @asahi-linux                               
kernel-modules-core.aarch64                        6.2.0-100.asahi10.1.fc37             @asahi-linux                               
kernel-modules-core.aarch64                        6.2.0-100.asahi11.1.fc37             @asahi-linux                               
kernel-srpm-macros.noarch                          1.0-15.fc37                          @fedora                                    
kernel-tools.aarch64                               6.2.6-200.fc37                       @updates                                   
kernel-tools-libs.aarch64                          6.2.6-200.fc37                       @updates                                   
barrett@canopy ~> 

Is there any advice you can give on fixing this issue?

Thanks, Barrett

leifliddy commented 1 year ago

It's related to this issue and completely my fault. https://github.com/leifliddy/asahi-fedora-builder/issues/22

Apparently, I didn't have the foresight to predict that the stock Fedora kernel could have a more recent version number then the one in my repo.

You can resolve it by simply updating the asahi-linux.repo config to the latest version. curl https://leifliddy.com/asahi-linux/asahi-linux.repo --output /etc/yum.repos.d/asahi-linux.repo

which contains a priority value

[asahi-linux]
name=Asahi Fedora $releasever - $basearch
...
priority=1

And will prevent Fedora kernels from being installed.

Also, you can also remove the exclude statements in /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo if you want to.

I had used kernel exclude statements in older versions my my build, but they're not necessary anymore.

You definitely don't want to "upgrade" to the stock Fedora kernel 6.2.7-200.fc37.aarch64 otherwise your system won't boot.

Apologies for that.

onkoe commented 1 year ago

I see! Thank you! Before I do any of that, could you please tell me if you plan to update to 6.2.7 soon? That may fix it if the Asahi repo is "over" Fedora's updates repo.

Also, I saw some of your build utilities on your GitHub profile, but didn't see a "status page" to see builds or something. If that exists, could you please provide me with a link to that?

Thank you so much for the project, by the way! Using Fedora is much more comfy for me and my workflow. You've saved me from countless hours of AUR suffering - and many other problems.

So, that's a long way to say that there's no need to apologize! Thanks for your contributions to this community! :)

leifliddy commented 1 year ago

could you please tell me if you plan to update to 6.2.7 soon?

I'm mostly following the kernel version scheme used by the asahi project https://cdn.asahilinux.org/aarch64/asahi-dev/

Which designate their kernels as only 6.2. I could create a version and call it 6.2.7, but the real fix for that issue is simply to install the updated version of my repo. It's a simple and easy fix that doesn't involve modifying other repo configs.

but didn't see a "status page" to see builds or something.

I don't have a status page, but the images are posted here. https://leifliddy.com/os/

Thanks for your contributions to this community! :)

Thanks! Just an FYI I'll be transitioning my build to use the Ashai Fedora Remix repos and kernel for F38 https://pagure.io/projects/fedora-asahi/%2A

I'll provide instructions in the README on how to transition over to using those their repos when that happens. Then I can finally get out of the package maintenance business ; )

onkoe commented 1 year ago

I see. Thanks for the detailed response! I didn't know about the Asahi kernel bounds. It's probably a good idea to continue following that for this project!

I'm going to go ahead and try your fix. I'll let you know how it turns out!

Also, I'll make sure to keep a watch for Fedora 38's repo swap. Thanks for letting me know! :)

onkoe commented 1 year ago

Ok, it worked great without any friction! Thank you!

I have one final question before I close the issue. Do you know if the updates I got on this Fedora machine included the changes mentioned on the new blog post?

The reason I was stalking the updates in the first place was to get more graphical features working so I can continue development on one of my projects, but I didn't see any changes after the updates.

leifliddy commented 1 year ago

Oh I forgot to mention that you install their kernel if you want https://copr.fedorainfracloud.org/coprs/g/asahi/kernel-edge/

So they're using kernel version 6.2.7-450.asahi.fc37 https://download.copr.fedorainfracloud.org/results/%40asahi/kernel-edge/fedora-37-aarch64/05679185-kernel/

leifliddy commented 1 year ago

Do you know if the updates I got on this Fedora machine included the changes mentioned on the new blog post?

Yes, just compare the kernel and mesa versions from here https://cdn.asahilinux.org/aarch64/asahi-dev/ and here https://leifliddy.com/asahi-linux/37/aarch64/

My repo tracks really closely with the asahi one. I normally pushed out updates on the same day that they're released for asahi arch linux.

onkoe commented 1 year ago

Oh I forgot to mention that you install their kernel if you want

Interesting! I know it says "edge," but should I expect any adverse effects when installing this? Or is this like a little slice of Rawhide?

Thanks again! :)

leifliddy commented 1 year ago

Edge simply means that it contains the Apple/Asahi DRM driver.

onkoe commented 1 year ago

Oh, does that mean I've been using the old software-renderer this whole time???

If so, it's insane what we can get away with on these machines! I'll try the other kernel a bit later today, so I appreciate your help here! :-)

leifliddy commented 1 year ago

No, you've been using the DRM driver this whole. I don't mark my kernel as edge , mainly because I don't offer a kernel without the DRM driver -- so there's not distinction that needs to be made.

onkoe commented 1 year ago

Okay, everything's been fine for a couple days now! Thanks for your help! :)

Going to go ahead and close the issue. Please let me know if you need anything!