Warning for xanmod kernel users

Mods, please feel free to move the thread elsewhere--it's not a help request, so this seemed the most appropriate place.

Xanmod users (I know there are at least two of you, and where there are two, there are likely more), Xanmod has made a change recently that could screw you up, and in fact WILL screw you up if anything you use needs to compile its own kernel modules. You can avoid this with one easy apt install command line.

sudo apt install --no-install-recommends dkms libdw-dev clang lld llvm

This was not previously part of their install instructions, and your kernel will update just fine without doing it, but kernel modules will fail to build if you haven't done the above install. If you're concerned about the authenticity of this, please feel free to check xanmod.org and view the install instructions; the above line is part of step three, "if necessary." The line was NOT there before, but updating kernels (assuming you kept their repo after initial installation) will put you on a version that needs it.

As for the level of risk, it varies based on what you're doing. I prefer to get my Nvidia drivers straight from Nvidia (instructions elsewhere on this forum) rather than Ubuntu's graphics-drivers PPA. When trying to install the new 580 beta driver, kernel modules wouldn't compile, leaving me driverless. I attempted to reinstall the 575 I'd been using, and got the same error. No Nvidia drivers allowed! Removing Xanmod from the system and falling back to Zorin's 6.8 kernel allowed the kernel modules to compile, and the computer to boot with a GUI. Visiting Xanmod's site after this provided the command line above, and with those packages installed, I was able to repeat the 580 install successfully.

Why did this happen? Based on my reading of /var/log/nvidia-installer.log, at some point Xanmod went from using the cc compiler in Ubuntu to clang from Debian. You'll note that clang is one of the packages being installed above.

Anyway, this may or may not ever be an issue if you don't install graphics drivers by hand, but other kernel modules exist, so be aware, and consider installing the packages above NOW if you're using Xanmod, instead of having to remember this later, when you need it.

(Edited to fix tags.)

5 Likes

I use Xanmod just for fun on my main desktop. I've been busy lately, but I went on and updated it after being left for a few months, however nothing happened during the install process, and everything continued as normal. That being said, as you've stated, I do not have an Nvidia GPU, so this may not apply to some setup such as that I have, but it's definitely something that needs to be brought up just in case, so I think this is a very good alert to have.

Thanks for bringing it up! I definitely wouldn't have known anything was going on otherwise. That being said, as you also do, I've always got backup kernels in case things go sideways.

I had no errors when updating to that version of the kernel either, only when updating the driver. My assumption would be that the DKMS set up for 575 kept it working for the kernel upgrade, but when a new driver install happened, the old DKMS was inapplicable.

I wouldn't expect AMD to hit this since as I understand it, it doesn't use kernel modules.

1 Like

Yeah that would make sense. Just another reason to go AMD, I suppose :wink:

Yep. I remain on Nvidia because they outperform on the high end. If AMD could compete with xx90 Nvidia cards, or if I were building budget, I'd go AMD in an instant.

That's fair. I usually only play a couple games, so even though I have a pretty good system, I don't realistically need it. Bought it when I got a new job to treat myself.

An update to this warning: Headaches will recur. I'd love to give a technical explanation of what's happening instead of just a means of handling it, but that requires more understanding of compilers, kernel modules, and DKMS than I have.

In a nutshell: The 580 drivers left beta today, and when I went to install them, I had the same problems I experienced before: The Nvidia installer was trying to build with cc, while Xanmod is now built with clang, so the driver install failed. Installing the packages as instructed above will not help at the Nvidia installer stage. What solved the problem there was (I expect), that I was running Zorin's 6.8 generic at the time, which I assume based on (lack of) errors is built with cc.

Once the Nvidia driver is installed, kernel modules are built, and DKMS is configured by the Nvidia installer, one may then reinstall Xanmod, and for whatever reason when the Xanmod install scripts build kernel modules, it has no problem with the Nvidia drivers.

Tl;dr: If you're using current Xanmod kernels and are using Nvidia drivers direct from Nvidia, you must uninstall Xanmod first, boot with Zorin's 6.8 generic kernel, use the Nvidia installer, then reinstall the Xanmod kernel. I don't think simply booting with the 6.8 kernel without uninstalling would be sufficient, as the Xanmod install scripts wouldn't run when booting back to it, but I could be mistaken. If you are not using the Xanmod kernel, or not using Nvidia's .run driver installer, none of this applies to you.

On the off chance someone reading this knows how to adjust this to simplify the process, I'd love to hear it, though the solution may simply be to see if TuxInvader or another kernel is more cooperative--as Xanmod used to be.

Edit: ...I had better look up how to lock the 6.8 kernel so I don't hit a point where I'm left with only Xanmod...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.