Добавить в FacebookДобавить в Google BookmarksДобавить в TwitterДобавить в OdnoklassnikiДобавить в Vkcom

How to configure drivers for Intel HD Graphics on Ubuntu 14.04

And it all started with the fact that I was not satisfied with the performance of the Intel graphics driver Intel linux Graphics on my Ubuntu 14.04 system. Not that he did not work at all - it worked. I just was sure that it does not work completely. For example, when watching Full HD video, the processor was loaded to 70-80%. Or the toy Warzone 2100 braked (specially set to check for games when drawing objects refer to the video card directly bypassing xserver). And there are many other signs that the driver does not work normally. In general, I did not like everything here. Can you tell me why this does not work out of the box? Because Ubuntu is installed and run on computers with different hardware configurations and it is useless to configure it to use all the capabilities of any single video card, it simply does not work in another (weaker) hardware configuration. To install and run the system, you need a minimal configuration that will work on most hardware. And if you want to get the performance of your particular video card, then the system needs to be configured precisely for this video card. In general, even after installing Intel Linux Graphics Installer with subsequent installation of new drivers, the graphics card produced 530 fps and the processor was constantly loaded. As usual, digging in the Internet began for the necessary information about the settings. Having collected pieces of information from various sources, I proceeded to the settings. I'd like to say a big thank you to comrades of Gentoo system (www.gentoo.ru) for the excellent documentation. So let's move on to the settings. I have installed xserver-xorg-video-intel, xserver-xorg-video-intel-lts-trusty, intel-linux-graphics-installer, mesa-utilspackages. All these packages are in the standard Ubuntu repository. All but intel-linux-graphics-installer. This installer installs the most recent drivers for the kernel of the selected system. For example, a new version of ubuntu with a new kernel has been released, and packages with a new driver optimized for this kernel have not yet been compiled. In this case, they are the first to meet at 01.org. I'll remind you how to connect the repository with this package. To do this, execute the echo "deb https://download.01.org/gfx/ubuntu/14.04/main trusty main #Intel Graphics drivers" | sudo tee /etc/apt/sources.list.d/intellinuxgraphics.list. This command will add the intelgraphics repository. Further Add GPG keys for this repository. Execute the commands:
wget --no-check-sertificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -o - | sudo apt-key add -
wget --no-check-sertificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -o - | sudo apt-key add -. After that, update the list of repositories with the apt-get update command and install the package with the apt-get install intel-linux-graphics-installercommand.

And run this program and install Intel drivers. I recommend that you run it from the console by running the sudo intel-linux-graphics-installercommand. Next, you will see a graphical user interface that allows you to install drivers.

If for some reason intel-linux-graphics-installer does not work for you, you can install the drivers directly by running apt-get install i915-3.16-3.13- dkms и apt-get install i965-va-driver. They have already installed me.

Since the writing of the note a lot of time has passed and now the current version of ubuntu 14.04 is 14.04.4 lts. The newest kernel that is in the ubuntu 14.04.4 lts repository is Linux-image-extra-4.2.0-34-generic. Here in this case, these drivers from Intel you do not screw. You can try to cheat intel-linux-graphics-installer 1.4.0 by changing the name of the system to Ubuntu 15.10. But this will only give instability, since the versions of the libraries in the intel Willy repository are newer than the versions of the libraries in the ubuntu 14.04 repository. For example, kde-window-manager will not be able to work with new libraries. Accordingly, the windows will not be completely drawn, I did not have the top part with the icons of folding and closing, and switching between windows will not work. Considering all this, I put the xserver-xorg-video-intel-lts-wily driver from the standard ubuntu 14.04 repository. On all tests, the results are the same. And uses already Mesa 11.0.2. In order to update the drivers for the new kernel, you need to run the command: sudo apt-get install --install-recommends linux-generic-lts-wily xserver-xorg-core-lts-wily xserver-xorg-lts-wily xserver-xorg-video-all-lts-wily xserver-xorg-input-all-lts-wily xserver-xorg-video-intel-lts-wily libwayland-egl1-mesa-lts-wily. It will install the kernel (if it is not already installed), the x-server stack, including the intel driver. And I recommend that after installing these packages, run the aptitude -f install command. This command will give the package manager aptitude a task to check the package dependencies. If some dependencies are not satisfied, the manager will offer to install the missing packages, delete the irrelevant and conflicting ones. True, she insists on installing old kernels. Then, after a reboot, you can, for example, using Ubuntu Tweak, remove the old kernels.

But in Ubuntu 16.04 LTS with the 4.4 kernel, you should already use the xserver-xorg-video-intel driver package. He works very well. Tightens the truth on a heavy video output to an external large monitor. Collecting the entire stack from Intel Linux is quite difficult, so you'll have to wait a month until the installer is released. Although the 3D tests on this driver are also normal. In general, on Plasma5, the rendering of windows works well. You can make sure you see this video.

Check which driver is used in the system by running lspci -k. ВHere's the output:  

   00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
        Subsystem: Acer Incorporated [ALI] Device 0742
        Kernel driver in use: i915

This means that i915 driver is loaded and running. To view information about this kernel module, you can run the modinfo command i915:

root@darkeye:/home/backup# modinfo i915
filename: /lib/modules/4.2.0-34-generic/kernel/drivers/gpu/drm/i915/i915.ko
license: GPL and additional rights
description: Intel Graphics
author: Intel Corporation
author: Tungsten Graphics, Inc.
firmware: i915/skl_dmc_ver1.bin
srcversion: 5C38138799E6BC8691FB133
....

If you search this driver with the aptitude search i915 command, then there is a package i915-3.15-3.13-dkms. If you type aptitude show i915-3.15-3.13-dkms in the console, we'll see the following: root@darkeye:~# aptitude show i915-3.15-3.13-dkms
Package: i915-3.15-3.13-dkms
New: yes
Status: installed
Automatically installed: no
Version: 0.01
Priority: optional
Section: kernel
Accompanying: Jack Leigh
Architecture: all
Unpacked size: 3.764 k
Dependencies: debhelper, dkms, linux-headers
Description: Intel i915 video drivers from the mainline kernel,
backported from the 3.15 series to the 3.12 series.
This package contains the source to be built with dkms.
This proves that the Intel Graphics driver is installed and running. Look at the Internet who is Jack Leigh and what does he have to download.01.org?
Are you sure? Perfectly.
To complete the driver, enable the required functions and load necessary modules into the kernel, you need to add some lines to the file xorg.conf . Immediately make a reservation in ubuntu 14.04 it is not (there x-server is configured without xorg.conf however if you create it, the settings at server start are read from it) so you need to generate this file. Let's go to console mode (ctrl + shift + F1). In the console, go to the superuser mode ( sudo -s ). We stop the X-server by running the service kdm stop in the console (who has Gnome service gdm stop or Unity - service lightdm stop ). Next, run the Xorg -configure command. This command will create a ~ / xorg.conf.new file in our home directory. It must be moved to the right place and named correctly. Execute the command mv xorg.conf.new /usr/share/X11/xorg.conf.d/xorg.conf .

In the comments, the guy correctly wrote about the inability to generate xorg.conf.new in new versions of Ubuntu (15.04, 15.10). The Xorg -configure command generates errors and does not create a file. I checked on Ubuntu 14.04.4 LTS - it really is. Therefore, I want to suggest another method. Boot into recovery mode (when you turn on the computer, press the esc key, select "Advanced boot options"). There you select the graph with the latest version of your kernel and with the inscription (recovery mode). The kernel will boot into recovery mode and a list will appear. In this list, select root . At the bottom, you will be prompted to enter #. First enter the mount -o remount, rw / command. This command will mount the root file system into read / write mode (before that, the root file system was mounted in read mode). Then enter the Xorg -configure command. During execution, the program will report some minor errors. However, the xorg.conf.new file will be created and will be located in the / root directory. After that, you can transfer this to the right place and name it correctly with the command mv xorg.conf.new /usr/share/X11/xorg.conf.d/xorg.conf .

Open this file in any available editor (I use nano) and edit the necessary sections. Now I will bring the contents, which, in addition to what already exists, should be in this file. If in one section there is, for example, one line, then you need to add the rest. The only thing - I ruled the first section of the "Device & quot; And the other two generated sections & quot; Device & quot; Left unchanged, since I have one video card on my laptop. Those sections that were not, I just added to the file.

What sections did I correct and add:

   Section "Module"
        Load    "extmod"
        Load    "record"
        Load  "glx"
        Load    "dbe"
        Load    "dri"
        Load    "dri2"
   EndSection

This section loads the necessary modules

 
   Section "ServerFlags"
        Option  "AIGLX" "true"
   EndSection

In the ServerFlags section, some X server functions are turned on and off, in this case AIGLX. Accelerated Indirect GLX ("AIGLX") is an open project developed by the communities of Red Hat and Fedora Linux to support direct GLX rendering compatible with X.Org and DRI drivers. This allows the remote X client to receive fully hardware accelerated rendering via the GLX protocol; This development is necessary for OpenGL transparency managers (such as Compiz and Beryl) to work with hardware acceleration.

 
   Section "Device"
        Option          "AccelMethod"           "sna"
        Option          "TearFree"                "true" // Choose whether to add this option yourself or not. I have longitudinal gaps and no jerking and without it. But the guy in the comments wrote that he had stripes and it took them away.
        Option          "Tiling"                "false" // I can turn it on, I normally work with it turned on.
        Option          "DRI"           "true"
        Identifier      "Card0"
        Driver          "intel"
        BusID           "PCI:0:2:0"
   EndSection

In this section you specify the parameters of the video card. Sna - 2D acceleration mode for intel drivers, Tiling - determines whether memory buffers will be allocated in tiled mode. In most cases (especially for complex visualization), the tiled mode significantly improves performance. DRI - direct rendering infrastructure. If you have a BusID parameter in the generated xorg.conf, then leave it.

 
   Section "Extensions"
        Option  "Composite"     "Enable"
        Option  "RENDER"        "Enable"
   EndSection

In this section, additional options are set such as the extension of the composite channel and the resolution of the acceleration of 2D graphics.

 
   Section         "DRI"
        Mode    0666
   EndSection
 

Additionally, for security, I created a file /etc/modprobe.d/i915-kms.conf with the following content: option i915 modeset = 1 . I did this for 100% confidence in the correct loading of the kernel's graphics module. 

You can tell why download modules that are already loaded? And in order to be safe. After editing the configuration file, we overload the computer.

Just want to say. If the graphics server has not booted, do not panic and do not shout that everything has broken down, which, they say, ruined the working system by experiments. Once again, quietly check the configuration file for errors, look at the logs (/var/log/Xorg.0.log). In either case, renaming xorg.conf with the command mv /usr/share/X11/xorg.conf.d/xorg.conf /usr/share/X11/xorg.conf.d/xorg.conf.bak, you can return the Xserver settings to their original state and then, if desired, fix the configuration file in graphical mode.

Since I correctly wrote all the sections of the configuration file, after rebooting the computer, I loaded everything normally.  Open the console and check the performance of 3D graphics:

glxinfo | grep direct
 
direct rendering: Yes
 
glxinfo | grep render
 
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
 
grep Composite /var/log/Xorg.0.log
 
(II) Initializing built-in extension COMPOSITE
We execute the glxgears command in the terminal and see 56-60 fps. And the performance even at first glance became weaker. 
To solve problems with graphics speed (now the driver does not render at full capacity by default), it is necessary to configure DRI independently. Direct Rendering Infrastructure (DRI) is an interface and implementation in the form of free software, used in the X Window System, which allows user applications to access the video equipment safely without the need to use X server (slowing this process). The main purpose of DRI is to provide hardware acceleration for Mesa, one of the implementations of OpenGL.
To configure DRI, if, of course, you have not created it, you need to create the ~ / .drirc file in your home directory as follows:
File: ~/.drirc
 
<driconf>
     <device screen="0" driver="i915">
         <application name="Default">
             <option name="force_s3tc_enable" value="false" />
             <option name="no_rast" value="false" />
             <option name="always_flush_cache" value="false" />
             <option name="always_flush_batch" value="false" />
             <option name="bo_reuse" value="1" />
             <option name="vblank_mode" value="0" />
         </application>
     </device>
 </driconf>
 
A complete list of DRI driver configuration options can be obtained by running the command: #xdriinfo options i915 . The same operations can be performed by performing the adjustment in graphical mode. To do this, simply install the driconf (apt-get install driconf) program and run it from the menu. Do not forget to create a file with the command touch ~ / .drirc . By the way, you can try switching the option < option name = " force_s3tc_enable " Value = " true " /≫ . You can change this option in the settings file using a text editor. Or you can do this in the corresponding tab of the newly installed 3D Acceleration & nbsp; (driconf package). By the way, it makes a more complete configuration file. And notice the "unknown options" tab. If it is, then the options in this tab should be removed from the .drirc file. They will interfere with the driver. This is true for the case when you have one built-in intel video card and there is no discrete video card using these options. All these explanations you can read in help to the program.
 
 
Restart the computer.
After these simple manipulations in the log (/var/log/Xorg.0.log) will appear cherished lines, saying that the drivers are normally loaded and working.

[ 33.093] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 33.093] (II) intel: Driver for Intel(R) HD Graphics: 2000-5000
[ 33.093] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100
[ 33.093] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200
[ 33.099] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 2500
[ 33.099] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2
[ 33.102] (II) intel(0): [DRI2] DRI driver: i965
[ 33.102] (II) intel(0): [DRI2] VDPAU driver: i965
[ 33.102] (II) intel(0): direct rendering: DRI2 Enabled
и т. д.

 
Check again with glxgears. Again 50-60 fps. And this is due to the fact that the program conducts an incorrect test and, in the end, considers the refresh rate of the screen. Run this command like this: $ vblank_mode = 0 glxgears . With this version of the launch, my test showed 4200 fps. But in fact, this test is not informative. Usually it is used only to make sure that OpenGl is working. For a more complete check, I recommend setting, for example, glmark2 ( apt-get install glmark2 ) and running it in the terminal.
 
 

I immediately saw 1100-1400 fps. I have on my laptop a celeron 1007U with an Intel HD Graphics 2500: 350-1000 MHz. Note the OpenGl Information in the test. The value of GL_RENDERER is Mesa DRI Intel (R) Ilybrige Mobile . This is the architecture of my processor, which again proves that these drivers support my video card. For this card this is quite an acceptable result. When viewing Full HD video now the processor is loaded at 20-25%. Toys and everything that requires rendering more or less normally works. I want to draw your attention to the fact that the settings of older intel graphics cards may differ. & Nbsp; < Br>
I looked through the search queries and saw a few about hybrid graphics. Very briefly touch on this issue.
So first - make sure that your model is discrete (an additional video card not built into the processor, Nvidia or AMD) is supported by drivers of 319 series and higher (Nvidia) or fglrx 13.101 series and higher (AMD).
 The second is integrated graphics card Intel.
 Third - your computer or laptop allows you to switch from one video card to another.
For Nvidia systems:
Make sure that no other drivers are installed (nvidia-common package).
Run apt-get install nvidia-331 nvidia-prime nvidia-settings.
Reboot the system.
You can easily switch between graphics processors in the prime part of the NVIDIA settings panel.
For AMD (Radeon) systems:
Make sure that no other fglrx drivers are installed.
Run apt-get instal fglrx fglrx-pxpress.
Reboot the system.
You can easily switch between GPUs in the AMD control panel.
You also need to configure your xorg.conf for the second video card. Above, describing the settings for Intel, I talked about two more sections of the device. So in the second section you need to register your discrete graphics card.
For Nvidia:
Section "Device"
Option   "Tiling"   "false"
Option   "DRI"   "true"
Option   "DRI2"   "true"
Identifier   "Card1"
Driver   "nvidia"
BusID   "PCI:0:2:0"
EndSection

For AMD:
Section "Device"
Option   "Tiling"   "false"
Option   "DRI"   "true"
Option   "DRI2"   "true"
Identifier   "Card1"
Driver   "fglrx"
BusID   "PCI:0:2:0"
EndSection

And of course again reboot the system :-). The DRI settings in the .drirc file remain the same for the Intel graphics card. For AMD and Nvidia, you need to add sections.
I'll add my full current .drirc configuration file generated using the application. Not the fact that it will work on all Intel graphics cards. It works for me. Some sections are settings for known games.
darkeye@darkeye:~$ cat .drirc
<driconf>
<device screen="0" driver="i915">
<application name="Default">
<option name="force_s3tc_enable" value="true" />
<option name="no_rast" value="false" />
<option name="always_flush_cache" value="false" />
<option name="shader_precompile" value="true" />
<option name="always_flush_batch" value="false" />
<option name="bo_reuse" value="1" />
<option name="vblank_mode" value="0" />
<option name="fragment_shader" value="true" />
</application>
</device>
<device screen="0" driver="i965">
<application name="Default">

<option name="force_s3tc_enable" value="true" />
<option name="no_rast" value="false" />
<option name="always_flush_batch" value="false" />
<option name="always_flush_cache" value="false" />
<option name="shader_precompile" value="true" />
<option name="hiz" value="true" />
<option name="clamp_max_samples" value="-1" />
<option name="bo_reuse" value="1" />
<option name="allow_glsl_extension_directive_midshader" value="true" />
<option name="force_glsl_extensions_warn" value="true" />
<option name="disable_throttling" value="false" />
<option name="disable_glsl_line_continuations" value="true" />
<option name="disable_blend_func_extended" value="true" />
<option name="vblank_mode" value="3" />
</application>
<application name="Unigine Sanctuary" executable="Sanctuary">
<option name="force_glsl_extensions_warn" value="true" />
<option name="disable_blend_func_extended" value="true" />
</application>
<application name="Unigine Tropics" executable="Tropics">
<option name="force_glsl_extensions_warn" value="true" />
<option name="disable_blend_func_extended" value="true" />
</application>
<application name="Unigine Heaven (32-bit)" executable="heaven_x86">
<option name="force_glsl_extensions_warn" value="true" />
<option name="disable_blend_func_extended" value="true" />
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Unigine Heaven (64-bit)" executable="heaven_x64">
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Unigine Valley (32-bit)" executable="valley_x86">
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Unigine Valley (64-bit)" executable="valley_x64">
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Unigine OilRush (32-bit)" executable="OilRush_x86">
<option name="disable_blend_func_extended" value="true" />
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Unigine OilRush (64-bit)" executable="OilRush_x64">
<option name="disable_blend_func_extended" value="true" />
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Savage 2" executable="savage2.bin">
<option name="disable_glsl_line_continuations" value="true" />
</application>
<application name="Topogun (32-bit)" executable="topogun32">
</application>
<application name="Topogun (64-bit)" executable="topogun64">
</application>
<application name="Dead Island" executable="DeadIslandGame">
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
<application name="Second Life" executable="do-not-directly-run-secondlife-bin">
<option name="allow_glsl_extension_directive_midshader" value="true" />
</application>
</device>
</driconf>
On this with all the settings.

 
 
Friends. Do not take this note as an absolute guide to setting up Intel video. The manuals are on the websites of the software manufacturers. I just optimized the work of the video subsystem of my laptop with built-in graphics card Intel HD Graphics 2500: 350-1000 MHz. In any other cases, on the other hardware, the settings may be slightly different. But the general principles and approaches to optimization are the same. These settings were enough for me so that the video card of my laptop showed normal performance.

Good luck.

Автор: Darkeye.  

Еще интересное в сети.

  

 

Похожие материалы

Go to the article feed