6

I'm mirriong a laptop with LCD TV through HDMI cable. Everytime I reboot I have to go to:

System Settings --> Screen Display

to enable mirroring again. Hence, I'm planning to write a bash script which enable this feature after logging in. However, I don't know which commands to type so that I can achieve the mirror feature.

I'm using Ubuntu 14.04 with the latest AMD driver (14.4) for Radeon 7xxx series so amdccle is installed but I'm not enabling it from there...

Note: I'm OK with using the alternative, amdccle, if necessary.

11

I'll presume that your monitors have the same resolution. Check for the names of your monitors with

$ xrandr --query
Screen 0: minimum 320 x 200, current 3840 x 1200, maximum 32767 x 32767
LVDS1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080      60.0*+   59.9  
   1680x1050      60.0     59.9  
   1600x1024      60.2  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       59.8     60.0  
   1152x864       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0 +
   1600x1200      60.0  
   1680x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        60.0  
   720x400        70.1  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

So here, mine are LVDS1 and DP1. If both are active, then simply run

xrandr --output DP1 --same-as LVDS1

If only one is active, then run

xrandr --output LVDS1 --auto --primary --output DP1 --auto --same-as LVDS1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.