View Single Post
Old 09-09-08, 11:09 AM   #4
jazzychad
bootstrapped user
 
Join Date: Sep 2008
Posts: 4
Default Re: nvclock: map_dev_mem (mmap) returning -1

well, I figured out how to force /dev/mem

for those interested...

in backend/backend_linux.c around line 170, change the switch statement to switch(0) to force /dev/mem:

Code:
 switch(0) //check_driver()                                                                                                                               
{
       case 0:
           nvclock.card[i].dev_name = (char*)strdup("/dev/mem");
           nvclock.card[i].reg_address = reg_addr;
           break;
        case 1:
           nvclock.card[i].dev_name = calloc(13, sizeof(char));
           sprintf(nvclock.card[i].dev_name, "/dev/nvidia%d", nvclock.card[i].number);
           nvclock.card[i].reg_address = 0;
           break;
         case 2:
           nvclock.card[i].dev_name = calloc(13, sizeof(char));
           sprintf(nvclock.card[i].dev_name, "/dev/nvidia%d", nvclock.card[i].number);
           nvclock.card[i].reg_address = reg_addr;
           break;
}
After that, the mmaps worked fine, and I was able to get the info on my cards.

Unfortunately, my 6600's don't support fanspeed adjustment as I was greeted an error message when I tried to slow them down. Bummer.

Oh well, I can always replace the fans, or just upgrade cards...

Thanks again for the help!
jazzychad is offline   Reply With Quote