You are not logged in.

#1 2023-05-18 18:07:25

xyhlon
Member
Registered: 2021-11-29
Posts: 24

xrandr configuration on sway/wayland

Hi, I am wondering why Gnome has more options in xrandr in wayland than sway.
All of my application running in Xwayland on sway look grainy because they are rendered at none native resolution with a way lower DPI than my display has.
However, on Gnome it recognizes my display correctly and renders it at native resolution, however not using the correct DPI.
I tried to add a custom resolution, it shows up in Gnome but not in sway. I believe that I applied the correct setting in my X configurations, because in awesomewm I can see the added resolution.

sway:

$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1620x1080 pixels (428x285 millimeters)
  resolution:    96x96 dots per inch

gnome:

$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    3240x2160 pixels (857x571 millimeters)
  resolution:    96x96 dots per inch
$ xrandr
Screen 0: minimum 16 x 16, current 3240 x 2160, maximum 32767 x 32767
eDP-1 connected primary 3240x2160+0+0 (normal left inverted right x axis y axis) 320mm x 210mm
   3240x2160     59.98*+
   2048x1536     59.95
   1920x1440     59.90
   1600x1200     59.87
   1440x1080     59.99
   1400x1050     59.98
   1280x1024     59.89
   1280x960      59.94
   1152x864      59.96
   1024x768      59.92
   800x600       59.86
   640x480       59.38
   320x240       59.52
   2560x1600     59.94
   1920x1200     59.88
   1680x1050     59.95
   1440x900      59.89
   1280x800      59.81
   1152x720      59.75
   960x600       59.63
   928x580       59.88
   800x500       59.50
   768x480       59.90
   720x480       59.71
   640x400       59.95
   320x200       58.96
   3200x1800     59.96
   2880x1620     59.96
   2560x1440     59.96
   2048x1152     59.90
   1920x1080     59.96
   1600x900      59.95
   1368x768      59.88
   1280x720      59.86
   1024x576      59.90
   864x486       59.92
   720x400       59.55
   640x350       59.77

X configuration

$ cat .Xresources
Xft.dpi: 260
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
janus.fractionalDpi: 1.63
$ cat /etc/X11/xorg.conf.d/90-monitor.conf
Section "Monitor"
    Identifier             "<default monitor>"
    Modeline "3240x2160_60.00"  600.00  3240 3504 3856 4472  2160 2163 2173 2237 -hsync +vsync
    DisplaySize            315 210    # In millimeters
EndSection

Funny thing is if I connect an external display it resolutions are correctly identified by sway.

external Display sway:

DP-2 connected 2560x1440+1620+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440     59.91*+
   1920x1440     59.90
   1600x1200     59.87
   1440x1080     59.87
   1400x1050     59.86
   1280x1024     59.89
   1280x960      59.94
   1152x864      59.78
   1024x768      59.68
   800x600       59.86
   640x480       59.38
   320x240       59.52
   1920x1200     59.88
   1680x1050     59.85
   1440x900      59.89
   1280x800      59.81
   1152x720      59.75
   960x600       59.63
   928x580       59.88
   800x500       59.50
   768x480       59.38
   720x480       59.71
   640x400       59.20
   320x200       58.96
   2048x1152     59.90
   1920x1080     59.88
   1600x900      59.82
   1368x768      59.88
   1280x720      59.86
   1024x576      59.90
   864x486       59.45
   720x400       59.55
   640x350       59.77

Is there a setting in X or sway I was not able to find?
Does sway have a custom Xwayland configuration somewhere?
Why does Xwayland believe I have such a big display on Gnome?

Update:
I also tested Hyperland it seems like this is a wlroots problem

Last edited by xyhlon (2023-05-19 13:34:37)

Offline

#2 2023-06-07 20:50:51

xyhlon
Member
Registered: 2021-11-29
Posts: 24

Re: xrandr configuration on sway/wayland

I opened an issue with freedesktop wlroots. Here

Offline

Board footer

Powered by FluxBB