Cuda, camera for Acer Chromebook 13 CB5-311

I don’t have pci either. Any hint from dmesg? Did you copy the folder “/lib/firmware” from ChromeOS to Ubuntu?

Great! My wifi is working!

I did not pay much attention when you mentioned “you must use the firmware from ChromeOS and not the one from x86 Ubuntu to get wifi working”. (In my case, I’m using Jetson TK1).

I deleted /lib/firmware and copied it from my Chromebook. Now wifi is working.

Thanks so much, I could no figure it out myself.

With network working I can finally do a lot with my Chromebook, starting with “sudo apt-get update”

You’re wolcome. One last point: to activate the sound you must unmute (button “m”) every single chip in alsa-mixer (“alsamixer -c 1”) or set volume to half amplitude.

With wifi working, I downloaded VLC and verified camera is working.

My next task is to have Cuda working. Cuda needs “nvidia” listed by “lspci”. My chromebook does not show anything under “lspci”.

Some links mentioned earlier kernel may be needed, I’ll try some of the approaches, e.g.

https://devtalk.nvidia.com/default/topic/776767/cuda-programming-on-chromebook/

This is very helpful when I tried to play sound today. I did not realize there is a powerful tool “alsamixer” for sound configuration. The sound “settings” of ubuntu did not work, but “alsamixer” did the trick.

So people had success in here?
The thread sounds rather vague (to me at least).
Can it be linked to https://devtalk.nvidia.com/default/topic/774354/embedded-systems/l4t-on-acer-chromebook-13-cb5/3/?offset=42#4728295 in some way?
Is there a way to get ANY proper OS running on the Chromebook13 CB5 and have CUDA binaries execute properly? Using the chrubuntu-script with L4T 21.3 or 21.4 seems to fail!
(CUDA deviceQuery works but actual CUDA code wont execute)

I searched many links which are rather vague about if Cuda runs on Chromebook 13 CB5 with graphics (e.g., the boxFilter sample).

I have recently found out the ubuntu login loop issue which happened to me many times for my Jetson TK1 and Chromebook 13 CB5 (I was logged out right after log in). The issue was due to “.Xauthority” changed owner to root. The solution is “sudo chown ubuntu .Xauthority”.

I flashed earlier version of chromeOs kernel for ubuntu rootfs, compiled Cuda 6.5 samples and still got Cuda device error when tried to run the samples.

My next step is to try earlier version of L4T.

I had an earlier version installed on the chromebook before. There CUDA ran quite well!
My installation was based on this thread here:
http://www.clifford.at/blog/index.php?/archives/131-Installing-Ubuntu-on-an-Acer-Chromebook-13-Tegra-K1.html

But it required some minor fixes here and there - not that clean. So I was hoping we could bundle the efforts/experience here in this forum.
I would love to see CUDA functional with the latest releases on the 13 CB5. Only then it has ‘a future’ in my opinion.

I followed other links to install Ubuntu 14.04 on external MMC cards because I didn’t want to risk my internal MMC.
I tried different versions of chromeos kernels with different versions of L4T, but as soon as I installed Cuda 6.5, my screen turned black.

I did follow the above link to install Ubuntu 14.4 on mmcblk0 but have not tried to install Cuda (I use internal ubuntu to recovery external ubuntu).

I’ll follow the above link to install ubuntu on external MMC.

When Cuda is working do you see nvidia under lspci?

I followed the link

installed ubuntu on external MMC and followed the link

http://elinux.org/Jetson/Installing_CUDA

installed CUDA for L4T.

The good new is no black screen after reboot, deviceQuery returned

###################################################################################
./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: “GK20A”
CUDA Driver Version / Runtime Version 6.5 / 6.5
CUDA Capability Major/Minor version number: 3.2
Total amount of global memory: 4017 MBytes (4212293632 bytes)
( 1) Multiprocessors, (192) CUDA Cores/MP: 192 CUDA Cores
GPU Clock rate: 72 MHz (0.07 GHz)
Memory Clock rate: 13 Mhz
Memory Bus Width: 64-bit
L2 Cache Size: 131072 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: No
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 0 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = GK20A
Result = PASS

####################################################################################################

but I still got “cudaErrorDevicesUnavailable” error for other samples:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CUDA Clock sample
GPU Device 0: “GK20A” with compute capability 3.2

CUDA error at clock.cu:119 code=46(cudaErrorDevicesUnavailable) “cudaMalloc((void **)&dinput, sizeof(float) * NUM_THREADS * 2)”
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Device 0: < GK20A >, Compute SM 3.2 detected

Using CUDA Host Allocated (cudaHostAlloc)
CUDA error at simpleZeroCopy.cu:186 code=46(cudaErrorDevicesUnavailable) “cudaHostAlloc((void **)&a, bytes, flags)”
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

there is no device listed by “lspci”.

It seems Cuda is working after reinstall earlier kernel following the link:

I hope the above link can be combined with the following links:

http://www.clifford.at/blog/index.php?/archives/131-Installing-Ubuntu-on-an-Acer-Chromebook-13-Tegra-K1.html

http://elinux.org/Jetson/Installing_CUDA

to install kernel, rootfs and cuda in one step.

The following is from sample test:

[simpleMultiCopy] - Starting…

Using CUDA device [0]: GK20A
[GK20A] has 1 MP(s) x 192 (Cores/MP) = 192 (Cores)
Device name: GK20A
CUDA Capability 3.2 hardware with 1 multi-processors
scale_factor = 1.00
array_size = 4194304

Relevant properties of this CUDA device
(X) Can overlap one CPU<>GPU data transfer with GPU kernel execution (device property “deviceOverlap”)
( ) Can overlap two CPU<>GPU data transfers with GPU kernel execution
(Compute Capability >= 2.0 AND (Tesla product OR Quadro 4000/5000/6000/K5000)

Measured timings (throughput):
Memcpy host to device : 6.306848 ms (2.660159 GB/s)
Memcpy device to host : 1.579200 ms (10.623870 GB/s)
Kernel : 4.447584 ms (37.722088 GB/s)

Theoretical limits for speedup gained from overlapped data transfers:
No overlap at all (transfer-kernel-transfer): 12.333632 ms
Compute can overlap with one transfer: 7.886048 ms
Compute can overlap with both data transfers: 6.306848 ms

Average measured timings over 10 repetitions:
Avg. time when execution fully serialized : 5.945952 ms
Avg. time when overlapped using 4 streams : 4.389174 ms
Avg. speedup gained (serialized - overlapped) : 1.556778 ms

Measured throughput:
Fully serialized execution : 5.643240 GB/s
Overlapped using 4 streams : 7.644817 GB/s

yahoo2016, try

sudo -i

echo performance > /sys/devices/soc0/50000000.host1x/57000000.gk20a/devfreq/57000000.gk20a/governor

… to speed up CUDA performance and memory transfers

JensM,

Thanks for your great work to make Cuda working for Chromebook 13. Following your instruction, I got significant performance boost for the same test:

[simpleMultiCopy] - Starting…
modprobe: FATAL: Module nvidia not found.

Using CUDA device [0]: GK20A
[GK20A] has 1 MP(s) x 192 (Cores/MP) = 192 (Cores)
Device name: GK20A
CUDA Capability 3.2 hardware with 1 multi-processors
scale_factor = 1.00
array_size = 4194304

Relevant properties of this CUDA device
(X) Can overlap one CPU<>GPU data transfer with GPU kernel execution (device property “deviceOverlap”)
( ) Can overlap two CPU<>GPU data transfers with GPU kernel execution
(Compute Capability >= 2.0 AND (Tesla product OR Quadro 4000/5000/6000/K5000)

Measured timings (throughput):
Memcpy host to device : 1.233408 ms (13.602325 GB/s)
Memcpy device to host : 1.231520 ms (13.623177 GB/s)
Kernel : 2.142368 ms (78.311548 GB/s)

Theoretical limits for speedup gained from overlapped data transfers:
No overlap at all (transfer-kernel-transfer): 4.607296 ms
Compute can overlap with one transfer: 2.464928 ms
Compute can overlap with both data transfers: 2.142368 ms

Average measured timings over 10 repetitions:
Avg. time when execution fully serialized : 5.033206 ms
Avg. time when overlapped using 4 streams : 4.325859 ms
Avg. speedup gained (serialized - overlapped) : 0.707348 ms

Measured throughput:
Fully serialized execution : 6.666611 GB/s
Overlapped using 4 streams : 7.756709 GB/s

I also followed this link after the general chrubunntu setup:

With this, CUDA works again.
Closing lid crashed however - any suggestions? I am using GNOME desktop, maybe that is an issue?
Also I have not yet looked into proper keybindings.

A bit strange, however:
I can verify your results

emcpy host to device : 1.233408 ms (13.602325 GB/s)
Memcpy device to host : 1.231520 ms (13.623177 GB/s)

But when I run glmark2 the score is about half as high as on my jetson TK1 in L4T 19.3.
(only ~ 600. Can anyone confirm this?)

I used default ubuntu desktop, lip does nothing. I had to change kb shortcuts to make mute, vol up/down working.

The following were from glmark2, I noticed some errors, may those limited performance?

** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.

glmark2 2012.08

=======================================================
OpenGL Information
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GK20A/NullRM/AXI
GL_VERSION: 4.4.0 NVIDIA 21.4

** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=false: FPS: 780 FrameTime: 1.282 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=true: FPS: 813 FrameTime: 1.230 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=nearest: FPS: 734 FrameTime: 1.362 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=linear: FPS: 735 FrameTime: 1.361 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=mipmap: FPS: 757 FrameTime: 1.321 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[shading] shading=gouraud: FPS: 704 FrameTime: 1.420 ms

                              glmark2 Score: 753 

=======================================================

I had the same (I believe) error messages on the Chromebook AND the Jetson TK1 dev-board.
I will compare the outcomes of other CUDA tests between the two these days. Important thing is: it works :)

May I ask how/where you changed the KB shortcuts?
I find that part somewhat troublesome to get done consistently.

Thanks and cheers,
Martin

To set KB shortcut from ubuntu desktop:

Click on “System Settings”

Select “keyboard” under “Hardware”.

Click on “Shortcuts”

To set mute button:

Clink on “Sound and Media” and click on “Volume mute” until it shows “New accelerator…”

clink on the mute button on KB, the “New accelerator…” should change to new key code e.g., “F8” or “F9” or “F10”

I found the following worked to turn off Chromebook when power button is pushed:

sudo gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true

Can you please make a simple tutorial (like [url]Ratgeber - Claire's Homepage) to install Ubuntu or Mint on my Chromebook cb5 with CUDA and headphone jack + lid opening working.

I am a noob. So please be kind.