Puncte:1

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

drapel 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

Puncte:0
drapel pk

De-a lungul secolelor mi-am dat seama de asta. Soluția nu este aplicarea unei scale de 0,5x0,5, ci ajustarea DPI-ului. Nu credeam că ajustările DPI funcționează pentru că trebuie să reîmprospătați i3 pentru a le vedea (Mod+shift+r)

Am adăugat următoarele la ~/.Xresources:

Xft.dpi: 192

Am rulat apoi următoarele comenzi:

xrdb -merge .Xresources

exec i3

Apoi am rulat următorul script, împrumutat din [acest articol][1]:

#!/bin/bash
xrandr --dpi 192 --fb 7680x4320 \
    --output eDP-1 --mode 3840x2160 \
    --output DP-1 --scale 2x2 --pos 3840x0 --panning 3840x2160+3840+0

După aceea, scalarea pare să funcționeze! [1]: https://blog.summercat.com/configuring-mixed-dpi-monitors-with-xrandr.html

Postează un răspuns

Majoritatea oamenilor nu înțeleg că a pune multe întrebări deblochează învățarea și îmbunătățește legătura interpersonală. În studiile lui Alison, de exemplu, deși oamenii își puteau aminti cu exactitate câte întrebări au fost puse în conversațiile lor, ei nu au intuit legătura dintre întrebări și apreciere. În patru studii, în care participanții au fost implicați în conversații ei înșiși sau au citit transcrieri ale conversațiilor altora, oamenii au avut tendința să nu realizeze că întrebarea ar influența – sau ar fi influențat – nivelul de prietenie dintre conversatori.