Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Armbian 23.8.1 - how to set up display resolution and refresh rate for CLI distro, when running UI apps?

Featured Replies

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

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.

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.

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.