You are not logged in.
Hi to all!
I've a notebook and I often connect it to an external monitor or to a TV using HDMI.
When I connect to the external monitor xrandr -q reports the correct physical dimensions.
The TV instead reports wrong dimensions.
Is there a way to fix it so that xrandr "automatically" reports the correct values every time that specific TV is connected?
Last edited by Xwang (2021-10-06 07:34:24)
Offline
Meantime I've discovered that even with the laptop alone there is something strange because xdpyinfo and xrandr report different physical dimensions (xrandr's output being the correct one):
xdpyinfo | grep -i dimens
dimensions: 1920x1080 pixels (508x285 millimeters)
xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
1920x1080 60.02*+ 60.01 59.97 59.96 59.93
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 59.98
800x450 59.95 59.82
640x512 60.02
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
640x400 59.88 59.98
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)
Why?
EDIT:
Meantime I've solved this issue by forcing the dpi with which Xorg is started in rootless mode by sddm from 96 to 128 (which is the correct value for my laptop screen).
Last edited by Xwang (2021-10-05 11:48:08)
Offline
Check the later posts in https://bbs.archlinux.org/viewtopic.php?id=269711 .
Combining what I and Seth posted should give a reasonable explanation .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Check the later posts in https://bbs.archlinux.org/viewtopic.php?id=269711 .
Combining what I and Seth posted should give a reasonable explanation .
Thank you.
I've solved the issue when using the laptop alone by setting the correct dpi to 128 and then reducing font size accordngly.
However I still have the issue when I connect the tv.
When I connect it I use the iterate monitor script taken from the Arch's wiki page about Xorg so that to turn off the laptop screen and use the tv as the only monitor (I've only forced the mode to 1920x1080 because otherwise the Tv uses a lower resolution even though it supports the 1920x1080):
#!/bin/bash
# get info from xrandr
connectedOutputs=$(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
activeOutput=$(xrandr | grep -E " connected (primary )?[1-9]+" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
# initialize variables
execute="xrandr "
default="xrandr "
i=1
switch=0
for display in $connectedOutputs
do
# build default configuration
if [ $i -eq 1 ]
then
default=$default"--output $display --auto --mode 1920x1080 "
else
default=$default"--output $display --off "
fi
# build "switching" configuration
if [ $switch -eq 1 ]
then
execute=$execute"--output $display --auto --mode 1920x1080 "
switch=0
else
execute=$execute"--output $display --off "
fi
# check whether the next output should be switched on
if [ $display = $activeOutput ]
then
switch=1
fi
i=$(( $i + 1 ))
done
# check if the default setup needs to be executed then run it
echo "Resulting Configuration:"
if [ -z "$(echo $execute | grep "auto")" ]
then
echo "Command: $default"
`$default`
else
echo "Command: $execute"
`$execute`
fi
echo -e "\n$(xrandr)"
Once I run it the two dimension of xpdyinfo and xrandr differ and moreover the xrandr one is wrong (the real dimension measured with a ruler are 705x395 millimiters).
xdpyinfo | grep -i dimens
dimensions: 1920x1080 pixels (378x212 millimeters)
xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary (normal left inverted right x axis y axis)
1920x1080 60.02 + 60.01 59.97 59.96 59.93
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 59.98
800x450 59.95 59.82
640x512 60.02
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
640x400 59.88 59.98
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 640mm x 360mm
1360x768 59.80 +
1920x1080 60.00* 50.00 59.94 30.00 25.00 24.00 29.97 23.98
1920x1080i 60.00 50.00 59.94
1280x720 60.00 50.00 59.94
1024x768 60.00
800x600 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 60.00 59.94
If there is a way to identify at the end of the iterate monitor script that the connected device is the TV, I could fix its physical size by adding this lines:
for i in 1 2;do
xrandr --fbmm 705x395
done
or there is a better way to do the same?
Offline
the real dimension measured with a ruler are 705x395 millimiters
W/ or w/o the bezel?
Also it would only be off by 10%
the Tv uses a lower resolution even though it supports the 1920x1080
Its EDID announces 1360x768 as default
Also it's ~77 DPI at 1920x1080 and 55 DPI at 1360x768 - the 96 DPI are probably set by your session (iirc gnome does that) - is this an nvidia system?
Offline
the real dimension measured with a ruler are 705x395 millimiters
W/ or w/o the bezel?
w/o bezel
Also it would only be off by 10%
the Tv uses a lower resolution even though it supports the 1920x1080
Its EDID announces 1360x768 as default
Also it's ~77 DPI at 1920x1080 and 55 DPI at 1360x768 - the 96 DPI are probably set by your session (iirc gnome does that) - is this an nvidia system?
My system is a laptop with nvidia optimus with KDE.
Now I've set sddm to start X with 128 dpi (being that the correct value of the laptop screen).
When I switch to that TV I would like to have the correct size and dpi for that display because otherwise part of the desktop (about 10 to 20 pixel for each side) is not displayed as if the pc "thinks" the display to be a little bigger. The result is that it is extremely difficult to semi blindly operate the bottom panel and to click the three buttons in maximized windows.
Offline
because otherwise part of the desktop (about 10 to 20 pixel for each side) is not displayed
That's probably not related to the resolution and certainly not the DPI but https://en.wikipedia.org/wiki/Overscan - disable that in the Tv ("just scan" setting?)
Offline
because otherwise part of the desktop (about 10 to 20 pixel for each side) is not displayed
That's probably not related to the resolution and certainly not the DPI but https://en.wikipedia.org/wiki/Overscan - disable that in the Tv ("just scan" setting?)
You are right! Thank you very much! Doing so that problem has been solved!!!
So I've reverted back to forcing 96 dpi on my laptop screen too (it works better with thunderbird and firefox and I'm using that setting since 2016), but for the TV a smaller value would be better. Is there a way to understand in the bash if the device connected to hdmi is that TV so that the script can automatically change the dpi when it switches to the TV?
Last edited by Xwang (2021-10-06 07:30:11)
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline