amd gpu but display on intel integrated graphics

5

3

On my Ubuntu 12.04 I connected my monitor to the onboard intel graphics. I'd like to use my ati radeon 6770 for opencl tasks (e.g. bitcoin mining).

So far I couldn't figure out how to get the ati driver working. When calling "aticonfig --initial -f" it always writes a new xorg.conf that ignores the intel graphics. At boot time it works only when I attached the monitor to the ati card.

So I manually tampered with the xorg.conf and got this:

Section "ServerLayout"
    Identifier     "Default Monitor"
    Screen      0  "myscreen" 0 0
    Screen      1  "deadscreen" RightOf "myscreen"
EndSection

Section "Module"
EndSection

Section "Monitor"
    Identifier "Default Monitor"
    Option "VendorName" "Monitor Vendor"
    Option "ModelName" "Monitor Name"
    Option "DPMS" "true"
EndSection

Section "Monitor"
    Identifier "null Monitor"
    Option         "Enable" "false"
EndSection

Section "Device"
    Identifier "Intel Integrated Graphics"
    Driver     "intel"
    BusID      "PCI:0:2:0"
    Screen 0
EndSection

Section "Device"
    Identifier  "aticonfig-Device[0]-0"
    Driver      "fglrx"
    BusID       "PCI:1:0:0"
    Screen 1
EndSection

Section "Screen"
    Identifier "myscreen"
    Device     "Intel Integrated Graphics"
    Monitor    "Default Monitor"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

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

I think this might be the right way since I see that X tries to start both drivers in /var/log/Xorg.0.log. However the fglrx driver seems crash (end of xorg.0.log):

Backtrace:
[     6.625] 0: /usr/bin/X (xorg_backtrace+0x26) [0x7fb5cd41b846]
[     6.625] 1: /usr/bin/X (0x7fb5cd293000+0x18c6ea) [0x7fb5cd41f6ea]
[     6.625] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fb5cc5b9000+0xfcb0) [0x7fb5cc5c8cb0]
[     6.625] 3: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/extra-modules.dpkg-tmp/modules/drivers/fglrx_drv.so (xdl_xs111_atiddxGetGPUMapInfo+0x1b1) [0x7fb5c88e16b1]
[     6.625] 4: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/extra-modules.dpkg-tmp/modules/drivers/fglrx_drv.so (atiddxGetGPUMapInfo+0xd) [0x7fb5c87bcc0d]
[     6.625] 5: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/extra-modules.dpkg-tmp/modules/extensions/libglx.so (0x7fb5ca12d000+0x1ab29) [0x7fb5ca147b29]
[     6.625] 6: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/extra-modules.dpkg-tmp/modules/extensions/libglx.so (0x7fb5ca12d000+0x1cf8c) [0x7fb5ca149f8c]
[     6.625] 7: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/extra-modules.dpkg-tmp/modules/extensions/libglx.so (0x7fb5ca12d000+0x1ee55) [0x7fb5ca14be55]
[     6.626] 8: /usr/bin/X (InitExtensions+0x99) [0x7fb5cd350069]
[     6.626] 9: /usr/bin/X (0x7fb5cd293000+0x3d605) [0x7fb5cd2d0605]
[     6.626] 10: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xed) [0x7fb5cb44e76d]
[     6.626] 11: /usr/bin/X (0x7fb5cd293000+0x3daad) [0x7fb5cd2d0aad]
[     6.626] Segmentation fault at address 0x14
[     6.626] 
Caught signal 11 (Segmentation fault). Server aborting
[     6.626] 

I'd be very happy if someone can give me a hint on how to configure my ATI card while using the integrated graphics for display.

Update

I used most of jjhughes57 config and successfully booted the X server on intel (keyboard layout is changed though, funnily).

Unfortunately the 2nd X server (fglrx) doesn't fully start. It shuts itself down right after starting>

[     6.265] (II) fglrx(0): Restoring Recent Mode via PCS is not supported in RANDR 1.2 capable environments
[     6.296] (II) UnloadModule: "mouse"
[     6.296] (II) Unloading mouse
[     6.296] (II) UnloadModule: "kbd"
[     6.296] (II) Unloading kbd
[     6.298] (II) fglrx(0): Shutdown CMMQS
[     6.298] (II) fglrx(0): [uki] removed 1 reserved context for kernel
[     6.298] (II) fglrx(0): [uki] unmapping 8192 bytes of SAREA 0x2000 at 0x7fbef8209000
[     6.337] (II) fglrx(0): Interrupt handler Shutdown.
[     6.470]  ddxSigGiveUp: Closing log
[     6.470] Server terminated successfully (0). Closing log file.

Thanks for any hints what is wrong here.

Solution

In my case the solution was quite simple. Mainly the xorg.conf (from jjhughes57) brought me on the right track. The remaining issues could be fixed in /etc/lightdm/lightdm.conf. My final version is:

[LightDM]
seats=Seat:0 Seat:1

[SeatDefaults]
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=lightdm-gtk-greeter


[Seat: 0]
xserver-layout=seat0
xserver-command=/usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -sharevts -novtswitch
autologin-guest=false
autologin-user=fx
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=ubuntu

[Seat: 1]
xserver-layout=seat1
xserver-command=/usr/bin/X :1 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -sharevts -novtswitch
autologin-guest=true
user-session=ubuntu

One problem was that "/usr/share/xgreeters/lightdm-gtk-greeter.desktop" was missing. After properly installing lightdm-gtk-greeter again the second X-server came up successfully. Now the following requirements need to be fulfilled:

  1. X needs to accept connections on :1 (assuming that :1 is your
  2. fglrx-display) your user needs permission to open X-clients on :1

Actually I first tried with autologin-guest=false which doesn't work. With autologin-guest=true and a running user session (as a guest user) you need to disable X access control (that's the easiest at least). E.g.: on display :0 as root:

# su - guest-6ht0hq
guest-6ht0hq$ echo $DISPLAY
:0.0
guest-6ht0hq$ export DISPLAY=:1
guest-6ht0hq$ xhost +
access control disabled, clients can connect from any host
guest-6ht0hq$

Now on another terminal (as root):

# DISPLAY=:1.0 aticonfig --adapter=0 --od-getclocks
Adapter 0 - AMD Radeon HD 6700 Series 
                            Core (MHz)    Memory (MHz)
           Current Clocks :    850           1000
             Current Peak :    850           1000
  Configurable Peak Range : [500-970]     [1000-1430]
                 GPU load :    0%
#

pitseeker

Posted 2012-08-17T09:19:12.090

Reputation: 203

1please post your solution as an answer in the below section, not in the question – Sathyajith Bhat – 2012-09-02T12:57:27.833

Answers

1

So I am really close to solving this issue. The basic Idead i had was a multi seat session. This allows the ATI card to have its own X session and the Intel display to have its own X session.

  1. Make sure PCIE is the default display for the system but that your onboard GPU is enabled in your system BIOS
  2. Modify our /etc/X11/xorg.conf to look like this...

Section "ServerLayout"
        Identifier     "seat0"
        Screen      0  "My screen 1" 0 0
        Option      "Clone" "off"
        Option      "AutoAddDevices" "off"
        Option      "DisableModInDev" "true"
        Option      "SingleCard" "on"   # use this to simplfied isolatedevice option
        Option      "AllowEmptyInput"       "true"
EndSection

Section "ServerLayout"
        Identifier     "seat1"
        Screen         "aticonfig-Screen[0]-0" 0 0
        Option      "Clone" "off"
        Option      "AutoAddDevices" "off"
        Option      "DisableModInDev" "true"
        Option      "SingleCard" "on"   # use this to simplfied isolatedevice option
        Option      "AllowEmptyInput"       "true"
EndSection

Section "Module"
EndSection

Section "InputClass"
    Identifier      "Ignore Streamzap IR"
    MatchProduct    "Streamzap"
    MatchIsKeyboard "yes"
    Option      "Ignore" "true"
EndSection

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

Section "Device"
    Identifier  "aticonfig-Device[0]-0"
    Driver      "fglrx"
    Option      "Capabilities" "0x00000800"
    BusID       "PCI:1:0:0"
EndSection

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

Section "Monitor"
        Identifier   "My monitor 1"
EndSection

Section "Device"
        Identifier  "Sandybridge"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "My screen 1"
        Device     "Sandybridge"
        Monitor    "My monitor 1"
        DefaultDepth     24
        SubSection "Display"
                Depth     24
                Modes    "1280x720"
        EndSubSection
EndSection
  1. Last I had to edit /etc/lightdm/lightdm.conf



[LightDM]
seats=Seat:0 Seat:1

[SeatDefaults]
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=lightdm-gtk-greeter


[Seat: 0]
xserver-layout=seat0
xserver-command=/usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -sharevts -novtswitch
autologin-guest=false
autologin-user=joe
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=lightdm-gtk-greeter
user-session=mythbuntu

[Seat: 1]
xserver-layout=seat1
xserver-command=/usr/bin/X :1 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -sharevts -novtswitch

I now have both monitors starting up. I am having an issue getting


sudo aticonfig --adapter=0 --od-getclocks

to work... but this will get you past your current error.

jjhughes57

Posted 2012-08-17T09:19:12.090

Reputation: 26

Using your conf the :1 server (flgrx) doesn't segfault, but it immediately shuts itself down: [ 6.298] (II) fglrx(0): Shutdown CMMQS [ 6.298] (II) fglrx(0): [uki] removed 1 reserved context for kernel [ 6.298] (II) fglrx(0): [uki] unmapping 8192 bytes of SAREA 0x2000 at 0x7fbef8209000 [ 6.337] (II) fglrx(0): Interrupt handler Shutdown. [ 6.470] ddxSigGiveUp: Closing log [ 6.470] Server terminated successfully (0). Closing log file.

Can you post your fglrx-Xorg.log (or parts of it) please? – pitseeker – 2012-08-29T20:56:07.137

This thread seems to describe your issue... you need to disable Rander. http://ubuntuforums.org/showthread.php?t=1653934

– jjhughes57 – 2012-09-01T14:41:35.513

Thanks - I got past that and now I have the same problem like you (--od-getclocks says: "ERROR - X needs to be running to perform AMD Overdrive(TM) commands" – pitseeker – 2012-09-01T19:50:39.673

1

You either need to connect a monitor to the card or connect a dummy plug. Otherwise, the card plays dead. If your monitor has two connections, you can just connect one of them to the card and not use that input.

David Schwartz

Posted 2012-08-17T09:19:12.090

Reputation: 58 310

Thx David. I attached both outputs (ati-card hdmi and onboard displayport) to the same monitor. However the X-server is still segfaulting in the fglrx driver. Perhaps my installation is screwed up - I'll try and see if I can fix that. – pitseeker – 2012-08-21T15:17:16.500