이번에 한성컴퓨터에서 나온 TFG7475H(GK7NPFR)를 구입하였습니다.

이 랩탑은 중국의 칭화통팡(淸華同方, 한국한자음: 청화동방, 중국어음: 칭화통팡, 중국어(번체)표기: 清華同方, 중국어(간체)표기: 清华同方 중국어: Qīnghuá tóngfāng, 영어표기: Tsinghua Tongfang)의 베어본으로 만들어졌습니다.

아래는 칭화통팡에서 제조한 15인치 'GK5N--O' 및 17인치 'GK7N--R' 시리즈의 전세계 출시될때의 이름을 정리한 목록입니다.

www.reddit.com/r/AMDLaptops/comments/himoym/all_of_the_vendors_that_are_offering_the_tongfang/

 

All of the Vendors that are offering the Tongfang GK5N--O and the GK7N--R

Tongfang is a Chinese ODM (Original Design Manufacturer) that sells their laptop designs to vendors around the world, so far they have released 2...

www.reddit.com

저는 이 중 'GK7NPFR' 모델 기반의 한성컴퓨터의 TFG7475H를 구매하였습니다.

이 노트북에는 CPU로 8코어 16쓰레드의 AMD Ryzen Renoir 4800H를 사용하였고, GPU로는 Nvidia GTX 1650 Ti를 사용하여 CUDA연산을 할 수 있습니다.

이번에 재택근무 이슈가 있다보니, 노트북을 뭘로 살까 고민하다 CPU 성능이 우수하면서 GPU가 들어간 노트북을 사용해보게되었습니다! 원래는 이 모델보다 GPU상위 모델(Nvidia RTX 2060)이 달린 TFG7476H를 사용하려고 했으나, 이미 인기가 많아 매진되어 구매 수령을 하려면 9월말까지 기다려야 한다고 하였습니다. 그래서 급하게 필요한지라 얼른 구할 수 있는 TFG7475H(GTX 1650Ti)를 구입하였습니다.

TFG7475H에 오픈수세(openSUSE) 리눅스와 KDE Plasma를 설치 하였습니다. 시스템 정보를 보니 CPU: AMD Ryzen 7 4800H와 GPU: GTX 1650 Ti가 보임을 확인할 수 있습니다.

아래는 오픈수세(openSUSE) 리눅스 설치 화면입니다.

설치가 완료되었습니다.

처음에, 리눅스 설치를 해보니 노트북 LCD엔 출력이 제대로 동작하니, 정상적으로 설치했다 좋아했습니다.
그러나, HDMI로 24인치 모니터를 노트북에 연결해보니 외장모니터 연결은 안되는 문제가 있습니다.

이 한성 TFG7475H의 그래픽스관련으로 리눅스에서 설치를 해보니 노트북의 LCD 화면은 AMD Radeon 내장 그래픽에서 출력되고, 외장화면(HDMI, miniDP 연결)은 Nvidia GTX 1650 Ti에서 출력되더군요.

그래서, Nvidia 드라이버를 설치 후, openSUSE의 SUSE Prime 설치해야 노트북 내장 화면(LCD)및 외장화면 (HDMI, miniDP)동시 출력이 가능합니다.(Nvidia 모듈 설치후에 외장모니터만 화면 출력되고, 노트북 LCD가 안나오는 현상 겪으면 멘붕합니다 ㅋㅋㅋㅋㅋㅋㅋ ㅠㅠㅠㅠ )

en.opensuse.org/SDB:NVIDIA_drivers

en.opensuse.org/SDB:NVIDIA_SUSE_Prime

en.opensuse.org/SDB:AMDGPU

위의 3가지 내용을 참조하여, Nvidia, AMD 내장 그래픽 모두 나올 수 있게 삽질을 해야합니다.

(해당 내용은 우분투등 대부분의 배포판에서 에서도 동일한 현상이 일어날 것입니다.)

아래는, 오픈수세 리눅스에서 리브레오피스(LibreOffice) 소스코드를 빌드할때 화면입니다.

오픈수세(openSUSE)에서 리브레오피스(LibreOffice) 빌드중

이제, 리눅스가 잘 돌아가는 걸 확인하였으면, tensorslow-gpu를 사용할 수 있게 설정해야합니다.

엔비디아(Nvidia)사이트 들어가서 CUDA Toolkit 11.0 를 설치하면 됩니다

developer.nvidia.com/cuda-downloads

 

CUDA Toolkit 11.0 Update 1 Downloads

Select Target Platform Click on the green buttons that describe your target platform. Only supported platforms will be shown. By downloading and using the software, you agree to fully comply with the terms and conditions of the CUDA EULA. Operating System

developer.nvidia.com

 

저는 오픈수세(openSUSE)를 사용하기 때문에, CUDA Toolkit을 openSUSE기반으로 받아서 설치했습니다.

그리고, cuDNN은 아래 링크에서 rpm파일을 다운로드 받아서 설치

developer.download.nvidia.com/compute/machine-learning/repos/rhel8/x86_64/

 

Index of /compute/machine-learning/repos/rhel8/x86_64

 

developer.download.nvidia.com

libcudnn8-8.0.3.33-1.cuda11.0.x86_64.rpmlibcudnn8-devel-8.0.3.33-1.cuda11.0.x86_64.rpm, nvidia-machine-learning-repo-rhel8-1.0.0-1.x86_64.rpm를 다운로드 받아서 설치하였습니다.

$ sudo zypper in libcudnn8-8.0.3.33-1.cuda11.0.x86_64.rpm libcudnn8-devel-8.0.3.33-1.cuda11.0.x86_64.rpm nvidia-machine-learning-repo-rhel8-1.0.0-1.x86_64.rpm 

이후 pip으로 tensorflow-gpu를 설치해봅니다.

$ pip3 install tensorflow tensorflow-gpu

라이브러리 설치가 되었으면, 두근두근

tensorflow에서 Nvidia GPU연동이 잘 되는지 테스트를 해봅니다

$ python3 -c 'import tensorflow as tf; print(tf.__version__)'
2020-09-12 03:28:30.666780: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-09-12 03:28:30.666814: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2.3.0

아, Python의 tensorflow-gpu는 CUDA 10.1 버전을 사용하고 있더군요. CUDA 동적 라이브러리 10.1 버전이 없어서 에러가 났습니다.

해당 내용 검색을 하니, CUDA 10.1버전을 설치하라고 나옵니다

Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory #38578

 

Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or

Debian 10.3 Python 3.8.2 Cuda 10.2 Quadro K5200d drivers 440.82 Tensorflow 2.2.0-rc2 import tensorflow as tf tf.config.list_physical_devices('GPU') 2020-04-15 20:58:07.177217: I tensorflow/...

github.com

추가적으로, 저는 openSUSE Linux에서 CUDA 10.1 버전을 추가 설치하였습니다

$ sudo zypper install cuda-10-1

설치가 완료되면 다시, tensorflow-gpu라이브러리가 정상 작동할수 있게 Nvidia CUDA가 제대로 설치되었는지 확인해봅니다

$ python3 -c 'import tensorflow as tf; print(tf.__version__)'
2020-09-12 03:38:39.770262: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2.3.0

드디어, Nvidia CUDA 및 tensorflow 설치, tensorflow-gpu 라이브러리가 정상 작동함을 확인하였습니다.

한성컴퓨터에서 출시된 TFG7475H에서 리눅스 설치하였고 딥러닝, tensorflow, CUDA연산 할수 있게 설정을 하니 가성비가 엄청 좋음을 느꼈습니다.

참고 링크:

intellegibilisverum.tistory.com/entry/%ED%95%9C%EC%84%B1-%EB%85%B8%ED%8A%B8%EB%B6%81%EC%97%90%EC%84%9C-ubuntu-1606-LTS-tensorflowgpu-%EC%84%B8%ED%8C%85%ED%95%98%EA%B8%B0

 

한성 노트북에서 ubuntu 16.06 LTS + tensorflow-gpu 세팅하기

2년전에 한성노트북을 구입했다. 그때 Intel graphic과 nvidia gtx 950m 가 같이 되어 세팅되어 있던 노트북이었는데 그동안 nvidia는 거의 안사용했던거 같다. 그래서 이번에 그것도 사용할 겸 tensorflow-gpu

intellegibilisverum.tistory.com

bcho.tistory.com/1311

 

개발자 코딩 노트북 구입기 (DELL Inspiron 7580) 우분투

개발자용 노트북 구입기 조대협 (http://bcho.tistory.com) 집에서 개발 공부와, 테스트를 위해서 개인 노트북이 필요했는데, 아무래도 업무와 개인 공부를 분리하는것이 좋을것 같아서, 얼마전 부터 ��

bcho.tistory.com

 

흠 위의 링크에서 한성컴퓨터에 리눅스 설치하면 삽질 엄청해야한다고 하는데, openSUSE 사용하면 그나마 우분투보다 삽질 품이 줄어들듯 합니다.

Buy me a coffeeBuy me a coffee

제가 사용하는 2011년도산 삼성 노트북에는 i7 쿼드코어(Quad core)에 Intel 기본 그래픽 카드에 Nvidia 그래픽카드도 탑재되어 있습니다. 이 노트북은 그 당시에 제일 잘나가던 사양으로 만든 노트북입니다.

이 노트북은 아직도 현역으로 잘 굴릴 만큼, 아직도 성능이 나쁘지 않습니다.

(그 이유는 제가 엄청나게 개조를 했기 때문이죠. 램(RAM)을 4GB에서 16GB로, 하드디스크를 SSD로 교체 등등)

그러나, 오픈수세(openSUSE)를 설치한 제 노트북에 딥러닝을 위한 GPU를 사용하려니 Nvidia드라이버가 활성화가 안되어 있더군요.

이를 계기로, 저는 오픈수세(openSUSE)에서 노트북에 있는 Nvidia 드라이버를 활성화 시켜보겠습니다.

우선 아래 링크의 글을 보고 따라했습니다.

openSUSE Wiki: NVIDIA Drivers

 

SDB:NVIDIA drivers - openSUSE Wiki

Warning: If you plan to replace your card with a more recent one, it's recommended that you uninstall the driver (reverting back to nouveau) before upgrading your hardware. Situation Installing the official NVIDIA drivers using ZYpp (YaST, YaST2, or Zypper

en.opensuse.org

일단 루트(Root)권한으로 들어갑니다.

첫번째로, Nvidia 드라이버 저장소를 오픈수세(openSUSE) 리눅스에 추가합니다.

# zypper addrepo --refresh https://download.nvidia.com/opensuse/tumbleweed NVIDIA
'NVIDIA' 리포지토리 추가 중 ...................................................................................................................................[완료]
'NVIDIA' 리포지토리가 추가되었습니다.

URI            : https://download.nvidia.com/opensuse/tumbleweed
활성화됨       : 예
GPG 확인       : 예
자동 새로 고침 : 예
우선순위       : 99 (기본 우선순위)

저장소는 우선순위가 없습니다. 모든 저장소는 같은 우선순위를 공유합니다.

이후, 설치된 하드웨어의 정보를 다음의 명령어 lspcilscpu로 확인합니다.

비디오카드 정보 확인은 다음의 명렁어 lspci로 확인합니다.

# lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

CPU아키텍처 정보 확인은 다음의 명령어 lscpu로 확인합니다.

# lscpu | grep Arch   
Architecture:                    x86_64

그리고, 명령어 lspcilscpu를 다음의 명령어 hwinfo로 대체할 수 있습니다.

비디오카드 정보 확인은 다음의 명령으로 확인합니다.

# hwinfo --gfxcard | grep Model
  Model: "nVidia GF119M [GeForce GT 520MX]"
  Model: "Intel 2nd Generation Core Processor Family Integrated Graphics Controller"

CPU아키텍처 정보 확인은 다음의 명령으로 확인합니다.

# hwinfo --arch
Arch: X86_64/grub                                               

정보를 확인하고, 적당한 Nvidia 드라이버 패키지를 찾습니다.

# zypper se x11-video-nvidiaG0*
Retrieving repository 'NVIDIA' metadata --------------------------------------------------------------------------------------------------------------------------[|]

New repository or package signing key received:

  Repository:       NVIDIA
  Key Name:         NVIDIA Corporation <linux-bugs@nvidia.com>
  Key Fingerprint:  9B763D49 D8A5C892 FC178BAC F5113243 C66B6EAE
  Key Created:      Fri Jun 16 01:13:18 2006
  Key Expires:      (does not expire)
  Subkey:           F016EEAA03224CDD 2006-06-16 [does not expire]
  Rpm Name:         gpg-pubkey-c66b6eae-4491871e


Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): a
Retrieving repository 'NVIDIA' metadata .......................................................................................................................[done]
Building repository 'NVIDIA' cache ............................................................................................................................[done]
Loading repository data...
Reading installed packages...

S | Name                | Summary                                                 | Type
--+---------------------+---------------------------------------------------------+--------
  | x11-video-nvidiaG04 | NVIDIA graphics driver for GeForce 400 series and newer | package
  | x11-video-nvidiaG05 | NVIDIA graphics driver for GeForce 600 series and newer | package

이제, Nvidia 드라이버 패키지를 설치합니다.

# zypper in x11-video-nvidiaG04
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 13 NEW packages are going to be installed:
  Mesa-libGLESv1_CM1 Mesa-libGLESv2-2 libX11-6-32bit libXau6-32bit libXext6-32bit libglvnd-32bit libxcb1-32bit nvidia-computeG04 nvidia-gfxG04-kmp-default
  nvidia-glG04 plasma5-applet-suse-prime suse-prime x11-video-nvidiaG04

The following 4 recommended packages were automatically selected:
  Mesa-libGLESv1_CM1 Mesa-libGLESv2-2 nvidia-glG04 x11-video-nvidiaG04

13 new packages to install.
Overall download size: 79.2 MiB. Already cached: 0 B. After the operation, additional 366.0 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Do you agree with the terms of the license? [yes/no] (no): yes

설치가 완료되었으면 재부팅 합니다.

재부팅 후에도 Intel 그래픽카드로 사용되는걸 확인할 수 있습니다.
openSUSE에서 Nvidia 그래픽카드 사용 활성화를 하려면 아래의 명령어로 활성화합니다

$ sudo prime-select nvidia
Logout to switch graphics

위의 내용처럼 로그아웃을 하고 난 후 새로 로그인 하면 변경되는 걸 확인할 수 있습니다.

ps. 이제 이 노트북으로 Nvidia GPU를 이용한 AI연산, 딥러닝을 사용할수 있다.

Buy me a coffeeBuy me a coffee

+ Recent posts