r/voidlinux • • Nov 22 '19

How do I update the initramfs ?

I want to disable my dGPU at boot and enable it at shutdown. So I add the following to /etc/modprobe.d/bbswitch.conf:

options bbswitch load_state=0 unload_state=1

The guide says that:

You have to update your initial ramdisk (initrd) for the changes propagate to the boot process. On Debian and Ubuntu, this can performed by running update-initramfs -u as root. 

How do i update the initramfs for Void ? is it : dracut --force ?

also, Can i have load_state=0 unload_state=1 both in the options bbswitch line ? or should I make separate lines like this:

options bbswitch load_state=0 
options bbswitch unload_state=1
3 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Nov 22 '19

So here is the procedure:

(1) I add:

 options bbswitch load_state=0 unload_state=1 

to /etc/modprobe.d/bbswitch.conf

(2) I add hostonly=yes to /etc/dracut.conf.d/manual.conf

(3) reboot.

(4) dracut --force --kver <kernel_version>

(5) xbps-reconfigure -f linux<kernel-version>

---------

Questions:

(1) is this correct ? can someone confirm ?

(2) Do i have to do the above everytime a new kernel is installed ?

(3) Is bbswitch built with DKMS support in Void Linux ?

1

u/[deleted] Nov 22 '19 edited Nov 22 '19

bumblebeed is easier ? lawl

Isn't this process easier ?

 xbps-install -S bumblebee nvidia bbswitch 
 gpasswd -a user bumblebee 
 ln -s /etc/sv/bumblebeed /var/service 

should I install nvidia or nvidia-dkms ?

1

u/cdqx Nov 23 '19

1: step 1,2,5 is enough. If you want to check, reboot.

2: no

3: dunno

1

u/SunkenStone Nov 24 '19

Yes, bbswitch is built with DKMS support in Void.