On Qua, 2016-09-14 at 13:16 -0500, Richard Shaw wrote:
On Wed, Sep 14, 2016 at 12:12 PM, Nicolas Chauvet <kwizart@gmail.com> wrote:
2016-09-14 18:01 GMT+02:00 Richard Shaw <hobbes1069@gmail.com>:
> I've had a few failures but not really sure as to the cause, but I've been
> toying around with doing the final RPM install with a systemd service
> instead of calling dnf directly with the kernel posttrans script.
>
> Thoughts? Pitfalls?
I really don't understand the method here.
Can you reproduce any issue ? or do you have received informal
informations that the posttrans script wasn't working for a reason ?
Because for now It's working fine with me all the time, so there is
probably an unknown corner case here.

Reproduce, no, but I've had a couple of occasions where I was not able to get to graphical boot. I just read about the need to run depmod on a Fedora thread. I didn't think about that so I manually erased the RPMs and let akmod rebuild them which fixed the problem. 

yes , after install kmod you should load the kmods modules , it may work without it , because X load it but we should ensure modprobe nvidia.ko (not depmod .. ) 

for example VirtualBox instructions:

    dnf install VirtualBox kernel-devel-$(uname -r) akmod-VirtualBox
    akmods
    systemctl restart systemd-modules-load.service


 
For some known ones, the major reason why the kernel posttrans script
might fails is because it's missing the matching kernel-devel for the
new installed kernel. Please see:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=3386 (please note that
while its reported against the akmods maintainer, anyone can take this
and implement, not only Richard or me).
In others word, you need to force to install the matching kernel-devel
along with the kernel update (dnf update kernel will break).

I'm certainly not missing kernel-devel but I have had intermittent issues. 


Looking at the current akmods.service, can you please explain why:
- It's using before display-manager.service (that's not the point with
nvidia here, if the nvidia driver isn't here, we should better
implement a fallback to anything else)

Are you saying it should be dependent on an earlier target? I chose display-manager since nvidia is my primary use.

 
- RemainAfterExit=yes, Can you point me why this was added ? akmods
shouldn't remains once it has finished to build.

Since it runs and exits (not a daemon) this option keeps systemd from thinking it failed.

 
- It has "ExecStart=-/usr/sbin/modprobe nvidia", this is not the way
the nvidia driver should be loaded, it's loaded by the DDX driver
(well not that true with modern nvidia driver,but at least it shoudn't
be loaded that way).

I can't remember why I added that but if must have fixed a problem I was having at the time. 


I think having more into systemd service might help (you can trigger a
start akmods.service from posttrans), I don't think having yet another
akmods script will help.

No new script, just alter the akmodsposttrans to call "systemctl start akmods-install" or whatever it will be called instead of calling akmods directly. 

Thanks,
Richard
-- 
Sérgio M. B.