Score:1

i3 and highdpi / HD dual screens: how to scale properly?

ธง pk

I have two monitors:

DP-1: 1920x1080 (hd, secondary)

eDP-1: 3840x2160 (4k, main)

My problem:

I want to set my 4k monitor to 200% scaling @ 3840x2160, and my HD monitor to 100% scaling @ 1920x1080

What I have attempted:

Running i3, it appears, visually the default setting is to keep everything at 4k @ 1x1 scaling. (When I check arandr it appears the HD monitor is set to 1080 but visually this does not appear to be the case).

In the gnome desktop environment, I must do a bit of trickery to get my two monitors to display properly. I run: xrandr --output eDP-1 --scale 0.999x0.999 --pos 3840x0 ; xrandr --output DP-1 --scale 1.999x1.999 --mode 1920x1080 --fb 7680x2160 --pos 0x0

In Gnome, that works like a charm, but when I run this in i3, it appears to set everything to 3840x2160 @ 100% scaling (very very small). I also get the error:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  7 (RRSetScreenSize)
  Serial number of failed request:  33
  Current serial number in output stream:  34

What I've done:

✔️ I can make the HD monitor work as follows: xrandr --output DP-1 --scale 1x1 --mode 1920x1080

Now when I adjust my main 4k monitor, it has the following curious behaviour:

✔️ xrandr --output eDP-1 --mode 3840x2160 adjusts it to the right resolution

❌ xrandr --output eDP-1 --scale 2x2 makes it REALLY small

✔️ xrandr --output eDP-1 --scale 0.5x0.5 makes things the right size, but blurry

❌ xrandr --output --dpi <attempted with value 96, 192> doesn't work and fails with:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  7 (RRSetScreenSize)
  Serial number of failed request:  33
  Current serial number in output stream:  35

So I am able to have both monitors at the correct resolutions, but I am unable to have crisp 200% scaling in my 4K monitor. For some reason where I had to do 2x2 scaling in Gnome to make things bigger, I must do 0.5x0.5 scaling in i3 to make things bigger, and this makes it blurry. Edit: oh yeah and although the UI elements are proportional, the mouse is REALLY big

Score:0
ธง pk

ตลอดหลายศตวรรษที่ผ่านมาฉันได้ค้นพบสิ่งนี้แล้ว วิธีแก้ไขคือไม่ใช้มาตราส่วน 0.5x0.5 แต่ให้ปรับ DPI ฉันไม่คิดว่าการปรับ DPI ทำงานเพราะคุณต้องรีเฟรช i3 เพื่อดู (Mod+shift+r)

ฉันเพิ่มสิ่งต่อไปนี้ใน ~/.Xresources:

Xft.dpi: 192

ฉันจึงรันคำสั่งต่อไปนี้:

xrdb - ผสาน .Xresources

ผู้บริหาร i3

จากนั้นฉันก็เรียกใช้สคริปต์ต่อไปนี้ ยืมมาจาก [บทความนี้][1]:

#!/bin/bash
xrandr --dpi 192 --fb 7680x4320 \
    --output eDP-1 --โหมด 3840x2160 \
    --เอาท์พุท DP-1 --สเกล 2x2 --pos 3840x0 --แพน 3840x2160+3840+0

หลังจากนั้นดูเหมือนว่าการปรับขนาดจะได้ผล! [1]: https://blog.summercat.com/configuring-mixed-dpi-monitors-with-xrandr.html

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา