wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

wlsunset 0.4.0 unable to adjust gamma on wayfire 0.8.1

Open je-vv opened this issue 1 year ago • 11 comments

Describe the bug

When running wayfire 0.8.1 and wlsunset 0.4.0, wlsunset is no longer able to adjust the screen gamma.

Doing:

killall wlsunset && wlsunset &

With wayfire running as:

WAYLAND_DEBUG=1 wayfire

Produces the output:

[2338848.869]  -> [email protected]_registry(new id wl_registry@2)
[2338848.875]  -> [email protected](new id wl_callback@3)
[2338849.181] [email protected]_id(3)
[2338849.189] [email protected](1, "wl_shm", 1)
[2338849.193] [email protected](2, "wl_drm", 2)
[2338849.197] [email protected](3, "zwp_linux_dmabuf_v1", 4)
[2338849.200] [email protected](4, "wl_compositor", 6)
[2338849.203] [email protected](5, "wl_subcompositor", 1)
[2338849.206] [email protected](6, "wl_data_device_manager", 3)
[2338849.210] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
[2338849.213] [email protected](8, "zwlr_data_control_manager_v1", 2)
[2338849.216] [email protected](9, "zwlr_output_manager_v1", 4)
[2338849.219] [email protected](10, "zwlr_output_power_manager_v1", 1)
[2338849.224] [email protected](11, "xdg_wm_base", 3)
[2338849.227] [email protected](12, "zwlr_layer_shell_v1", 4)
[2338849.230] [email protected](13, "xwayland_shell_v1", 1)
[2338849.233] [email protected](14, "zwp_tablet_manager_v2", 1)
[2338849.235] [email protected](15, "wl_seat", 8)
[2338849.238] [email protected](16, "zwlr_screencopy_manager_v1", 3)
[2338849.241] [email protected](17, "zwlr_gamma_control_manager_v1", 1)
[2338849.245]  -> [email protected](17, "zwlr_gamma_control_manager_v1", 1, new id [unknown]@4)
[2338849.248] [email protected](18, "zwlr_export_dmabuf_manager_v1", 1)
[2338849.251] [email protected](19, "zxdg_output_manager_v1", 3)
[2338849.254] [email protected](20, "wp_drm_lease_device_v1", 1)
[2338849.257] [email protected](21, "zwlr_input_inhibit_manager_v1", 1)
[2338849.260] [email protected](22, "ext_idle_notifier_v1", 1)
[2338849.263] [email protected](23, "zwp_idle_inhibit_manager_v1", 1)
[2338849.265] [email protected](24, "org_kde_kwin_server_decoration_manager", 1)
[2338849.269] [email protected](25, "zxdg_decoration_manager_v1", 1)
[2338849.273] [email protected](26, "zwp_virtual_keyboard_manager_v1", 1)
[2338849.276] [email protected](27, "zwlr_virtual_pointer_manager_v1", 2)
[2338849.278] [email protected](28, "zwp_pointer_gestures_v1", 3)
[2338849.281] [email protected](29, "zwp_relative_pointer_manager_v1", 1)
[2338849.284] [email protected](30, "zwp_pointer_constraints_v1", 1)
[2338849.287] [email protected](31, "wp_presentation", 1)
[2338849.290] [email protected](32, "wp_viewporter", 1)
[2338849.293] [email protected](33, "zxdg_exporter_v1", 1)
[2338849.296] [email protected](34, "zxdg_importer_v1", 1)
[2338849.299] [email protected](35, "zxdg_exporter_v2", 1)
[2338849.301] [email protected](36, "zxdg_importer_v2", 1)
[2338849.304] [email protected](37, "wp_fractional_scale_manager_v1", 1)
[2338849.307] [email protected](38, "wp_single_pixel_buffer_manager_v1", 1)
[2338849.310] [email protected](40, "wl_output", 4)
registry: adding output 40
[2338849.315]  -> [email protected](40, "wl_output", 4, new id [unknown]@5)
[2338849.318] [email protected](41, "zwlr_foreign_toplevel_manager_v1", 3)
[2338849.321] [email protected](42, "gtk_shell1", 3)
[2338849.324] [email protected](43, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[2338849.327] [email protected](44, "zwf_shell_manager_v2", 2)
[2338849.329] [email protected](500)
[2338849.332]  -> [email protected]_gamma_control(new id zwlr_gamma_control_v1@3, wl_output@5)
[2338849.335]  -> [email protected](new id wl_callback@6)
[2338849.413] [email protected]_id(6)
[2338849.418] [email protected](0, 0, 530, 300, 0, "HP Inc.", "HP V24i", 0)
[2338849.422] [email protected](1, 1920, 1080, 60000)
[2338849.425] [email protected](2)
[2338849.427] [email protected]("HDMI-A-3")
[2338849.429] [email protected]("HP Inc. HP V24i 1CR20308TZ (HDMI-A-3)")
[2338849.431] [email protected]()
[2338849.432] [email protected]_size(1024)
[2338849.456] [email protected](500)
calculated sun trajectory: midnight sun
setting temperature to 6500 K
[2338849.554]  -> [email protected]_gamma(fd 7)

But the gamma never get to change, :(

Is there anything else you might need, that I can share?

To Reproduce

Use wlsunset 0.4.0 and wayfire 0.8.1 (latest release) and you'll notice no gamma adjusting happens at all.

Expected behavior

Gamma correction should happen, I should see less blue (a bit higher temp / more red).

Screenshots or stacktrace

N/A

Wayfire version

wayfire 0.8.1 wlsunset 0.4.0

je-vv avatar Apr 25 '24 08:04 je-vv

BTW, I can't remember when this started happening. I recall gama adjusting with wlsunset was working fine.

je-vv avatar Apr 25 '24 08:04 je-vv

I have unfortunately had some issues like this where I had to restart my computer :) (it was a driver bug probably)

Unfortunately it works here for me so it is hard to say what is going on, maybe try looking at Wayfire's log (stdout), I'd expect a wlroots error potentially.

ammen99 avatar Apr 25 '24 08:04 ammen99

A full output when wayfire is running with WAYLAND_DEBUG=1 is available on the gist:

https://gist.github.com/je-vv/d5f88397ca09b996e39e55ee78f8cd6e

I don't see something in the log that helps me, but I understand little about that output any ways...

As mentioned, it was working just fine. Not sure what broke, neither when, :( Restarting the computer doesn't help...

je-vv avatar Apr 25 '24 09:04 je-vv

As mentioned, it was working just fine. Not sure what broke, neither when, :( Restarting the computer doesn't help...

:(

Any chance of trying another compositor with the same wlroots version, so that we can try tracking down where the bug is happening?

ammen99 avatar Apr 25 '24 09:04 ammen99

ohh, I'll see if I can on the weekend. I'm not familiar with tiling, so there are no many options, there's labwc, which I never tried since I don't like the openbox xml config and it's using wlroots0.17, same as wayfire...

I'll see what I can do...

je-vv avatar Apr 25 '24 09:04 je-vv

I'm not familiar with tiling, so there are no many options

You don't need to do much, just open sway & a terminal and type your wl-sunset command. But ofc feel free to try labwc as well, it doesn't matter, the point is to check whether wayfire or wlroots or some component in the kernel is the issue.

I guess you could also try updating wayfire to -git and wlroots to latest release (0.17.2, idk which version you are on), but I don't think there have been any bug fixes so I doubt this will fix the issue, but who knows ..

ammen99 avatar Apr 25 '24 09:04 ammen99

Tried with wlroots 17.4 seems to be working fine. - was able to adjust color temperature with manual mode (wlsunset -T) several times in a row.

mark-herbert42 avatar Jul 04 '24 04:07 mark-herbert42

Although I was not able to do almost nothing with labwc, I included wlsunset in its autostart config, and it did nothing. I also used then labwc -s 'wlsunset -T 10000' and other values, and nothing... I don't know if that means it's a wlroots issue rather than a compositor one... And if that were the case, if it'd be better to release wayfire and all other components (plugins, configs, wf-shell, and so on) for a newer wlroots version. On Arch 0.17.4 is the version used, which actually corresponds to wlroots latest release: https://gitlab.freedesktop.org/wlroots/wlroots/-/releases

je-vv avatar Jul 04 '24 05:07 je-vv

wlsunset works fine for me. Well - it does what it should do. But - for me it causes a lot of glitches and artifacts when playing videos in firefox/youtube with AMD hardware vaapi. So I have removed it from my setup so far. Seems that it is not ready for productive use.

mark-herbert42 avatar Jul 06 '24 19:07 mark-herbert42

wlsunset works fine for me. Well - it does what it should do. But - for me it causes a lot of glitches and artifacts when playing videos in firefox/youtube with AMD hardware vaapi. So I have removed it from my setup so far. Seems that it is not ready for productive use.

Is this happening when the video is playing fullscreen? It might be helpful to disable direct scanout in this case, otherwise definitely a weird driver bug.

ammen99 avatar Jul 06 '24 20:07 ammen99

Mark, is that with wayfire on wlroots 17.4?

For me it was working flawlessly with wayfire until it all of a sudden stopped working with the versions I posted. But I didn't try wayfire built with wlroots 17.4...

je-vv avatar Jul 06 '24 22:07 je-vv