我在笔记本电脑上安装了 Fedora 19,它具有 Intel 集成显卡和独立 AMD 显卡。我一直在使用该radeon
驱动程序,它适用于大多数东西 - 尽管我最近尝试了该fglrx
驱动程序,发现它速度更快并且具有更好的电源管理,但某些基于 OpenGL 的程序无法正确运行。
那么我怎样才能禁止fglrx
驱动程序在启动时加载,所以它又落在了radeon
司机身上?
我尝试通过编辑文件来做到这/etc/modprobe.d/blacklist-fglrx.conf
一点
# Advanced Micro Devices, Inc.
# radeon conflicts with AMD Linux Graphics Driver
blacklist radeon
通过注释该blacklist radeon
行并添加“blacklist fglrx_pci”
- 项目清单
` 在它下面。这只会导致 GUI 登录屏幕无法加载,因此我必须切换到 TTY 并编辑回原来的状态。
lspci -k
已fglrx
安装(与它唯一的区别未安装不会Subsystem: Lenovo Radeon HD 6370M/7370M
显示,并radeon
用作 AMD 驱动程序* - 当刚刚列入黑名单时我认为唯一的变化是radeon
使用):
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
这里是安装程序制作的 RPM(安装程序提供直接安装或为 openSUSE 或 RedHat 构建包,我使用了最新的 RedHat 64a 选项), 和这里是从中提取的 RPM 安装/卸载脚本。
我知道已尝试modprobe
在系统启动时使用删除模块 - 这不起作用,导致modprobe: FATAL: Module fglrx is in use
.
将司机列入黑名单(并删除/etc/X11/xorg.conf
- 安装后需要创建一个fglrx
(看起来像这) 和软呢帽无论如何都不需要)工作原理是使用 radeon 驱动程序 - 这里的问题是很多应用程序无法工作,并且 Gnome Shell 和 GDM 显示了这一点:
不过,卸载驱动程序并重新启动总是有效的。
例如,将此黑名单应用于/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
并删除xorg.conf
上述 GDM 错误的结果。然后我可以(并且已经)切换到 TTY,并用于systemctl
从 GDM 切换到 LightDM 并登录到 Xfce(似乎工作正常)。诸如此类的应用程序cairo-dock
会因分段错误而失败。glxinfo
给出:
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
将此显示为 GDM 的状态(在我切换到 LightDM + Xfce 之前),即使它崩溃了:
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]
如下lspci -k
:
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
这也是来自的日志/var/log/gdm/:0.log
,/var/log/Xorg.0.log
&/var/log/Xorg.0.log.old
- 我检查了每个日志的时间戳,我认为 GDM 和旧的 Xorg 日志是正确的日志 - 后面的 Xorg 日志是来自当前 Xfce 会话的日志,并且也应该是相关的。
我认为问题是要么仍然有一些配置告诉它使用 fglrx 驱动程序,要么有一个 fglrx 安装的 libGL 的修补版本(或类似的东西)需要 fglrx (在这种情况下这可能无法解决...... ....)。
答案1
答案2
我最终只是编写了一个脚本,可用于安装和卸载驱动程序,以及xorg.conf
根据我的系统需要进行设置:
#!/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
我也许可以尝试拆开rpm 脚本看看它在安装/卸载过程中做了什么,但我认为上述解决方案更简单。