Extremely low resolution on 1.9 on linux with Wayland

Yes, I am deliberately using the same title as the closed issue Extremely low resolution in Obsidian 1.4.x on Linux with Wayland - can it really be the case that electron is still not able to handle this?

One other wrinkle - the resolution problem seems to be primarily when the monitor has fractional scaling. I am using the package from AUR, currently v1.9.14

Solution

type this in bash:

OBSIDIAN_USE_WAYLAND=1 obsidian --enable-features=UseOzonePlatform --ozone-platform=wayland

This takes care of stuff in the moment. The following talks about why this happens and how to make a more permanent fix.

The Problem

Electron, the framework obsidian and discord are built on, does poorly at recognizing that it is in a wayland environment. This means that important visualizing tools aren’t called on when starting up. The above sets obsidian’s variable “OBSIDIAN_USE_WAYLAND“ to true, calls obsidian, and tells it to enable the OzonePlatform, electron’s compatibility tool for wayland.

Now it would suck to have to type all of that out into bash every time you want to use obsidian so here is the

Permanent Fix

Depending on how you installed can make this more difficult or easier. That said, I understand you installed via the AUR and must recommend you change that out for the version in pacman’s extra library as this reduces your risk of installing malware. In either case do the following:

  1. navigate to /usr/share/applications and see if there is an obsidian.desktopfile there. If there isn’t one skip to step 3.
  2. run the following in bash cp /usr/share/applicaitons/obsidian.desktop ~/.local/share/applications/ This makes a copy of obsidian.desktop in your local user space so this doesn’t break during updates.
  3. open ~/.local/share/applications/obsidian.desktop in your text editor of choice and make it match the following:
[Desktop Entry]
Name=Obsidian
Exec=env OBSIDIAN_USE_WAYLAND=1 /usr/bin/obsidian --enable-features=UseOzonePlatform --ozone-platform=wayland %U
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

Save and quit.

You should now be able to open obsidian normally and it not be blurry! Hope you are enjoying linux!

1 Like

I just want to jump in here to add a solution for those who installed Obsidian as a snap package as well. I used your response to guide me in the right direction - so thank you!

If you installed Obsidian via snapd, you won’t have a .desktop file in the normal location. Your desktop file is located in /var/lib/snapd/desktop/applications/obsidian_obsidian.desktop. The right way to go is to create a copy of this and edit the execution of the copy.

cp /var/lib/snapd/desktop/applications/obsidian_obsidian.desktop ~/.local/share/applications/
nano ~/.local/share/applications/obsidian_obsidian.desktop

Then make sure the Exec= line is the same as this,

[Desktop Entry]
X-SnapInstanceName=obsidian
Name=Obsidian
X-SnapAppName=obsidian
Exec=env OBSIDIAN_USE_WAYLAND=1 /snap/bin/obsidian --enable-features=UseOzonePl>
Terminal=false
Type=Application
Icon=/snap/obsidian/53/meta/gui/icon.png
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

Finally, just updating your desktop database:

update-desktop-database ~/.local/share/applications

Once you have done this, search for obsidian via your launcher and open it. The resolution should be fixed. Since this is the desktop file that you just created, you will want to pin this one. Running obsidian via the terminal seems to run the snap version without the scaling fix.

2 Likes

Oops, slight error on the copy and paste from Nano. The full Exec line is:

Exec=env OBSIDIAN_USE_WAYLAND=1 /snap/bin/obsidian --enable-features=UseOzonePlatform --ozone-platform=wayland %U
1 Like

Good on you for providing the better answer when you found it!

Happy I could at least get you started.

Cheers

Thanks! That’s working great. I also updated my ~/.config/hyprland/hyprland.conf to have this command for the keyboard shortcut I use, eg

bindl = $mainMod, O, exec, env OBSIDIAN_USE_WAYLAND=1 /usr/bin/obsidian --enable-features=UseOzonePlatform --ozone-platform=wayland %U

One note: you’ve got a typo in step 2 in the path"applicaitons", just in case anyone comes here and tries to blindly copy :laughing:

EDIT:

My bad - I actually had installed from pacman (extra), but thanks for this note.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.