Closed PancakeTAS closed 2 months ago
Interestingly, on nvidia, both Hyprland and gamescope become darker when using the 10-bit format. Hyprland shows banding, but gamescope is smooth.
I found a hack to aquamarine that makes 10-bit appear to work, maybe it will help pin down the issue:
diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp
index 899bbec..450ac43 100644
--- a/src/backend/drm/DRM.cpp
+++ b/src/backend/drm/DRM.cpp
@@ -1543,18 +1543,6 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) {
// sometimes, our consumer could f up the swapchain format and change it without the state changing
bool formatMismatch = false;
- if (data.mainFB) {
- if (const auto params = data.mainFB->buffer->dmabuf(); params.success && params.format != STATE.drmFormat) {
- // formats mismatch. Update the state format and roll with it
- backend->backend->log(AQ_LOG_WARNING,
- std::format("drm: Formats mismatch in commit, buffer is {} but output is set to {}. Modesetting to {}", fourccToName(params.format),
- fourccToName(STATE.drmFormat), fourccToName(params.format)));
- state->setFormat(params.format);
- formatMismatch = true;
- // TODO: reject if tearing? We will miss a frame event!
- flags &= ~DRM_MODE_PAGE_FLIP_ASYNC; // we cannot modeset with async pf
- }
- }
if (connector->crtc->pendingCursor)
data.cursorFB = connector->crtc->pendingCursor;
My guess is that the buffer format is not being detected properly. Whatever it is, the formats that hyprctl monitors
shows just isn't what's actually being used.
And a side note about the triangle program: the vertex shader sets the color to vec3(0.5, 0.0, 0.0)
which should be half red, so the darker way it shows up when a 10-bit format is used is actually the correct way. Not sure why it's full red in 8-bit, but it's not really important.
I can definitely confirm this works on ffplay -enable_vulkan
(i finally have two identical monitors and can see gradients vs no gradients on the same window when moving it to another monitor).
Even my silly test application shows clear 10-bit
huh, can you post a trace log (without removing those lines)?
With HYPRLAND_TRACE=1 AQ_TRACE=1
variables.
hyprland.log
daafq
can you try latest aquamarine-git
After pulling latest hyprland/aq, it appears to work for me now. I think it even fixed the TTY-switch crash I was having.
closing then :)
Can also confirm works smoothly, thank you for all for the help as well
Regression?
Yes
System Info and Version
System/Version info
```sh Hyprland, built from branch main at commit 912e7ba82defdb10efc892a5db578598c972fe4a (render: fixup format mismatch after leaving DS). Date: Sat Aug 17 19:27:20 2024 Tag: v0.42.0-31-g912e7ba8, commits: 5100 flags: (if any) System Information: System name: Linux Node name: cute Release: 6.10.5-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 15 Aug 2024 00:25:30 +0000 GPU information: 0a:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3080 Lite Hash Rate] [10de:2216] (rev a1) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 555.58.02 Tue Jun 25 01:39:15 UTC 2024 os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ======Config-Start====== Config File: /home/pancake/.config/hypr/hyprland.conf: Read Succeeded # === Main Configuration === general { layout = dwindle allow_tearing = true } opengl { nvidia_anti_flicker = true } render { explicit_sync = 1 explicit_sync_kms = 0 direct_scanout = 1 } dwindle { pseudotile = yes preserve_split = yes force_split = 2 permanent_direction_override = yes } misc { disable_hyprland_logo = yes disable_splash_rendering = yes force_default_wallpaper = 0 mouse_move_enables_dpms = no key_press_enables_dpms = true animate_manual_resizes = true } cursor { no_hardware_cursors = true default_monitor = DP-2 no_warps = true enable_hyprcursor = false } xwayland { force_zero_scaling = true } debug { disable_logs = false } # env vars env = XCURSOR_SIZE,24 env = XCURSOR_THEME,Bibata-Modern-Classic env = QT_QPA_PLATFORMTHEME,qt6ct env = LIBVA_DRIVER_NAME,nvidia env = XDG_SESSION_TYPE,wayland env = GBM_BACKEND,nvidia-drm env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = NVD_BACKEND, direct env = MOZ_DISABLE_RDD_SANDBOX, 1 env = __EGL_VENDOR_LIBRARY_FILENAMES, /usr/share/glvnd/egl_vendor.d/10_nvidia.json env = QT_AUTO_SCREEN_SCALE_FACTOR, 1 env = QT_ENABLE_HIGHDPI_SCALING, 1 # workspaces $ws1 = 3 $ws2 = 4 $ws3 = 2 $ws4 = 1 # startup apps exec-once = hyprpaper exec-once = nvidia-settings --load-config-only exec-once = pipewire exec-once = sleep 0.2 && wireplumber exec-once = /home/pancake/.local/bin/wallpaper # === Decoration Configuration === general { gaps_in = 5 gaps_out = 20 border_size = 0 col.active_border = rgba(000000AA) col.inactive_border = rgba(00000055) } decoration { rounding = 20 blur { enabled = true size = 1 passes = 1 } drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { enabled = yes bezier = bezier, 0.0, 1.0, 0.3, 1.0 animation = global, 0, 0, default animation = fade, 1, 4, default animation = windows, 1, 4, bezier animation = workspaces, 1, 4, default, fade } # === Input Configuration === input { kb_layout = de numlock_by_default = true sensitivity = -0.6666 accel_profile = flat follow_mouse = 1 } # === Keybinds === $alt = Alt_L $super = SUPER $ctrl = Control_L $shift = SHIFT # main keybinds bind = $alt $shift $ctrl, Delete, exit bind = $alt $ctrl, Return, exec, kitty bind = $alt $shift $ctrl, q, killactive bind = $alt $ctrl, e, exec, bash -c '( "/home/pancake/.docs/Start Menu/$(ls /home/pancake/.docs/Start\ Menu/ | rofi -dmenu -i)" & )' & bind = $alt $shift, d, exec, grim -g "$(slurp -d)" - | wl-copy bind = $alt $ctrl, w, exec, hyprctl --batch "keyword general:gaps_out 0 ; keyword general:gaps_in 0 ; keyword decoration:rounding 0" bind = $alt $ctrl $shift, w, exec, hyprctl --batch "keyword general:gaps_out 20 ; keyword general:gaps_in 5 ; keyword decoration:rounding 20" # split keybinds bind = $alt $ctrl, d, layoutmsg, preselect r bind = $alt $ctrl, s, layoutmsg, preselect d bind = $alt $ctrl, y, layoutmsg, togglesplit # TODO: layout swap 2 # window keybinds bind = $alt $shift, 2, movetoworkspace, special:magic bind = $alt, space, togglespecialworkspace, magic bind = $alt $ctrl, f, fullscreen bind = $alt $ctrl, v, togglefloating bindm = $super, mouse:272, movewindow bindm = $super, mouse:273, resizewindow # media keybinds bind = , XF86AudioMute, exec, amixer sset 'Line 01 Mute' toggle && amixer sset 'Line 02 Mute' toggle && amixer sset 'Line 03 Mute' toggle && amixer sset 'Line 04 Mute' toggle bind = , XF86AudioNext, exec, playerctl next bind = , XF86AudioPrev, exec, playerctl previous bind = , XF86AudioPlay, exec, playerctl play-pause bind = , XF86AudioPause, exec, playerctl play-pause # workspaces bind = $alt, 1, movetoworkspace, $ws1 bind = $alt, 2, movetoworkspace, $ws2 bind = $alt, 3, movetoworkspace, $ws3 bind = $alt, 4, movetoworkspace, $ws4 # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=DP-2,1920x1080@240,-1920x50,1,bitdepth,10 monitor=DP-3,2560x1440@240,0x-100,1.25,bitdepth,10 monitor=HDMI-A-1,1920x1080@60,2048x0,1 monitor=DP-1,3840x2160@60,3968x0,1.666667,bitdepth,10 windowrulev2 = suppressevent maximize, class:.* windowrulev2 = immediate, class:.* # nautilus windowrulev2 = float,class:(Nautilus) windowrulev2 = size 1200 800,class:(Nautilus) # amberol windowrulev2 = float,class:(Amberol) windowrulev2 = size 768 768,class:(Amberol) # steam windowrulev2 = float,initialTitle:(Steam Settings) windowrulev2 = float,initialTitle:(Friends List) windowrulev2 = float,initialTitle:(Sign in to Steam) # rofi windowrulev2 = float,class:(Rofi) # obs # TODO ======Config-End======== ```Description
10-bit color depth does not seem to work.
A few commits ago, the log showed this:
output DP-3 succeeded basic test on format DRM_FORMAT_XRGB2101010
, but then proceeded to create an 8-bit buffer (verified throughhyprctl monitors
. Checking again on latest master commit, all 3 of my 10-bit monitors show the correct format inhyprctl monitors
, but in reality all black out and don't show anything at all.Commit that broke 10-bit rendering according to bisect: 016da234d0e852de3ef20eb2e89ac58d2a85f6e7
How to reproduce
Add
bitdepth,10
to a monitor that supports 10-bit in the hyprland configCrash reports, logs, images, videos
hyprland.log.tar.gz hyprctlmonitors.txt sysinfo.txt huge log..