2

I have a Fedora 19 install on a laptop, which has Intel integrated graphics & discrete AMD graphics. I have been using the radeon driver, which works for most stuff - though I have recently tried the fglrx driver, and found it to be quite a bit faster and have better power management, though some OpenGL based programs won't run correctly.

So how can I disable the fglrx driver from loading upon boot, so it fall backs onto the radeon driver?

I have tried doing this by editing the /etc/modprobe.d/blacklist-fglrx.conf file

# Advanced Micro Devices, Inc.
# radeon conflicts with AMD Linux Graphics Driver
blacklist radeon

by commenting the blacklist radeon line, and adding `blacklist fglrx_pci

  • List item

` below it. This just resulted in the GUI login screen not loading, so I had to switch to a TTY and edit back to what it was.

lspci -k with fglrx installed (the only difference with it not installed is Subsystem: Lenovo Radeon HD 6370M/7370M is not shown, and radeon is used as the AMD driver* - when just blacklisted I think the only change is radeon is used):

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    Subsystem: Lenovo Device 3975
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
    Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    Subsystem: Lenovo Device 397a
    Kernel driver in use: i915
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: mei
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ehci-pci
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
    Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
    Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: lpc_ich
00:1f.2 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ata_piix
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
    Subsystem: Lenovo Device 3975
00:1f.5 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ata_piix
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Robson CE [Radeon HD 6370M/7370M]
    Subsystem: Lenovo Radeon HD 6370M/7370M
    Kernel driver in use: fglrx_pci
07:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
    Subsystem: Lenovo Device 3979
    Kernel driver in use: atl1c
08:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
    Subsystem: Broadcom Corporation Device 051b
    Kernel driver in use: bcma-pci-bridge

Here is the RPM made by the installer (the installer offers install directly or build packages for openSUSE or RedHat, I used the latest RedHat 64a option), and here are the RPM install/uninstall scripts extracted from it.


I know about have tried using modprobe to remove the module when the system has booted - this does not work, resulting in modprobe: FATAL: Module fglrx is in use.

Blacklisting the driver (and removing /etc/X11/xorg.conf - one needs to be created after installing fglrx (it looks like this), and fedora does not need one anyway ) works in that the radeon driver is used instead - the problem here is that then quite a few applications don't work, and Gnome Shell & GDM show this: Oh no something has gone wrong GDM & GNOME error screen

However, uninstalling the driver and rebooting always works.


For instance, applying this blacklist in /etc/modprobe.d/blacklist-fglrx.conf:

# Advanced Micro Devices, Inc.
# radeon conflicts with AMD Linux Graphics Driver
#blacklist radeon
blacklist fglrx
blacklist amd_iommu_v2
blacklist fglrx_pci

and removing xorg.conf results in the above GDM error. I can then (and have) switched to a TTY, and used systemctl to switch from GDM to LightDM and log into Xfce (which seems to work normally). Apps such as cairo-dock fail with segmentation faults. glxinfo gives:

name of display: :0.0
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  19 (X_GLXQueryServerString)
  Serial number of failed request:  12
  Current serial number in output stream:  12

systemctl show this as GDM's status (before I switched to LightDM + Xfce), even though it crashed:

 gdm.service - GNOME Display Manager
   Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled)
   Active: active (running) since Mon 2014-11-10 17:15:27 GMT; 1min 34s ago
 Main PID: 471 (gdm)
   CGroup: name=systemd:/system/gdm.service
           ├─ 471 /usr/sbin/gdm
           ├─ 597 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Displays/_0
           ├─ 921 /usr/bin/Xorg :0 -background none -verbose -auth /run/gdm/auth-for-gdm-l88Ufh/database -seat seat0 -nolisten tcp vt1
           └─1102 gdm-session-worker [pam/gdm-launch-environment]

and lspci -k is as follows:

 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    Subsystem: Lenovo Device 3975
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
    Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    Subsystem: Lenovo Device 397a
    Kernel driver in use: i915
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: mei
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ehci-pci
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
    Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
    Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: lpc_ich
00:1f.2 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ata_piix
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
    Subsystem: Lenovo Device 3975
00:1f.5 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller (rev 05)
    Subsystem: Lenovo Device 3975
    Kernel driver in use: ata_piix
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Robson CE [Radeon HD 6370M/7370M]
    Subsystem: Lenovo Radeon HD 6370M/7370M
    Kernel driver in use: radeon
07:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
    Subsystem: Lenovo Device 3979
    Kernel driver in use: atl1c
08:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
    Subsystem: Broadcom Corporation Device 051b
    Kernel driver in use: bcma-pci-bridge

Here also are the logs from /var/log/gdm/:0.log, /var/log/Xorg.0.log & /var/log/Xorg.0.log.old - I have checked the timestamps of each log, and I think the GDM & the old Xorg logs are the correct logs - the later Xorg log is the one from the current Xfce session, and should also be relevant.

I think the issue is either there is still some configuration somewhere telling it to use the fglrx driver, or there is a patched version of libGL (or something similar) which fglrx installed which needs fglrx (in which case this may be unsolvable.......).

  • use the modprobe command: – vfbsilva Nov 9 '14 at 2:55
2

Use the modprobe command. Assuming the drivers are called radeon and fglrx you can:

modprobe -r radeon 
modprobe -r fglrx

In order to check if those are really the right modules do a lsmod

Assuming those procedures do what you need you can edit your modules

  • I know about modprobe & lsmod - the problem is I want it to use radeon, and not use fglrx_pci/fglrx, and work.... also it usually just results in modprobe: FATAL: Module NAME is in use. amd_iommu_v2 also appears to be part of fglrx. – Wilf Nov 9 '14 at 14:41
  • Give me the exact command you used. And the exact message. Copy from terminal. The message suggests you did: mod probe fglrx_pci/fglrx while I tolkd you to do modprobe -r fglrx_pci/fglrx which is a total different deal. Please use proper commands and show the proper output. – vfbsilva Nov 10 '14 at 12:38
  • 1
    I did modprobe -vr - the r to remove the module, and the v to show what it did. Trying to use modprobe to load a already existing module does not show anything in terminal anyway :). The issue is that when fglrx is removed, radoen is loaded, but remaining configuration or some other issue (e.g. xorg.conf is one) means that the graphics don't work properly. I will add this in more detail to the question when I have time. – Wilf Nov 10 '14 at 12:50
1

I eventually just wrote a script that could be used to install and uninstall the driver, as well as set up the xorg.conf as my system required it:

#!/bin/bash
if [[ ! $(whoami) = "root" ]]; then
    echo -e "\033[1;31mPlease run this as root\033[0m"
    exit 1
fi

if [ "$1" = "enable" ]; then
    echo -e "\033[22;34mInstalling fglrx... ('/usr/share/fglrx64_p_i_c.x86_64')\033[1m\033[0m"
    sleep 3
    sudo rpm -ivh /usr/share/fglrx-amd-RPM/fglrx64_p_i_c-14.301.1001-1.x86_64.rpm
    if [ -f "/etc/X11/xorg.conf" ]; then
        echo "Backing up 'etc/X11/xorg.conf'"
        mv "/etc/X11/xorg.conf" "/etc/X11/xorg.conf.bak.$(date)"
    fi
    echo "Preparing /etc/X11/xorg.conf"
    echo -e 'Section "ServerLayout"\n   Identifier     "aticonfig Layout"\n Screen      0  "aticonfig-Screen[0]-0" 0 0\nEndSection\n\nSection "Module"\nEndSection\n\nSection "Monitor"\n   Identifier   "aticonfig-Monitor[0]-0"\n Option      "VendorName" "ATI Proprietary Driver"\n Option      "ModelName" "Generic Autodetecting Monitor"\n   Option      "DPMS" "true"\nEndSection\n\nSection "Device"\n Identifier  "aticonfig-Device[0]-0"\n   Driver      "fglrx"\n   BusID       "PCI:1:0:0"\nEndSection\n\nSection "Screen"\n   Identifier "aticonfig-Screen[0]-0"\n    Device     "aticonfig-Device[0]-0"\n    Monitor    "aticonfig-Monitor[0]-0"\n   DefaultDepth     24\n   SubSection "Display"\n      Viewport   0 0\n        Depth     24\n  EndSubSection\nEndSection\n' > "/etc/X11/xorg.conf"

elif [ "$1" = "disable" ]; then
    echo "\033[22;34mUninstalling fglrx... ('fglrx64_p_i_c.x86_64')\033[1m\033[0m"
    sleep 3
    sudo rpm -ev fglrx64_p_i_c.x86_64
else
    lsmod | grep fglrx
    echo -e "\033[22;34mThe options for the script are 'enable' 'disable'\033[1m\033[0m"

fi
exit

I could of perhaps had a go at taking apart the rpm scripts to see what it did during install/uninstall, but the above solution I think is simpler.

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.