linutil
linutil copied to clipboard
feat(fedora): add nvidia proprietary driver setup script
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.
@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.
Yeah you could do that, also check whether the user's graphics card is compatible before proceeding with vaapi drivers installation
@jeevithakannan2, Do you have any idea how I can check that?
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
Yeah! This'll help a lot thanks @jeevithakannan2
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.
Okay @ChrisTitusTech, I'll do it now, and also thanks for checking in.
I'm having this problem now. I'm unable to sync the repo
I'm having this problem now. I'm unable to sync the repo
The file structure has changed, you'll have to rebase.
So, I don't know how I can fix this issue so I'm going to create a new pull request, with proper precaution.
I'm having this problem now. I'm unable to sync the repo