Nvidia cards and Fedora 22 kernel upgrades

Roderick Johnstone rmj at ast.cam.ac.uk
Thu Jul 23 17:58:45 CEST 2015


On 23/07/15 15:36, Richard Shaw wrote:
> On Thu, Jul 23, 2015 at 8:22 AM, Roderick Johnstone <rmj at ast.cam.ac.uk
> <mailto:rmj at ast.cam.ac.uk>> wrote:
>
>         Do you also have the shutdown service enabled?
>
>
>     No, I don't.
>
>     So then I guess it would need to rebuild the kmod for all installed
>     kernels, not just the currently running one as it can't know which
>     kernel you might want to boot, although the latest would probably be
>     a good guess.
>
>
> Well the answer to your first statement is no then yes then no :)
>
> For some reason I setup the shutdown service to run akmods directly
> instead of calling a script which would "collect" the installed kernels,
> so no, it would only try to build for the current kernel via "uname -r".
>
> Then yes, because I just changed the service file to run a script which
> would grab all of the installed kernels and pass them to akmods.
>
> Then no, because it can only build kernel modules for kernels that have
> the appropriate kernel-devel package installed, but currently unlike the
> kernel itself, only one kernel-devel package is typically installed at
> one time. :)
>
> Could you follow all that?

All except the last, which I can follow but doesn't seem to accord with 
my systems.

Given that you need to install kernel-devel to build the kmod the first 
time I would have expected it to be upgraded with each kernel.

Oh, but wait, kernels get installed, not upgraded, so I see your point 
except that on my systems I do seem to have kernel-devel for each kernel 
thats installed and I only installed kernel-devel once. Maybe though 
this is a yum/dnf behaviour change - I use yum-deprecated rather than 
dnf for nightly updates.

>
> So basically once I build new packages, the shutdown script will attempt
> to build modules for every kernel-devel package installed, whether it be
> the latest or not (though it typically should be).

That sounds good.

>
> Ok, now that that's covered I have a crazy idea... For systemd service
> type "oneshot" which the akmod service is, you can have multiple
> ExecStart= directives. Why couldn't we have two, something like:
>
> [Service]
> Type=oneshot
> RemainAfterExit=true
> ExecStart=/usr/sbin/akmods --from-init
> ExecStart=-/usr/sbin/modprobe nvidia
>
> Anything know why that wouldn't work? That should fix the problem with
> building modules on startup.

That might be ok but I don't know enough about systemd to know if the 
two ExecStart lines are run synchronously. Maybe you need the --force as 
well on the akmods line?


Later...I just tested it and it worked!

Great idea.

Thanks.

Roderick


More information about the rpmfusion-users mailing list