英特尔hd630驱动_Ubuntu 16.04安装Intel显卡驱动(解决Intel HD Graphics 630显卡驱动问题)...

本文详细介绍了如何在Ubuntu 16.04系统中,针对Intel HD Graphics 630显卡遇到的死机问题进行解决。通过升级内核到4.7版本,下载并安装特定的驱动脚本,然后添加用户到video组,确保兼容性和稳定性。此外,还提供了在安装过程中遇到的依赖问题及解决办法。
摘要由CSDN通过智能技术生成

之前的现象描述

办公电脑的显卡是Intel HD Graphics 630,系统是 Ubuntu 16.04 x64 版本,之前外接一个 VGA 显示器时使用正常。最近又外接了一个 HDMI 显示器做扩展屏幕,发现系统经常死机,只能强制重启,升级了 kernel 之后也没有解决。找到了这篇教程,自己也整理一下。

升级4.7的内核,步骤如下:

下载脚本:

https://software.intel.com/en-us/forums/opencl/topic/738108

使用:

mv install_OCL_driver.txt install_OCL_driver.sh

chmod 755 install_OCL_driver.sh

sudo su

./install_OCL_driver.sh install

完成后的提示信息:

...

Installation completed successfully.

Next steps:

Add OpenCL users to the video group: 'sudo usermod -a -G video USERNAME'

e.g. if the user running OpenCL host applications is foo, run: sudo usermod -a -G video foo

If you have Intel Pentium J4000 or Intel Celeron J3000, you will need to add:

i915.preliminary_hw_support=1

to the 4.7 kernel command line, in order to enable OpenCL functionality for these platforms.

Reboot into the patched 4.7 kernel

HINT: to boot into the 4.7 kernel do the following:

1) Hold the "shift" button during boot

2) When the GRUB menu appears, select "Advanced options for Ubuntu"

3) Select the Linux 4.7.0.intel.r5.0 kernel from the list

重启后即可。

如果中途出现APT的错误,参考:http://www.cnblogs.com/EasonJim/p/7343892.html

install_OCL_driver.sh

#!/bin/bash

#

# Installs the Graphics Driver for OpenCL (SRB5.0) on Linux.

#

# Usage: sudo -E ./install_OCL_driver.sh [OPTION]...

#

# Supported platforms:

# 5th, 6th or 7th generation Intel® processor with Intel(R)

# Processor Graphics Technology not previously disabled by the BIOS

# or motherboard settings or Intel Pentium J4000 and Intel Celeron

# J3000 processors.

#

# Official document:

# http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip

# replace this with link to download

#

# Optimization note: at the end of installation you will have on:

#

# 1) CentOS

# /rpmbuild/RPMS/x86_64/kernel-4.7.0.intel.r*-1.x86_64.rpm

# /rpmbuild/RPMS/x86_64/kernel-devel-4.7.0.intel.r*-1.x86_64.rpm

#

# 2) Ubuntu

# /linux-image-4.7.0.intel.r*-*.deb

# /linux-headers-4.7.0.intel.r*-*.deb

#

# You may deploy these packages on other systems you have, and

# then launch this script on these systems. This will result in a

# *significantly faster* installation time.

#

#

RELEASE_NUM="5.0"

BUILD_ID="r5.0-63503"

EXIT_FAILURE=1

SRB_5_0=http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip

KERNEL_4_7=https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.7.tar.xz

SRB_5_0_SHA="a3989a7a00f216b1a50bad37dc49629c3f7ce65104a2ca665e59d8c699bf7443"

KERNEL_4_7_SHA="5190c3d1209aeda04168145bf50569dc0984f80467159b1dc50ad731e3285f10"

KERNEL_BUILD_MARKER=".intel_kernel_built"

LINUX_KERNEL_UNAME="4.7.0.intel.r*"

# The devel/headers package is required for the OpenCL GPU kernel debugger,

# as the kernel module (igfxdcd) needs kernel sources in order to build.

#

CENTOS_RPMS=("kernel-4.7.0.intel.r*"

"kernel-devel-4.7.0.intel.r*")

DEBIAN_DEBS=("linux-image-4.7.0.intel.r*"

"linux-headers-4.7.0.intel.r*")

PKGS=

SKIP_DOWNLOADS=0

INTERACTIVE=1 # 0/1 prompt/don't prompt for yum installations, set by parse_args

FAIL_ON_SHA_MISMATCH=1

TIMEOUT=5 # curl connect timeout

WORKSPACE=~/intel-opencl

CENTOS_UPGRADE_TO_72=1

BUILD_KERNEL=1

CHECK_DISTRO_VER=1

INSTALL_MODE= # 0/1 means uninstall/install, set by parse_args

CENTOS_MINOR=

UBUNTU_VERSION=

RPMBUILD_DIR=

DISTRO=

_install_prerequisites_centos()

{

# yum doesn't accept timeout in seconds as parameter

echo

echo "Note: if yum becomes non-responsive, try aborting the script and run:"

echo " sudo -E $0"

echo

local coreutils=""

$(sha256sum --version >& /dev/null) || coreutils="coreutils"

local minus_y=""

[[ $INTERACTIVE -eq 0 ]] && minus_y="-y"

CMDS=("yum $minus_y install tar libpciaccess numactl-libs $coreutils"

"yum $minus_y groupinstall 'Development Tools'"

"yum $minus_y install rpmdevtools openssl openssl-devel bc")

for cmd in "${CMDS[@]}"; do

echo $cmd

eval $cmd

if [[ $? -ne 0 ]]; then

echo ERROR: failed to run $cmd >&2

echo Problem \(or disk space\)? >&2

echo . Verify that you have enough disk space, and run the script again. >&2

exit $EXIT_FAIULRE

fi

done

if [[ $CENTOS_UPGRADE_TO_72 -eq 1 && -n $CENTOS_MINOR && $CENTOS_MINOR -lt 2 ]]; then

echo Upgrading from CentOS 7.$CENTOS_MINOR to CentOS 7.2...

cmd="yum $minus_y update"

echo $cmd

eval $cmd

if [[ $? -ne 0 ]]; then

echo ERROR: failed to run $cmd >&2

echo problem \(or disk space\)? >&2

echo 2. Verify that you have enough disk space, and run the script again. >&2

exit $EXIT_FAIULRE

fi

fi

}

_install_prerequisites_ubuntu()

{

# apt-get doesn't accept timeout in seconds as parameter

echo

echo "Note: if apt-get becomes non-responsive, try aborting the script and run:"

echo " sudo -E $0"

echo

local minus_y=""

[[ $INTERACTIVE -eq 0 ]] && minus_y="-y"

local xz="xz-utils"

CMDS=("apt-get $minus_y update"

"apt-get $minus_y install openssl libnuma1 libpciaccess0"

"apt-get $minus_y install $xz"

"apt-get $minus_y install build-essential openssl bc curl libssl-dev")

for cmd in "${CMDS[@]}"; do

echo $cmd

eval $cmd

if [[ $? -ne 0 ]]; then

echo ERROR: failed to run $cmd >&2

echo Problem \(or disk space\)? >&2

echo " sudo -E $0" >&2

echo 2. Verify that you have enough disk space, and run the script again. >&2

exit $EXIT_FAIULRE

fi

done

}

install_prerequisites()

{

if [[ $DISTRO == "centos" ]]; then

echo Installing prerequisites...

_install_prerequisites_centos

elif [[ $DISTRO == "ubuntu" ]]; then

echo Installing prerequisites...

_install_prerequisites_ubuntu

fi

}

# Download the url (if needed) and compares its sha256sum against source sha.

#

# Arguments:

# $1 - source sha256sum

# $2 - url

#

_fetch_and_compare_sha()

{

local src_sha=$1

local url=$2

local fname=$(basename $url)

local dst_sha=""

local should_download=0

local cmd="curl --connect-timeout $TIMEOUT -O $url"

if [[ -f $fname ]]; then

dst_sha=

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值