Problems with Ubuntu Linux on notebooks with AMD Ryzen APUs

End of last year I have replaced my aging ASUS Zenbook UX32LN with a Ryzen-based UM431DA. After installing Ubuntu 19.10 eoan with kernel 5.3 I have noticed four annoying problems:

  1. Initializing X.Org and geting to the login screen may not work
  2. Suspend does not work (system freezes)
  3. There is disturbing tearing when moving windows or playing movies
  4. Sound is very loud and volume control does not work properly

My notebook variant comes with a Ryzen 7 3700U CPU and 16GB RAM.

Buyers of specific Ryzen 5 2500U or Ryzen 7 3700U notebooks like the ASUS UM431DA should know that the amount of system RAM taken by the APU might not be adjustable on all models. On the UM431DA it is fixed to 2GB of system RAM. This means that a UM431DA notebook with advertised 8GB of RAM is going to have only 6GB of RAM available to the operating system.

Display initialisation and suspend bugs

The first problem comes with the following lines in the system console:

Failed to write reg 28b4 wait reg 28c6
Failed to write reg 1a6f4 wait reg 1a706

It is followed by unexpected behavior. X Windows may not get initialized or they do after a some time. This happens every time the screen is switched. This problem is related to the amdgpu kernel driver.

My solution to this and the suspend problem is moving to the 5.5 kernel series and installing latest linux-firmware. Sadly, it looks like Ubuntu 20.04 is going to be released with kernel 5.4 LTS and as of 5.4.21 these problems have not yet been addressed.

Kernel 5.5 can be downloaded directly from Ubuntu:
https://kernel.ubuntu.com/~kernel-ppa/mainline/

Kernel 5.5.6 has received additional amdgpu fixes.
To install it you need the following 4 packages (installable with dpkg -i):
linux-headers-5.5.6-050506_5.5.6-050506.202002240832_all.deb
linux-headers-5.5.6-050506-generic_5.5.6-050506.202002240832_amd64.deb
linux-image-unsigned-5.5.6-050506-generic_5.5.6-050506.202002240832_amd64.deb
linux-modules-5.5.6-050506-generic_5.5.6-050506.202002240832_amd64.deb

You can grab the latest linux-firmware from Ubuntu 20.04 focal development:
https://packages.ubuntu.com/focal/all/linux-firmware/download

Tearing bug

The tearing problem that occurs on both internal display and HDMI outputs can be solved by adding Option "TearFree" "true" to the amdgpu driver configuration.

/usr/share/X11/xorg.conf.d/10-amdgpu.conf

Section "OutputClass"
         Identifier "AMDgpu"
         MatchDriver "amdgpu"
         Driver "amdgpu"
         Option "TearFree" "true"
EndSection

Volume control bug

The volume control problem can be solved by adding the section [Element Master] to analog-output.conf.common right before [Element PCM] of alsa-mixer.

/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

[Element Master]
switch = mute
volume = ignore

[Element PCM]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>