Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Surprise dependency installed kernel 6.6.16!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sat Mar 16, 2024 1:40 am    Post subject: [SOLVED] Surprise dependency installed kernel 6.6.16! Reply with quote

Hello,

Yesterday I updated my system as usual and among the packages that needed to be updated was the linux firmware. So, after the update I did the kernel and module rebuild using the commands below:

Code:

cd /usr/src/linux
make modules_prepare && make && emerge @module-rebuild && make modules_install && make install && make clean
dracut --force --kver=6.1.74-gentoo
grub-mkconfig -o /boot/grub/grub.cfg
reboot


Instead of booting to 6.1.74, it booted to 6.6.16! I never installed this thing! I did some digging to figure out where this thing came from and found out the following:

Code:

emerge -av --depclean gentoo-kernel:6.6.16

Calculating dependencies... done!
  sys-kernel/gentoo-kernel-6.6.16 pulled in by:
    virtual/dist-kernel-6.6.16 requires ~sys-kernel/gentoo-kernel-6.6.16
    virtual/linux-sources-3-r8 requires sys-kernel/gentoo-kernel

equery d linux-sources
 * These packages depend on linux-sources:
x11-drivers/nvidia-drivers-535.161.07 (modules ? virtual/linux-sources)

equery d dist-kernel 
 * These packages depend on dist-kernel:
sys-kernel/gentoo-kernel-6.6.16 (>=virtual/dist-kernel-6.6.16)
x11-drivers/nvidia-drivers-535.161.07 (dist-kernel ? virtual/dist-kernel)


Why is the nvidia drivers all of sudden needing to install gentoo-kernel-dist? How do I get rid of this mess?


Thanks,
_________________
[<<$>>]


Last edited by myga on Sun Mar 17, 2024 9:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Sat Mar 16, 2024 6:20 am    Post subject: Reply with quote

Did you manually unmerge your old kernel at some point?

Best Regards,
Georgi
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sat Mar 16, 2024 4:22 pm    Post subject: Reply with quote

nvidia-drivers depends on linux-sources.
linux-sources has
part of RDEPEND:
   || (
      sys-kernel/gentoo-sources
      sys-kernel/vanilla-sources
      sys-kernel/git-sources
      sys-kernel/mips-sources
      sys-kernel/pf-sources
      sys-kernel/rt-sources
      sys-kernel/zen-sources
      sys-kernel/raspberrypi-sources
      sys-kernel/gentoo-kernel
      sys-kernel/gentoo-kernel-bin
      sys-kernel/vanilla-kernel
      sys-kernel/linux-next
      sys-kernel/asahi-sources
   )
... so no, gentoo-kernel isn't required, but it's one choice among all the others.
Portage might pull in any of those if you don't have any installed.

Hence the question logrusx posted.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sun Mar 17, 2024 4:25 am    Post subject: Reply with quote

logrusx wrote:
Did you manually unmerge your old kernel at some point?

Best Regards,
Georgi


Not sure what you mean by manually, but I followed this guide (https://wiki.gentoo.org/wiki/Kernel/Removal).
_________________
[<<$>>]
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sun Mar 17, 2024 4:29 am    Post subject: Reply with quote

Zucca wrote:
nvidia-drivers depends on linux-sources.
linux-sources has
part of RDEPEND:
   || (
      sys-kernel/gentoo-sources
      sys-kernel/vanilla-sources
      sys-kernel/git-sources
      sys-kernel/mips-sources
      sys-kernel/pf-sources
      sys-kernel/rt-sources
      sys-kernel/zen-sources
      sys-kernel/raspberrypi-sources
      sys-kernel/gentoo-kernel
      sys-kernel/gentoo-kernel-bin
      sys-kernel/vanilla-kernel
      sys-kernel/linux-next
      sys-kernel/asahi-sources
   )
... so no, gentoo-kernel isn't required, but it's one choice among all the others.
Portage might pull in any of those if you don't have any installed.

Hence the question logrusx posted.


How can portage pull in gentoo-kernel if I'm logged in using gentoo-sources (6.1.74-gentoo)?! I don't use that package and never have. The guide I followed from the wiki to remove gentoo-kernel is not working, so is there a different way of doing this?
_________________
[<<$>>]
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Sun Mar 17, 2024 5:33 am    Post subject: Reply with quote

myga wrote:
Zucca wrote:
nvidia-drivers depends on linux-sources.
linux-sources has
part of RDEPEND:
   || (
      sys-kernel/gentoo-sources
      sys-kernel/vanilla-sources
      sys-kernel/git-sources
      sys-kernel/mips-sources
      sys-kernel/pf-sources
      sys-kernel/rt-sources
      sys-kernel/zen-sources
      sys-kernel/raspberrypi-sources
      sys-kernel/gentoo-kernel
      sys-kernel/gentoo-kernel-bin
      sys-kernel/vanilla-kernel
      sys-kernel/linux-next
      sys-kernel/asahi-sources
   )
... so no, gentoo-kernel isn't required, but it's one choice among all the others.
Portage might pull in any of those if you don't have any installed.

Hence the question logrusx posted.


How can portage pull in gentoo-kernel if I'm logged in using gentoo-sources (6.1.74-gentoo)?! I don't use that package and never have. The guide I followed from the wiki to remove gentoo-kernel is not working, so is there a different way of doing this?


It doesn't matter what you're suing, you may very well be using a kernel built from sources manually downloaded from kernel.org. Portage has no knowledge of that, it only understands packages.

If at the point or upgrade of nvidia drivers you didn't have a kernel *package* installed, emerge would chose one of the list above. However I doubt it would exactly pick gentoo-kernel if there wasn't something else in the equation.

Maybe if you go to /var/log/emerge.log and post that part which includes the update process we could get more information to solve this mystery. I expect the whole file might be a bit too large to share on the popular paste sharing sites.

Best Regards,
Georgi
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sun Mar 17, 2024 6:48 am    Post subject: Reply with quote

I hope I'm right about this because I believe I found the root cause of this mess.

A few weeks ago, there was a gentoo-sources update to 6.6.13 and so I did the necessary steps to update. When I rebooted, all USB devices stopped working. So, I opened a thread and consequently, a bug report. I tried fiddling with the kconfig and got tired of building and rebooting plus NVIDIA didn't either, so I switched back to 6.1.67.

There seems to be a patch but it didn't solve the problem because a few users reported the same issue related to USB devices and NVIDIA not working. To avoid portage updating to 6.6.*, I masked any version above 6.1.67 and I accidentally found that 6.1.67 was mysteriously dropped from the list of available gentoo-sources. I updated to 6.1.74 and masked any version above that one as well. Running 'eix -I gentoo-sources' displays a question mark next to it, so I ran 'eix-update' to fix it. When that didn't work, I checked the available versions on the packages website and it turns out 6.1.74 is in an unknown state for AMD64 and that explains why gentoo-kernel was installed.

It would be really helpful if emerge can check the currently installed version against the ones on packages.gentoo.org and display an alert ("the currently installed kernel is no longer supported, please update to a supported version") or whatever helps avoid problems like these.

I was able to remove gentoo-kernel and dist-kernel using 'emerge --unmerge' command. I am now building gentoo-sources-6.1.81 and hopefully things become stable again.
_________________
[<<$>>]
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Sun Mar 17, 2024 7:11 am    Post subject: Reply with quote

Generally, in situations like that where multiple choices are available to satisfy a dependency, if you're not happy with what portage selects, you can emerge a different one prior to updating, so that portage is happy and don't select for you. That usually would be a --oneshot merge.

If you're already in such a situation, you emerge what you want and then unmerge what was selected by portage. This way the dependency graph would still be consistent. That again would usually be a --oneshot merge.

p.s. you can now edint the first post and add SOLVED to the title.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sun Mar 17, 2024 2:46 pm    Post subject: Reply with quote

myga wrote:
To avoid portage updating to 6.6.*, I masked any version above 6.1.67
I suspect you did the mask incorrectly. If you don't want to move above 6.1.x, then the safe and forward-compatible mask would be >=sys-kernel/gentoo-sources-6.2. This will allow all future 6.1.x updates as they arrive, but refuse all 6.2.x and later (so also 6.3.x, 6.4.x, ...).
myga wrote:
I accidentally found that 6.1.67 was mysteriously dropped from the list of available gentoo-sources.
This is normal. In almost all cases, when a new stable kernel is released, it will include the statement that All users must upgrade. As such, older kernels in that line get removed, because users should not be using them anymore.
myga wrote:
When that didn't work, I checked the available versions on the packages website and it turns out 6.1.74 is in an unknown state for AMD64 and that explains why gentoo-kernel was installed.
I find this doubtful as an explanation. Portage does not look at the packages website. The website should not be showing "Unknown" for a major architecture. Do you have a link to where this can be seen?
myga wrote:
It would be really helpful if emerge can check the currently installed version against the ones on packages.gentoo.org and display an alert ("the currently installed kernel is no longer supported, please update to a supported version") or whatever helps avoid problems like these.
Portage does check that your currently installed sources are still the most current among the selected sources. Portage cannot in general rely on contacting packages.gentoo.org, nor should it even if that were possible.
Back to top
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sun Mar 17, 2024 8:36 pm    Post subject: Reply with quote

Hu wrote:
myga wrote:
To avoid portage updating to 6.6.*, I masked any version above 6.1.67
I suspect you did the mask incorrectly. If you don't want to move above 6.1.x, then the safe and forward-compatible mask would be >=sys-kernel/gentoo-sources-6.2. This will allow all future 6.1.x updates as they arrive, but refuse all 6.2.x and later (so also 6.3.x, 6.4.x, ...).


That makes sense but at the time I relied on what on the packages page to avoid any more issues.

Quote:
myga wrote:
I accidentally found that 6.1.67 was mysteriously dropped from the list of available gentoo-sources.
This is normal. In almost all cases, when a new stable kernel is released, it will include the statement that All users must upgrade. As such, older kernels in that line get removed, because users should not be using them anymore.


A detailed message would be nice tho.

Quote:
myga wrote:
When that didn't work, I checked the available versions on the packages website and it turns out 6.1.74 is in an unknown state for AMD64 and that explains why gentoo-kernel was installed.
I find this doubtful as an explanation. Portage does not look at the packages website. The website should not be showing "Unknown" for a major architecture. Do you have a link to where this can be seen?


Here is the grid (https://packages.gentoo.org/packages/sys-kernel/gentoo-sources) go to 6.1.74 x AMD64.

Quote:
myga wrote:
It would be really helpful if emerge can check the currently installed version against the ones on packages.gentoo.org and display an alert ("the currently installed kernel is no longer supported, please update to a supported version") or whatever helps avoid problems like these.
Portage does check that your currently installed sources are still the most current among the selected sources. Portage cannot in general rely on contacting packages.gentoo.org, nor should it even if that were possible.


Not the way I'd like to see it, but I'll create my own script to deal with this in the future.
_________________
[<<$>>]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum