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

Multi-GPU - Multi-Output/Monitor - Crash Regression #123

Closed
tbiehn opened this issue Dec 23, 2024 · 15 comments · Fixed by #124
Closed

Multi-GPU - Multi-Output/Monitor - Crash Regression #123

tbiehn opened this issue Dec 23, 2024 · 15 comments · Fixed by #124

Comments

@tbiehn
Copy link

tbiehn commented Dec 23, 2024

Hyprland (5f7ad767dbf0bac9ddd6bf6c825fb9ed7921308a) crashes when external monitor is attached to a laptop with dual GPU reverse prime setup.

Issue bisected and looks like the issue is introduced with aquamarine builds on and after;
first bad commit: [9fc2d8e] drm: allow multigpu blit from explicit to implicit (#114)

This hyprland crash report might help:
hyprlandCrashReport24198.txt

@Emiya173
Copy link

I had the same problem. When I removed the 'bitdepth, 10' it continued to work again.

@vaxerski
Copy link
Member

@ikalco

@ikalco
Copy link
Contributor

ikalco commented Dec 28, 2024

can you give a trace hyprlandd.log (https://wiki.hyprland.org/Crashes-and-Bugs/#obtaining-a-trace-log)

edit:
btw, im pretty sure the crash is caused by swapchain->next in beginRender cause of out_of_range exception
so I wont need a debug stacktrace, but if you want to you can also give that

@tbiehn
Copy link
Author

tbiehn commented Dec 28, 2024

can you give a trace hyprlandd.log (https://wiki.hyprland.org/Crashes-and-Bugs/#obtaining-a-trace-log)

edit: btw, im pretty sure the crash is caused by swapchain->next in beginRender cause of out_of_range exception so I wont need a debug stacktrace, but if you want to you can also give that

Sure - here's the log from Aquamarine latest and Hyprland 2b01a5bcf62956a5d641a3367edcd35e103edfcd

hyprland.log

@ikalco
Copy link
Contributor

ikalco commented Dec 29, 2024

can you give the same log but with this patch applied?
patch.txt

also give the log with below patch applied, it might or might not fix it
patch.txt

@tbiehn
Copy link
Author

tbiehn commented Dec 30, 2024

can you give the same log but with this patch applied? patch.txt

also give the log with below patch applied, it might or might not fix it patch.txt

Thank you for the patches.

First one:
hyprland-patch-extralog.log
Crashed as expected.

Second one:
hyprland-patch-fixed.log
Resolved / no crash.

@ikalco
Copy link
Contributor

ikalco commented Dec 30, 2024

ok this patch should fix it correctly
patch.txt

@tbiehn
Copy link
Author

tbiehn commented Dec 30, 2024

@ikalco - from HEAD or from 'patch-fixed' ?

@ikalco
Copy link
Contributor

ikalco commented Dec 30, 2024

from upstream/main

@tbiehn
Copy link
Author

tbiehn commented Dec 30, 2024

@ikalco - this latest patch applied against upstream/main results in a crash.
Log:
hyprland-patch-3.log
crash report:
hyprlandCrashReport1039021.txt

'hyprland-patch-fixed.log' - This patch didn't crash.

@ikalco
Copy link
Contributor

ikalco commented Dec 30, 2024

'hyprland-patch-fixed.log' - This patch didn't crash.

I know, but patch-fixed just hides the underlying bug that I'm trying to fix

try this now
patch.txt

@tbiehn
Copy link
Author

tbiehn commented Dec 30, 2024

'hyprland-patch-fixed.log' - This patch didn't crash.

I know, but patch-fixed just hides the underlying bug that I'm trying to fix

try this now patch.txt

OK, no crash, but now with this strange interleaving;
tv-blurr

disabling bitdepth 10 from this monitor's descriptor corrects the image.

This particular SONY display should be capable of HDR signaling - HDR input was explicitly enabled on the HDMI port.

Reducing the resolution to 1920x1080 displays same interleaving pattern at lower resolution.

@ikalco
Copy link
Contributor

ikalco commented Dec 31, 2024

hah thats funny, try this patch and also give log if something goes wrong
patch.txt

@tbiehn
Copy link
Author

tbiehn commented Dec 31, 2024

Seems good?

[LOG] [CXDGOutputProtocol] updating all xdg_output heads
[LOG] Monitor eDP-1 data dump: res [email protected], scale 2.00, transform 0, pos 0x0, 10b 1
[LOG] [CXDGOutputProtocol] updating all xdg_output heads
[LOG] Applying monitor rule for HDMI-A-1
[LOG] Monitor HDMI-A-1: requested [email protected], using available mode [email protected]
[ERR] [AQ] GBM: Failed to allocate a GBM buffer: format XR30 isn't supported by primary backend
[ERR] [AQ] Couldn't allocate a gbm buffer with size [Vector2D: x: 3840, y: 2160] and format XR30
[ERR] [AQ] Swapchain: Failed acquiring a buffer
[ERR] output HDMI-A-1 failed basic test on format DRM_FORMAT_XRGB2101010
[LOG] [AQ] GBM: Buffer is marked as multigpu, forcing linear
[ERR] [AQ] GBM: Allocating with modifiers failed, falling back to modifier-less allocation
[ERR] [AQ] GBM: Failed to allocate a GBM buffer: bo null
[ERR] [AQ] Couldn't allocate a gbm buffer with size [Vector2D: x: 3840, y: 2160] and format XB30
[ERR] [AQ] Swapchain: Failed acquiring a buffer
[ERR] output HDMI-A-1 failed basic test on format DRM_FORMAT_XBGR2101010
[LOG] output HDMI-A-1 succeeded basic test on format DRM_FORMAT_XRGB8888
[LOG] [AQ] drm: Modesetting HDMI-A-1 with [email protected]
[LOG] arrangeMonitors: 2 to arrange
[LOG] arrangeMonitors: eDP-1 explicit [0, 0]
[LOG] arrangeMonitors: HDMI-A-1 auto [0, -1080]
[LOG] arrangeMonitors: eDP-1 xwayland [0, 0]
[LOG] arrangeMonitors: HDMI-A-1 xwayland [3840, 0]
[LOG] [CXDGOutputProtocol] updating all xdg_output heads
[LOG] Monitor HDMI-A-1 data dump: res [email protected], scale 2.00, transform 0, pos 0x-1080, 10b 0

It's unsetting 10b mode here for HDMI-1 after failing to negotiate the XBGR2101010 mode?

@ikalco
Copy link
Contributor

ikalco commented Jan 1, 2025

It's unsetting 10b mode here for HDMI-1 after failing to negotiate the XBGR2101010 mode?

yes, I believe this is correct
since nvida gpu can output XB30 for 10 bit but intel gpu cant render to XB30
and the same happens before offending commit

btw you might be able to get HDMI-A-1 to output 10 bit by setting your nvidia card as primary (https://wiki.hyprland.org/Configuring/Multi-GPU/#telling-hyprland-which-gpu-to-use)

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 a pull request may close this issue.

4 participants