1) Download the latest Nvidia driver for Linux.

2) Install the driver according to the instructions given on the Nvidia web site. You will also have to stop the X-server when installing the driver, a good way would be to install the driver in Recovery Mode.

3) After installation, configure the x-server using:-
Code:
sudo dpkg-reconfigure xserver-xorg


Code:
sudo dpkg-reconfigure -phigh xserver-xorg
, then restart my computer, X starts up perfectly and uses the nv driver. Now if all I do is modify the file /etc/X11/xorg.conf so that the line
Code:
Driver    "nv"
reads
Code:
Driver    "nvidia"


Ok I found some more information that should be useful. There are 3 versions of the nvidia driver on Ubuntu. Each version is in a different package:
  • nvidia-glx-legacy contains version 1.0.7185
  • nvidia-glx contains version 1.0.9639
  • nvidia-glx-new contains version 100.14.19
Each version supports a different set of nVIDIA graphics cards. Go to http://www.nvidia.com/object/IO_32667.html to determine which version supports your graphics card. If you don't know what graphics card you have, go to System > Preferences > Hardware Information, or run the command lspci on the command line.

I have an nVIDIA GeForce FX 5200, which needs nvidia-glx-new, but I had nvidia-glx installed. I'm going to try installing nvidia-glx-new and see whether that gets me any further.


'Development > Linux' 카테고리의 다른 글

sigaction  (0) 2009.08.01
Linux daemon  (0) 2009.07.06
There was an error starting the GNOME Settings Daemon  (0) 2009.03.24
shmctl  (0) 2009.02.20
shmat  (0) 2009.02.20
Posted by 까 치
,
There was an error starting the GNOME Settings Daemon.
Some things, such as themes, sounds, or background settings may not work correctly.
The last error message was:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
GNOME will still try to restart the Settings Daemon next time you log in.

덕분에 1시간가량 삽질을 한듯 ...
이유야 여러가지가 있겠지만, 아래와 같이 해결!!

login to a failsafe terminal
$ vi /etc/network/interfaces

Make sure the following lines are in there, and that they arent commented out:

auto lo
iface lo inet loopback

Also, comment out anything involving IPv6 if you dont use it.

then:

$ sudo ifconfig lo up
$ exit

Reboot your box and your good to go. Dont forget to change your session back to Gnome!

참고 : 해당 파일에서 ip setting을 정상적으로 해주면서 해결!!!

Posted by 까 치
,

shmctl

Development/Linux 2009. 2. 20. 16:51

shmctl() 함수는 공유 메모리에 대한 정보를 구하거나 변경 또는 제거합니다. 공유 메모리에 대한 자세한 내용은 shmget() 함수의 내용을 참고하여 주십시오.

헤더

#include <sys/ipc.h>
#include <sys/shm.h>

형태 int shmctl(int shmid, int cmd, struct shmid_ds *buf);
인수
int shmid 공유 메모리 식별 번호
int cmd 제어 명령
struct shmid_ds *buf 공유 메모리 정보 구하기 위한 버퍼 포인터
struct shmid_ds {
  struct    ipc_perm shm_perm;/* 접근권한 */
  int  shm_segsz;            /* 세그먼트의 크기(bytes) */
  time_t    shm_atime;       /* 마지막 접근 시간 */
  time_t    shm_dtime;       /* 마지막 제거 시간 */
  time_t    shm_ctime;       /* 마지막 변경 시간 */
  unsigned short shm_cpid; /* 생성자의 프로세스의 프로세스 id */
  unsigned short shm_lpid; /* 마지막으로 작동한 프로세스의 프로세스 pid */
  short     shm_nattch;     /* 현재 접근한 프로세스의 수 */
  /* 다음은 개별적이다 */
  unsigned short   shm_npages; /* 세그먼트의 크기(pages) */
  unsigned long   *shm_pages;
  struct shm_desc *attaches;    /* 접근을 위한 기술자들 */
  };

shm_perm 멤버의 필드들은 아래와 같이 설정할 수 있습니다.
struct ipc_perm{
       key_t  key;
       ushort uid;   /* owner의 euid 와 egid */
       ushort gid;
       ushort cuid;  /* 생성자의 euid 와 egid */
       ushort cgid;
       ushort mode;  /* 접근 모드의 하위 9 bits */
       ushort seq;   /* 연속 수(sequence number) */
     };
반환
-1 실패
0 성공

예제

예제를 위해 두 개의 프로세스를 만들겠습니다. counter.c 는 공유 메모리에 1초 마다  0부터 계속 증가하는 카운터 문자열을 공유 메모리에 넣으면 show_counter.c에서 공유 메모리를 화면에 출력하도록 하겠습니다.

#include <stdio.h>      // printf()
#include <unistd.h>     // sleep()
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/types.h>

#define  KEY_NUM     9527
#define  MEM_SIZE    1024

int main( void)
{
   int    shm_id;
   void  *shm_addr;
   struct shmid_ds   shm_info;

   if ( -1 == ( shm_id = shmget( (key_t)KEY_NUM, MEM_SIZE, IPC_CREAT¦0666)))
   {
      printf( "공유 메모리 생성 실패n");
      return -1;
   }
   else
   {
      printf( "공유 메모리 생성 성공n");
   }

   if ( ( void *)-1 == ( shm_addr = shmat( shm_id, ( void *)0, 0)))
   {
      printf( "공유 메모리 첨부 실패n");
      return -1;
   }
   else
   {
      printf( "공유 메모리 첨부 성공n");
   }

   if ( -1 == shmctl( shm_id, IPC_STAT, &shm_info))
   {
      printf( "공유 메모리 정보 구하기에 실패했습니다.n");
      return -1;
   }

   printf( "공유 메모리를 사용하는 프로세스의 개수 : %dn", shm_info.shm_nattch);

   if ( -1 == shmdt( shm_addr))
   {
      printf( "공유 메모리 분리 실패n");
      return -1;
   }
   else
   {
      printf( "공유 메모리 분리 성공n");
   }

   if ( -1 == shmctl( shm_id, IPC_RMID, 0))
   {
      printf( "공유 메모리 제거 실패n");
      return -1;
   }
   else
   {
      printf( "공유 메모리 제거 성공n");
   }

   return 0;
}
]$ gcc main.c
]$ ./a.out
공유 메모리 생성 성공 공유 메모리 첨부 성공 공유 메모리를 사용하는 프로세스의 개수 : 1 공유 메모리 분리 성공 공유 메모리 제거 성공 ]$
Posted by 까 치
,