5 Replies Latest reply on Dec 20, 2015 9:00 AM by nibal

    Headless AMD graphics card with integrated Intel GPU on Ubuntu




      I am trying to know how to activate/access AMD GPU for OpenCL applications and CodeXL when it is not connected to any display.

      In other words, I want to use AMD GPU as a dedicated compute device while integrated Intel GPU is in charge of display (and X window).

      (1) I have two monitors. All of them have been connected to integrated GPU.

      (2) I've installed "AMD Radeon Software Crimson Edition Proprietary Ubuntu Graphics Driver" by using dpkg -i

      (3) However, after rebooting, what I can see through my monitors is just blank screen. (At least, during booting, I can see something including Ubuntu logo...)


      Please let me know what I need to to fix this issue. I attach my system environment and contents of xorg.conf


      My system environment includes the followings:

      - Ubuntu 14.04 LTS

      - Intel Core i7-4470 CPU

      - AMD Radeon R9 Fury X


      Contents of xorg.conf

        1 Section "ServerLayout"

        2     Identifier "amd-layout"

        3     Screen 0 "amd-screen" 0 0

        4 EndSection


        6 Section "Device"

        7     Identifier "intel"

        8     Driver "intel"

        9     Option "AccelMethod" "uxa"

      10     BusID "PCI:0@0:2:0"

      11 EndSection


      13 Section "Device"

      14     Identifier "amd-device"

      15     Driver "fglrx"

      16     BusID "PCI:1:0:0"

      17 EndSection


      19 Section "Monitor"

      20     Identifier "amd-monitor"

      21     Option "VendorName" "ATI Proprietary Driver"

      22     Option "ModelName" "Generic Autodetecting Monitor"

      23     Option "DPMS" "true"

      24 EndSection


      26 Section "Screen"

      27     Identifier "amd-screen"

      28     Device "amd-device"

      29     Monitor "amd-monitor"

      30     DefaultDepth 24

      31     SubSection "Display"

      32         Viewport   0 0

      33         Depth     24

      34     EndSubSection

      35 EndSection





        • Re: Headless AMD graphics card with integrated Intel GPU on Ubuntu

          In the most cases second X server is not required to using and running OpenCL apps. Just same OpenCL from drivers is working without X server, without any envvars setting.


          I am running second AMD graphics card by second X server by using simple script, that switch GLX libraries before running second X server. To run painlessly second X server I added options '-sharevts' to sharing single linux console and allowing to using two X server simultaneously. Ofcourse second X server shares this same linux console (vt) like IGP X server. Some stuff is need to be added to X server config:


          Section "ServerFlags"

                  Option "AllowMosuseOpenFail" "true"

                  Option "AutoEnableDevices" "false"

                  Option "DontVTSwitch" "true"

                  Option "DontZap" "true"



          After adding that lines to original xorg.config generated by AMD drivers, we can run second X server. I run server by command:

          nohup X -config /etc/X11/xorg.conf.fglrx -sharevts :1 vt7&

          EDIT: I am running that command (from script) when I am working on the graphics mode (first X server) from X terminal. When X server running, any switching between linux consoles causes the stopping of the

          second X server and the OpenCL apps, so you should not do this operation.


          before that you must switch GLX libraries to AMD version:

          /usr/lib64/fglrx/switchlibglx amd

          and switch back to intel, after X server running:

          /usr/lib64/fglrx/switchlibglx intel


          If you would like to use OpenCL via X server, just try to run second X server.

          I am using that config due to problems with stability (often crashes/freezes) while AMD GPU was doing some heavy computations and desktop was running on the same GPU.

            • Re: Headless AMD graphics card with integrated Intel GPU on Ubuntu

              I appreciate for your response.


              However, I am not sure how it can be applied to my problem...

              My biggest problem is that I can see nothing (only blank black screen...) when I connect my monitors to Intel iGPU.

              (It normally works only when I don't install AMD graphic driver. However, in this case, obviosuly, my AMD GPU is not activated/enabled)

              As a result, I have no choice but to connect one of the monitors to AMD graphics card(Even in this case, I have one blank screended monitor connected to iGPU).


              In this situation, If I follow your advices, can this problem be solved? More specifically, should the discrete GPU only for OpenCL should be connected to x server?

              In my understanding, procedure you specify includes following, correct?

              (1) add  "ServerFlags" stuffs in "/etc/X11/xorg.conf" (I assume this is automatically genrated by AMD driver and correponds to what I attached)

              (2) switch GLX libraries to AMD version

              (3) run secondary X server by using the config described in (1)

              (4) switch back GLX libraries to intel