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

Add bitdepth functionality #35

Closed
gekoke opened this issue Oct 26, 2023 · 19 comments · Fixed by #55
Closed

Add bitdepth functionality #35

gekoke opened this issue Oct 26, 2023 · 19 comments · Fixed by #55
Labels
enhancement New feature or request

Comments

@gekoke
Copy link

gekoke commented Oct 26, 2023

I'd like to specify the bitdepth for outputs using this program. Both sway and Hyprland have support for this in their configs.

@nwg-piotr nwg-piotr added the enhancement New feature or request label Oct 26, 2023
@nwg-piotr
Copy link
Owner

I'll take a look at this soon.

@nergdron
Copy link

I'd love this as well, my main display supports 10bit output, and right now I have to manually edit monitors.conf to re-enable it after using nwg-displays.

@nwg-piotr
Copy link
Owner

We'll think about it next year. ;)

@nwg-piotr
Copy link
Owner

It seems we'll need some own data file, which is what I wanted to avoid. Or maybe you guys know how to check if 10-bit depth is turned on per display/monitor? Neither swaymsg -t get_outputs nor hyprctl monitors seems to return this info.

@nergdron
Copy link

nergdron commented Mar 5, 2024

since I use hyprland, I've filed an upstream bug for them to provide this, since I think that's probably the best solution. if someone who uses sway could do something similar, that'd be rad:

hyprwm/Hyprland#4971

@nwg-piotr
Copy link
Owner

nwg-piotr commented Mar 5, 2024

Thank you, @nergdron.

@gekoke
Copy link
Author

gekoke commented Mar 5, 2024

I agree - there is no rush to make things more complicated when this can be remedied in the upstreams. These seem like sensible features to have in the clients, anyway.

@nwg-piotr
Copy link
Owner

As it has been already done in Hyprland, I'll add a form field soon. I only need to get us rid of wlr-randr, as vaxerski made it possible in the same commit. Either way, both changes won't work on Hyprland <= 0.36.0.

nwg-piotr added a commit that referenced this issue Mar 7, 2024
@nwg-piotr
Copy link
Owner

Available for testing on a branch with the misleading name no-wlr-randr. Could you take a look? Of course it requires the latest development version of Hyprland.

@nergdron
Copy link

nergdron commented Mar 7, 2024

@nwg-piotr will the hyprland-git package in arch get me on that dev branch, or will I have to build from source manually?

@nwg-piotr
Copy link
Owner

hyprland-git is what you need. :)

@nergdron
Copy link

nergdron commented Mar 7, 2024

perfect. i'll try to get to that soon, i'm in the middle of week 3 of covid, so i'm not exactly running at full processing power.

@nwg-piotr
Copy link
Owner

nwg-piotr commented Mar 7, 2024

No hurry. We won't release this before hyprland > 0.36.0, while Arch is still on 0.35.0. Take care and get well soon.

@gekoke
Copy link
Author

gekoke commented Mar 20, 2024

Awesome - thanks for your work!

@nergdron
Copy link

this new build doesn't run for me, crashes with the following. are we waiting on some dev release tools that aren't available in AUR yet?

Settings: {'view-scale': 0.25, 'snap-threshold': 10, 'indicator-timeout': 500, 'custom-mode': [], 'use-desc': False}
Running on Hyprland
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 569, in create_display_buttons
    outputs = list_outputs()
              ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nwg_displays/tools.py", line 146, in list_outputs
    for item in m["availableModes"]:
                ~^^^^^^^^^^^^^^^^^^
KeyError: 'availableModes'

@nwg-piotr
Copy link
Owner

nwg-piotr commented Mar 20, 2024

@nergdron Are you on Hyprland 0.37.1? The hyprctl monitors command does not return available modes in Hyprland <= 0.36.

Could you show me your hyprctl monitors output?

@nergdron
Copy link

nergdron commented Mar 20, 2024

aha! I had it installed, but hadn't logged out in a while. now that I'm logged in with the latest hyprland and versions of your packages, I get the following:

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'

my current monitors.conf looks like this:

monitor=DP-2,highrr,0x0,1.25,bitdepth,10,vrr,1
monitor=DP-3,disabled
monitor=HDMI-A-1,preferred,0x0,1.0,mirror,DP-2

if it's the highrr messing things up, I had to add that since I just got a 240Hz monitor, and the normal preferred setting was defaulting to 60Hz for some strange reason.

in any case, if you can identify what it's breaking on, I'm happy to open a new ticket about it. no rush.

@nwg-piotr
Copy link
Owner

The disabled one is what crashes the program. I'll fix it tonight.

@nwg-piotr
Copy link
Owner

The crash on the 'monitor' key has been reported in #54. Let's continue up there.

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

Successfully merging a pull request may close this issue.

3 participants