2020년 12월 5일 토요일

ubuntu amdgpu vulkaninfo 에러수정.

vulkaninfo 실행시 아래와 같은 에러 발생.
 .......... vkEnumerateInstanceExtensionProperties failed with ERROR_INITIALIZATION_FAILED
 아래 링크 참조하여 수정. 
 
커널 옵션 추가 방식 선택
1. /etc/default/grub 의 GRUB_CMDLINE_LINUX_DEFAULT 에 다음과 같이 추가.
....
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.si_support=0 amdgpu.si_support=1 radeon.cik_support=0 amdgpu.cik_support=1"
...

2. sudo update-grub 실행

3. 재시작

4. lspci -k 실행
Kernel driver in use 가 amdgpu 로 바뀐 것 확인. 원래 radeon 이었음.
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics]
    Subsystem: Hewlett-Packard Company Mullins [Radeon R4/R5 Graphics]
    Kernel driver in use: amdgpu
    Kernel modules: radeon, amdgpu

5. vulkaninfo 실행
==========
VULKANINFO
==========

Vulkan Instance Version: 1.2.141


Instance Extensions: count = 18
===============================
        VK_EXT_acquire_xlib_display            : extension revision 1
        VK_EXT_debug_report                    : extension revision 8
        VK_EXT_debug_utils                     : extension revision 2
        VK_EXT_direct_mode_display             : extension revision 1
....


2018년 1월 9일 화요일

VS2015 로 컴파일된 DLL을 XP에서 LoadLibrary 시 Access Violation 예외.

VS2015 로 컴파일된 DLL을 XP에서 LoadLibrary 시 모듈초기화단계에서 Access Violation 예외가 발생됨.
VS2015 에 도입된 Thread-safe Local Static Initialization 기능때문임.
컴파일러옵션에 "/Zc:threadSafeInit-" 을 추가하면 됨.
https://github.com/open-source-parsers/jsoncpp/issues/719
https://stackoverflow.com/questions/32517234/access-violation-on-static-initialization/32776479#32776479
https://docs.microsoft.com/en-us/cpp/build/reference/zc-threadsafeinit-thread-safe-local-static-initialization

2017년 7월 18일 화요일

Notepad++ 편집창 줄간격 조정하기

https://github.com/notepad-plus-plus/notepad-plus-plus/issues/971 참조

nppexec 에서 다음 구문 실행.
NPP_CONSOLE 0
SCI_SENDMSG SCI_SETEXTRAASCENT 5
SCI_SENDMSG SCI_SETEXTRADESCENT 5

2015년 12월 21일 월요일

CentOS 7 1503->1511 업데이트후 소프트웨어 추가/제거, 업데이트 메뉴 사라지는 이슈

CentOS 7 을 1503 에서 1511 버전으로 업데이트후 시스템도구의 일부메뉴가 사라지는 버그가 있는 것 같음.
특히, 소프트웨어 추가/제거, 업데이트 메뉴가 사라져서 엄청 불편함.
root 권한으로 패키지 설치
yum install gnome-packagekit-installer gnome-packagekit-updater

2015년 11월 4일 수요일

RtlGetVersion() 으로 윈도 8.1 이상에서 OS버전 제대로 얻기.

http://simplecodewithsanat.blogspot.kr/2015/01/get-correct-os-version-on-win-81.html
https://indidev.net/forum/viewtopic.php?f=5&t=474
 

NTSTATUS (WINAPI *RtlGetVersion)(LPOSVERSIONINFOEXW);
OSVERSIONINFOEXW osInfo;

*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");

if (NULL != RtlGetVersion)
{
   osInfo.dwOSVersionInfoSize = sizeof(osInfo);
   RtlGetVersion(&osInfo);
}

2015년 9월 22일 화요일

subversion empty 로그 커밋 차단

http://stackoverflow.com/questions/1928023/how-can-i-prevent-subversion-commits-without-comments
https://dzone.com/articles/useful-subversion-pre-commit
hooks/pre-commit 파일 수정

#!/bin/bash
REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook

# Comments should have more than 5 characters
LOGMSG=$($SVNLOOK log -t "$TXN" "$REPOS" | grep [a-zA-Z0-9] | wc -c)
if [ "$LOGMSG" -lt 15 ];
    then
    echo -e "Please provide a meaningful comment when committing changes." 1>&2
exit 1
fi

# All checks passed, so allow the commit.  
exit 0