You are not logged in.

#1 2023-12-10 20:31:39

sidiasus
Member
Registered: 2010-10-21
Posts: 4

Hyperland Resolution Issues

I have a unique problem that I can't seem to find an answer for after a few hours of googling. Any advice is appreciated.

In order to conserve battery life and keep temps down on my laptop, I'd like to switch from my default resolution (4k) to 1080p. When I set my resolution using the hyprland config both hyprland and kitty render and launch just fine, but other wayland apps refuse to start; such as firefox, waybar, bemenu, etc.

Also, XWayland apps start just fine, but don't seem to receive/react to mouse input.

Once I edit the configuration file to use the preferred resolution, everything works just fine.

Here's the output of wlr-randr:

eDP-1 "Samsung Display Corp. 0x4142 (eDP-1)"
  Make: Samsung Display Corp.
  Model: 0x4142
  Serial: (null)
  Physical size: 290x170 mm
  Enabled: yes
  Modes:
    3840x2160 px, 60.000999 Hz (preferred, current)
  Position: 0,0
  Transform: normal
  Scale: 2.000000
  Adaptive Sync: disabled

I think it's related to the fact that there's only one mode available, but I don't know where to change this. I can change the resolution just fine in plasma-wayland, oddly enough.


Thoughts and ideas are welcome! Thanks!

Offline

#2 2023-12-11 23:30:11

sidiasus
Member
Registered: 2010-10-21
Posts: 4

Re: Hyperland Resolution Issues

Fixed!

The solution was to use the custom modeline feature in hyprland. However, modelines are kind of esoteric with a whole bunch of numbers that I didn't understand until I googled further about modeline formats.

Here's the solution: Use gtf to generate a modeline with all the relevant bits, then you have to tweak those numbers in your hyprland config.

I used <gtf 1980 1020 60> and got:

$ gtf 1920 1080 60
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync

I then copied the second line, and uncapitalized the word Modeline as well as removed the text in parenthesis. I then added commas and spacing to match the example from hyprland's wiki. The final line looks like this:

monitor=eDP-1, modeline 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -hsync +vsync, auto, 1

After that, everything worked!

Offline

Board footer

Powered by FluxBB