You are not logged in.

#1 2023-11-05 04:08:00

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

[RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Hello,

I'm sure it's a very simple question, and there must have been hundreds people like me who asked it before, but I couldn't find anything through the forum search.

I want to mirror my screen (as is, meaning without it being on the right or left of my laptop screen) to a monitor connected with HDMI.

I read the Holy Arch-Wiki, and found an easy way of casting my screen to the right/left/below/above my laptop screen with the following command:

xrandr --output VGA1 --auto --output HDMI1 --auto --right-of VGA1

, where I get the correct HDMI1 and VGA1 device names through "xrandr -q".

This option is actually very cool, but I was hoping to simply replicate my laptop screen on the monitor, to use only one screen to work with.

So, my question is how do I mirror my laptop screen on the monitor connected with HDMI?

Also, how do make it a default option, so that my laptop is mirrored as soon as the monitor is connected by HDMI?

Appreciate all the help.

Last edited by Stonegrip (2023-11-08 14:50:31)

Offline

#2 2023-11-05 07:46:00

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

I read the Holy Arch-Wiki

RTHM
but for the xorg.conf, there's only https://man.archlinux.org/man/extra/xor … #Option~50 - though  enabling outputs at 0x0 is the default behavior anyway.

Offline

#3 2023-11-05 15:17:09

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Hi Seth, thanks for the link. Are you alluding to the fact that there is no simple xrandr option to mirror my laptop screen to the moniror, and the only (or the best way) to do that is by adjusting the Xorg.conf?

Offline

#4 2023-11-05 15:18:47

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Did you check the holy manpage? Tried --same-as ?

Offline

#5 2023-11-06 03:14:59

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Seth, you are fantastic! However, when I write a command like this:

xrandr --output eDP-1 --mode 1920x1080 --output HDMI-1-0 --mode 2560x1440 --same-as eDP-1

my monitor that has a higher resolution utilizes its upper-left corner only, whereas the rest of the screen to the right and below is black, and all I can do is to hover over it with my mouse. In other words, the output of the screen with lower resolution overrides the one with the higher resolution despite me purposefully mentioning both the resolutions in the xrandr parameters.

And if I write the same command with the --right-of option instead of --same-as, the whole monitor screen is utilized, which would be exactly what I'm looking for, if the screen was mirrored.

I read the xrandr wiki, and even though there are a lot of various options on how to rotate, scale up/down and position multiple displays, there seems to be only one option to make both the screens the same, which, if used like I stated above, applies the resolution of the smaller display to the whole bundle.

Do you know how I can replicate my laptop screen on a bigger monitor, so that both the display entities are fully utilized?

Offline

#6 2023-11-06 08:45:01

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

You'll have  to --scale one of the ouputs to actually clone them, otherwise you can only use them in overlapping positions, where the smaller one is going to mirror a segment of the bigger one.

Offline

#7 2023-11-07 18:13:33

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Thanks for the help. I tried to --scale the bigger clone down to the primary display, and it didn't work. Afterwards, I noticed that my primary screen max resolution is not 1920x1080, but 2560x1440 (after paying closer attention to the "xrandr -q" output). So, I simply changed that, and it worked as a charm, meaning the larger monitor is now a spitting image of my laptop screen.

Here is the final version of the command:

xrandr --output eDP-1 --mode 2560x1440 --output HDMI-1-0 --mode 2560x1440 --same-as eDP-1

However, as a result of that, my main screen resolution is 2560x1440 now, which makes it hard to read its objects. This is really nit-picking as it is more than usable, but I still wonder if I can keep its resolution as 2560x1440 to match it with the bigger monitor, but zoom it in a little so that it looks like it has 1920x1080 resolution. Do you think it's doable?

Offline

#8 2023-11-07 20:15:22

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

tried to --scale the bigger clone … it didn't work

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
What did you try and how did that not work?

I still wonder if I can keep its resolution as 2560x1440 to match it with the bigger monitor, but zoom it in a little so that it looks like it has 1920x1080 resolution

https://wiki.archlinux.org/title/HiDPI

"zoom" would suggest to shrink the visible area what logically collides with your cloning desire - you'll have to accept the content to be "small" on the hidpi or "large" on the normal output.
The generic approach for that is actually scaling.

Offline

#9 2023-11-07 21:15:57

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

What did you try and how did that not work?

I tried the following command:

xrandr --output eDP-1 --mode 1920x1080 --output HDMI-1-0 --mode 2560x1440 --same-as eDP-1 --scale 0.75x0.75

As a result, the bigger screen was only utilized in the upper left corner, whereas the rest was blacked out. Interestingly, I couldn't even move the curse outside the utilized area.

Earlier, when I was running the same command without the --scale parameter, namely:

xrandr --output eDP-1 --mode 1920x1080 --output HDMI-1-0 --mode 2560x1440 --same-as eDP-1

the result was almost the same as the one described above, but I could hover over the black area with the cursor.

Also, I've noticed that Xrandr stops working properly after 2-3 unsuccessful attempts. I just saved several Bash scripts and was changing and launching them for the sake of time. So, Xrandr starts spitting error messages after several runs even the the scripts were exactly the same. The remedy for me was constant rebooting. Is it a know peculiarity?

Last edited by Stonegrip (2023-11-07 21:20:47)

Offline

#10 2023-11-07 21:46:07

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Try

xrandr --output eDP-1 --mode 1920x1080 --pos 0x0
xrandr --output HDMI-1-0 --mode 2560x1440 --pos 0x0 --scale 0.75x0.75

xrandr is known to be not very good with command chains and it's more rebust to break them up into several calls.
Also we don't use "same as" but imply that by setting geometry and position.

So, Xrandr starts spitting error messages after several runs even the the scripts were exactly the same.

"Please don't paraphrase" - What kind of errors exactly?
Typically, restating the X11 server should™ suffice.

Offline

#11 2023-11-07 22:00:49

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

I've tried your commands, but to no avail. Same upper left corner utilization. However, the wallpaper and Conky are outside of it, so the whole monitor entity is covered by the wallpaper. Also, the objects locations don't match between the two displays: my mouse is not hitting the right spots on the secondary display, so I had to navigate via the primary one. Go figure.

Interestingly, if I rerun my bash-script after yours, the screen is still not utilized properly. And a simple X11 restart doesn't help. Will reboot now.

Offline

#12 2023-11-07 22:30:10

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Can you please post the resulting "xrandr -q"?

Offline

#13 2023-11-08 01:35:59

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Sure thing. There you go:

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
eDP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   2560x1440    240.00*+  60.00 +  59.99    59.99    59.96    59.95  
   1920x1440     85.00    75.00    60.00  
   1856x1392     75.00    60.01  
   1792x1344     75.00    60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     85.00    75.00    70.00    65.00    60.00  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 1190mm x 340mm
   2560x1440     59.95*+ 120.00  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-1-0 disconnected (normal left inverted right x axis y axis)
  2560x1440 (0x4b) 241.500MHz +HSync -VSync
        h: width  2560 start 2608 end 2640 total 2720 skew    0 clock  88.79KHz
        v: height 1440 start 1443 end 1448 total 1481           clock  59.95Hz
  1680x1050 (0x62) 146.250MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
        v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz
  1280x1024 (0x6b) 135.000MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock  79.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  75.02Hz
  1280x1024 (0x6c) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x800 (0x77) 83.500MHz -HSync +VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz
        v: height  800 start  803 end  809 total  831           clock  59.81Hz
  1152x864 (0x79) 108.000MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock  67.50KHz
        v: height  864 start  865 end  868 total  900           clock  75.00Hz
  1024x768 (0x82) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0x83) 75.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock  56.48KHz
        v: height  768 start  771 end  777 total  806           clock  70.07Hz
  1024x768 (0x84) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x9f) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0x9e) 50.000MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock  48.08KHz
        v: height  600 start  637 end  643 total  666           clock  72.19Hz
  800x600 (0xa0) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0xa1) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0xb3) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0xb4) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz

Offline

#14 2023-11-08 08:24:07

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

That has

eDP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
HDMI-1-0 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 1190mm x 340mm

- both outputs run at 2560x1440+0+0 and nothing is scaled at all?

As a caveat: the eDP is running at 240Hz (despite defaulting to 60) and HDMI at its default 60Hz.

Offline

#15 2023-11-08 14:20:04

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

sorry, I misunderstood the request and shared the xrandr -q of my current layout, where both the displays are rendering at 2560x1440 resolution.

Here is the output of xrandr -q after running your code:

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   2560x1440    240.00 +  60.00 +  59.99    59.99    59.96    59.95  
   1920x1440     85.00    75.00    60.00  
   1856x1392     75.00    60.01  
   1792x1344     75.00    60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96*   59.93  
   1600x1200     85.00    75.00    70.00    65.00    60.00  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1193mm x 336mm
   2560x1440     59.95*+ 120.00  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-1-0 disconnected (normal left inverted right x axis y axis)
  2560x1440 (0x4b) 241.500MHz +HSync -VSync
        h: width  2560 start 2608 end 2640 total 2720 skew    0 clock  88.79KHz
        v: height 1440 start 1443 end 1448 total 1481           clock  59.95Hz
  1680x1050 (0x62) 146.250MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
        v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz
  1280x1024 (0x6b) 135.000MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock  79.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  75.02Hz
  1280x1024 (0x6c) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x800 (0x77) 83.500MHz -HSync +VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz
        v: height  800 start  803 end  809 total  831           clock  59.81Hz
  1152x864 (0x79) 108.000MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock  67.50KHz
        v: height  864 start  865 end  868 total  900           clock  75.00Hz
  1024x768 (0x82) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0x83) 75.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock  56.48KHz
        v: height  768 start  771 end  777 total  806           clock  70.07Hz
  1024x768 (0x84) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x9f) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0x9e) 50.000MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock  48.08KHz
        v: height  600 start  637 end  643 total  666           clock  72.19Hz
  800x600 (0xa0) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0xa1) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0xb3) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0xb4) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz

Like I wrote earlier, after using your xrandr script the bigger monitor is utilized fully by the wallpaper and Conky, but all the other windows are opened in the top left corner and occupy ~75% of the total screen space. I can also move my cursor outside the window-occupied area. And most importantly, the cursors on my laptop screen and the monitor do not align: I point at different targets on the bigger monitor (as the cursor of the monitor uses the whole screen space, but the windows are located in the top left corner), so I can only navigate through my laptop.

As for the monitor refresh rate, I also noticed it is at 60Hz, whereas it is supposed to be at 240Hz, but I thought it's limited by the HDMI connection. What is the highest possible refresh rate I can get and mention in the xrandr parameters when connected via HDMI? I tried adding the "--rate 120" parameter to the HDMI-1-0 output of the xrandr-based script, but the resultant refresh rate stayed at the previous 60Hz level, so it made me think that 60Hz is the bare maximum I can get out of HDMI. I would be happy to know I was wrong.

Last edited by Stonegrip (2023-11-08 14:32:25)

Offline

#16 2023-11-08 14:29:14

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.01    59.97    59.96*   59.93
HDMI-1-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1193mm x 336mm
   2560x1440     59.95*+ 120.00 

You've both outputs at 1920x1080, HDMI-1-0 upscaled to 2560x1440 for the scanout.

Though I just realized that this is kinda dumb - you could just run both at 1920x1080?

xrandr --output eDP-1 --mode 1920x1080 --output HDMI-1-0 --mode 1920x1080 --same-as eDP-1

Offline

#17 2023-11-08 14:37:41

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

You are right. I tried to apply the 1920x1080 resolution to both the screen, and it worked perfectly.

So, the only question left is related to the 60Hz refresh rate. What is the highest possible refresh rate I can get when connected via HDMI? I tried adding the "--rate 120" parameter to the HDMI-1-0 output of the xrandr-based script, but the resultant refresh rate stayed at the previous 60Hz level, so it made me think that 60Hz is the bare maximum I can get out of HDMI. I would be happy to know I was wrong.

Offline

#18 2023-11-08 14:41:22

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

The edid advertises 120Hz only for 2560x1440 - which is odd.
You could try whether that works at all in isolation.

If so, you could try to run both outputs at 2560x1440 and scale both to 75% - though that's a bit clumsy and overhead hmm

Offline

#19 2023-11-08 14:45:37

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

I tried the 120 refresh rate at 2560x1440 resolution, and it didn't fly. Same old 60 hertz are shown in xrandr -q.

Offline

#20 2023-11-08 14:48:55

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Anyways, I think the core issue is resolved, so I'm tagging this thread correspondingly. It would be nice to delve into the refresh rate issue though. It kind of sucks when the 240Hz-capable monitor is use at 60Hz, even though it has nothing to do with Arch and this forum.

Offline

#21 2023-11-08 15:05:20

seth
Member
Registered: 2012-09-03
Posts: 57,935

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

only the eDP does 240Hz, the HDMI seems capable of 120Hz.

xrandr --output HDMI-1-0 --mode 2560x1440 --rate 120
xrandr -q

Offline

#22 2023-11-08 15:35:36

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Same 60Hz. Plus the utilized screen size shrank back to 75% of the total area.

Another thought: since I'm using an ultra-wide monitor, which shows two laptop screens on one wide screen side by side (PIP mode), the second half is connected and casts my corporate laptop on MS Windows. So, I've reviewed its refresh rate, and it also shows 60Hz. Can it be a limiting factor, meaning the monitor can't refresh its parts at different refresh rates, so it takes the one with a lower refresh rate and caps the others respectively?

Offline

#23 2023-11-08 15:51:27

Stonegrip
Member
Registered: 2022-12-10
Posts: 60

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Yup, I just validated this hypothesis. I have disconnected my second (corporate) laptop and turned off the PIP mode. As a result, my refresh rate jumped up to the requested 120Hz after running the same xrandr script. I also googled it, and it is said on Reddit that the PIP mode does limit the refresh rate at 60Hz.

What a bummer. Since I'm planning to keep using the display in PIP mode (that was the whole idea of purchasing an ultra-wide monitor), I will have to live with the 60Hz.

Offline

#24 2024-05-04 15:15:59

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 49
Website

Re: [RESOLVED] How to mirror my laptop screen on a HDMI-connected monitor?

Hello Seth and Stonegrip,

I ran into the thread after having purchased a Dell G2724D monitor https://www.dell.com/en-us/shop/dell-27 … ccessories to be used as an extension for my Asus Vivobook M7600Q laptop (AMD Ryzen 7, GeForce RTX). As my profession has to do with physics research, I have to publish continuously and needed a larger monitor, not only for editing (LaTeX) but also for graphics (Maple, Matplotlib).   

The monitor came equipped with a DisplayPort-DisplayPort cable and a USB-C - DisplayPort cable (no HDMI cable included). The first option can not be used as the laptop has no DisplayPort available, while the second cable does not operate after I have connected it into the USB-C port of the laptop.  The laptop manual says the Thunderbolt 4 port is compatible with USB Type-C standards and provides a transfer rate of up to 40 Gbit/s for Thunderbolt 4 devices (which the laptop is not). So I purchased myself a HDMI 2.1 cable.   

After running the command

xrandr --output HDMI-1-0 --mode 2560x1440 --pos 0x0 --scale 0.75x0.75

(where 2560 x 1440 is the maximum resolution the monitor supports)

or

xrandr --output eDP-1 --mode 1920x1080 --output HDMI-1-0 --mode 1920x1080 --same-as eDP-1

I get the message

output HDMI-1-0 not found; ignoring

I just discarded the 0 form the HDMI-1-0

xrandr --output eDP-1 --mode 1920x1080 --output HDMI-1 --mode 1920x1080 --same-as eDP-1

and it worked like a charm.

After launching

xrandr --output HDMI-1 --mode 2560x1440 --rate 120

(taking into consideration that the monitor can operate at 144 and 165 Hz)

and then

xrandr -q

I get

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 215mm
   3840x2400     60.00 +
   3840x2160     60.00    60.01    59.98    59.97  
   3200x1800     59.96    59.94  
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.99    59.99    59.96    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     60.00    59.88    59.95  
   1920x1080     60.00*   60.01    59.97    59.96    59.93  
   1600x1200     60.00    60.00  
   1680x1050     60.00    59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.00    60.02  
   1440x900      60.00  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      60.00    59.99    59.97    59.81    59.91  
   1280x720      60.00    60.00    59.99    59.86    59.74  
   1024x768      60.00    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.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    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  

HDMI-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 596mm x 335mm
   2560x1440     59.95 + 143.97   120.04    96.02    72.01    60.00    50.01    48.01   120.00* 
   1920x1440     85.00    75.00    60.00  
   1856x1392     75.00    60.01  
   1792x1344     75.00    60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.95    59.88    59.95  
   1920x1080     60.01   143.98   120.00   119.88    59.97    59.96    60.00    60.00    50.00    59.94    59.93  
   1600x1200     59.95    85.00    75.00    70.00    65.00    60.00  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1440x900      59.90  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00   120.00   119.88    59.99    59.86    60.00    50.00    59.94    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   720x576       50.00  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   720x480       60.00    59.94  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    75.00    72.81    75.00    60.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04    70.08  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27

Thank you very much. smile

Last edited by Daedalus24 (2024-05-04 15:40:32)

Offline

Board footer

Powered by FluxBB