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:
Use Wayland. Download and reinstall any version newer than 1.11.4, it will default to Wayland Native.
If you are stuck with X11. Download and install version 1.8.10 and rely on the internal update mechanism to update the app.
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 …
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.
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.
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?
Just so that I can investigate the issue locally and come up with a potential fix.
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.
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.
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.
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.
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.