View previous topic :: View next topic |
Author |
Message |
hollowsoul n00b

Joined: 29 Feb 2004 Posts: 31
|
Posted: Mon Dec 19, 2005 4:33 pm Post subject: Missing Nvidia devices |
|
|
Have seen a couple of times now in irc.
So decided to make a post i can just send a link for the solution.
I think the problem with nvidia driver and newer kernel/udev
Not 100% sure why? If someone knows plz reply so i can find out for myself aswell
Step1 -- Check for missing nvidia devices
U should see /dev/nvidia0 and more, if not read on.
Step2 -- Check if u got the script
Code: | ls -l /sbin/NVmakedevices.sh |
if u have this file u can skip step3
Step3 -- Get the nvidia device script
Copy the Code below into a file and save to /sbin/NVmakedevices.sh
Code: |
#!/bin/sh
error() {
echo "$(basename $0): fatal error, $1 failed"
exit 1
}
# create a temporary file
tmp=`(mktemp -q /tmp/nvidia.XXXXXX) 2> /dev/null` || tmp="/tmp/nvidia.$$"
# The module-init-tools package uses different files and syntax than
# what was used previously used for 2.4 kernels: determine if this is
# a 2.6 or greater kernel, and then select the correct search path
kernel_2_6=""
[ `uname -r | cut -d '.' -f 2` -ge 6 ] && kernel_2_6="1"
paths_2_4="/etc/modutils/aliases /etc/modules.conf /etc/conf.modules"
paths_2_6="/etc/modprobe.d/aliases /etc/modprobe.conf"
[ "$kernel_2_6" ] && paths=$paths_2_6
[ "$kernel_2_6" ] || paths=$paths_2_4
# walk the search path, and select the first file that exists
modconf=""
for path in $paths; do
if [ -f "$path" ]; then
modconf=$path
break
fi
done
# if we found a file from the search path, update the nvidia alias
if [ ! -z $modconf ]; then
# Initialize the permissions on $tmp so that we don't change the
# permissions of $modconf when we mv it into place
cp -p $modconf $tmp
sed '/^alias.*\(NVdriver\|nvidia\)/d' < $modconf > $tmp
# make sure the last character in the file is a newline
[ `tail -n 1 $tmp | wc -l` = 0 ] && echo "" >> $tmp
if [ -c /dev/.devfsd ]; then
echo "alias /dev/nvidia* nvidia" >> $tmp
elif [ "$kernel_2_6" ]; then
echo "alias char-major-195* nvidia" >> $tmp
else
echo "alias char-major-195 nvidia" >> $tmp
fi
mv -f $tmp $modconf
test -x /sbin/update-modules && /sbin/update-modules
else
if [ -f /etc/rc.d/rc.modules ]; then
# Initialize the permissions on $tmp so that we don't change the
# permissions of /etc/rc.d/rc.modules when we mv it into place
cp -p /etc/rc.d/rc.modules $tmp
sed '/.*\(NVdriver\|nvidia\).*/d' < /etc/rc.d/rc.modules > $tmp
# make sure the last character in the file is a newline
[ `tail -n 1 $tmp | wc -l` = 0 ] && echo "" >> $tmp
echo "/sbin/modprobe nvidia" >> $tmp
mv -f $tmp /etc/rc.d/rc.modules
fi
fi
if [ ! -c /dev/.devfsd ]; then
for i in 0 1 2 3 4 5 6 7; do
node="/dev/nvidia$i"
rm -f $node
mknod $node c 195 $i || error "mknod \"$node\""
chmod 0666 $node || error "chmod \"$node\""
done
node="/dev/nvidiactl"
rm -f $node
mknod $node c 195 255 || error "mknod \"$node\""
chmod 0666 $node || error "chmod \"$node\""
fi
exit 0 |
Then type
Code: | chmod 755 /sbin/NVmakedevices.sh |
Step4 -- Add Script to start @ boot
Edit the /etc/conf.d/local.start
and add
Code: | if [ ! -e /dev/nvidia0 ]; then
/sbin/NVmakedevices.sh
fi |
Step5 -- Check it workin
Type
U should see more devices now
Restart xorg and u set to go |
|
Back to top |
|
 |
iMike Apprentice

Joined: 01 Apr 2005 Posts: 217 Location: Stockholm, Sweden
|
Posted: Tue Dec 27, 2005 10:56 pm Post subject: |
|
|
This thread also follows the top, in case you'd like another reference.
/iMike |
|
Back to top |
|
 |
Deathwing00 Bodhisattva


Joined: 13 Jun 2003 Posts: 4087 Location: Dresden, Germany
|
|
Back to top |
|
 |
|