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 IPC event for switching TTYs #2476

Closed
mark-herbert42 opened this issue Sep 28, 2024 · 6 comments
Closed

Add IPC event for switching TTYs #2476

mark-herbert42 opened this issue Sep 28, 2024 · 6 comments

Comments

@mark-herbert42
Copy link

I use light command to change brtightness mapped to a keyboard shortcuts. So it works.

But when I switch to text console (Alt-F) and back - the screen is much brighter. But when I run light to show the brightness - it shows the same as before switch. So switching to console and back causes the hardware to go to higher brightness level somehow, and it is not restored.

Not sure if it is afeature or a bug and what but it is , and is it possible to have a workaround to call save and restore brightness when switching between text console and wayfire session?

@ammen99
Copy link
Member

ammen99 commented Sep 28, 2024

Wayfire does not control brightness in any way, but I suppose we could add an IPC event for when switching between TTYs and then you can store/restore brightness with a script.

@ammen99 ammen99 changed the title Screen brightness is changed when switching to linux console and back to Wayfire session. Add IPC event for switching TTYs Sep 28, 2024
@mark-herbert42
Copy link
Author

same story happens when returning from "dpms" state that entered with idle plugin. Screen goes to sleep from dim night mode but when touch mouse it wakes up bright. And again light program does not see the brtightness change but it happens somewhere deep in hardware.

@mark-herbert42
Copy link
Author

Looks like it is an amdgpu issue - opened the bug with them. I've tried same actions on other laptop which s Intel based and no issue with brightness at all. Still if there is a way to set up IPC on [oint when the wayfire screen lights up - on wayfire start, waking up from idle or returning back from text console switching TTY that could be a way to workaround this

@soreau
Copy link
Member

soreau commented Sep 28, 2024

Wayfire could tie into wlr_session->events.active but in my experience, this can be unreliable do to a possible seatd bug.

@mark-herbert42
Copy link
Author

The resolution of the bug is clear and is inside AMD kernel driver. Not yet done and maybe never will be as the code is pretty long ago in the kernel and was not reported before. The buggy "feature" was introduced to workaround some mini-led HDR panels but somehow was applied to amoled as well where it is absolutely not required.

Here is the link to amdgpu gitlab where I posted the patch reverting miniled workaround, but of course that can not be applied to mainstream as it will cause big issues for miniled.

https://gitlab.freedesktop.org/drm/amd/-/issues/3655

@ammen99
Copy link
Member

ammen99 commented Oct 1, 2024

I guess we won't be adding more IPC events until we find a good use-case for them.

Thanks for updating this issue :)

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

No branches or pull requests

3 participants