2

I recently built a computer and put a fresh install of Debian 9 on it. However when I plug both monitors into the Radeon RX 550 graphics card, my desktop is mirrored instead of extended. On top of this I have been unable to change the default size of 1024x768 to the actual monitor resolution of 1600x900. Running xrandr I get

xrandr: Failed to get size of gamma for output default
Screen0: minimum 1024 x 768, curent 1024 x 768, maximum 1024 x 768
default connected primary 1024x768+0+0 0mm x 0mm
   1024x768      76.00*

One monitor is plugged into the DVI port and the other is plugged into the HDMI port.

This problem persists on both i3wm and XFCE, though currently I'm using i3wm

The package "firmware-amd-graphics" is installed.

My X logs https://gist.github.com/anonymous/fc1bb91a4778c5a43efca4a854efb164
More recent X logs https://gist.github.com/anonymous/cb6a1f2f2f7d901245d5b8869cbad25c My xorg.conf https://gist.github.com/anonymous/6864f488ae8837966cfa3fffde059385
dmesg https://gist.github.com/anonymous/8fa180a9330adf674c39b949adaa00aa

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Medynsky
  • 23
  • 1
  • 6
  • Can you post a link to your X logs, please? Usually it is `/var/log//var/log/Xorg.0.log`. You could use, for example, `gist-paste /var/log//var/log/Xorg.0.log`, which will create a GIST for you. You then just need to post the URL. You will need to install the gist package first - `apt-get install gist`. Also, what desktop/window manager are you running? – Faheem Mitha Aug 04 '17 at 07:17
  • Here you go https://gist.github.com/anonymous/fc1bb91a4778c5a43efca4a854efb164 – Medynsky Aug 04 '17 at 07:38
  • Add that link to the question, please. Also, what desktop/window manager are you running? Based on a quick look at the logs, it's not clear what driver is being used, per X's usual transparency of reporting. It might be `fb` or it might be `vesa`. In any case, it seems unlikely it's the correct driver. Please paste your current `/etc/X11/xorg.conf`. – Faheem Mitha Aug 04 '17 at 08:22
  • I'm currently using i3, but I installed debian with XFCE. When I go to /etc/X11 I do not see an xorg.conf file. The only .conf file I have in that folder is Xwrapper.config. – Medynsky Aug 04 '17 at 09:12
  • Well, time to create a config file. :-) – Faheem Mitha Aug 04 '17 at 09:17
  • I've updated my question with a link to a copy of the config file. I generated it using sudo Xorg :1 -configure and then copied it from /root to /etc/X11, if any of that matters. – Medynsky Aug 04 '17 at 18:48
  • You still need to choose your driver. Xorg isn't magically going to select the right one for you. – Faheem Mitha Aug 04 '17 at 18:54
  • I followed the instructions here https://wiki.debian.org/ATIProprietary for Debian 8 (due to the lack of instructions for Debian 9) to install the proprietary drivers, but after restarting I no longer have a GUI, just the text terminal. On the plus side all that text is being scaled properly ;-). For posterity, I also ran "apt install firmware-realtek" as well, something that isn't mentioned on that page but I had to do to get rid of an error message that came up when I logged in. – Medynsky Aug 05 '17 at 02:35
  • Can you provide more details about your graphics card, please? Is it the Radeon™ RX 460? If so, see the most relevant information provided by AMD, which is http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx. And I believe the driver you want on Debian corresponds to the package `xserver-xorg-video-amdgpu`. – Faheem Mitha Aug 05 '17 at 08:01
  • See also https://askubuntu.com/questions/869582/rx-460-in-ubuntu-14-04-16-04-16-10-not-working . Oh, and what driver did you configure `xorg.conf` for, and please post the X logs again for that configuration. – Faheem Mitha Aug 05 '17 at 08:29
  • Correction, the `xserver-xorg-video-amdgpu` is an open source driver, and is separate from the AMD proprietary drivers. You could try both. There's a helpful discussion in https://wiki.archlinux.org/index.php/AMDGPU and see also https://help.ubuntu.com/community/AMDGPU-Driver – Faheem Mitha Aug 05 '17 at 08:36
  • This is embarrassing. After running lspci -nn | grep -E 'VGA|Display' I see that my GPU is a Radeon RX 550, not an RX 460. The driver I configured (or rather, tried to configure) was the fglrx driver. My xorg.conf file is (was, I changed it back to get the GUI working) the same as it was before, just with the "fbdev" after "Driver" and under "Device" changed to "fglrx". – Medynsky Aug 05 '17 at 20:41
  • Using the resources you provided I was able to download the amdgpu driver and I can see it in /usr/lib/xorg/modules/drivers, however I don't see it in /lib/modules/$kernel_version/kernel/drivers/video, I just see the fdbev driver. Changing the "fdbev" in my xorg.conf file to amdgpu once again breaks the GUI and I have to go into recovery mode to change it back to the functional-just-not-completely-functional fdbev driver to get the GUI back. I have the driver on my computer, I just don't know how to make linux use it. – Medynsky Aug 05 '17 at 20:42
  • Some obvious things to do - please update your question with the correct card to avoid confusion. Your question still says AMD 460. Second, please check your X logs, and see if they anything. Also check and see if the drivers you are using support your card. Also, try the proprietary ATI drivers I've mentioned, if they report your card as supported. Oh, and the X drivers are (for the most part) not kernel modules, as far as I know. They live in user space. – Faheem Mitha Aug 06 '17 at 11:21
  • 1
    I read through the X logs and found that I am using the fbdev driver as my graphics driver. In /usr/lib/xorg/modules/drivers I have the amdgpu driver, the radeon driver, the ati driver, and the fbdev driver (among other things). I'm just at a loss for how exactly I'm supposed to use any of those drivers in place of fbdev. I don't know how to change my driver and everything I find online seems to be about just downloading the driver. Do I just change the fbdev after "Driver" in the xorg.conf file to the driver? That seems to break things when I try it so I feel there has to be more. – Medynsky Aug 09 '17 at 11:11
  • You definitely don't want to be using `fbdev`. You'd updated your video card in the question to AMD 550. The correct model, as you already mentioned, is Radeon RX 550. Please quote model numbers etc. accurately. I've changed it in your question. And you don't have to check the X logs to see that you are using `fbdev`; your `xorg.conf` says it does. `Section "Device" -> Driver "fbdev"`. And yes, that's exactly what you want to change. And if it breaks, you need to figure out why it is breaking. There is no other way I know of, sorry. – Faheem Mitha Aug 09 '17 at 13:22
  • One general tip with xorg.conf, at least for the drivers actually in X, and possibly for the proprietary ones too, is to specify as little detail as posible, and let X figure it out. But before changing it to some specific driver, try your best to make sure that the driver in question actually supports your card. – Faheem Mitha Aug 09 '17 at 13:23
  • Xorg is trying to use the radeon driver, but it fails due to `(EE) open /dev/dri/card0: No such file or directory`. That means the kernel DRI/DRM driver isn't loaded... Can we get `dmesg` and/or `journalctl -b -k`? – derobert Aug 09 '17 at 13:38
  • So, I asked for assistance in the U&L chat room in the hope of getting an expert interested, since it didn't look like my efforts were going anywhere, and driver issues are generally easily solvable, at least in a sanely configured system. Meet derobert, expert. If you answer his questions, there's a high probability he'll get your issue sorted out tout suite. – Faheem Mitha Aug 09 '17 at 14:55
  • Also, one thing that would be quite helpful in trying to debug this, would be if you could make sure the `xorg.conf` and X logs you have posted belong together. I.e. the X logs were posted when using that `xorg.conf`. – Faheem Mitha Aug 09 '17 at 15:05
  • Thanks Faheem. I updated the question to include dmesg and an updated gist-paste of the x-logs. Running journalctl returns back "No journal files were found." – Medynsky Aug 09 '17 at 21:03
  • I don't have any recent AMD video hardware, so I'm mostly unfamiliar with them—but quick Googling around suggests that this card came out very recently, and you need the very newest stuff to make it work. E.g., fixes [were in May](https://cgit.freedesktop.org/mesa/mesa/commit/?id=69e6eab6533ff48f72223cd21ef640242c52598b) ... my guess is it missed Stretch. Not sure if it's in testing/Buster yet, but if so maybe someone will backport it. I suspect you need a newer kernel too, because your dmesg doesn't show it trying to load any display driver. – derobert Aug 10 '17 at 13:32
  • So I guess my options at the moment are to wait, try Buster or Sid, or try a different distro. In the mean time I can try a newer kernal? – Medynsky Aug 12 '17 at 02:32

1 Answers1

0

I've had this issue as well in various Linux distros and have created a script that I copy to systems in which I encounter this problem, which I'll include below after a brief explanation of my findings, though I still have a problem with permanency as not all config files are created equal, or even present in some Linux OS flavors; however, I find that both utilities to query and set the modes are present ('cvt' and 'xrandr').

First of all you need to determine the parameters to set with 'xrandr' which you'll do with 'cvt' by executing the following in a terminal window. First, get the data from 'xrandr' as you already have. When I execute 'xrandr' it returns the following:

xrandr

Screen0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768 default connected primary 1024x768+0+0 0mm x 0mm 1024x768 76.00*

The only info you really need from that block above is the device name, Screen0 which I'll put in the code below for your benefit. Make sure to change any data you get from xrandr and cvt that differs from my results as your hardware is different and may return different parameters.

You'll need to get your data from cvt doing:

cvt 1600 900

This should return something like:

# 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz Modeline "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync

You'll need the Modeline data from the quotation mark through to the end of 'vsync'

With that, if I were doing it with that resolution and the hardware I have, I'd put the following into a script, save it as something like 'fixmyres.sh'

# Resolution fix for 1600x900 - changes to 1600x900 with cvt calculation

xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
xrandr --addmode Screen0 1600x900_60.00
xrandr --output Screen0 --mode 1600x900_60.00

and set it as executable:

chmod a+x fixmyres.sh

then run it

./fixmyres.sh

I place the file on the desktop since the results have been inconsistent for me using the Xorg file(s).

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
HoundCat
  • 16
  • 3
  • Most of this is unnecessary these days. X is mostly self-configuring. – Faheem Mitha Aug 04 '17 at 08:39
  • I created a .sh file exactly like the one you provided (I get the same xrandr and cvt output) but while this does create another line under "default connected" when running xrandr I'm still in 1024x768. Also the script returns "cannot find output Screen0". changing Screen0 to default removes that error but the script still doesn't fix my screen resolution or mirrored monitor problem. – Medynsky Aug 04 '17 at 08:56
  • The only other thing I can suggest, especially since you confirmed that another resolution line is created under the "default connected" block is to check the Display applet in the system preferences and see if that newly entered resolution is selectable in the resolution dropdown list. That would be the same place to turn off the mirrored option as well. That the resolution didn't appear in the UI for me until I was able to append that additional resolution to the list of the default connections. You'd still have to work on the Xorg file to make it automatic which is still a problem here. – HoundCat Aug 04 '17 at 11:16