# R9 380 with xf86-video-amdgpu: dual monitor not working

## outtay

I'm rather paranoid about making mistakes, so I read the guidelines multiple times and just hope I'm not doing anything wrong with my first thread (I'm not sure I'm even it the right category).  :Confused: 

I bought a new PC two weeks ago with a Sapphire Nitro R9 380 4GB. I moved Gentoo from my old system to the new one, reconfigured the kernel but because I used the 4.0.5 kernel, I had to upgrade to 4.2.2 to get the amdgpu drivers for my new card. After a lot of fiddling with the kernel and out of frustration then simply using genkernel, my system started to work except for my dual monitor setup. Here are the main details about that:

When two monitors are both plugged into the DVI slots only one works and the other is "on" but only displays a black image. I can change which one is black by unplugging the functioning one and plugging it in again.

Both monitors are recognized and can be manipulated as usual with xrandr only that one stays black.

When one of the monitors is plugged into the HDMI slot *after* the system boots, the monitor works although when I then try to rotate the screen I get a black screen and am back in the display manager, with both screens in the rotation they were before.

Oh and by the wayː both monitors work as intended under Windows 10.

I am not entirely sure what part exactly doesn't work, since I'm not even sure which parts are at work here (and how I'd find out). What I tried is to update xorg-server to the latest version, as well as mesa and x11-drivers/xf86-video-amdgpu (with both of those I even tried the live ebuild). I also tried the latest kernel from kernel.org (4.3-rc3) but to no avail. I have the same problem when I boot from the latest Ubuntu Beta Live Dvd which uses kernel version 4.2.0 if that's important.

I'm not sure what else I could try and I only found one thread in another forum where somebody seems to have the same problem: http://www.tonymacx86.com/desktop-compatibility/171597-dual-monitor-dvi-hdmi.html.

The only thing I can think of that's left to do (or rather that I can do) is to ask around here and then file a bug. With filing a bug, I don't know where I should do that: Is it a kernel issue, or has xorg a bug, or something else entirely?

Could anybody help me narrowing down the problem or maybe even offer a solution?

If anybody needs more specifics, I'll probably refresh this thread every 5 minutes, so I'll try to answer immediately. And yes if you hadn't noticed already, I'm still quite the beginner.

Thanks in advance and thanks for bearing with me.

----------

## Wadlax

I'm using opensource drivers , radeonsi.

At first i got an error, when i've tried to rotate one display.

(Worked good with non-rotated displays)

I solved it by adding --fb option to xrandr.

```

xrandr --fb 4096x4096 --verbose --output DisplayPort-1 --primary --mode 1920x1080 --pos 0x1080 --rotate normal --output DVI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-1 --mode 1920x1080 --pos 1920x480 --rotate right 

```

Also, i had modified 

/home/<user>/.kde4/share/config/krandrrc

StartupCommands=xrandr --fb 4096x4096 --output .......

.

Hope it helps.

Write your display resolution. May be you'll need to set --fb 8192x8192 .

----------

## outtay

I'm using the opensource amdgpu drivers. Do the radeon drivers work for the r9 380? If so how could I switch to them? 

I read that it's possible to change that in the xorg.conf, but when I try to let Xorg generate it with X -configure it just terminates with: "No devices to configure.  Configuration failed."

I also tried changing the resolution, but unfortunately this doesn't accomplish anything. If I just change the resolution it's the same and if I also rotate the sreen. KDE again crashes and I'm back in the display manager.

Thanks for your help, though  :Smile: 

Edit: Okay I think what I now did was right to configure xorg and only the amdgpu driver works for me.....

BTW with the terminal I get when I use the shortcut ctrl+alt+F1... shouldn't my second monitor work there if it was just a problem with xorg or am I wrong here?

----------

## Wadlax

1) What are your displays resolution ?

2) Did you use   xrandr with param --fb 8192x8192  ?

----------

## outtay

Both my displays are 1920x1080 and yes I did try that. However with DVI I can't even get the screens to mirror so I'm not sure why this should do the trick. The last time I had a problem like this and it didn't work anywhere, not even on the Ubuntu Live DVD (which for me always runs extremely well out of the box) it was a Kernel Bug as well... so maybe it's the same this time.

----------

## deussomnus

I had the same exact issue with that very card. My only difference was that I use one HDMI connector and the other is the DVI-I. When I switched to using the DVI-D port I was able to use both monitors without any Xorg configuration.

----------

## outtay

Oh wow.... this problem is really weird.

I did what you suggested deussomnus and the monitors now both work at startup. The only problem I now have is that I can't rotate the display. If I do that in the Ubuntu Live DVD the screen rotates and the other one automatically disconnects. And if I try it in Gentoo the X server crashes with a segmentation fault. Can you rotate your screens without any problems?

----------

## deussomnus

I have not tried to rotate my displays. I'll try tonight and see if I can after work.

----------

## deussomnus

I was able to rotate my displays successfully using settings menu in XFCE. Both screens stayed on if I rotated the other one. Specifically the DVI-D would rotate, and the HDMI would not.

----------

## deussomnus

Wow, my last post was unclear. I chose to only rotate one display. I was able to do this. The DVI-D display rotated fine. I did not rotate the HDMI display.

----------

## outtay

Thank you. 

This confirmed that it has to work somehow, and with help I found out that glamor was the problem for me. I used glxinfo to see if that tells me anything, and it quite surprisingly told me that llvm version 3.6.1 was required, which I didn't know before.

I emerged the new version and the rotation finally works.

It's still weird that it only works with the second DVI and the HDMI slot, but as long as I have the cables and don't need a third monitor I find the workaround rather acceptable.

Thanks again for your help!

----------

