4

I got a prompt to install the latest Ubuntu HWE (Hardware Enablement Stack):

Upgrade HWE prompt

Without thinking, I clicked Install. After rebooting, I noticed the following issues:

  • My second monitor was black and would show only my mouse pointer but nothing else
  • There was a lot of graphics flickering

I'm using an AMD graphics card:

$ lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos XTX [Radeon HD 8490 / R5 235X OEM]

This was the state of my machine after rebooting:

$ uname -r
4.4.0-38-generic

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty

$ dpkg -l | egrep "utopic|vivid|wily|xenial"
ii  linux-generic-lts-utopic                    3.16.0.77.68                                          amd64        Complete Generic Linux kernel and headers
ii  linux-generic-lts-xenial                    4.4.0.38.28                                           amd64        Complete Generic Linux kernel and headers
ii  linux-headers-generic-lts-utopic            3.16.0.77.68                                          amd64        Generic Linux kernel headers
ii  linux-headers-generic-lts-xenial            4.4.0.38.28                                           amd64        Generic Linux kernel headers
ii  linux-image-generic-lts-utopic              3.16.0.77.68                                          amd64        Generic Linux kernel image
ii  linux-image-generic-lts-xenial              4.4.0.38.28                                           amd64        Generic Linux kernel image

$ dpkg -l | grep fglrx
ii  fglrx-amdcccle-updates                      2:15.201-0ubuntu0.14.04.1                             amd64        Catalyst Control Center for the AMD graphics accelerators
ii  fglrx-updates                               2:15.201-0ubuntu0.14.04.1                             amd64        Video driver for the AMD graphics accelerators
ii  fglrx-updates-core                          2:15.201-0ubuntu0.14.04.1                             amd64        Minimal video driver for the AMD graphics accelerators

$ fglrxinfo
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  157 (ATIFGLEXTENSION)
  Minor opcode of failed request:  66 ()
  Serial number of failed request:  13
  Current serial number in output stream:  13
3

The root cause of my issue was that only the kernel portion of the HWE was installed, meaning the kernel was upgraded but not the graphics stack. Since the Xenial kernel isn't compatible with the proprietary fglrx AMD driver, that caused the graphics problems.

Before doing anything else, it's best to do some cleanup:

  1. Remove all the utopic, vivid, and wily HWE packages since they're no longer supported (without this, the prompt to upgrade the HWE will continue to appear)

    sudo apt purge `dpkg --get-selections | egrep "utopic|vivid|wily" | awk '{print $1}' | tr '\n' ' '`
    
  2. Remove all utopic (3.16), vivid (3.19), and wily (4.2) kernels since they're also no longer supported (this causes hwe-support-status to print a security warning)

    sudo apt purge `dpkg --get-selections | egrep "linux-.+-(3\.16|3\.19|4\.2)" | awk '{print $1}' | tr '\n' ' '`
    

After doing that, there are two solutions:

(Recommended) Install the full Xenial HWE

  1. Following the instructions here, install the full Xenial HWE:

    sudo apt install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial
    

    This should install the new graphics stack, which should also remove fglrx

  2. Make sure fglrx is removed, just to be safe

    sudo apt remove fglrx fglrx-core fglrx-updates fglrx-updates-core
    
  3. Remove any other unused packages

    sudo apt-get autoremove
    
  4. Reboot

The final state of your machine should look something like this:

$ uname -r
4.4.0-112-generic

$ dpkg --get-selections | grep xenial | wc -l
40

$ dpkg --get-selections | grep fglrx | wc -l
0

$ fglrxinfo
fglrxinfo: command not found

If at this point everything seems to be working fine, it's probably best to go ahead and upgrade to 16.04 since 14.04 is only supported until April 2019.

(Not recommended) Fully remove the Xenial HWE

  1. Remove the xenial HWE packages

    sudo apt purge `dpkg --get-selections | grep xenial | awk '{print $1}' | tr '\n' ' '`
    
  2. Remove the xenial kernels (4.4)

    sudo apt purge `dpkg --get-selections | egrep "linux-.+-4\.4" | awk '{print $1}' | tr '\n' ' '`
    
  3. Remove any other unused packages

    sudo apt-get autoremove
    
  4. Reconfigure xserver-xorg (for some reason cleaning up the HWEs removes the symlink from /etc/X11/X to /usr/bin/Xorg, breaking X; this fixes it)

    sudo dpkg-reconfigure xserver-xorg
    
  5. Reboot

The final state of your machine should look something like this:

$ uname -r
3.13.0-119-generic

$ dpkg --get-selections | egrep "utopic|vivid|wily|xenial" | wc -l
0

$ dpkg --get-selections | grep fglrx | wc -l
4

$ dpkg -l | grep fglrx
ii  fglrx-amdcccle-updates                      2:15.201-0ubuntu0.14.04.1                             amd64        Catalyst Control Center for the AMD graphics accelerators
ii  fglrx-updates                               2:15.201-0ubuntu0.14.04.1                             amd64        Video driver for the AMD graphics accelerators
ii  fglrx-updates-core                          2:15.201-0ubuntu0.14.04.1                             amd64        Minimal video driver for the AMD graphics accelerators

$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon(TM) HD8490
OpenGL version string: 4.5.13399 Compatibility Profile Context 13.35.1005
| improve this answer | |
  • Thanks for posting this! I'm glad I held off on this and kept ignoring it. I actually got so fed up with AMD problems that I bought myself a new laptop with an NVidia card! – Dorian Sep 26 '16 at 14:02
  • @Dorian There are problems with NVidia cards, too, so I wonder, id that is any better for Linux. – jarno Aug 26 '19 at 6:07
  • It is better to do the cleanup like this sudo apt purge -- '^linux-.+-(3\.16|3\.19|4\.2)' '-(utopic|vivid|wily)(-|$)' – jarno Aug 26 '19 at 6:33
1

You cannot use fglrx with Kernel 4.4 and Xorg from the 14.04.5 HWE stack. To continue using fglrx you need to rever to the older Xorg and kernel from 14.04.4. Otherwise, with your card, you will have to use the open source radeon driver, which is probably what is being used now. The issues described are likely bugs in the driver when used with your card.

AMD does not support the new APIs with fglrx, and won't be releasing updates to support newer kernel or Xorg versions for it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.