Ubuntu에서 DDM 기능 대체하기

Dell 모니터 중 KVM 기능을 지원하는 제품의 경우, Windows나 macOS에서는 DDM (Dell Display Manager)라는 프로그램을 통해서 모니터를 키보드를 통해 제어할 수 있다.

이를 이용하면 유용한 점이, 모니터를 직접 조작하지 않고도, 입력 소스를 선택할 수 있어 두 대의 PC를 오가며 쉽게 작업할 수 있다는 점이다.

다만 아쉽게도 아직까지 Ubuntu에서 동작하는 DDM은 없는 상황이다. 하지만 구글링을 해보면 쉽게 이를 대체할 수 있는 방법이 나온다.

기본적으로 DDM의 역할은 모니터에 연결된 특정칩에 명령을 전달하는 것인데, 이 명령이 DDC/CI 기능을 이용한다. 아마 게임기나 셋탑박스를 연결할 때, 케이블을 꼽기만 해도 해당 입력소스로 자동으로 전환되는 것을 경험해보셨다면, 그 모니터가 DDC/CI 기능을 지원한다는 의미이다.

Ubuntu에도 이러한 기능을 수행하는 커맨드가 존재하는데, ddccontrol 이 그것이다.

설치는 다음과 같이

$ sudo apt install ddccontrol

설치하면 되고..

이제 실행을 해보면, 먼저 모니터를 인식하는지를 확인해보면…

$ ddccontrol -p
ddccontrol version 0.6.0
Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)
Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program under the terms of the GNU General Public License.

Detected monitors :
 - Device: dev:/dev/i2c-6
   DDC/CI supported: Yes
   Monitor Name: VESA standard monitor
   Input type: Digital
  (Automatically selected)
Reading EDID and initializing DDC/CI at bus dev:/dev/i2c-6...
I/O warning : failed to load external entity "/usr/share/ddccontrol-db/monitor/DEL426A.xml"
Document not parsed successfully.
I/O warning : failed to load external entity "/usr/share/ddccontrol-db/monitor/DELlcd.xml"
Document not parsed successfully.

EDID readings:
	Plug and Play ID: DEL426A [VESA standard monitor]
	Input type: Analog

...
= VESA standard monitor
...
> Input settings
	> Input sources
		> id=inputsource, name=Input Source Select (Main), address=0x60, delay=-1ms, type=2
		  Possible values:
			> id=analog - name=Analog, value=1
			> id=digital - name=Digital, value=3
		  supported, value=3855, maximum=14
...

와 같이 연결된 모니터 정보가 인식된다.

이중, 중요한 것이, 연결되어 있는 디바이스 정보인데, 여기에선 /dev/i2c-6으로 되어 있다. 또, Input sources를 설정하는 레지스터 주소가 0x60으로 되어 있는 것을 알 수 있다.

이제 0x60에 특정한 값을 넣으면, 해당되는 입력 소스로 전환할 수 있다는 것인데… 이 특정한 값이 무엇인지를 파악해야 하는데, 역시 검색해보면 답이 바로 나온다.

  • Display Port : 0x0f (15)
  • USB-C : 0x1B (27)
  • HDMI : 0x11 (17)

이다.

즉 터미널에서 다음과 같이 입력하면, USB-C 입력소스로 즉시 전환된다.

$ ddccontrol -r 0x60 -w 27 dev:/dev/i2c-6

이제, 이 명령을 키보드 단축키로 지정하면 쉽게 사용 가능.

설정에서 키보드 > 키보드 단축키 설정 > 사용자 단축키 설정

이제, 위 단축키를 이용하면, 모니터의 입력소스를 조정하여 쉽게 전환이 가능하다.