LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-28-2020, 05:33 AM   #1
3rensho
Member
 
Registered: Mar 2008
Location: Switzerland
Distribution: Slackware64-current
Posts: 421

Rep: Reputation: 106Reputation: 106
Automate additions to grub.cfg


I'm running the latest Plasma 5 and it runs fine. In Eric's install guide when he converted it over to elogind there is one step where you need to "cat /sys/module/nvidia_drm/parameters/modeset" and if the result comes back N (which it did for me) then you need to add "nvidia-drm-modeset=1" to the "linux" lines of grub.cfg. I did and all is fine, however, when I install a new kernel and and grub-mkconfig gets run it generates a new grub.cfg and the "nvidia-drm-modeset=1" bit gets removed. Rather than having to edit the grub.cfg file by hand every time is there a way to modify a file under /etc/grub.d to take care of this? I grep'd 10_linux and see this entry where it adds parameters to the linux line

Code:
linux_entry "${OS}" "${version}" simple \
Maybe I'm overlooking something trivial or missing the obvious. Can someone please let me know how to have each newly generated grub.cfg file append the required "nvidia-drm-modeset=1" bit to the "linux" lines for each kernel version in grub.cfg??? Thank you.
 
Old 06-28-2020, 06:23 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,391

Rep: Reputation: Disabled
In /etc/default/grub include this line:
GRUB_CMDLINE_LINUX="nvidia-drm-modeset=1"

Then run:
grub-mkconfig -o /boot/grub/grub.cfg

Last edited by Didier Spaier; 06-28-2020 at 06:25 AM.
 
Old 06-28-2020, 06:36 AM   #3
3rensho
Member
 
Registered: Mar 2008
Location: Switzerland
Distribution: Slackware64-current
Posts: 421

Original Poster
Rep: Reputation: 106Reputation: 106
Cool beans. Thank you Didier.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB menu not getting updated even after changing /boot/grub/grub.cfg KNSI Linux From Scratch 4 06-20-2018 09:13 PM
Files in /etc/grub.d not included in /boot/grub/grub.cfg. stf92 Slackware 21 05-27-2018 04:38 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] how to the give path of the part.cfg file in %include command in ks.cfg. YOGESHAS87 Linux - Newbie 2 01-11-2011 04:33 AM
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration