How to change resolution in 'Raspberry Pi OS' to a custom resolution - screen-resolution

So I'm trying to implement the following resolution: 1920x127
What I have tried so far:
Option 1-
Added the following to /boo/config.txt file :
hdmi_ignore_edid=0xa5000080
hdmi_cvt=1920 127 60
hdmi_group=2
hdmi_mode=8
Following the Raspberry Pi documentation: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
This doesn't sets the resolution to 1920x127. But if I use for example 1920x1080 it does change the resolution accordingly.
So this process works but not for my current need.
Option 2-
Added the following to /boot/cmdline.txt file:
video=HDMI-A-1:1920x127M#60
So the file looks like this:
console=serial0,115200 video=HDMI-A-1:1920x127M#60 console=tty1 root=PARTUUID=156bada3-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
And just as the first solution it doesn't work with 1920x127 but it does with 1920x1080.
Now, this solution does not work alone. It needs the following
Create the file /usr/share/X11/xorg.conf.d/screen-resolution.conf and paste:
Section "Screen"
Identifier "Screen0"
Device "Card0"
SubSection "Display"
Modes "1920x127"
EndSubSection
EndSection
But still, with 1920x127 the X server goes to 1024x768 but if I set up both files with 1920x1080 the X server ran at 1920x1080
End of option 2
So checking the xrandr command I can see that it says:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 7680 x 7680
The minimum is 320x200. So the minimum resolution I was able to set was 1920x240.
Now, about the Monitors.
Everything I have tried have been in 2 monitors:
1- ViewSonic VX2776
2- Custom made monitor that should support *1920x127*
So. Solution 1 and 2 in the Monitor 1 works with resolution 1920x1080 and 1920x240, it looks stretched but the Monitor shows something.
It does not work with resolution *1920x127. Meaning that it goes to default 1024x768.
In the Monitor 2, the solution 1 does not work, it always goes to default 1024x768. But solution 2 it works with 1920x1080 and 1920x320. Note the "320", because the 1920x240 it works, meaning that the X servers startx at 1920x240 but the monitor indicates "resolution not supported".
I have tried force 1920x127 with xrandr:
cvt 1920 127 60
xrandr --newmode "1920x127_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
xrandr --addmode HDM-1 1920x127_60.00
xrandr --output HDMI-1 --mode 1920x127
(Not actual used code, just an example)
And after this, the monitor goes off, like there is no output. And after set the resolution back to the default one, the monitor goes on.
So, basically the question is: How to set up a resolution below the minimum shown from xrandr 320x200?
Note: The makers of the monitor show to me the monitor working at 1920x127 with their own SBC with a Rock chip on Android.

Related

imx8mplus dev board yocto image psplash shows dual image on mipi dsi touch display

I was trying boot yocto image with custom boot logo on imx8mplus (compulab bsp) dev board with touch display interfaced via mipi dsi port, the procedure was simple, created bbappend for psplash recipe and located custom boot logo. The boot logo was coming up but it was showing double images of custom logo. The boot logo supposed to show as single image full screen on display.
The display resolution is 1280x800 .
the fbset output of target board is
mode "720x600-0"
# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
geometry 720 600 1024 1200 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
My Finding:
The display resolution and fbset mode values are different.
How can I change display resolution atleast for psplash while compiling yocto ?
Display Psplash Image
Tried to boot custom logo with help of psplash on yocto. But the psplash boot logo displayed as two while booting up. boot logo double issue

Setting Custom Resolution on Raspberry Pi to Fit 1:1 Display

I have a Raspberry Pi connected to a 480x480 circular touch screen. I have edited the config.txt to reflect the new resolution I want to run. Unfortunately the resolution is only displayed correctly using VNC on the display itself it is weirdly offset and not at all in a 1:1 Aspect ratio.
Touch works like a charm.
I already searched Google for how to set the aspect ratio correctly etc.
Any ideas what I could try?
config.txt:
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
# hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
# disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
# overscan_left=16
# overscan_right=16
# overscan_top=16
# overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
# framebuffer_width=480
# framebuffer_height=480
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
hdmi_cvt=480 480 60 4
# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=87
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_=drive
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
Try:
hdmi_cvt=480 480 59
Similar configuration works fine for my 720x720 screen
I ended up contacting the AliExpress Seller who contacted the manufacturer. They sent me this config with custom HDMI timings. There is also a commented line for 720x720px
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=8
#overscan_right=1
overscan_top=0
overscan_bottom=0
# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=480
framebuffer_height=480
hdmi_group=2
hdmi_mode=87
#framebuffer_width=1920
#framebuffer_height=1080
hdmi_timings=480 1 10 20 50 480 1 10 10 5 0 0 0 60 0 16960000 4
#hdmi_timings=720 1 20 20 40 720 1 10 10 5 0 0 0 65 0 39000000 4
#hdmi_timings=1080 1 26 2 36 1920 1 8 4 16 0 0 0 62 0 138167744 3
#max_framebuffer_width=1920
#max_framebuffer_height=1080
#hdmi_pixel_freq_limit=400000000
max_framebuffer_width=480
max_framebuffer_height=480
hdmi_pixel_freq_limit=400000000
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
#hdmi_group=2
#hdmi_mode=87
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
#hdmi_drive=1
# uncomment to increase signal to HDMI, if you have interference, blanking, or
no display
# config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
display_hdmi_rotate=0
Now it works

Difference between 'display_aspect_ratio' and 'sample_aspect_ratio' in ffprobe [duplicate]

I am trying to change the dimensions of the video file through FFMPEG.
I want to convert any video file to 480*360 .
This is the command that I am using...
ffmpeg -i oldVideo.mp4 -vf scale=480:360 newVideo.mp4
After this command 1280*720 dimensions are converted to 640*360.
I have also attached video. it will take less than minute for any experts out there. Is there anything wrong ?
You can see here. (in Video, after 20 seconds, direclty jump to 1:35 , rest is just processing time).
UPDATE :
I found the command from this tutorial
Every video has a Sample Aspect Ratio associated with it. A video player will multiply the video width with this SAR to produce the display width. The height remains the same. So, a 640x720 video with a SAR of 2 will be displayed as 1280x720. The ratio of 1280 to 720 i.e. 16:9 is labelled the Display Aspect Ratio.
The scale filter preserves the input's DAR in the output, so that the output does not look distorted. It does this by adjusting the SAR of the output. The remedy is to reset the SAR after scaling.
ffmpeg -i oldVideo.mp4 -vf scale=480:360,setsar=1 newVideo.mp4
Since the DAR may no longer be the same, the output can look distorted. One way to avoid this is by scaling proportionally and then padding with black to achieve target resolution.
ffmpeg -i oldVideo.mp4 -vf scale=480:360:force_original_aspect_ratio=decrease,pad=480:360:(ow-iw)/2:(oh-ih)/2,setsar=1 newVideo.mp4

Xorg increase virtual screen size past 8192 x 8192

I have one 4K monitor (3840 x 2160) and two QHD monitors (2560 x 1440) and I want to have them side by side. This is currently not possible though, since the horizontal virtual resolution required for this is 8960 pixels (3840+2560+2560) but the maximum (horizontal) virtual resolution set by the X server is 8192 pixels. Is there any way to increase the maximum virtual resolution past 8192x8192 pixels?
What I have tried up to now:
I do not have a xorg.conf file - I tried manually creating one myself including the "Display" sub-section and setting a different "Virtual" value in there, rebooted, nothing changed.
Tried various xrandr command variations with the --fb and/or --panning parameters set to the desired maximum (8960x2160+0+0), again to no avail. (output: xrandr: screen cannot be larger than 8192x8192 (desired size 8960x2160))
I did read a claim somewhere (EDIT: here) that Intel's graphics processors do not support greater virtual screen resolutions than 8192x8192 pixels (my system is using a Core i7-6700HQ CPU with the Intel HD Graphics 530 graphics processor), but I unfortunately have been unable to confirm this information - hopefully this is not the case.
EDIT: It is indeed probably not the case:
#: glxinfo -l | grep GL_MAX_TEXTURE_SIZE
GL_MAX_TEXTURE_SIZE = 16384
GL_MAX_TEXTURE_SIZE = 16384
My xrandr output (I currently have the third monitor positioned bottom-right, hence the 8192x3600 virtual screen resolution):
Screen 0: minimum 320 x 200, current 8192 x 3600, maximum 8192 x 8192
eDP-1 connected primary 3840x2160+2560+0 (normal left inverted right x axis y axis) 346mm x 194mm
3840x2160 60.00*+
2048x1536 60.00
1920x1440 60.00
1856x1392 60.01
1792x1344 60.01
1600x1200 60.00
1400x1050 59.98
1280x1024 60.02
1280x960 60.00
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
800x600 60.00 60.32 56.25
700x525 59.98
640x512 60.02
640x480 60.00 59.94
512x384 60.00
400x300 60.32 56.34
320x240 60.05
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 2560x1440+4519+2160 (normal left inverted right x axis y axis) 527mm x 296mm
2560x1440 59.95*+
2048x1152 59.90
1920x1200 59.95
1920x1080 60.00 50.00 59.94 24.00 23.98
1920x1080i 60.00 50.00 59.94
1600x1200 60.00
1680x1050 59.88
1280x1024 75.02 60.02
1280x800 59.91
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 75.00 60.00 59.94
720x400 70.08
DP-2 connected 2560x1440+0+285 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 59.95*+
1280x720 59.86
HDMI-2 disconnected (normal left inverted right x axis y axis)
I was able to fix this with the following steps to generate and modify an xorg.conf file and put it in /etc/X11/xorg.conf.
I am on Ubuntu 16.04 with gnome-session-fallback using metacity and whenever I would try to make all three full resolution I got an error about virtual size unable to go past 8192x8192.
I am not sure it will matter if your on gnome unity metacity or not.
Before rebooting - generate an xorg.conf.new file.
$ sudo X :2 -configure
# will make a file /home/$USER/xorg.conf.new or ~/xorg.conf.new
$ cat ~/xorg.conf.new |grep Screen|more
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
Section "Screen"
Identifier "Screen0"
Section "Screen"
Identifier "Screen1"
I have two Screen Sections for example and I am trying to utilize 3 monitors - I don't think you need three Screen Sections whatever is generated.
Monitor 1: 3840x2160 x 32 in
Monitor 2: 3840x2160 x 32 in
Monitor 3: 1920x1080 x 22 in
Check that your glx can handle above 8192x8192 if you need it above this size.
glxinfo -l | grep GL_MAX_TEXTURE_SIZE
GL_MAX_TEXTURE_SIZE = 16384
GL_MAX_TEXTURE_SIZE = 16384
Modify the xorg.conf.new file in your /home/username directory and add the size from the glxinfo command Virtual 16384
sudo nano ~/xorg.conf.new
Under Subsection Display with Depthof 24 on both Sections Screen add Virtual 16384
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 16384 16384 <-- ADD THIS.
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 16384 16384 <-- ADD THIS.
EndSubSection
EndSection
Copy the xorg.xonf.new to /etc/X11/xorg.conf then reboot.
sudo cp /home/user/xorg.conf.new /etc/X11/xorg.conf # Modify user
sudo shutdown -r now
When you log back in set your monitors in gnome, metacity or unity or whatever you use.
Update:
After rebooting, logging out or unlocking I found that the monitor settings are not saving.
This possible gnome issue might be related to this bug:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1292398
This fix was found from parts of multiple answers in this posting:
https://askubuntu.com/questions/6137/saving-monitor-settings
I prefer to run this script from a terminal since I open one first after login.
First login with the bad configuration - monitors not placed correctly:
cd ~/.config
mv ~/.config/monitors.xml{,.bak}
Now set your monitors with system settings to create a new ~/.config/monitors.xml file with proper settings.
Copy Nicolas Bernaerts's fixed script from my repo: https://raw.githubusercontent.com/alextomko/monitors/master/monitors and put it in a path to run from terminal.
$ ls -l ~/bin
# if you don't have this directory then create it - do not be logged in as root here.
$ mkdir /home/$USER/bin
$ echo $PATH
# should show /home/username/bin if the dir existed or if you had to create.
$ wget -P ~/bin https://raw.githubusercontent.com/alextomko/monitors/master/monitors
$ chmod +x ~/bin/monitors
# Log out, lock, reboot or whatever it takes to make monitor settings lost for you and run the script.
$ monitors

use ppi to get logical resolution

I am trying to emulate the Samsung Galaxy Tab S 10.5 , and I have no idea what the screen resolution is to create an emulator. This model seems to be left off any list I found.
Full Spec & Details http://www.gsmarena.com/samsung_galaxy_tab_s_10_5-6438.php
The screen has been given the specs:
2560 x 1600 pixels, 10.5 inches (~288 ppi pixel density)
If I use 2560 x 1600 pixels as the screen size, its obviously too big. How can I work out its Device pixel Ratio? Does the ppi have anything to do with it?
The Nexus 10 is 1280 x 800, but how can I get an exact for this or any device?
EDIT
Looking at the Nexus 10 (also made by samsung), it has the same 2560 x 1600 pixels, a Device pixel Ratio of 2, a slightly smaller screen, and a slightly bigger ppi of 300. So it would make sense this tab would also be Device pixel Ratio of 2. But is there a way to work out Device pixel Ratio from specs?