nix-community / nixGL

A wrapper tool for nix OpenGL application [maintainer=@guibou]
627 stars 76 forks source link

Xwayland Applications Using x11 "Screen" Resolution instead of Display #142

Open DrymarchonShaun opened 10 months ago

DrymarchonShaun commented 10 months ago

I'm trying to launch Stellaris through nixgl and nix-alien. Works fine with a single 1920x1080 display, launching with the proper resolution, but when I have 2 1080 displays connected, the game attempts to launch with a resolution of 3840x1080, but it doesn't work; half of the window shows up on the main display, but the rest is cut off.

The game is running in Xwayland, and I noticed in my xrandr output,

Screen 0: minimum 16 x 16, current 3840 x 1080, maximum 32767 x 32767
eDP-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     59.96*+
   1440x1080     59.99  
   ...
HDMI-A-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 820mm x 460mm
   1920x1080     59.96*+
   1440x1080     59.99  
   ...

The x11 screen has a resolution of 3840x1080, which if I remember correctly is what it's supposed to be. It seems as though something is trying to use the xorg/xwayland screen resolution as apposed to the display resolution.

There's so much going on here that I don't really understand, I'm not sure what is actually at fault, whether it's nixGL or nix-alien. I do know that the resolution is correct when the game is run with steam-run, so I don't think it's the game.