Multiple Monitors – Secondary Display for Video Playback Only

multiple-monitorsvideo

I have two displays. One monitor (DisplayPort-0) for work and one TV (HDMI-0) for movies. Xrandr says both connected, but I configured screen/desktop just to monitor, because I don't want any window to stray to TV. On TV I want only video output.

Is there any media player, utility program or any command line tool, that will allow me send video output to TV, means send it to display, that is connected but out of screen?

I use Radeon driver and GPU Radeon HD6xxx family. I totally lack experience here so thanks for any advice.

edit: Oh, and I run elementary OS based on Ubuntu 12.04

edit-1: There seems to be common solution for this by setting two separate screens, one for each display. In the past, one would fiddle with xorg.conf. These days, people achieve that through AMD proprietary driver. I'll try both way and will post my results here.

Best Answer

OK, done, but next time will someone tell me, that configuring X.server is fun, I'll punch him right in the middle of his eyes.

Anyway, the solution, that leads me to success, include AMD proprietary driver and VLC player.

  1. firstly, install AMD proprietary driver. Thanks to this thread I used somehow cleaner and should-be-safe procedure with installation code (recommended even if you have already fglrx installed, but experiencing troubles):

    sudo apt-get --purge remove fglrx*
    sudo apt-get install fglrx-updates fglrx-amdcccle-updates
    
  2. now you can configure your setup with

    sudo amdcccle
    

    it'll open C atalyst C ontrol C enter

  3. In CCC you configure your displays as 'desktop with one display' or something like that. I don't know exact english phrase, because I use translated GUI. Anyway, it should configure your displays as separate screen.

  4. now restart computer (or X). My computer behave strangely after boot, it needs one suspend & resume to work properly. Don't ask me why, but if you experienced abnormally laud GPU fan, you have probably the same problem and suspend & resume is one way around. For piece in mind, run CCC again and check your settings.

  5. now to the media player. If you don't have VLC yet, install it via App Center. Then open VLC, go to Tools->Setting and

    NOTE: solution described here makes all VLC settings permanent, which makes VLC one-purpose player only for video on secondary display. If you want use VLC for other purposes, you should run VLC with this settings set from command line, read VLC command line help

    • on the first panel 'Interface' uncheck 'embeed video in interface' and uncheck 'Show controls in fullscreen'

      (again, phrases may vary, because I have localized GUI in VLC too, thats one good thing about linux -> it localize all your apps by default).

    • then go to Video tab and check 'Play in fullscreen' and set video output to

      Video output X11(XCB)
      
    • then turn to advanced/all (?) setting via radio button near left bottom corner.

      • In tree structure navigate to video and there set 'video width' and 'video height' to your secondary screen resolution. Without this, VLC plays video on my secondary screen in resolution of source, not scaled to fullscreen.
      • Then expand video->modules->x-window and set it to your desired X screen. Mine (and most probably yours) is

        :0.1
        

        Initials :0 means local display and following .1 targets secondary screen. Primary display/screen is :0.0. You can find your configured x screens and their numbers in

        /etc/X11/xorg.conf
        
  6. then should be all set. You can try play video with VLC and it should open on your secondary display fullscreen, while keeping VLC control interface on your primary screen. Only audio is played from your PC speakers/headphones. That we solve in VLC control interface under Audio->Audio devices, where we choose HDMI output. Then you hit Ctrl+L to switch VLC interface into playlist view and you have all your media fully under control.

This procedure describe in short, what leads me to success. In your case, it shall not be as straightforward, because of LINUX. But if you don't understand something or have any problem, just ask.

EDIT: Switch back to radeon driver

I had strange problems with fglrx driver and xorg.conf generated by amdcccle looked pretty normal, so I tried, if it'll work with open-source radeon driver and guess what, it works! Just need a little modification (basically, just replace driver "fglrx" to driver "radeon", beware that there are multiple device sections).

My working xorg.conf looks like this:

Section "ServerLayout"
Identifier     "aticonfig Layout"
Screen      0  "aticonfig-Screen[0]-0" 0 0
Screen         "amdcccle-Screen[1]-1" 2560 0
EndSection

Section "Monitor"
Identifier   "aticonfig-Monitor[0]-0"
Option      "VendorName" "ATI Proprietary Driver"
Option      "ModelName" "Generic Autodetecting Monitor"
Option      "DPMS" "true"
EndSection

Section "Monitor"
Identifier   "0-DFP1"
Option      "VendorName" "ATI Proprietary Driver"
Option      "ModelName" "Generic Autodetecting Monitor"
Option      "DPMS" "true"
Option      "PreferredMode" "2560x1440"
Option      "TargetRefresh" "60"
Option      "Position" "0 0"
Option      "Rotate" "normal"
Option      "Disable" "false"
EndSection

Section "Monitor"
Identifier   "0-DFP5"
Option      "VendorName" "ATI Proprietary Driver"
Option      "ModelName" "Generic Autodetecting Monitor"
Option      "DPMS" "true"
Option      "PreferredMode" "1920x1080"
Option      "TargetRefresh" "50"
Option      "Position" "0 0"
Option      "Rotate" "normal"
Option      "Disable" "false"
EndSection

Section "Device"
Identifier  "aticonfig-Device[0]-0"
Driver      "radeon"
Option      "Monitor-DFP1" "0-DFP1"
BusID       "PCI:1:0:0"
EndSection

Section "Device"
Identifier  "amdcccle-Device[1]-1"
Driver      "radeon"
Option      "Monitor-DFP5" "0-DFP5"
BusID       "PCI:1:0:0"
Screen      1
EndSection

Section "Screen"
Identifier "Default Screen"
DefaultDepth     24
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device     "aticonfig-Device[0]-0"
DefaultDepth     24
SubSection "Display"
    Viewport   0 0
    Depth     24
EndSubSection
EndSection

Section "Screen"
Identifier "amdcccle-Screen[1]-1"
Device     "amdcccle-Device[1]-1"
DefaultDepth     24
SubSection "Display"
    Viewport   0 0
    Depth     24
EndSubSection
EndSection

You should backup your xorg.conf before uninstall fglrx, because it is removed during uninstallation process. Then you uninstall fglrx and reconfigure x-server like this:

sudo apt-get remove --purge xorg-driver-fglrx fglrx*
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

Then put back your modified xorg.conf and restart computer (or X). If nothing went wrong, you should see your separate screen config load under radeon driver. Only issue is missin HDMI audio, which you can solve by adding kernel parameter

radeon.audio=1

more useful informations can be obtained in documentation.

Related Question