linutil icon indicating copy to clipboard operation
linutil copied to clipboard

feat(fedora): add nvidia proprietary driver setup script

Open harshv5094 opened this issue 1 year ago • 7 comments

Pull Request

Type of Change

  • [x] New feature

Description

This script allows fedora user to install and remove proprietary NVIDIA drivers properly, without locking their system to infinity state on startup.

Testing

  • Tested this script on my personal laptop with Fedora 40 running.
  • I've run this script multiple times to check if the driver is working properly.

Additional Information

  • After installing the NVIDIA driver, before rebooting, the user need to keep their system on for up to 5 min to build drivers properly. then you need to run this command to check if your driver is installed properly or not.
modinfo -F version nvidia
  • So I've already implemented a solution for this in my script. I added a sleep timer for up to 4 minutes, so that the drivers can build in that time. Then it run above command to check if the driver number is showing or not.
  • I've also added instruction in my script for what to do if installation doesn't work.

Checklist

  • [x] My code adheres to the coding and style guidelines of the project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] My changes generate no errors/warnings/merge conflicts.

harshv5094 avatar Sep 09 '24 13:09 harshv5094

@jeevithakannan2 I made changes according to your suggestion, and also I've used your script as reference to modify my own script. I modified some changes from your script and tested on my own system, the script works way better than the previous iteration.

harshv5094 avatar Sep 10 '24 06:09 harshv5094

Should I Add VAAPI drivers, as an option for video acceleration? @nnyyxxxx, @jeevithakannan2

image

harshv5094 avatar Sep 12 '24 07:09 harshv5094

Yeah you could do that, also check whether the user's graphics card is compatible before proceeding with vaapi drivers installation

jeevithakannan2 avatar Sep 12 '24 07:09 jeevithakannan2

@jeevithakannan2, Do you have any idea how I can check that?

harshv5094 avatar Sep 12 '24 07:09 harshv5094

It would be something like this

if command_exists nvidia-smi; then
  gpu_info=$(nvidia-smi --query-gpu=name --format=csv,noheader)
  printf "%b\n" "${GREEN}NVIDIA GPU detected: $gpu_info${RC}"
else
  printf "%b\n" "${RED}nvidia-smi not found or drivers not installed.{RC}"
  exit 1
fi

if echo "$gpu_info" | grep -Eq "GeForce (8|9|[1-9][0-9])|GTX|RTX"; then
  printf "%b\n" "${GREEN}Your GPU ($gpu_model) is GeForce 8 series or above.${RC}"
else
  printf "%b\n" "${RED}Your GPU ($gpu_model) is below GeForce 8 series.${RC}"
fi

Add few more informational message for users and it is a sample script develop your own script based on that

jeevithakannan2 avatar Sep 12 '24 08:09 jeevithakannan2

Yeah! This'll help a lot thanks @jeevithakannan2

harshv5094 avatar Sep 12 '24 15:09 harshv5094

Sorry for the inconvenience. We had a massive restructure of the codebase to improve future development. Because of this can you update your PR to the new structure. Thank you for your assistance and contribution.

ChrisTitusTech avatar Sep 12 '24 18:09 ChrisTitusTech

Okay @ChrisTitusTech, I'll do it now, and also thanks for checking in.

harshv5094 avatar Sep 13 '24 15:09 harshv5094

image I'm having this problem now. I'm unable to sync the repo

harshv5094 avatar Sep 13 '24 15:09 harshv5094

image I'm having this problem now. I'm unable to sync the repo

The file structure has changed, you'll have to rebase.

ghost avatar Sep 13 '24 16:09 ghost

So, I don't know how I can fix this issue so I'm going to create a new pull request, with proper precaution.

harshv5094 avatar Sep 13 '24 17:09 harshv5094