
| This forum is proudly powered by Scientific Linux 6 | SL website Download SL Help Search Members |
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| Trespasser |
Posted: Oct 20 2011, 12:21 AM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 77 Joined: 20-April 11 |
Hi, Not long ago at this site I posted about dkms letting me down big time when a kernel update occurred. Being who I am I became obsessed with finding a solution for this problem. Well, I found it. It's a simple script and procedure that I can verify does work (at least for the Nvidia driver...I'll try the Ati part of it tomorrow). First off, you'll need the build packages installed like kernel-devel, kernel-headers, make, etc. before proceeding. With reference to building an Ati driver I had to have rpm-build installed before it would work for me in the past. I'll probably install it tomorrow just to be on the safe side. This procedure assumes you've already manually installed the Nvidia or Ati driver before hand. The script appears to only kick-in on a kernel update. Here's the script and the procedure I used... 1) Download the latest Nvidia or Ati package from the respective sites. 2) Move the NVIDIA-*.run or ati-*.run package to /usr/src mv NVIDIA-Linux-x86-285.05.09.run /usr/src (32bit) mv NVIDIA-Linux-x86_64-285.05.09.run /usr/src/ (64bit) mv ati-driver-installer-11-9-x86.x86_64.run /usr/src (32 or 64bit) 3) Create a system-link to the package you just moved. By doing this you can later remove an outdated Nvidia or Ati package with an updated one then you only need to change the system-link to point to the new package. Of course, you have to remove the old system-link afterwards. The script will remain the same. ln -s /usr/src/NVIDIA-Linux-x86-285.05.09.run /usr/src/nvidia.run (32bit) ln -s /usr/src/NVIDIA-Linux-x86_64-285.05.09.run /usr/src/nvidia.run (64bit) ln -s /usr/src/ati-driver-installer-11-8-x86.x86_64.run /usr/src/ati.run (32 or 64bit) 4) Plop this script into gedit and save it as gfx
5) Move the gfx file to /etc/init.d, make it executable, then link it to runlevel 5. mv gfx /etc/init.d chmod +x /etc/init.d/gfx ln -s /etc/init.d/gfx /etc/rc5.d/S99gfx 6) And that's it. On the next kernel update this simple script will build a module for you. I let it run thru two kernel updates today and it built a new driver module (nvidia) successfully on both occasions. I can't swear by the Ati part of the script because I haven't tried it yet so use it at your own risk. I'll report back on that section tomorrow. Like I said before...IT WORKS! Later.... Bob |
|||
| redman |
Posted: Oct 20 2011, 05:55 AM
|
|
![]() SLF Admin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admins Posts: 1664 Member No.: 2 Joined: 8-April 11 |
This sounds VERY interesting, thanks for posting
-------------------- What is SL? - Forum Rules - Info on 3rd Party Repos - How to post images - How to post large text / config files
Desktop: Asus P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, Asus GeForce GT 430 1GB, SL6.4 x86_64 Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-Dimm, Asus GeForce GT 220 1GB, SL6.4 x86_64 |
|
| Trespasser |
Posted: Oct 20 2011, 06:05 PM
|
|
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 77 Joined: 20-April 11 |
Back again...
![]() Well, I tried the Ati section of the script and things turned out well the first kernel upgrade but on the second it booted me up to a black screen. I couldn't even boot to Desktop on the previous kernel. I got on my laptop and did some research and found out that if you add the number 3 to the end of the kernel line in grub your system will boot to login prompt. Whew! I then opened /etc/init.d/gfx with nano and added --force .... ### ATI driver # if [ -f /usr/src/ati.run ]; then { if [ -f /lib/modules/`uname -r`/kernel/drivers/char/drm/fglrx.ko ]; then { echo "ATI DRIVER PRESENT" } else { echo "ATI DRIVER UPDATING" /usr/src/ati.run --force ##< right here } fi } fi to the script and the module was built successfully on the following reboot. Things didn't go as easily as the Nvidia build but overall...not bad. Later... Bob |
|
| U308 |
Posted: Oct 20 2011, 06:15 PM
|
|
|
SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 486 Member No.: 32 Joined: 11-April 11 |
Valuable information for those not installing from the repos.
I think it deserves Pinning status. Good detective work there Trespasser. |
|
| Trespasser |
Posted: Oct 21 2011, 01:59 AM
|
|
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 77 Joined: 20-April 11 |
I need to mention one thing about the Ati procedure. Ati doesn't have a switch (unlike Nvidia) that assumes yes/ok for every question during the building process once a kernel update occurs. So, as a result, during the bootup process, when the plymouth splash and the progressing ring are taking place, you need to press ESC to enter verbose mode because the ati-installer will execute, display the install process, and wants you to tell it what to do for 4 or 5 steps. I don't see why they don't have a switch you can add that assumes yes as your answer because all I did was press Enter. If you don't enter verbose mode the boot process will just stall there. If you wait too long to enter verbose mode the ati-installer will briefly display "Process aborted" and the screen will go black. But the good news is you can reboot and enter the build process again because no module was built previously. If you're aware of this fact then this procedure works fine.
One could add the argument... echo "ATI DRIVER UPDATING" /usr/src/ati.run --buildandinstallpkg RedHat/RHEL6_64a (64bit) /usr/src/ati.run --buildandinstallpkg RedHat/RHEL6 (32bit) to the script (I'll try it tomorrow) which should eliminate user input but you need to have rpm-build installed. Also, did you know that whenever you build an rpm package via the Ati installer a copy of that package is saved in /root/rpmbuild as well as in your home folder (~50mbs). I didn't even know it was there until I played around with fslint one day. I was a bit surprised. It doesn't begin to compare to the Nvidia build process of this script for ease of use (no user input at all), but, hey, it does work. Later... Bob |
|
| Trespasser |
Posted: Oct 21 2011, 04:12 PM
|
|
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 77 Joined: 20-April 11 |
Hi,
I can confirm that if you add one of the following, depending upon whether you're running 32 or 64bit, to the Ati section of the script... echo "ATI DRIVER UPDATING" /usr/src/ati.run --buildandinstallpkg RedHat/RHEL6_64a (64bit) /usr/src/ati.run --buildandinstallpkg RedHat/RHEL6 (32bit) the ati module will be updated without any user input at all. .Here's the updated script... http://ShareText.org/BUG7 Please notice that I commented out both of the above entries in the script. You'll need to un-comment the line that corresponds to the type of system you are running (32 or 64bit). Note that the module will not be built unless you do. You'll also notice that I added the line... rm -rf /root/rpmbuild to the script as well. This command removes the rpmbuild folder, which contains the fglrx-*.rpm that I mentioned in my previous post, from the /root folder. Also, you'll need to install rpm-build, along with the other build packages (kernel-devel, kernel-headers, make, gcc, etc.). Well, that's about it. Hope this info will help someone. Lord knows I put enough time into it trying to figure it out. .Have a good one. Later... Bob |
|
| Trespasser |
Posted: Oct 24 2011, 08:34 PM
|
|||
|
SLF Rookie ![]() Group: Members Posts: 18 Member No.: 77 Joined: 20-April 11 |
Hi, I found some mistakes in the other script I posted previously but I have hopefully fixed them. The Ati section requires no user input at all, just like the Nvidia section. For the Ati section you need to install the build packages, compat-libstdc++, compat-glibc, as well as rpm-build. You first must build a fglrx package and install it. For example (as root)... ./ati-driver-installer-11-9-x86.x86_64.run --buildpkg RedHat/RHEL6_64a (64bit) ./ati-driver-installer-11-9-x86.x86_64.run --buildpkg RedHat/RHEL6 (32 bit) A few more dependencies will be installed at this point. After that whenever a kernel update takes place this script will automatically build a new module and install it for you. I've tried this script on both Scientific Linux 6.1 and CentOS 6.0 (one kernel update with SL6.1 and two for CentOS 6.0). It worked on both systems. Here's the updated script...
Hope you enjoy it. Later... Bob |
|||
| mack_guy911 |
Posted: Mar 13 2012, 04:14 PM
|
|
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 117 Member No.: 81 Joined: 21-April 11 |
i tried this today confirm its work like charm awesome work best part i like of this way is you can keep your fav working nvidia like new nvidia is pretty slow here as i have old card 8600GT so this is like
for me.what i did is here hope it help if anyone needed http://www.wilderssecurity.com/showthread.php?p=2028731 sorry i am not spaming but i cannot type all again ![]() last thanks to all for help -------------------- Bhagvad gita verse 20: soul can never be created nor be destroyed, but moves on from one body to another upon death.
Science says : Energy can neither be created or destroyed......it is tranformed from one state to another. |
|
![]() |
![]() ![]() ![]() |