Closed iqbal1975 closed 3 months ago
All the display detection part has already been re-written on the no-wlr-randr branch. However, the change also resolves #35, and relies on this commit on the Hyprland side. This means I cannot release until Hyprland > 0.36 is available. I know that v0.37.1 has been released yesterday, but on Arch we're still on v0.35.
Update: New Error now on Arch with Hyprland v0.37.1 : KeyError: 'monitor'
nwg-displays
Settings: {'view-scale': 0.15, 'snap-threshold': 10, 'indicator-timeout': 500, 'custom-mode': [], 'use-desc': False}
Running on Hyprland
eDP-1 {'active': True, 'mirror': '', 'scale_filter': None, 'modes': [{'width': 1920, 'height': 1080, 'refresh': 60000.0}, {'width': 1920, 'height': 1080, 'refresh': 50000.0}], 'focused': True, 'adaptive_sync_status': 'disabled', 'description': 'Lenovo Group Limited 0x40B2', 'x': 0, 'y': 0, 'refresh': 60.0, 'logical-width': 1920, 'logical-height': 1080, 'physical-width': 1920.0, 'physical-height': 1080.0, 'transform': 'normal', 'scale': 1.0, 'dpms': True, 'ten_bit': False, 'model': '0x40B2', 'monitor': <__gi__.GdkWaylandMonitor object at 0x734d70502000 (GdkWaylandMonitor at 0x6076d1b3b070)>}
DP-2 {'active': False, 'modes': [{'width': 1920, 'height': 1080, 'refresh': 60000.0}, {'width': 1920, 'height': 1080, 'refresh': 59940.0}, {'width': 1920, 'height': 1080, 'refresh': 50000.0}, {'width': 1920, 'height': 1080, 'refresh': 29970.0}, {'width': 1920, 'height': 1080, 'refresh': 23980.0}, {'width': 1680, 'height': 1050, 'refresh': 59950.0}, {'width': 1600, 'height': 900, 'refresh': 60000.0}, {'width': 1280, 'height': 1024, 'refresh': 60020.0}, {'width': 1152, 'height': 864, 'refresh': 75000.0}, {'width': 1280, 'height': 720, 'refresh': 60000.0}, {'width': 1280, 'height': 720, 'refresh': 59940.0}, {'width': 1280, 'height': 720, 'refresh': 50000.0}, {'width': 1280, 'height': 720, 'refresh': 29970.0}, {'width': 1280, 'height': 720, 'refresh': 23980.0}, {'width': 1024, 'height': 768, 'refresh': 60000.0}, {'width': 800, 'height': 600, 'refresh': 60320.0}, {'width': 720, 'height': 576, 'refresh': 50000.0}, {'width': 720, 'height': 480, 'refresh': 59940.0}, {'width': 640, 'height': 480, 'refresh': 59940.0}, {'width': 640, 'height': 480, 'refresh': 59930.0}], 'mirror': '', 'scale_filter': None, 'focused': False, 'adaptive_sync_status': 'disabled', 'description': 'Sony SONY TV 0x01010101', 'x': 0, 'y': 0, 'refresh': 60.0, 'logical-width': 1920, 'logical-height': 1080, 'physical-width': 1920.0, 'physical-height': 1080.0, 'transform': 'normal', 'scale': 1.0, 'dpms': True, 'ten_bit': False, 'model': 'SONY TV'}
Traceback (most recent call last):
File "/usr/bin/nwg-displays", line 33, in <module>
sys.exit(load_entry_point('nwg-displays==0.3.15', 'gui_scripts', 'nwg-displays')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/nwg_displays/main.py", line 1252, in main
create_display_buttons()
File "/usr/lib/python3.11/site-packages/nwg_displays/main.py", line 577, in create_display_buttons
item["focused"], item["monitor"], mirror=item["mirror"])
~~~~^^^^^^^^^^^
KeyError: 'monitor'
OK, I managed to reproduce the crash and find a quick fix while at the office. Will take a closer look at it tonight, at home.
The commit above should prevent the program from crashing when Gdk.Monitor assignment fails. It won't resolve other problems we're still experiencing on Hyprland, however. E.g.: mirroring monitors are not listed as active. When you re-launch nwg-displays, they will show up as disabled with x and y values = 0. I don't think we can do much about it.
Thanks for the quick turnaround @nwg-piotr 👍🏼 Now keeping fingers crossed that I can get mirroring to work on Hyprland ! 🤔 😅
OS: Arch WM: Hyprland v0.35
Monitor config in Hyprland:
hyprctl monitors all
wlr-randr
Trying to manually enable DP-2 causes Hyprland to crash and takes me back to SDDM login screen
wlr-randr --dry-run --output DP-2 --on OR wlr-randr --output DP-2 --on
Finally, nwg-displays
System information (inxi -Faz) is attached. system_info.txt Let me know what other information you need. Thank you.