Installing nvidia driver from quickpet entry without reboot

Moderators: 666philb, Forum moderators

Post Reply
nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

Hi,

I'm installing the current latest (on quickpet entry in Fossapup9.5) nvidia driver, which is version number 450.
I know how to make it work (it's on a normal desktop computer, with the screen attached on the nvidia card's hdmi port, so no need to set up optimus :) ) and usually would just reboot so that the nvidia kernel module can be loaded and thus make the driver work.

Except, I'm mostly using frugal these days, and would prefer, for my own reasons/curiosity/etc to know: how can i install the nvidia driver without having to reboot?

I know already that after installation, two things are usually done, either automatically (on distro's side) or requested of the user (based on experience on other distros beside puppy):

- update initramfs
- restart Xorg
- load nvidia modules

I already know how to do those steps on other distro, but problem is, I'm feeling stuck on the "rebuild/update initramfs" so that I can get access to the nvidia module, without having to reboot (which is the usual step I do on other distros). I tried to install the initramfs-tools package, where most tools I'm used to for doing this reside, but this seems to require a lot more dependencies (perl dependencies, and such) that I had to take a step back ans ask myself: if this isn't installed by default already, then how does puppy build/update it's initramfs?

From what I'm gathering, I'm not sure, but I do know that most tools in the initramfs-tools package are just shell script anyway, so it wouldn't surprise me if puppy had a couple script to do that too.
I'm curious to know how to do that the "puppy" way, or/and by just knowing what/how does puppy update/rebuild it's initramfs, so that i can do it myself in time of need (like now, so that I don't have to reboot to install the nvidia driver) :D

Thanks in advance.

User avatar
mikewalsh
Moderator
Posts: 6169
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 799 times
Been thanked: 1987 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by mikewalsh »

@nexussea :- Hallo....and :welcome: to the "kennels".

Well, first things first. Let's put you straight on one thing from the very start; Puppy does not USE an 'initramfs'. This is specific to 'full' installs of "mainstream" distributions, which always require an entire partition to themselves. Puppy can live inside a directory.....inside of another distro (if you wish!)

I know very little of the inner workings of Puppy; I'm just a "tinkerer", who bumbles his way from one disaster to the next. :shock: :D I DID know the answer to that one, but others will be along soon to explain it all in much greater detail.....

Mike. ;)

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

mikewalsh wrote: Wed Nov 10, 2021 1:14 am

@nexussea :- Hallo....and :welcome: to the "kennels".

Well, first things first. Let's put you straight on one thing from the very start; Puppy does not USE an 'initramfs'. This is specific to 'full' installs of "mainstream" distributions, which always require an entire partition to themselves. Puppy can live inside a directory.....inside of another distro (if you wish!)

I know very little of the inner workings of Puppy; I'm just a "tinkerer", who bumbles his way from one disaster to the next. :shock: :D I DID know the answer to that one, but others will be along soon to explain it all in much greater detail.....

Mike. ;)

Gotcha, I guess this does explain why I had to take a step back and ask myself "why is this not installed already".

Thanks a lot for your answer :)

hopefully I'll manage to figure out how to do the equivalent of that on puppy (whatever name it has, since there is a need for puppy to do "something" before newly installed kernel module can be used? otherwise I wouldn't have to reboot for the nvidia driver, as an example)

User avatar
mikeslr
Posts: 2970
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 179 times
Been thanked: 926 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by mikeslr »

Second things 2nd. And if 'tother Mike's a tinkerer, I'm a young boy playing with blocks.
Short version: Puppys run in RAM. Before you execute a SAVE, the files you 'install' only exist in RAM. PPM unpacked the packages and copied its folders and files to corresponding locations in RAM, You can Menu>Exit>Restart-X (AKA Graphical Server) and Puppy 're-catalogs' what constitutes what makes up its operating system and available applications including (I think) Xorg. [Works with AFAIK everything except applications depending on python. Why that doesn't? I can't tell you. I'm just a young boy playing with blocks]. :)
Of course, you would have to SAVE to make the changes in RAM a permanent part of your system. [For an alternative to SAVing, search for Save2SFS].

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

mikeslr wrote: Wed Nov 10, 2021 2:25 pm

Second things 2nd. And if 'tother Mike's a tinkerer, I'm a young boy playing with blocks.
Short version: Puppys run in RAM. Before you execute a SAVE, the files you 'install' only exist in RAM. PPM unpacked the packages and copied its folders and files to corresponding locations in RAM, You can Menu>Exit>Restart-X (AKA Graphical Server) and Puppy 're-catalogs' what constitutes what makes up its operating system and available applications including (I think) Xorg. [Works with AFAIK everything except applications depending on python. Why that doesn't? I can't tell you. I'm just a young boy playing with blocks]. :)
Of course, you would have to SAVE to make the changes in RAM a permanent part of your system. [For an alternative to SAVing, search for Save2SFS].

Right, and I did do that (restarting Xorg) :D

But that didn't make the newly installed kernel module (nvidia in this case) be loadable, using modprobe.

Nvidia driver only work if restart is done (on puppy, as mentioned, I know of the 3 things to do manually/or automatically for this to work right, not sure on the "loading kernel module nvidia" part, which is normally possible only after it has been built into the kernel, which is also usually done by rebuilding initramfs as far as I know)

Just restarting Xorg sadly doesn't work if modprobe cannot find the nvidia kernel module...and nvidia driver cannot work if it's kernel module isn't loaded :/ I just need to know the equivalent workflow on puppy so I don't have to restart (eg: if I don't want to use a save file or I'm in frugal, etc)

User avatar
mikewalsh
Moderator
Posts: 6169
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 799 times
Been thanked: 1987 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by mikewalsh »

Following an exchange with Barry via PM, where he states that Puppy does use an initramfs (except it's the older initrd.gz), this link makes things a wee bit clearer....I think!

https://unix.stackexchange.com/question ... -initramfs

There are bits of that I can more or less understand, although that's mostly WAY over my head, I freely admit. However, I believe the idea of the initramfs is to make certain user-processes visible to the kernel at an earlier stage of the boot procedure than was possible with the older initrd. I'm willing to be corrected on this...!! :D

(Apparently, the initramfs has been an integral, embedded part of the kernel ever since the 2.6-series appeared. You CAN, however, choose whether or not to actually enable its use during the kernel compile process.)

Mike. ;)

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

mikewalsh wrote: Wed Nov 10, 2021 2:45 pm

Following an exchange with Barry via PM, where he states that Puppy does use an initramfs (except it's the older initrd.gz), this link makes things a wee bit clearer....I think!

https://unix.stackexchange.com/question ... -initramfs

There are bits of that I can more or less understand, although that's mostly WAY over my head, I freely admit. However, I believe the idea of the initramfs is to make certain user-processes visible to the kernel at an earlier stage of the boot procedure than was possible with the older initrd. I'm willing to be corrected on this...!! :D

(Apparently, the initramfs has been an integral, embedded part of the kernel ever since the 2.6-series appeared. You CAN, however, choose whether or not to actually enable its use during the kernel compile process.)

Mike. ;)

Yeah, same for me :)
I just understand it enough to run the commands needed to make it work (eg: on other distro where initramfs tools are usually used for, not sure how puppy does things internally here...).

I *guess* I could try to see if I can make the usual update-initramfs command work on puppy and see what happen, but knowing me, I'll probably either waste hours or break something, or both! (although things sometimes work out) So I'm trying to save some time by asking first, as you can see

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by rcrsn51 »

I don't think that "update-initramfs" is the issue here.

Switching from the default "nouveau" video driver to the "nvidia" driver requires several steps.

1. Blacklist the nouveau kernel module.
2. Unload nouveau.
3. Load the nvidia kernel module.
4. Restart X to use the Xorg nvidia driver.

I don't know if that is all possible in Puppy without a reboot.

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

rcrsn51 wrote: Wed Nov 10, 2021 4:04 pm

I don't think that "update-initramfs" is the issue here.

Switching from the default "nouveau" video driver to the "nvidia" driver requires several steps.

1. Blacklist the nouveau kernel module.
2. Unload nouveau.
3. Load the nvidia kernel module.
4. Restart X to use the Xorg nvidia driver.

I don't know if that is all possible in Puppy without a reboot.

That's true, but I also already did all of that, _except_, the part where I'm stuck, which is "loading the nvidia kernel module", which I can't do, if modprobe can't find the nvidia kernel module :) which usually require to (at least on other distro) to rebuild the initramfs, which I don't know how to do on puppy.

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by rcrsn51 »

Can you get the quickpet nvidia driver to work WITH a reboot?

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

rcrsn51 wrote: Wed Nov 10, 2021 4:15 pm

Can you get the quickpet nvidia driver to work WITH a reboot?

yeah, I can :) (I recall saying that I can get everything to work with a reboot on my first post, unless I forgot)

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by rcrsn51 »

Before trying to load the nvidia kernel module, run: depmod -a

nexussea
Posts: 13
Joined: Mon Nov 08, 2021 12:18 pm
Has thanked: 2 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by nexussea »

rcrsn51 wrote: Wed Nov 10, 2021 4:18 pm

Before trying to load the nvidia kernel module, run: depmod -a

Doesn't work I'm afraid.
Still same error:

Code: Select all

modprobe: ERROR: could not insert 'nvidia': No such device

And yeah, I did restart Xorg, and made sure nouveau was blacklisted:

Code: Select all

blacklist nouveau
options nouveau modeset=0
User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by rcrsn51 »

Maybe try exiting from X and switching kernel modules from the console. Then restart X.

User avatar
mikewalsh
Moderator
Posts: 6169
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 799 times
Been thanked: 1987 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by mikewalsh »

I believe Bill's right.

rcrsn51 wrote: Wed Nov 10, 2021 4:04 pm

I don't think that "update-initramfs" is the issue here.

Switching from the default "nouveau" video driver to the "nvidia" driver requires several steps.

1. Blacklist the nouveau kernel module.
2. Unload nouveau.
3. Load the nvidia kernel module.
4. Restart X to use the Xorg nvidia driver.

I don't know if that is all possible in Puppy without a reboot.

As I've always understood it, alteration of anything kernel-related has always been one of the very few things that does require a re-boot under Linux. Probably because with the kernel being such a fundamental system component, a re-boot is the only way to get the system to re-read a different/modified version of that component.

I understand Ubuntu have recently been implementing a method of swapping kernels literally "on-the-fly" as the system is running, followed by a way for the system to start using that different kernel without needing a re-boot. I kinda wonder if this is in any way related to how Puppy loads SFS packages "on-the-fly"..? :?

Mike. ;)

bigpuppyfan
Posts: 81
Joined: Fri Feb 12, 2021 1:20 pm
Has thanked: 14 times
Been thanked: 17 times

Re: Installing nvidia driver from quickpet entry without reboot

Post by bigpuppyfan »

Some time ago I did it on machine which had an Nvidia Quadro. Since I only use puppy in mode 5 (RAM only), rebooting would not be an option if it needed to be done on-the-fly. The caveat is that it had 2 display cards (one Intel) and multiple monitors.

I didn't do it with the .PET - download the Linux driver from Nvidia
- make the package executable (chmod 755)
- exit X
- unload nouveau (modprobe -r nouveau)
- run the package
- load the module (modprobe nvidia)
- and go back to X

Post Reply

Return to “Fossapup64”