# Screen resolution issue after upgrading FreeBSD (11.1 -> 11.2) and X



## absurdium (Oct 19, 2018)

To keep this brief, in point form this is what I've done:

In May 2018

installed FreeBSD 11.1 (no problems)
installed X (no problems) and fluxbox (no problems)
I did not need to run `Xorg -configure`
`startx` (no problems, with resolution automatically set to 1920x1080)
Yesterday,

freebsd-update(8) (11.1 -> 11.2, no problems)
reboot, `startx` (no problems)
update installed software (including X)
`startx` (blank screen)
After some fiddling, I managed to get X to start, but now it selects a lower resolution than I expected (1280x1024) and with distortion - photographs are slightly stretched horizontally (but not vertically). Reading over the log file (/var/log/Xorg.0.log), it appears that Xorg is using the vesa(4) driver instead of the amdgpu(4) driver.

I've tried creating the file /usr/local/etc/X11/xorg.conf.d/20-amdgpu.conf as follows:

```
Section "Device"
  Identifier      "AMD"
  Driver          "amdgpu"
EndSection
```

This, however, results in a "no screens found" error, and of course X aborts. Other possibly useful info:

I have a Dell Ultrasharp U2311H monitor

```
% pciconf -lv | grep -A 4 vga
vgapci0@pci0:1:5:0:     class=0x030000 card=0x843e1043 chip=0x97151002 rev=0x00 hdr=0x00
vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device     = 'RS880 [Radeon HD 4250]'
class      = display
subclass   = VGA
```


```
% xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 400, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
 1280x1024      0.00*
 1152x864        0.00
 1024x768        0.00
 800x600          0.00
 640x480          0.00
 720x400          0.00
```
The output of `xrandr` is bogus, given that the monitor can run at 1920x1080, which is the resolution I had before the upgrade. (Aside: does `xrandr` report info from the monitor, or from the driver?)

Can anyone help me solve this?


----------



## SirDice (Oct 22, 2018)

Install/update/reinstall graphics/drm-next-kmod.


----------



## absurdium (Oct 22, 2018)

I had already tried that. It turns out my problem was similar, though. I deinstalled graphics/drm-next-kmod  and installed graphics/drm-stable-kmod (well, actually I installed graphics/drm-kmod, which installed graphics/drm-stable-kmod), and added the line `kld_list="/boot/modules/radeonkms.ko"` ' to /etc/rc.conf.

I tried dropping to single-user mode and immediately typing 'exit', but apparently the video driver is loaded well before that, so it required a full shutdown.

I am happy to report that using graphics/drm-stable-kmod has fixed the problem.


----------

