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 AQ_NO_MODIFIERS to try to mitigate hardware limitations #77

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

ikalco
Copy link
Contributor

@ikalco ikalco commented Sep 4, 2024

will hopefully mitigate or fix #76

plz test @romanstingler @techyporcupine

@romanstingler
Copy link
Contributor

romanstingler commented Sep 5, 2024

I can confirm that this indeed fixes the issues
all monitors are displaying the set resolution

Monitor eDP-1 (ID 0):
	2560x1440@60.00000 at 3840x0
	description: California Institute of Technology 0x1500
	make: California Institute of Technology
	model: 0x1500
	serial: 
	active workspace: 1 (1)
	special workspace: 0 ()
	reserved: 0 35 0 0
	scale: 1.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: 0
	activelyTearing: false
	disabled: false
	currentFormat: A XRGB8888 H XRGB8888
	availableModes: 3840x2160@60.00Hz 

Monitor DP-3 (ID 1):
	4096x2160@59.94000 at 6400x0
	description: Hisense Electric Co. Ltd. HISENSE 0x676C626C
	make: Hisense Electric Co., Ltd.
	model: HISENSE
	serial: 0x676C626C
	active workspace: 2 (2)
	special workspace: 0 ()
	reserved: 0 35 0 0
	scale: 1.00
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: 0
	activelyTearing: false
	disabled: false
	currentFormat: A XRGB8888 H XRGB8888
	availableModes: 3840x2160@60.00Hz 4096x2160@60.00Hz 4096x2160@59.94Hz 4096x2160@50.00Hz 4096x2160@30.00Hz 4096x2160@29.97Hz 4096x2160@25.00Hz 4096x2160@24.00Hz 4096x2160@23.98Hz 3840x2160@60.00Hz 3840x2160@60.00Hz 3840x2160@59.94Hz 3840x2160@59.94Hz 3840x2160@50.00Hz 3840x2160@50.00Hz 3840x2160@30.00Hz 3840x2160@29.97Hz 3840x2160@25.00Hz 3840x2160@24.00Hz 3840x2160@23.98Hz 2560x1440@59.95Hz 1920x1080@120.00Hz 1920x1080@119.88Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@30.00Hz 1920x1080@29.97Hz 1920x1080@25.00Hz 1920x1080@24.00Hz 1920x1080@23.98Hz 1280x1024@60.02Hz 1280x960@60.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1024x768@60.00Hz 800x600@60.32Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@60.00Hz 720x480@59.94Hz 720x480@59.94Hz 640x480@60.00Hz 640x480@59.94Hz 

Monitor DP-1 (ID 2):
	3840x2160@60.00000 at 0x0
	description: Samsung Electric Company U32R59x 0x43573242
	make: Samsung Electric Company
	model: U32R59x
	serial: 0x43573242
	active workspace: 3 (3)
	special workspace: 0 ()
	reserved: 0 35 0 0
	scale: 1.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: 0
	activelyTearing: false
	disabled: false
	currentFormat: A XRGB8888 H XRGB8888
	availableModes: 3840x2160@60.00Hz 3840x2160@60.00Hz 3840x2160@59.94Hz 3840x2160@50.00Hz 3840x2160@30.00Hz 3840x2160@30.00Hz 3840x2160@29.97Hz 3840x2160@25.00Hz 3840x2160@24.00Hz 3840x2160@23.98Hz 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@50.00Hz 1920x1080@30.00Hz 1920x1080@29.97Hz 1680x1050@59.95Hz 1600x900@60.00Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.89Hz 1280x800@59.81Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1024x768@75.03Hz 1024x768@70.07Hz 1024x768@60.00Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@72.19Hz 800x600@60.32Hz 800x600@56.25Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@60.00Hz 720x480@59.94Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@72.81Hz 640x480@66.67Hz 640x480@60.00Hz 640x480@59.94Hz 720x400@70.08Hz 

thank you very much

@techyporcupine
Copy link

I'll try this out later today when I have my dock again!

@techyporcupine
Copy link

techyporcupine commented Sep 5, 2024

How am I supposed to add the new branch into my flake? I know how to do this normally, but AQ is part of the hyprland flake so I'm not sure how to add it to test...
Nevermind, I figured it out

@techyporcupine
Copy link

Sorry, I'm unable to figure out how to specify env stuff on NixOS for building it, but if @romanstingler says it's working, I would guess it would work for me.

@fufexan
Copy link
Member

fufexan commented Sep 5, 2024

@techyporcupine you can test with AQ_NO_MODIFIERS=1 hyprland in a tty.

@techyporcupine
Copy link

Hmm no luck.
Is this right in my flake?

    hyprland = {
      url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
      inputs.aquamarine.url = "github:ikalco/aquamarine/add_aq_no_modifiers";
    };

I didn't notice it compiling aquamarine on a rebuild, is that a problem?

@ikalco
Copy link
Contributor Author

ikalco commented Sep 5, 2024

you can verify if the fix is on by searching for AQ_NO_MODIFIERS in the logs, if it shows up its on

@ikalco ikalco force-pushed the add_aq_no_modifiers branch from 8635d81 to da8c6e8 Compare September 5, 2024 22:02
@techyporcupine
Copy link

Hmm, it's not showing up. Probably just keep going with the PR since one person reported it to fix it?

@vaxerski vaxerski merged commit a8eb8ae into hyprwm:main Sep 6, 2024
1 check passed
@techyporcupine
Copy link

Will this just automatically work now or do I need to pass any flags?

@romanstingler
Copy link
Contributor

Will this just automatically work now or do I need to pass any flags?

for now just add
env = AQ_NO_MODIFIERS,1
to your hyprland.conf

no clue if in the future they will add the code like wlroots or if they will get the modifiers from something like
DRM_IOCTL_MODE_GETPLANE2 and set that on a per-plane basis.
https://lists.freedesktop.org/archives/intel-gfx/2017-January/116698.html

@romanstingler
Copy link
Contributor

Vax I have a question, would you oppose a more detailed explanation of the env variables in the docs?

something like

AQ_NO_MODIFIERS: Disables DRM modifiers for buffers. 
This can also resolve issues where a monitor fails to turn on or is not detected properly.
DRM modifiers define how pixel data is stored in memory (e.g., in optimized formats). 
Setting AQ_NO_MODIFIERS to 1 ensures simpler buffer handling, 
which might be necessary on hardware that doesn’t support advanced memory layouts, 
especially for high resolutions like 4K.
AQ_DRM_DEVICES: This option allows you to set a specific list of DRM devices (GPUs) for the system to use. 
The list is separated by colons (:), and the first device listed will be the primary GPU. 
For example: /dev/dri/card1:/dev/dri/card0. 
This means the system will primarily use card1 and then fall back to card0 if needed.

AQ_NO_ATOMIC: Disables atomic mode setting for the DRM. 
Atomic mode setting is a feature that makes screen updates more reliable by grouping changes together. 
Setting AQ_NO_ATOMIC to 1 can be useful on hardware or drivers that don’t fully support atomic mode setting, 
as it can prevent crashes or freezes caused by incomplete or incorrect atomic updates.

AQ_MGPU_NO_EXPLICIT: Disables explicit synchronization between buffers when using multiple GPUs (multi-GPU setups).
Without explicit syncing, the system handles buffer transfers between GPUs more automatically, 
which can improve performance in some cases but might introduce errors in more complex setups.

@vaxerski
Copy link
Member

vaxerski commented Sep 6, 2024

fine by me

@ikalco ikalco deleted the add_aq_no_modifiers branch September 6, 2024 17:32
@techyporcupine
Copy link

Can confirm this fix works for me!

@techyporcupine
Copy link

This actually only seems to make to work in about 50% of my Hyprland sessions... any ideas?

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

Successfully merging this pull request may close these issues.

Blank screen with usb/thunderbolt dock or usb-c -> hdmi or igpu
5 participants