Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash during launch with VR headset: KeyError: 'physical-width' #47

Closed
tristanbeedell opened this issue Feb 11, 2024 · 3 comments
Closed

Comments

@tristanbeedell
Copy link

Traceback (most recent call last):
  File "/nix/store/8xyhz1bqxnss3ax655zvcgmliq509400-nwg-displays-0.1.4/bin/.nwg-displays-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/8xyhz1bqxnss3ax655zvcgmliq509400-nwg-displays-0.1.4/lib/python3.11/site-packages/nwg_displays/main.py", line 1229, in main
    create_display_buttons()
  File "/nix/store/8xyhz1bqxnss3ax655zvcgmliq509400-nwg-displays-0.1.4/lib/python3.11/site-packages/nwg_displays/main.py", line 552, in create_display_buttons
    b = DisplayButton(key, item["description"], item["x"], item["y"], round(item["physical-width"]),
                                                                            ~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'physical-width'

I am running NixOS, Hyprland latest (v0.35.0) (from git / nix flake) and tested with the latest version of nwg-displays from this git repo (using the nix flake).

I have determined that this issue is caused by my Valve Index VR Headset being connected:

DP-2 {'active': False, 'modes': [{'width': 2880, 'height': 1600, 'refresh': 90002.998}, {'width': 2880, 'height': 1600, 'refresh': 144000.0}, {'width': 2880, 'height': 1600, 'refresh': 120018.997}, {'width': 2880, 'height': 1600, 'refresh': 79999.001}, {'width': 1920, 'height': 1200, 'refresh': 90002.998}, {'width': 1920, 'height': 1080, 'refresh': 90002.998}, {'width': 1600, 'height': 1200, 'refresh': 90002.998}, {'width': 1680, 'height': 1050, 'refresh': 90002.998}, {'width': 1280, 'height': 1024, 'refresh': 90002.998}, {'width': 1440, 'height': 900, 'refresh': 90002.998}, {'width': 1280, 'height': 800, 'refresh': 90002.998}, {'width': 1280, 'height': 720, 'refresh': 90002.998}, {'width': 1024, 'height': 768, 'refresh': 90002.998}, {'width': 800, 'height': 600, 'refresh': 90002.998}, {'width': 640, 'height': 480, 'refresh': 90002.998}], 'scale_filter': None, 'dpms': True, 'mirror': '', 'monitor': None, 'focused': False, 'adaptive_sync_status': 'disabled', 'description': 'Valve Corporation Index HMD 0x63AF4FCC', 'x': 0, 'y': 0, 'logical-width': 0, 'logical-height': 0, 'transform': 'normal', 'scale': 1.0, 'model': 'Index HMD'}

interestingly, after disconnecting this device and reconnecting it, it contained slightly less info:

DP-2 {'active': False, 'focused': False, 'adaptive_sync_status': 'disabled', 'description': 'Valve Corporation Index HMD 0x63AF4FCC', 'x': -1, 'y': -1, 'logical-width': 0, 'logical-height': 0, 'transform': 'normal', 'scale': 1.0, 'dpms': True, 'model': 'Index HMD'}

This device will of course never be part of the desktop, so doesn't necessarily need to be recognised by nwg-displays at all, so ignoring this error and continuing would actually be a fine solution for me.

Upon disconnecting this device, the application launches and functions great 👍

@Ciflire
Copy link

Ciflire commented Mar 27, 2024

Same issue here but with secondary display.
I don't know where that comes from

@nwg-piotr
Copy link
Owner

Which version are you on? It shouldn't happen on 0.3.16.

@nwg-piotr
Copy link
Owner

Closing due to no further feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants