Open porridgewithraisins opened 2 hours ago
Hmm thats weird. Can you run xrandr and post the output?
Xrandr says 3072x1920...
sandy [~] $ xrandr
Screen 0: minimum 320 x 200, current 3072 x 1920, maximum 16384 x 16384
eDP connected 3072x1920+0+0 (normal left inverted right x axis y axis) 286mm x 178mm
1920x1200 60.03*+ 40.02
1920x1080 60.03
1600x1200 60.03
1680x1050 60.03
1280x1024 60.03
1440x900 60.03
1280x800 60.03
1280x720 60.03
1024x768 60.03
800x600 60.03
640x480 60.03
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
Additional investigation, there doesn't seem to be a problem with your code, I overrode crt_info->width
and crt_info->height
in for_each_active_monitor_output_x11_not_cached
and it seems to work fine now. And I checked the commits in that file, it seems like this app has always just called Xrandr library function the same way and not done anything funky.
So, I am not sure why the behaviour changed. That part of xrandr code hasn't seen changes in years, again going by the commits in the corresponding files in libxrandr. So I must be missing something. I also don't remember what xrandr used to return unfortunately...
What's the way I can fix this?
One part did change long ago. Its needed for proper monitor handling on x11, for example with rotated monitors. I can see if i can maybe try and fix it. When you said scaling the display, did you mean using xrandr --output DP-1 --scale 1.6
for example?
I did it in the xfce display settings, but now I turned that back to 1x and did it with your xrandr command, and it seems to do the same thing. So yes.
Also, curious, what changed in that rotation handling code? From what I saw, it doesn't do anything on x11?
/* Monitor size is already rotated on x11 when the monitor is rotated, no need to apply it ourselves */
Ah ok no I remembered wrong. I checked git history and it has to do with capturing external monitor on laptops with dedicated nvidia gpu on x11. The external monitor info wont be available in the drm info output (as seen when running the drm_info command) for the monitor connected to the nvidia gpu (the hdmi slot), as nvidia doesn't use linux drm api on x11. So you have to query that information from x11 instead to be able to capture the external monitor on such systems (my laptop has this setup). This is when trying to capture the external monitor with the iGPU (intel), when the external monitor is connected to the dedicated nvidia gpu.
Anyways, I pushed a fix for this issue. Can you update to the latest aur version and test again? Note that this only fixes this issue for monitor capture. If you try to capture a fullscreen window instead then it will capture at 3072x1920, although it wont have black bars on the side like in the video you posted. There isn't really anything to do about that, the window texture itself is that size.
Describe the bug Hi, you might recognise me from the emails where I implemented the beginnings of region capture for x11/intel.
Context
I don't know if I am using the right terms here, so bear with me. I have a laptop, where I want to have fractional scaling. And you know the story of that on linux. The solution I use (and it works well) is setting xfce window manager zoom to 2x, and then scale the display to 1.6x. What this seems to do is render the desktop to a larger canvas, but the windows on that canvas are all 2x'd. So this ends up giving a good result. I have to set GDK_SCALE_whatever and QT_whatever also.
Old behaviour
In this setup, gpu-screen-recorder used to give me proper results. For example, this video from april 2023. I had the same desktop scaling setup back then as well (I think, because I don't remember changing anything). And it recorded fine, as you can see in the video, at 1920x1200 resolution (my screen resolution).
New behaviour
Now, the videos I record look like this. What could be the reason? Now, it records at the 1.6x scaled 3072x1920 resolution.
Command ran
gpu-screen-recorder -w screen -f 60 -o /tmp/lol.mp4
Desktop (please complete the following information):
Additional context drm-info.txt.