EnumDisplayDevices vs EnumDisplayMonitors - windows

I have noticed that EnumDisplayDevices and EnumDisplayMonitors report different information on which monitor is attached to which port.
For example, i have 4 monitors attached to my graphics card. 3 of them are 1920x1080 and one of them is 1280x768.
The information i get from EnumDisplayMonitors is:
1920 1080 \\.\DISPLAY1
1920 1080 \\.\DISPLAY2
1920 1080 \\.\DISPLAY3
1280 768 \\.\DISPLAY4
and the one from EnumDisplayDevices is:
1280 768 \\.\DISPLAY1
1920 1080 \\.\DISPLAY2
1920 1080 \\.\DISPLAY3
1920 1080 \\.\DISPLAY4
Also i noticed that the order in EnumDisplayDevices is sometimes shuffled, so it could also be:
1280 768 \\.\DISPLAY1
1920 1080 \\.\DISPLAY4
1920 1080 \\.\DISPLAY2
1920 1080 \\.\DISPLAY3
Anyways, which one is the correct one?
I am looking for this because i want to read the EDID data from the correct monitor.

Related

Relation between PPI and Resolution

The Redmi Note 8 Pro has a screen height of 6.53 inch and 395 ppi. The total pixels along height is 2580 but the max resolution is 2340 *1080. What about the extra 240 pixels (2580-2340)?
I did research on this but couldn't find a answer

What does intrinsic value represent in dev tools when inspecting an image?

When inspecting an image in Chrome Dev Tools I notice that when hovering on the HTML it will display dimensions followed by other dimensions in parenthesis.
For example: 298 x 274 pixels (intrinsic: 860 x 731 pixels)
What is the meaning of the dimension in the parenthesis?
When you hover on the HTML it will display dimensions followed by other dimensions in parenthesis.
For example: 298 x 274 pixels (intrinsic: 860 x 731 pixels)
860 x 731 pixels is the image's actual size, and 298 x 274 pixels are the size after applying CSS to that image.

Fuzzy image through HTDMI Fedora 25

I have Fedora 25 mate-desktop and ATI/AMD driver on my laptop. And external monitor 1920x1080 27. On my external monitor bad pixel resolution.
How fix it?
enter image description here
Display xrandr:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP connected (normal left inverted right x axis y axis)
1920x1080 60.01 + 40.00
1680x1050 60.00
1400x1050 60.00
1280x1024 59.95
1440x900 59.99
1280x960 59.99
1280x854 59.95
1280x800 59.96
1280x720 59.97
1152x768 59.95
1024x768 59.95
800x600 59.96
848x480 59.94
720x480 59.94
640x480 59.94
HDMI-A-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+ 60.01 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1600x900 60.00
1280x1024 75.02 60.02
1280x800 59.91
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
832x624 74.55
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
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
lspci | grep VGA -A 12
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 98e4 (rev ea)
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15b3
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 157b
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 157c
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 157c
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 157c
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 157b
00:08.0 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 1578
00:09.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 157d
00:09.2 Audio device: Advanced Micro Devices, Inc. [AMD] Device 157a
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 20)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 4b)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 49)
My monitor BenQ EW2750ZL and laptop HP 255 G6 2HG34ES

macOS does'nt change dppx with scaling, bug or feature?

I've made some tests on macOS 10.13 with dppx.
macOS has 4 scales:
1680 х 1050
1440 х 900 (as default begin 2016+)
1280 x 800 (as default untill 2016)
1024 х 640
I've cheched dppx (using this online service) and as a results, I've always got 2dppx!
Why? What am I doing wrong? This is a bug?
macbook resolution is 2560*1600, assuming that I have 2 dppx, real scaling is: 2560 / 2dppx x 1600 / 2 dppx === 1280 x 800
Other scalling is:
1680 х 1050 = 1.52 dppx
1440 х 900 = 1.77 dppx
1280 x 800 = 2 dppx
1024 х 640 = 2.5 dppx
I'm right? If so, why do the tools for checking dppx always write 2dppx?
This is consistent with how Mac OS treats retina as a whole. The scaling factor is locked at 2x and the virtual resolution of the screen changes, instead of the resolution of the screen being fixed and the scaling factor changing. The web browser is faithfully exposing this fact to the web page.
At 1680x1050, for instance, the entire screen is rendered at 3360x2100 with a 2x scaling factor, and then scaled down by a factor of 1.3125 to fit on the screen, but this scaling is invisible to apps. If the MacBook Retina is set to any resolution other than exactly 2x the physical display, then the user has no hope of seeing a pixel-perfect image.
For a platform where the devicePixelRatio can change, test your site against the display scaling in Android N, or change the zoom level in Chrome or Firefox, but not Safari.
Some links:
Understanding points and the user space in Cocoa Drawing as they interact with screen resolution
What resolution programmers will get in Macbook Pro Retina
https://www.anandtech.com/show/6023/the-nextgen-macbook-pro-with-retina-display-review/6

Embedded linux framebuffer rotate

I have to integrate an LCD screen to my embedded linux (ARM9) system. The LCD is portrait 320x480 and I need to run the screen in landscape orientation 480x320.
Using the LCD config register I can rotate it in hardware, so that (x,y)(0,0) is rotated 90 degrees.
Here starts my problem, the screen's wide side gets narrowed from 480 pixels to 320, and the long side of the picture is out of the screen. This should be fixed by changing the framebuffer dimensions AFAIK, but I tried a few ways to do it with no success yet.
using the fbset, below are the settings for portrait:
mode "480x320-55"
# D: 9.091 MHz, H: 18.182 kHz, V: 55.096 Hz
geometry 480 320 480 320 16
timings 110000 4 4 4 4 12 2
rgba 5/0,6/5,5/11,0/0
endmode
Sending the command:
fbset --geometry 480 320 480 320 16
Results in:
mode "480x320-55"
# D: 9.091 MHz, H: 18.182 kHz, V: 55.096 Hz
geometry 480 320 480 320 16
timings 110000 4 4 4 4 12 2
rgba 5/0,6/5,5/11,0/0
endmode
Which makes the picture appear a few times and overlaps, but the screen width is still too narrow.
I tried to provide double the screen size for the virtual xres and yres, but no change.
fbset --geometry 480 320 960 640 16
I also tried using fb rotate function I found on the web "saFbdevRotation.c", which uses the FB IOCTL, but the active screen size is still incorrect.
rotate 90 degrees, see output
$> ./fb_rotate -r 90
## Before rotation
### Fix Screen Info:
Line Length - 640
Physical Address = 81a00000
Buffer Length = 1048576
### Var Screen Info:
Xres - 320
Yres - 480
Xres Virtual - 320
Yres Virtual - 480
Bits Per Pixel - 16
Pixel Clk - 110000
Rotation - 0
## after rotation
### Fix Screen Info:
Line Length - 960
Physical Address = 81a00000
Buffer Length = 1048576
### Var Screen Info:
Xres - 480
Yres - 320
Xres Virtual - 480
Yres Virtual - 320
Bits Per Pixel - 16
Pixel Clk - 110000
Rotation - 90
I can also add that the system is very limited with free memory, can this cause the fb to NOT allocate a new buffer? However there were no errors in dmesg.
Will appreciate your advise.
I can also add that the system is very limited with free memory, can
this cause the fb to NOT allocate a new buffer? However there were no
errors in dmesg.
Normally,the standard way for allocating video buffer is to pre-allocate a large video buffer(based on the max video resolution you support) in the boot time,which pass a men= argument to the kernel so that kernel won't occupy it initially.
then later on,the video driver can do
void *ioremap(unsigned long phys_addr, unsigned long size)
which will create a mmap area for driver directly operate the frame buffer.
You can check it via doing cat /proc/iomen
Thus,the video driver memory is pre-allocated and is different from linux kernel system memory(like kmalloc() or get_free_pages() or vmalloc()), what you concerned is ruled out.
I think your issue is related to the LCD that you are using. I have seen several embedded LCDs that claim to support 90 deg rotation, but the result was exactly as you described.
My problems were always encountered using the RGB display interface. I suspect that the rotation might have worked using the CPU interface.
I have seen only one embedded display that was able to do the rotation correctly for RGB interface.
The thing is, you should try to do the rotation either with
LCD HW, your processor HW, or pure SW.
I do not know if Linux framebuffer might use pure SW or your processor HW, it probably depends on your driver.
Have you tried rotating the display by adding a line in config.txt (on the DOS boot partition)?
The line you would need is:
display_rotate=0..3
(where 0 is the default and 1 is 90 degrees clockwise, 2 180 degrees, etc.)
There's also an lcd_rotate command, but I'm not sure what the difference is.

Resources