nwg-piotr / nwg-displays

Output management utility for sway and Hyprland.
MIT License
334 stars 22 forks source link

traceback- crash on hyprland - nwg-displays-0.3.4 #21

Closed mac-a-r0ni closed 1 year ago

mac-a-r0ni commented 1 year ago

Running on Hyprland LVDS-1 {'description': 'Apple Computer Inc Color LCD', 'active': True, 'focused': False, 'modes': [{'width': 1280, 'height': 800, 'refresh': 60223.0}], 'scale_filter': None, 'dpms': None, 'mirror': '', 'monitor': <gi.GdkWaylandMonitor object at 0x7fd61436a440 (GdkWaylandMonitor at 0x230d970)>, 'physical-width': 1280, 'physical-height': 800, 'refresh': 60.223, 'x': 0, 'y': 0, 'transform': 'normal', 'scale': 1.0, 'logical-width': 1280.0, 'logical-height': 800.0} Traceback (most recent call last): File "/usr/bin/nwg-displays", line 33, in sys.exit(load_entry_point('nwg-displays==0.3.4', 'gui_scripts', 'nwg-displays')()) File "/usr/lib64/python3.9/site-packages/nwg_displays/main.py", line 1002, in main create_display_buttons() File "/usr/lib64/python3.9/site-packages/nwg_displays/main.py", line 542, in create_display_buttons item["active"], item["dpms"], item["adaptive_sync_status"], custom_mode, item["focused"], KeyError: 'adaptive_sync_status'

Executing nwg-displays 0.3.4 on Hyprland results in this for me. nwg-displays operates normally on sway.

nwg-piotr commented 1 year ago

May I see the output of wlr-randr on Slackware?

mac-a-r0ni commented 1 year ago

LVDS-1 "Apple Computer Inc Color LCD (LVDS-1)" Physical size: 290x180 mm Enabled: yes Modes: 1280x800 px, 60.223000 Hz (preferred, current) Position: 0,0 Transform: normal Scale: 1.000000

TBF it could just be an environment issue. I haven't really got hyprland 100% yet, it works, but some things don't (xwayland comes to mind) so this could be simply a mis-configuration issue.

nwg-piotr commented 1 year ago

Interesting. The Adaptive Sync: <status> line is missing from the very end. At least my version (0.3.0) prints it. Well, actually we make no use of this value, as Hyprland has no way to switch Adaptive Sync on/off. I'll substitute it with some dummy value tonight, and release v0.3.5.

[edit] Or I'll grab this value from hyprctl -j monitors. It does not return a half of what I need, but it returns this certain one.

nwg-piotr commented 1 year ago

@mac-a-r0ni Please close if v0.3.5 does not crash for you.

mac-a-r0ni commented 1 year ago

It'll be some hours before I can test it, but I will!

mac-a-r0ni commented 1 year ago

v0.3.5 is operating as expected on Hyprland now. Thank you!

nwg-piotr commented 1 year ago

Thank you for reporting.