Bug 61416

Summary: Clover doesn't authenticate when not run as a privileged user
Product: Mesa Reporter: Mike Lothian <mike>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: mike
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Xorg log
Xorg log old
Xorg log
Glibc error

Description Mike Lothian 2013-02-25 00:09:39 UTC
Clover doesn't find the correct device when running the simple tests when run under X

./math-int if_ne -20 20 1     
radeon: Failed to get PCI ID, error number -13
There are 1 platforms.
clGetDeviceIDs() failed: CL_DEVICE_NOT_FOUND

When I run it from a virtual terminal (X is still running) I get:

./math-int if_ne -20 20 1
There are 1 platforms.
There are 1 GPU devices.
clCreateContext() succeeded.
clCreateCommandQueue() succeeded.
clCreateProgramWithSource() succeeded.
clBuildProgram() succeeded.
clCreateKernel() succeeded.
clCreateBuffer() succeeded.
clSetKernelArg() succeeded.
clSetKernelArg() succeeded.
clSetKernelArg() succeeded.
clEnqueueNDRangeKernel() succeeded.
clEnqueueReadBuffer() succeeded.
Pass

The above was typed manually due to the output not piping to a file - think there are a few typos in the program

Is Clover using an environmental variable when run under X that's giving it the wrong device name?

This is a PRIME system - sandybridge i965 with Radeon 6600M r600g

tau Overlay # lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0101] (rev 09)
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0105] (rev 09)
00:01.2 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0109] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 05)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b5)
00:1c.4 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 [8086:1c18] (rev b5)
00:1c.7 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 [8086:1c1e] (rev b5)
00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 05)
00:1f.0 ISA bridge [0601]: Intel Corporation HM65 Express Chipset Family LPC Controller [8086:1c49] (rev 05)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller [8086:1c03] (rev 05)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 05)
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Whistler [AMD Radeon HD 6600M Series] [1002:6741]
09:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6230 [Rainbow Peak] [8086:0090] (rev 34)
0a:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet [1969:1083] (rev c0)
0b:00.0 USB controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 04)
Comment 1 Mike Lothian 2013-02-25 00:11:09 UTC
Created attachment 75466 [details]
Xorg log
Comment 2 Mike Lothian 2013-02-25 00:15:04 UTC
Also just found this in my dmesg:

[80637.912484] traps: memset[1671] general protection ip:7f720cbd6a68 sp:7fff4301aec0 error:0 in libOpenCL.so.1.0.0[7f720c955000+e80000]
[80637.931162] traps: memset[1676] general protection ip:7fd72d648a68 sp:7fff95024860 error:0 in libOpenCL.so.1.0.0[7fd72d3c7000+e80000]
[80638.196478] traps: memset[1736] general protection ip:7fd4f0e24a68 sp:7fffc08321a0 error:0 in libOpenCL.so.1.0.0[7fd4f0ba3000+e80000]
[80638.213838] traps: memset[1740] general protection ip:7f323c707a68 sp:7fffaa50b780 error:0 in libOpenCL.so.1.0.0[7f323c486000+e80000]
[80638.230677] traps: memset[1744] general protection ip:7f15cbbcfa68 sp:7fffd6528c20 error:0 in libOpenCL.so.1.0.0[7f15cb94e000+e80000]
[80638.248368] traps: memset[1748] general protection ip:7f8077aeea68 sp:7fff57009ae0 error:0 in libOpenCL.so.1.0.0[7f807786d000+e80000]
[80638.299297] traps: memset[1762] general protection ip:7f20cc28ea68 sp:7fff183d62e0 error:0 in libOpenCL.so.1.0.0[7f20cc00d000+e80000]
[80638.316670] traps: memset[1766] general protection ip:7f133368ba68 sp:7fff058332a0 error:0 in libOpenCL.so.1.0.0[7f133340a000+e80000]

These don't appear when I run the test above either in X or from the terminal

They only appear when I run all the tests under X - 71 fails

No messages appear from running from the terminal where I get 67 Passes 4 Fails
Comment 3 Mike Lothian 2013-03-02 05:34:52 UTC
There's a chance this might not be related to PRIME

I've tested this on another system that uses a Radeon 4200 (I know it doesn't work with the R600 backend yet)

The interesting thing was when X was running I got:

./math-int rotl 4096 23 8
radeon: Failed to get PCI ID, error number -13
There are 1 platforms.
clGetDeviceIDs() failed: CL_DEVICE_NOT_FOUND

When I stopped X I got:

./math-int rotl 4096 23 8
There are 1 platforms.
There are 1 GPU devices.
clCreateContext() succeeded.
clCreateCommandQueue() succeeded.
Failed to open file: rotl.cl
Comment 4 Mike Lothian 2013-03-02 05:46:54 UTC
Both tests were run via ssh so it seems the issue only appears when X is the active VT
Comment 5 Mike Lothian 2013-03-13 19:44:13 UTC
Created attachment 76494 [details]
Xorg log old
Comment 6 Mike Lothian 2013-03-13 19:44:40 UTC
Created attachment 76495 [details]
Xorg log
Comment 7 Mike Lothian 2013-03-13 19:50:58 UTC
Created attachment 76498 [details]
Glibc error

This shows the glibc lined lists issue
Comment 8 Tom Stellard 2014-08-21 15:54:15 UTC
This should work now if you enable rendernodes in the kernel.  You can do this by adding drm.rnodes=1 you your kernel command line.  The oldest kernel that supports rendernodes is 3.12. Please re-open if you are still having issues.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.