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

Fix plymouth on multi-screens with different resolution #41

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions plymouth/qubes-dark/qubes-dark.script
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ logo.sprite = Sprite(logo.image);
logo.opacity_angle = 0;

fun refresh_callback () {
# Reposition everything 50 times per second
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks scary ;) But if it helps, I'm happy :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks scary ;) But if it helps, I'm happy :)

I am not 100% sure if it fixes it. Actually the logo is repositioned every 50 seconds at the moment with the existing code before this fix. I am guessing that the plymouth render interleaves the default 50 refresh cycles between the two monitors. But I might be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, this step doesn't have the update installed yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is with the update applied: https://openqa.qubes-os.org/tests/106932#step/startup/4
So, not looking good. When the current run completes, I'll double check if initramfs actually include your change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked and your change is included there, and didn't help :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the plymouth issue I included a debug log, but also info in which plymouth version it worked before. Maybe that will help...

# This is necessary on multi-monitor systems with different resolution
logo.sprite.SetX(Window.GetX() + (Window.GetWidth() - logo.image.GetWidth()) / 2);
logo.sprite.SetY(Window.GetY() + (Window.GetHeight() - logo.image.GetHeight()) / 2);
logo.sprite.SetOpacity(1);
if (global.dialog) {
global.dialog.prompt.sprite.SetX(logo.sprite.GetX() + (logo.image.GetWidth() - prompt.image.GetWidth()) / 2);
global.dialog.prompt.sprite.SetY(logo.sprite.GetY() + logo.image.GetHeight() + 16);
global.dialog.prompt.sprite.SetZ(1);
global.entry.sprite.SetX(prompt.sprite.GetX() + (prompt.image.GetWidth() - entry.image.GetWidth()) / 2);
global.entry.sprite.SetY(prompt.sprite.GetY() + prompt.image.GetHeight() + 16);
global.entry.sprite.SetZ(1);
}
}

Plymouth.SetRefreshFunction(refresh_callback);
Expand Down