一半君的总结纸

听话只听一半君

Thinkpad T450s kmod-nvidia 升级备忘录 with bumblebee

升级了下系统结果maya2016开不了了直接crash

之前yum update了一下,结果maya2016开不了了,后来发现把kmod-nvidia降一个版本就好了,写了自动恢复脚本备忘

$ yum --showduplicates list kmod-nvidia
Available Packages
kmod-nvidia.x86_64    352.79-1.el7.elrepo        elrepo 
kmod-nvidia.x86_64    361.28-1.el7.elrepo        elrepo 
kmod-nvidia.x86_64    361.42-1.el7.elrepo        elrepo 
kmod-nvidia.x86_64    361.45.11-1.el7.elrepo     elrepo 
kmod-nvidia.x86_64    367.27-1.el7.elrepo        elrepo 
kmod-nvidia.x86_64    367.35-1.el7.elrepo        elrepo 

或者用repoquery

$ repoquery kmod-nvidia --show-duplicates
kmod-nvidia-0:352.79-1.el7.elrepo.x86_64
kmod-nvidia-0:361.28-1.el7.elrepo.x86_64
kmod-nvidia-0:361.42-1.el7.elrepo.x86_64
kmod-nvidia-0:361.45.11-1.el7.elrepo.x86_64
kmod-nvidia-0:367.27-1.el7.elrepo.x86_64
kmod-nvidia-0:367.35-1.el7.elrepo.x86_64

还可以这样临时查询下elrepo-testing里的

$ repoquery kmod-nvidia --show-duplicates --disablerepo="*" --enablerepo="elrepo-testing"

此外有个问题就是elrepo为了省空间,经常把老的package删掉,只留最近的几个,旧的会移动到archive目录里,但不是每个mirror都有存archive,如果需要用旧版的驱动,可以这样,自己改下/etc/yum.repos.d/elrepo.repo

[elrepo-archives]
name=ELRepo.org Community Enterprise Linux Archives Repository - el7
baseurl=http://ftp.ines.lug.ro/elrepo/archive/elrepo/el7/$basearch/
#mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-extras.el7
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0

这是从上面的其他的repo复制来的,相当于是禁用了mirrorlist,而且指定了说就只要用这个mirror(是mirror列表页面上第一个有archives的),然后给他起了个名字叫做elrepo-archives,测试一下

$ repoquery kmod-nvidia --show-duplicates --disablerepo="*" --enablerepo="elrepo-archives"
kmod-nvidia-0:331.79-2.el7.elrepo.x86_64
kmod-nvidia-0:331.89-1.el7.elrepo.x86_64
kmod-nvidia-0:340.24-1.el7.elrepo.x86_64
kmod-nvidia-0:340.32-1.el7.elrepo.x86_64
kmod-nvidia-0:340.46-1.el7.elrepo.x86_64
kmod-nvidia-0:340.58-1.el7.elrepo.x86_64
kmod-nvidia-0:340.65-1.el7.elrepo.x86_64
kmod-nvidia-0:346.35-1.el7.elrepo.x86_64
kmod-nvidia-0:346.47-1.el7.elrepo.x86_64
kmod-nvidia-0:346.47-2.el7.elrepo.x86_64
kmod-nvidia-0:346.59-1.el7.elrepo.x86_64
kmod-nvidia-0:352.21-1.el7.elrepo.x86_64
kmod-nvidia-0:352.21-3.el7.elrepo.x86_64
kmod-nvidia-0:352.30-1.el7.elrepo.x86_64
kmod-nvidia-0:352.41-1.el7.elrepo.x86_64
kmod-nvidia-0:352.55-1.el7.elrepo.x86_64
kmod-nvidia-0:352.63-1.el7.elrepo.x86_64
kmod-nvidia-0:352.79-1.el7.elrepo.x86_64
kmod-nvidia-0:361.28-1.el7.elrepo.x86_64
kmod-nvidia-0:361.42-1.el7.elrepo.x86_64
kmod-nvidia-0:361.45.11-1.el7.elrepo.x86_64
kmod-nvidia-0:367.27-1.el7.elrepo.x86_64
kmod-nvidia-0:367.35-1.el7.elrepo.x86_64

不错,这样装挂了以后,还能装回以前老的(万一老的已经不在普通repo里的话)

总之之前升级到最新的367.35-1,maya 2016进不去,因为手动设置麻烦,所以做成了个自动script,lz的机器信息如下

$ cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

$ uname -r
3.10.0-327.28.2.el7.x86_64

$ lspci -vnn | grep '\''[030[02]\]'
00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1616] (rev 09) (prog-if 00 [VGA controller])
04:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 940M] [10de:1347] (rev a2)

update:
12/11/2016
想更新下系统,发现这个repo里也有 kmod-nvidia的包,所以干脆把他禁了

yum-config-manager --disable epel-HandBrake*

lz把自动升级kmod-nvidia的script放在github了,地址

参考:
ELRepo archives – The ELRepo Blog

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: