安装 S3000 5.1.0
安装驱动依赖包
安装 dkms 依赖包
yum install dkms
安装驱动
安装驱动
根据系统架构获取相应驱动包,并安装,以 amd 版本为例:
rpm -ivh musa_5.1.0-server_amd64.rpm
驱动安装后,可以重启操作系统使驱动加载,也可以不重启系统使驱动加载。
重启系统加载驱动
shutdown -r now
不重启系统加载驱动
不重启系统, 则需要将当前的相关业务停止,并停止 Xorg,在驱动安装后,重新加载 kmd。
停止正在运行相关的业务,停止 Xorg
killall Xorg
service lightdm stop
卸载已经加载的 kmd 模块
rmmod mtgpu
查看是否成功卸载 mtgpu
lsmod |grep mtgpu
重新加载 kmd
modprobe mtgpu
查看是否成功加载 mtgpu
lsmod |grep mtgpu
更换驱动
更换驱动,也支持不重启操作系统使驱动加载。更换驱动前需要停止相关业务,卸载原有驱动,安装新驱动,重新加载驱动。具体操作如下:
停止正在运行相关的业务,停止 Xorg
pkill Xorg
service lightdm stop
卸载已经安装的驱动
rpm -e $(rpm -qa |grep musa)
安装新版本的驱动,以 amd 版本为例。
rpm -ivh musa_5.1.0-server_amd64.rpm
卸载已经加载的 kmd 模块
rmmod mtgpu
查看是否成功卸载 mtgpu
lsmod |grep mtgpu
重新加载 kmd
modprobe mtgpu
查看是否成功加载 mtgpu
lsmod |grep mtgpu
配置 Xorg
--- 配置 Xorg 需要修改配置文件,然后重启 Xorg 生效。
配置 xorg.conf
服务器环境一般存在集显,当安装 MT 显卡用作图形渲染时,则需要配置多显卡的 Xorg。通过这样的配置,支持集显用作 BMC 远程桌面显示,同时 MT 显卡可以用作图形渲染。
Xorg 的配置路径为 /etc/X11/xorg.conf,配置主要包括集显的配置,MT 显卡配置和公共部分配置。集显和 MT 显卡的配置主要由 Device,Monitor,Screen 组成,公共部分配置由 OutputClass,ServerLayout,ServerFlags 组成。
集显配置
如果集显用作 BMC 远程桌面显示,则集显做为主显,Identifier 的编号都为 0,DISPLAY 为:0.0。
Device 配置项说明:
-
Identifier 指定 Device 的编号,如果集显做为主显,编号为 Video Device0。
-
Driver 指定集显的驱动,设置为 “modesetting”。
-
BusID:指定集显的 pcie busid。使用 lspci 获取集显的 pcie 地址,lspci 输出的地址为 16 进制,BusID 需要配置成 10 进制,需要将 16 进制转为 10 进制;另外 lspci 获取的地址分隔符为“.”,BusID 的分隔符为“:”。例如使用 lspci 获取 pcie 的地址为:“05:00.0” ,配置项则为"PCI:5:00:0"
使用 lspci 获取显卡的 PCIE 地址
# lspci | grep -E 'VGA|3D|Display'
02:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200e [Pilot] ServerEngines (SEP1) (rev 42)
19:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
1a:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
1b:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
1c:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
b3:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
b4:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
b5:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
b6:00.0 3D controller: Moore Threads Technology Co.,Ltd MTT S3000
将 16 进制转为 10 进制,以“1a”为例:
# echo $((16#1a))
26
Monitor 配置项说明:
- Identifier:指定 Monitor 的编号,如果集显做为主显,编号为 Monitor0
Screen 配置项说明:
-
Identifier:指定 Screen 的编号,如果集显做为主显,编号为 Screen0。
-
Monitor:配置 Monitor 部分 Identifier 的值,为 Monitor0。
-
Device:配置 Device 部分 Identifier 的值,为 Video Device0。
集显为主显的配置示例:
Section "Device"
Identifier "Video Device0"
Driver "modesetting"
BusID "PCI:5:00:0"
EndSection
Section "Monitor"
Identifier "Monitor0"
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "Monitor0"
Device "Video Device0"
EndSection
MT 显卡配置
MT 的每张显卡也是由 Device,Monitor,Screen 三个 section 组成,有几张卡则有几组 Device,Monitor,Screen。在集显做主显的场景下,MT 显卡的 Device,Monitor,Screen 的 Identifier 编号从 1 开始,有几张卡依此类推。第一张 MT 显卡为 DISPLAY 的:0.1,第二张为 :0.2。
Device 配置项说明:
-
Identifier 指定 Device 的编号,例如:Video Device1。
-
Driver 指定 MT 显卡的驱动,设置为“mtgpu”
-
BusID:指定 MT 显卡的 pcie busid,获取 MT 显卡的 pcie 地址。lspci 输出的地址为 16 进制,BusID 需要配置成 10 进制,需要将 16 进制转为 10 进制;另外 lspci 获取的地址分隔符为“.”,BusID 的分隔符为“:”。例如使用 lspci 获取 pcie 的地址为:01:00.0 ,配置项则为"PCI:1:00:0",具体命令可以参考上节。
Monitor 配置项说明:
-
Identifier:指定 Monitor 的编号,例如:Monitor1
-
Modeline:指定显示器的显示模式。例如:
1024x768_60.0063.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync -
Option:指定偏好的显示模式,设置为:"PreferredMode"
1024x768_60.00
注:为了更好的支持集显做为 BMC 远程显示,将 MT 显卡和集显的分辨率和刷新率设置为相同。本指导书推荐将 ServerLayout 部分的 sceen 是叠加在一起的,如果分辨率不同,会导致分辨率小的屏幕鼠标点击发生偏移。
Screen 配置项说明:
-
Identifier:指定 Screen 的编号,如果集显做为主显,编号为 Screen1
-
Monitor:配置 Monitor 部分 Identifier 的值,为 Monitor1
-
Device:配置 Device 部分 Identifier 的值,为 Video Device1
示例:
Section "Device"
Identifier "Video Device1"
Driver "mtgpu"
BusID "PCI:1:00:0"
EndSection
Section "Monitor"
Identifier "Monitor1"
Modeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
Option "PreferredMode" "1024x768_60.00"
EndSection
Section "Screen"
Identifier "Screen1"
Monitor "Monitor1"
Device "Video Device1"
EndSection
公共部分配置
公共部分配置由 OutputClass,ServerLayout,ServerFlags 组成。其中 OutputClass 和 ServerFlags 的配置无需单独修改;ServerLayout 将根据配置显卡的数量,包含集显和 MT 显卡,将屏幕叠加摆放。
OutputClass 配置
Section "OutputClass"
Identifier "mtgpu display"
MatchDriver "mtgpu"
EndSection
ServerLayout 配置
将所有显卡,包括集显和 mtgpu,屏幕叠加摆放。示例中中是将三张卡,一张集显,两张 MT 显卡叠加摆放。
Section "ServerLayout"
Identifier "Server Layout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 0 0
Screen 2 "Screen2" 0 0
EndSection
ServerFlags 配置
Section "ServerFlags"
Option "DefaultServerLayout" "Server Layout"
Option "PrimaryBusDriver" "mtgpu"
Option "AutoAddGPU" "off"
EndSection
完整 Xorg 配置示例请参考附录。
重启 Xorg 进程
停止 Xorg 进程
如果 Xorg 进程启动,则关闭 Xorg 进程
pkill Xorg
如果 Xorg 进程是由 lightdm 服务启动的,则关闭 lightdm 进程。
service lightdm stop
启动 Xorg 进程
如果仅需要 Xorg,则直接启动 Xorg 进程。
Xorg &
如果需要启动窗口管理系统,则使用如下命令
service lightdm start
显示配置
S3000 显卡有 DP 显示接口,可以连接显示器。S3000 可以做为主显,也可以做为副显,两种方式的 Xorg 配置不同。
系统配置检查
S3000 用作显示,需要操作系统配置内核参数 CONFIG_GENERIC_PHY 为 ”y“,如果系统未配置,则需要升级内核版本。
# cat /usr/src/kernels/`uname -r`/.config|grep CONFIG_GENERIC_PHY
CONFIG_GENERIC_PHY=y
驱动配置检查
S3000 用作显示,需要 MT 显卡驱动加载的 display 参数为 ”mt“,否则无法点亮显示器。以下命令可以检查当前加载驱动的 display 参数:
# cat /sys/module/mtgpu/parameters/display
mt
设置 display 参数可以修改 /etc/modprobe.d/mtgpu.conf 配置文件:
# cat /etc/modprobe.d/mtgpu.conf
options mtgpu display=mt
修改配置后,重启系统生效。
MT 显卡作为主显
如果 MT 显卡作为主显,需要修改 /etc/X11/xorg.conf 配置,将其中一张 MT 显卡配置为主显,集显配置配置为副显。具体配置可参考附录 MT 显卡作为主显的内容。
修改 Xorg 配置之后需要停止 Xorg 进程,具体请参考重启 Xorg 进程部分内容。
启动 lightdm,则显示器可点亮。
service lightdm start
注:如果 MT 显卡配置为主显,则 BMC 远程桌面显示为黑屏。