geefr / beatsaber-linux-goodies

Mod installation scripts and other goodies to support Beat Saber on Linux
BSD 2-Clause "Simplified" License
132 stars 5 forks source link

Beataroni can not display GUI with a resolution of 5120x1440 (32:9) #80

Closed ghost closed 3 years ago

ghost commented 3 years ago

There are no problems with a resolution of 1920 x 1080 (16:9)

Unhandled exception. System.InvalidOperationException: Failed to create Skia render target surface
   at Avalonia.Skia.SurfaceRenderTarget..ctor(CreateInfo createInfo)
   at Avalonia.Skia.DrawingContextImpl.CreateRenderTarget(Size size, Nullable`1 format)
   at Avalonia.Skia.DrawingContextImpl.CreateLayer(Size size)
   at Avalonia.Rendering.RenderLayers.Update(Scene scene, IDrawingContextImpl context)
   at Avalonia.Rendering.DeferredRenderer.UpdateRenderLayersAndConsumeSceneIfNeeded(IDrawingContextImpl& context, Boolean recursiveCall)
   at Avalonia.Rendering.DeferredRenderer.Render(Boolean forceComposite)
   at Avalonia.Rendering.DeferredRenderer.Paint(Rect rect)
   at Avalonia.Controls.TopLevel.HandlePaint(Rect rect)
   at Avalonia.X11.X11Window.DoPaint()
   at Avalonia.X11.X11Window.<OnEventSync>b__81_0()
   at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run()
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.Threading.Dispatcher.RunJobs()
   at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken)
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
   at Beataroni.Program.Main(String[] args)
geefr commented 3 years ago

Okay that's interesting. I found a couple of Avalonia issues with similar errors, but they're old, related to creating a zero-size surface.

What's your monitor/gpu/x11 setup like? Does the system treat it as one giant display or spanning one x screen over multiple monitors? What's your OS/etc like? If you're running something with an odd ui could you try the same under a Linux Mint live cd or similar? Something that's just running stock X11 rather than Wayland, cinnamon/mate/gnome/kde desktop etc.

Could probably debug into Skia, but I might have issues reproducing this one. Can go up to 5760x1080 but don't have any 1440 monitors here.

ghost commented 3 years ago

What's your monitor/gpu/x11 setup like? Does the system treat it as one giant display or spanning one x screen over multiple monitors?

QLED Gaming Monitor C49RG94SSU (49") (my system uses it as a single big monitor, plain and simple)

GeForce RTX 2080 Ti GAMING X TRIO / NVIDIA Driver Version: 455.38

Output xdpyinfo:

name of display:    :1
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    12009000
X.Org version: 1.20.9
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x3e0000b, revert to Parent
number of extensions:    30
    BIG-REQUESTS
    Composite
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    DRI2
    GLX
    Generic Event Extension
    MIT-SCREEN-SAVER
    MIT-SHM
    NV-CONTROL
    NV-GLX
    Present
    RANDR
    RECORD
    RENDER
    SECURITY
    SHAPE
    SYNC
    X-Resource
    XC-MISC
    XFIXES
    XFree86-DGA
    XFree86-VidModeExtension
    XINERAMA
    XINERAMA
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    5120x1440 pixels (1355x381 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x1ea
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store WHEN MAPPED, save-unders NO
  largest cursor:    256x256
  current input event mask:    0xda0033
    KeyPressMask             KeyReleaseMask           EnterWindowMask          
    LeaveWindowMask          StructureNotifyMask      SubstructureNotifyMask   
    SubstructureRedirectMask PropertyChangeMask       ColormapChangeMask       
  number of visuals:    132
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    11 bits

What's your OS/etc like?

OS: Pop!_OS 20.04 LTS (Nvidia)

Output uname -r: 5.8.0-7630-generic

desktop environment: GNOME 3.36.8

Could probably debug into Skia, but I might have issues reproducing this one.

If you have something I can test with my setup, I have no problem with that. (As long as it doesn't completely clutter up my system) ;)

btw. here is a screenshot Screenshot

geefr commented 3 years ago

Thanks for the info, seems like a normal enough setup ignoring resolution so maybe there's a max width? Your screenshot is a very wide title bar which is odd - beataroni is supposed to be fixed-size at the moment, so if anything i'd expect it to just be too small on high dpi screens (I literally hard coded it to 400x800 pixels :|)

I'll see what I can play around with. It's either me doing something dumb in the window setup or a bug in avalonia/skia itself..I'd expect those to be better tested than my little projects though.

geefr commented 3 years ago

@Sulavius if this is still an issue please try the latest release here: https://github.com/geefr/beatsaber-linux-goodies/releases/tag/1.2.0

By the looks of it avalonia has fixed a lot of graphical issues now, so might at least throw an error/similar for this case.

ghost commented 3 years ago

With the new release, the error no longer occurs. So far everything works for me.

Thank you for incorporating the fix.

geefr commented 3 years ago

Sweet, I'll try and keep an eye on avalonia's updates