wanderer Posted October 14, 2023 Posted October 14, 2023 Armbian build: Armbian_23.8.1_Bananapim2zero_bookworm_current_6.1.47 Hardware: BananaPi M2 Zero I am using pure CLI environment, and when the output is on screen I can't really tell what is the resolution or the refresh, but the monitor is 1080p@60 and it seems to be matching. Although when I run apps that use SDL2 for example; the resolution is changed, and I tried to set a fixed resolution but there seems to be no way to do so in Armbian. I changed the boot settings and those are correctly set with 1080p@60; then I tried to use xrandr (I have X11 installed as I have SDL2 installed too), and it says "can't open display" (I assume because I have no X app running?); so I am basically stuck at this point. Is there a global setting that force the OS to a specific resolution? Is my CLI running really at 1080p@60? How can I tell an app running in X server to set itself to the same resolution of the current CLI? Thanks 0 Quote
mitu Posted October 14, 2023 Posted October 14, 2023 3 hours ago, wanderer said: I am using pure CLI environment, and when the output is on screen I can't really tell what is the resolution or the refresh, but the monitor is 1080p@60 and it seems to be matching. There are various methods to check the current resolution. compile modetest from Mesa (not sure if there's any package including it) and use it to inspect the current resolution. https://gitlab.freedesktop.org/mesa/drm/tree/master/tests/modetest there's a similar utility (kmsprint) in the kmsxx project - https://github.com/tomba/kmsxx Both utilities also allow you to test various resolutions to see if they're supported by your monitor/display. 3 hours ago, wanderer said: Although when I run apps that use SDL2 for example; the resolution is changed, and I tried to set a fixed resolution but there seems to be no way to do so in Armbian. SDL2 has specific support for mode change in their KMS/DRM video driver. You can see how it's done by looking up in their test folder for various testing utilities, most of them support the --fullscreen parameter (when they set a fixed resolution, usually 640x480) and --fullscreen-desktop (where they use the current 'desktop' resolution and scale the main window to that). Note that none of this is specific to Armbian, the behavior and capabilities are dictated by Linux's DRM/KMS APIs. 3 hours ago, wanderer said: I changed the boot settings and those are correctly set with 1080p@60; then I tried to use xrandr (I have X11 installed as I have SDL2 installed too), and it says "can't open display" (I assume because I have no X app running?); so I am basically stuck at this point. Is there a global setting that force the OS to a specific resolution? Is my CLI running really at 1080p@60? How can I tell an app running in X server to set itself to the same resolution of the current CLI? xrandr works only withing Xorg, so it's normal it's not working outside of it. There is no equivalent to it when you're using a pure KMS/DRM environment, the resolution change/switch has to be done at the application level. If you want to set a specific start-up resolution for your system, instead of Linux choosing the best resolution from the ones reported by your display, then you can use the video Linux kernel parameter to set it up - see https://wiki.archlinux.org/title/kernel_mode_setting#Forcing_modes. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.