Linux: Zoom Level / Zoom Factor / Scaling is not restored on startup (XWayland, X11) // Maximize too

Since installer version 1.9.10 / Electron 37, the zoom level settings works but is not correctly applied / restored on startup under Linux. Window Maximize status is also not restored.

This is a regression of Electron. Specifically, it happens under X11 or XWayland (not native wayland).

Current workarounds:

  1. Use Wayland. Download and reinstall any version newer than 1.11.4, it will default to Wayland Native.
  2. If you are stuck with X11. Download and install version 1.8.10 and rely on the internal update mechanism to update the app.
2 Likes

Thank you for discovering the core issue. I would like to ask, for us non-techies, what does this mean? Do we need to wait for another version of obsidian, electron? If this is an electron issue and not part of obsidian, what is the next step.

My solution for the moment was to downgrade to 1.8.10, but this is just a temporary solution …

Thank you …

Are you sure? Because even the value of the setting is reset, which shouldn’t normally happen. This leads me to believe that this is more of an issue with Obsidian’s code itself which is failing to load/save this setting (and potentially others) for some reason. This is further supported by a little testing I did by using manually using Electron 36 to execute the asar and it exhibits the same issue.

I’d have taken a deeper look but unfortunately the source for Obsidian is not available.

P.S. I am a developer.

Yes, I am fairly sure.
We were using electron 34 in Obsidian 1.8.10. You can download the appimage of 1.8.10 and let the internal updater just update the asar and see if it happens.

Obsidian has very little platform specific code. If this was an Obsidian problem, it should have happened on windows and mac too.

1 Like

You are right, it doesn’t happen with electron34, I just tested it manually. This is quite strange, would mind if I ask what API you’re using to store the user’s preferences? :thinking:

Just so that I can investigate the issue locally and come up with a potential fix.

I’m also having this issue, and I also noticed that the custom icon might not be used anymore. I think that started with 1.9.12

@WhiteNoise Can you link the BR at the electron repo?

1 Like

Yup, downgrading to 1.8.10 works like a charm.

I did manage to work around this issue Setting Zoom at startup

Here is an elegant work-around by @blue_emperor

Cheers,
jhhh

Just an idea. If this “zoom situation” persists because of Electron, wouldn’t be maybe the best to create a Plugin for “zoom”. I hope someone can find interest and time. Thanks.

1 Like

I use Linux Mint and have the same problem. It significantly disturbs me every time I try to set up Zoom again when starting.

1 Like

I did some more testing on this. This electron regression is limited to obsidian running XWayland (and maybe X11 too). It doesn’t not happen when obsidian is forced to run with wayland native.

You can force obsidian to use wayland native by adding these switches to the command line argument (or in the .desktop file)
If you use --enable-features=UseOzonePlatform --ozone-platform=wayland

At some point, we will update to Electron 38.2+ which uses Wayland Native by default, so you won’t need the command line switches.

2 Likes

That’s good to know, but the issue would still bug X11 users. Any links to the upstream bug report? Would be good to know the exact issue, quite baffling to think changing underlying the GUI framework somehow fixes this issue.

I haven’t found an upstream bug report.

Hmmm… so it’s still a mystery which API is causing the issue? :confused:

It is something related to window creation (the zoom factor and some other aspect of the window state are not set).

I am not sure if there is a problem in X11. There is certainly with Xwayland. Since electron is moving to default wayland soon, we have no intention to dig into this further.

I see, in that case would setting these values post window creation fix the issue? That seems to work when the user does it manually, should be an easy hotfix for X11 users.

I’ve always been a X11 user so it’s an issue there as well, it’s not limited to Xwayland.

I urge you to please at-least implement a hotfix for us X11 users, not everyone is ready to shift to Wayland.

2 Likes

That’s unfortunate, especially given that Nvidia’s Wayland support remains incomplete and major bugs and unresolved issues persist across popular desktop environments. It shouldn’t be up to users to bear the consequences of Wayland still being unusable on many systems.

hello, can you please explain me how to do it? i recently switched to fedora 42 workstation so im a total noob. thank you.