djpohly / dwl

dwm for Wayland - ARCHIVE: development has moved to Codeberg
https://codeberg.org/dwl/dwl
Other
1.93k stars 284 forks source link

Doesn't get the right resolution #512

Closed qaqland closed 9 months ago

qaqland commented 9 months ago

Info

dwl version: 0.4 wlroots version: 0.16

Description

my screen is 1920x1280 but dwl only think it is 1920x1080

here is wlr-randr outputs:

HDMI-A-1 "DO NOT USE - RTK FHD demoset-1 (HDMI-A-1)"
  Make: DO NOT USE - RTK
  Model: FHD
  Serial: demoset-1
  Physical size: 300x190 mm
  Enabled: yes
  Modes:
    1920x1080 px, 60.000000 Hz (preferred, current)
    1920x1080 px, 60.000000 Hz
    1920x1080 px, 60.000000 Hz
    1920x1080 px, 59.939999 Hz
    1600x900 px, 60.000000 Hz
    1280x800 px, 59.910000 Hz
    1280x720 px, 60.000000 Hz
    1280x720 px, 59.939999 Hz
    1024x768 px, 60.004002 Hz
    800x600 px, 60.317001 Hz
    720x480 px, 60.000000 Hz
    720x480 px, 60.000000 Hz
    720x480 px, 59.939999 Hz
    720x480 px, 59.939999 Hz
    640x480 px, 60.000000 Hz
    640x480 px, 59.939999 Hz
    640x480 px, 59.939999 Hz
  Position: 0,0
  Transform: normal
  Scale: 2.000000
  Adaptive Sync: disabled
sevz17 commented 9 months ago

Your monitor does not seems to support that resolution... very strange, can you try on sway if it gets the right resolution?

Also, on IRC you mentioned wlr-randr --custom-mode doesn't work can you attach the stderr of dwl -d (in that session try to set the custom mode)

EDIT: just in case, run dwl directly from the tty

qaqland commented 9 months ago

sway cannot get the right also..

idk how to get the stderr of dwl

sevz17 commented 9 months ago

So... here are two problems:

To get the stderr of a program you need to redirect it to a file which is done with 2> path/to/file, e.g dwl 2> dwl.log, this will create a file named dwl.log in your current directory, attach that file 1> or almost always used as > is to redirect the stdout

EDIT: please use the latest commit to get the logs, -d was added recently

qaqland commented 9 months ago

Thank you for your help.

I tried ways and find that add my resolution to grub's GFXMODE and this time wlr-randr custom-mode works well.

I also successfully get stderr from dwl -d, but this time it looks good, so I don't paste it here.

sevz17 commented 9 months ago

Ah, then your driver/monitor did not expose all the modes.