Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5142 Discussions

Make sure you have root privileges to analyze Processor Graphics hardware events

Janusz_R_
Beginner
1,740 Views

vtune_amplifier_xe_2016.4.0.470476 on i7-5557U, Ubuntu 15.10.

Once I select "Analyze Processor Graphics hardware events" to "Overview" I'm getting error as in subject. Running as sudo/root doesn't help.

Any idea how to fix this?

0 Kudos
12 Replies
Ekaterina_L_Intel
1,740 Views

Hello,

root privileges are required on Linux in order to collect Intel HD Graphics hardware events.

You need to run amplxe-cl/-gui under root account or with sudo.

Regards, Katya

0 Kudos
Janusz_R_
Beginner
1,740 Views

Yes, I did try both to no avail.

0 Kudos
Ekaterina_L_Intel
1,740 Views

Ah, ok.

Please specify which Intel Graphics Driver version you have?

Regards, Katya

0 Kudos
Janusz_R_
Beginner
1,740 Views

Using Kernel Mode Setting driver: i915, version 1.6.0 20150522

0 Kudos
Janusz_R_
Beginner
1,740 Views

I've just installed Graphics Installer 1.4.0 for Ubuntu* 15.10, 64-bit, reinstalled vtune but that didn't change anything.

0 Kudos
Ekaterina_L_Intel
1,740 Views

Can you please provide output of the command below run under root?

<vtune>/bin64/amplxe-runss --context-value-list

Regards, Katya

0 Kudos
Janusz_R_
Beginner
1,740 Views
root@nuc:~# /opt/intel/vtune_amplifier_xe/bin64/amplxe-runss --context-value-list
[MD] InitializeOaBuffer: failed to pin buffer
[MD] MetricsDeviceEnable: OA buffer not allocated
[MDAPI] OpenMetricsDevice: driver support enabling failed
targetOS: Linux
OS: Linux
isPtraceScopeLimited: false
isTSXAvailable: false
isHTEnabled: true
isSGXAvailable: false
LinuxRelease: 4.2.0-41-generic
Hypervisor: None
isPtraceAvailable: true
areGpuHardwareMetricsAvailable: InitializationError
ETW: NA
isEtwDxSupported: no
isEtwCLRSupported: no
isPowerAnalysisAvailable: PlatformError
isPowerKernelStacksAvailable: false
isFtraceAvailable: yes
isMdfEtwAvailable: false
isCSwitchAvailable: yes
isGpuBusynessAvailable: yes
isGpuBusynessDetailsAvailable: yes
isGpuWaitAvailable: yes
isFunctionTracingAvailable: yes
isIowaitTracingAvailable: yes
isVSyncAvailable: yes
isSEPDriverAvailable: true
platformType: 97
CPU_NAME: 5th generation Intel(R) Core(TM) Processor family
PMU: broadwell
referenceFrequency: 3100000000
isVTSSPPDriverAvailable: true
isNMIWatchDogTimerRunning: false
LinuxPerfCredentials: Kernel
LinuxPerfCapabilities: breakpoint:raw;cpu:raw,format,events;intel_bts:raw;intel_pt:raw,format;power:raw,format,events;software:raw;tracepoint:raw;uncore_imc:raw,format,events
LinuxPerfStackCapabilities: fp,dwarf
isTPSSAvailable: true
isPytraceAvailable: true
isGENDebugInfoAvailable: false
root@nuc:~#

 

0 Kudos
Janusz_R_
Beginner
1,740 Views

OK so output provided, what can be done about the issue?

0 Kudos
Alexandr_K_Intel
Employee
1,740 Views

Hi,

  Did you patch your kernel during installation of the graphics driver? This step is required for VTune. Reffer to to your copy of Getting starting guide from graphics driver installation. Here you can find https://software.intel.com/sites/default/files/media_server_studio_getting_started_guide.pdf ;some general getting starting guide which likely is applicable to your version of the driver. 

 

0 Kudos
Janusz_R_
Beginner
1,740 Views

I cannot find in Vtune docs that kernel patching is required. Docs for graphics driver installation don't talk about it either. The only talk about kernel patching I saw was for OpenCL driver installation in order to make it work but that was for Ubuntu 14.04 for 3.x and 4.1 kernel. On Ubuntu 15.10 the default kernel is 4.2 and OpenCl works fine without patching.
Now you attached me pdf from Media Server Studio with kernel patching instruction which I belive includes the patch file but that is a paid product which I'm not interested in.

Where can I get this kernel patch file from otherwise?

0 Kudos
Alexandr_K_Intel
Employee
1,740 Views

Hi,

  Only patched driver from Media Server Studio is officially supported by VTune on Linux. Community edition is free and is OK to use, you can download it here: https://software.intel.com/en-us/intel-media-server-studio. Again, it requires kernel to be patched.

  If you on your own risk want to use VTune with OpenCL driver, then you need to patch the kernel with /opt/intel/opencl/kernel-4.1.patch, see your copy of intel-opencl-1.2-installation-external.txt coming with the OpenCL driver for details. I am attaching some version 510472of this document for your reference. VTune requires this patching and will not work with out-of-the-box version of 4.2 kernel (although OpenCL itself might work fine).

   Sorry about misleading error messages and docs -- we will enhance those.

0 Kudos
Janusz_R_
Beginner
1,740 Views

There is progress but still not there.

I've installed Media Server Studio on CentOS 7.1.1503, followed steps for CentOS 7.1.
simple_1_session from tutorials is working, OpenCL in general is working.

Then installed Vtune. There is no error about root privileges anymore but still hardware events are not working for gpu.

I'm getting errors:

[MDC] MDClientOpenStream: invalid handle to DRM
CoreUOpenIoStream: failed to handle stream open
[MDC] MDClientCloseStream: already closed
[MDAPI] OpenIoStream: open stream failed, res: 1

Any ideas?

0 Kudos
Reply