I am aware of the switches you can pass to each app to make it use native wayland, but is there any way to do it globally?

  • hallettj@leminal.space
    link
    fedilink
    English
    arrow-up
    4
    ·
    22 days ago

    Probably not directly helpful, but Nix packages for Chromium and Electron apps are set up so that you can switch to native Wayland mode globally by setting an environment variable, NIXOS_OZONE_WL=1

    I don’t know of any global setting that isn’t distro-specific.

    • Fisch@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      22 days ago

      Is there a noticeable benefit to those apps running natively on Wayland vs running through xWayland?

  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    22 days ago

    For electron, if ELECTRON_OZONE_PLATFORM_HINT and electron-flags.conf don’t work, you can also add --ozone-platform-hint=wayland to the end of Exec in each .desktop file (also works on Chromium, but not CEF AFAIK and sometimes CEF).

    There’s also --ozone-platform-hint=auto if you find yourself switching between X11 and Wayland.

  • dinckel@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    23 days ago

    Depends on your distribution. Arch packages some electron apps in a way, where they can accept their own flags through a dedicated file. For others, it’s just a plain electron-flags.conf in your ~/.config

    I would recommend visiting either the arch wiki, or tour distributions equivalent for details

    Keep in mind that this does not apply to CEF apps, as that’s an entirely different framework

      • Asyx@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        21 days ago

        If you need fractional scaling, they are unusable blurry. Some screens just need fractional scaling so for those setups it’s almost essential to do this.

        You need fractional scaling it your resolution is very high compared to the screen size. So something like a 15 inch 1440p screen would need 150% or 125% scaling because 100% is too small, 200% is too large but with anything in between, xwayland apps are blurry af.

      • Björn Tantau@swg-empire.de
        link
        fedilink
        arrow-up
        1
        ·
        23 days ago

        Bad is relative. But I have some problems with scaling on a HiDPI display with some Electron apps. I think that might be solved if they were Wayland native.

      • Presi300@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        23 days ago

        They are kinda choppy, when compared to native Wayland apps and screensharing from an app, running in xwayland doesn’t really work…