사용자 도구

사이트 도구


linux:hidpi

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linux:hidpi [2020/10/30 21:16]
kwon37xi [Gnome]
linux:hidpi [2023/06/07 10:30] (현재)
kwon37xi [wine]
줄 1: 줄 1:
 ====== Linux HighDPI ====== ====== Linux HighDPI ======
-  * [[https://wiki.archlinux.org/index.php/HiDPI|HiDPI - ArchWiki]]+  * [[https://wiki.archlinux.org/title/HiDPI|HiDPI - ArchWiki]]
   * [[https://wiki.debian.org/MonitorDPI|MonitorDPI - Debian Wiki]]   * [[https://wiki.debian.org/MonitorDPI|MonitorDPI - Debian Wiki]]
   * [[linux:xrandr|XRandr]]   * [[linux:xrandr|XRandr]]
- +  * [[https://github.com/alex-spataru/HiDPI-Fixer|alex-spataru/HiDPI-Fixer: Qt app that automates fractional scaling configuration on X11 desktops]] 
 +  * [[https://askubuntu.com/questions/197828/how-to-find-and-change-the-screen-dpi|How to find and change the screen DPI? - Ask Ubuntu]] 
 +  * [[https://winaero.com/find-change-screen-dpi-linux/|How to Find and Change Screen DPI in Linux]]
 ===== Gnome ===== ===== Gnome =====
   * [[linux:gnome|Gnome]]   * [[linux:gnome|Gnome]]
   * 설정에서 Scale 을 조정하면 됨.   * 설정에서 Scale 을 조정하면 됨.
   * Gnome 환경의 QT 애플리케이션의 경우 시작 프로그램으로 너무 일찍 시작하면 Scaling 이 적용 안될때가 있음. 약간 sleep을 주고 실행해볼 것.   * Gnome 환경의 QT 애플리케이션의 경우 시작 프로그램으로 너무 일찍 시작하면 Scaling 이 적용 안될때가 있음. 약간 sleep을 주고 실행해볼 것.
 +  * [[linux:gnome:dconf|dconf]] 를 이용해서 ''org.gnome.desktop.interface/scaling-factor'' 값이 적용된다.
 +    * ''hidpi daemon'' 사용시 이 값이 올바로 변경되지 않는 경우를 발견함. 직접 바꿔 줘야 할수도 있음.
 +
 +==== Gnome 3.38 ====
 +  * 기본적으로는 정수 스케일링만 가능(''1(100%), 2(200%), 3(300%), ...'').
 +  * Gnome 3.38 현재, 재부팅 없이 Scaling 변경 방법. 모니터별로 별도 스케일링 지정은 안 된다.
 +    * 먼저, **시스템설정 -> Display** 에서 해상도와 비율(Scaling Factor)를 원하는 값으로 조정해준다.
 +    * 그래도 실제로는 즉시 반영이 안되는데, 그 상황에서 원하는 Scaling Factor 에 따라 아래 명령을 실행한다.<code sh>
 +# 1K : 100%
 +gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "[{'Gdk/WindowScalingFactor', <1>}]"
 +gsettings set org.gnome.desktop.interface scaling-factor 1
 +
 +# 4k - 200%
 +gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "[{'Gdk/WindowScalingFactor', <2>}]"
 +gsettings set org.gnome.desktop.interface scaling-factor 2
 +</code>
 +    * 그 뒤에 Gnome 자체를 재시작한다. [[linux:gnome|Gnome]] 참조.(제일 쉬운건 ''Alt-F2, r'')
 +    * 그리고서 이미 실행돼서 떠 있는 애플리케이션들을 재시작해줘야 한다. 특히 ''guake'', 등..
 +    * [[linux:xrandr|XRandr]] 을 통한 해상도와 Scaling Factor 변경은 올바로 반영이 안됐었다.
 +
 +==== Gnome 42 ====
 +  * 위의 ''scaling-factor'' 값들이 반영이 안됐다.
 +  * [[:intellij_idea|IntelliJ IDEA]]의 경우 다른 방식이 필요했다.
 +
 +==== gdm ====
 +  * [[linux:gdm|GDM]] 로그인 화면에 대해서도 scaling 을 강제 지정할 수 있다.
  
 ===== Pop! OS, Gnome HIDPI Daemon ===== ===== Pop! OS, Gnome HIDPI Daemon =====
   * [[https://blog.system76.com/post/174414833678/all-about-the-hidpi-daemon|System76 Blog — All About the HiDPI Daemon]]   * [[https://blog.system76.com/post/174414833678/all-about-the-hidpi-daemon|System76 Blog — All About the HiDPI Daemon]]
   * [[https://support.system76.com/articles/hidpi-multi-monitor/|HiDPI Multi-Monitor Support - System76 Support]]   * [[https://support.system76.com/articles/hidpi-multi-monitor/|HiDPI Multi-Monitor Support - System76 Support]]
 +  * [[http://ppa.launchpad.net/system76-dev/stable/ubuntu/pool/main/h/hidpi-daemon/|HiDPI Daemon PPA deb files]] 에서 직접 다운로드 가능. 혹은
 +  * [[https://launchpad.net/~system76-dev/+archive/ubuntu/stable|System76 Stable PPA]] 등록해서 패키지 설치
   * HiDPI(4K) 노트북 등을 사용하는데 LoDPI(FHD) 모니터가 붙으면 LoDPI를 기준으로 HiDPI 쪽 해상도를 변경하고 Scaling 을 100%로 자동변경하는 데몬이다.   * HiDPI(4K) 노트북 등을 사용하는데 LoDPI(FHD) 모니터가 붙으면 LoDPI를 기준으로 HiDPI 쪽 해상도를 변경하고 Scaling 을 100%로 자동변경하는 데몬이다.
     * 예를들어, 3840x2160(16:9, 4k) 모니터에 한 대를 200% Scaling을 사용하고 있는 도중에 1920x1080(16:9, FHD, 1K) 모니터가 연결되면 설정을 뭐로 했었는지를 기억해서     * 예를들어, 3840x2160(16:9, 4k) 모니터에 한 대를 200% Scaling을 사용하고 있는 도중에 1920x1080(16:9, FHD, 1K) 모니터가 연결되면 설정을 뭐로 했었는지를 기억해서
줄 33: 줄 62:
  
 > if ''QT_AUTO_SCREEN_SCALE_FACTOR=1'' does not work, the issue may be related to that gnome-settings-daemon sets Xft.dpi to a non-integer. Try xrdb -query | grep dpi to check this. – Fang Hung-chien Jun 15 '19 at 22:36 > if ''QT_AUTO_SCREEN_SCALE_FACTOR=1'' does not work, the issue may be related to that gnome-settings-daemon sets Xft.dpi to a non-integer. Try xrdb -query | grep dpi to check this. – Fang Hung-chien Jun 15 '19 at 22:36
 +
 +==== KDE Plasma DPI 변경 즉시 적용 ====
 +  * [[https://nilsonsales.wordpress.com/2019/10/31/changing-monitor-dpi-on-kde-using-xrandr/|Changing monitor DPI on KDE using ‘xrandr’]]
 +  * [[linux:xrandr|XRandr]]
 +
 +<code>
 +xrandr --dpi 120
 +
 +# then
 +kquitapp5 plasmashell && kstart5 plasmashell
 +
 +</code>
 +
 +> The recommended values are 96 (default value), 120 (25% higher), 144 (50% higher), 168 (75% higher) and 192 (100% higher).
  
 ===== wine ===== ===== wine =====
   * [[linux:wine|Linux Wine]]   * [[linux:wine|Linux Wine]]
   * [[https://www.dedoimedo.com/computers/wine-apps-hd-display.html|WINE applications on HD displays - Better looks]]   * [[https://www.dedoimedo.com/computers/wine-apps-hd-display.html|WINE applications on HD displays - Better looks]]
-  * ''winecfg'' 에서 **Graphics -> Screen resolution** 에서 dpi 변경. 128, 144, 168?? +  * ''winecfg'' 에서 **Graphics -> Screen resolution** 에서 dpi 변경.  
 +  * 표준 DPI 설정은 100%(''96'' DPI)125%(''120'' DPI) 및 150%(''144'' DPI)200%(''192'' DPI) 
 +  * [[https://learn.microsoft.com/ko-kr/windows/win32/learnwin32/dpi-and-device-independent-pixels|DPI 및 장치 독립적 픽셀 - Win32 apps | Microsoft Learn]]
 ===== gimp ===== ===== gimp =====
   * [[linux:gimp|GIMP]]의 아이콘 크기를 명시적 조정으로 변경할 수 있다.   * [[linux:gimp|GIMP]]의 아이콘 크기를 명시적 조정으로 변경할 수 있다.
줄 46: 줄 90:
 ===== Java Swing ===== ===== Java Swing =====
   * Java 9 이상부터 ''GDK_SCALE=2'' 형태의 환경변수를 인식한다.   * Java 9 이상부터 ''GDK_SCALE=2'' 형태의 환경변수를 인식한다.
 +  * [[linux:flatpak|Flatpak]] 혹은  [[linux:snap|Snap]] 애플리케이션 실행시에도 ''GDK_SCALE=2''를 줘서 실행할 수 있다.
  
 +<code sh>
 +GDK_SCALE=2 flatpak run net.sourceforge.squirrel_sql
 +</code>
 +  * [[https://developer.gnome.org/gtk3/stable/gtk-x11.html|Using GTK+ on the X Window System: GTK+ 3 Reference Manual]]
 +  * [[https://github.com/flathub/com.diy_fever.DIYLayoutCreator/blob/master/diylc.sh#L3|com.diy_fever.DIYLayoutCreator/diylc.sh at master · flathub/com.diy_fever.DIYLayoutCreator]]
 +  * [[https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk11/issues/15|Java Swing applications (SWT) lack Desktop integration · Issue #15 · flathub/org.freedesktop.Sdk.Extension.openjdk11]]
 +===== JetBrains / IntelliJ IDEA =====
 +  * 2023 최근에는 별다른 설정없이 잘 인식 됐음.
 +  * [[https://intellij-support.jetbrains.com/hc/en-us/articles/360007994999-HiDPI-configuration|HiDPI configuration – IDEs Support (IntelliJ Platform) | JetBrains]]
 +  * [[https://plugins.jetbrains.com/plugin/9541-hidpi-profiles|hidpi-profiles - plugin for IntelliJ IDEs | JetBrains]]
 +  * ''JBR 11'' 사용시에 다음 순서로 적용된다.
 +    * ''-Dsun.java2d.uiScale=값'' 
 +    * Gnome dconf의 ''org.gnome.desktop.interface/scaling-factor'' (모니터 무관 전역값) 값을 우선 사용한다. 이 값이 잘 못되면 이상 작동한다.
 +    * ''ubuntu.user-interface/scale-factor'' 모니터별 DPI 설정값([[linux:wayland|Wayland]])용.
 +    * ''GDK_SCALE''
 +
 +  * Gnome 4.2 [[linux:ubuntu:22.04|Ubuntu Linux 22.04 Jammy Jellyfish]]부터 위에 나온 ''dconf'' 값들이 모두 제대로 설정이 안되고 있다. 따라서 ''-Dsun.java2d.uiScale.enabled=false'' 로 IDE 가 자동 판독하게 하거나, 아니면 ''-Dsun.java2d.uiScale=2''로 명시해야 했다.
 +
 +===== JavaFX =====
 +  * [[https://news.kynosarges.org/2018/01/26/javafx-dpi-scaling-in-java-9/|JavaFX DPI Scaling in Java 9 – Kynosarges Weblog]]
 ===== Console / Virtual Terminal ===== ===== Console / Virtual Terminal =====
   * [[http://www.ateijelo.com/blog/2017/02/01/linux-console-high-dpi-display|Linux Console & High DPI Displays]]   * [[http://www.ateijelo.com/blog/2017/02/01/linux-console-high-dpi-display|Linux Console & High DPI Displays]]
줄 61: 줄 126:
   * [[https://github.com/kaueraal/run_scaled|GitHub - kaueraal/run_scaled: Run an X application scaled via xpra. Useful on hidpi screens.]]   * [[https://github.com/kaueraal/run_scaled|GitHub - kaueraal/run_scaled: Run an X application scaled via xpra. Useful on hidpi screens.]]
   * [[https://github.com/kaueraal/run_scaled|run_scaled]]   * [[https://github.com/kaueraal/run_scaled|run_scaled]]
 +
 +===== 참조 =====
 +  * [[https://www.youtube.com/watch?v=qv72pUWM08U|HiDPI 환경을 지원하지 못하는 Application의 스케일 변경하기 - YouTube]]
linux/hidpi.1604060172.txt.gz · 마지막으로 수정됨: 2020/10/30 21:16 저자 kwon37xi