Search Unity

Scaling X11 versus Wayland

Discussion in 'Linux' started by bricefr, Dec 8, 2019.

  1. bricefr

    bricefr

    Joined:
    May 3, 2015
    Posts:
    61
    Hello there,

    Could somebody explain me why Plasma scaling instructions are handled by Unity when I start it from a Wayland session, and not from a X11 session?

    I mean, on a 4K display:
    - Plasma/X11 with 1.3 global scale: Unity is tiny (the menu is ok tho)
    - Plasma/Wayland with 1.3 global scale: perfect (but some stuff don't work like mouse scroll, and some visual artifacts)

    I'm pretty sure Unity Editor scaling can be set with the command line but nothing in the documentation.

    Any clue?

    Thanks a lot
     
  2. bricefr

    bricefr

    Joined:
    May 3, 2015
    Posts:
    61
    For those having the same limitation as mine, I managed to start Unity within a nested Wayland session within the current X11 session.



    Start the nested Plasma session:

    kwin_wayland --xwayland --width 2400 --height 1600 --scale 1.2 --no-lockscreen --no-global-shortcuts nested &


    Start Unity within the session:

    DISPLAY=:1 ./Unity -projectPath ~/Git/Test


    It's important to give a startup project or Unity Hub will be started up in the X11 session and prevent Unity Editor to start in the Wayland session.

    Pros:
    • Great performances
    • Good scaling support (you can set the exact scaling you need whatever might be your current X11 resolution using the --scale parameter)
    Cons:
    • Unity is "limited" to the size of the Wayland session window (doesn't support resizing)
    • No copy/paste between X11 and Wayland for the moment (working on this)