Acer Chromebook CB5-311 mainline

This forum is for supported devices using an ARMv7 nVidia SoC.

Re: Acer Chromebook CB5-311 mainline

Postby reey » Thu Jan 03, 2019 2:51 pm

As I mentioned in my previous post, there is no need for an external keyboard for uboot, just make sure that you boot/reboot by pressing reload (cirular arrow) and power at the same time..

the external keyboard is also not working for me on the white screen..
You need to use the usb port on the left side, that is next to the sd card slot, the port on the backside isn't working for me.
I think the port on the backside is used for debugging..

clean build could also help..
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Thu Jan 03, 2019 3:15 pm

$this->bbcode_second_pass_quote('', 'j')ust make sure that you boot/reboot by pressing reload (cirular arrow) and power at the same time


Yes, this is working!

Now I've been able to enter a printenv, which is yielding a lot of information:

$this->bbcode_second_pass_code('', 'arch=arm
baudrate=115200
board=nyan-big
...
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc1 mmc0 usb0 pxe dhcp
...
bootdelay=2
...
efi_dtb_prefixes=/ /dtb/ /dtb/current/
...')

Looking at the Linux Exynos Wiki is giving quite some ideas of what could be done with U-Boot... but I don't have much of an idea yet. From my cubox I know that it needs the respective dtbs in the right place, to boot a new kernel, so I suspect it could be similar for our Chromebook. Other than that U-Boot should read the filesystem, and should even boot a kernel zImage... so we're almost there. :-)
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sun Jan 06, 2019 7:03 pm

I've been writing with someone from the phoronix forum who is using u-boot + grub + debian on an Tegra K1 device.
He gave me some instructions, and I'm able to boot into grub, but debian is not booting up from there..

He also mentioned in his instructions to edit the arch/arm/dts/tegra124-nyan-big-u-boot.dtsi file:
Edit this line: spi-deactivate-delay = <200>; to spi-deactivate-delay = <2000>;
This is solving my issues with the unrecognized keyboard.
spi-deactivate-delay = <500>; has also worked for me.
So I no longer need to boot with reload/refresh button + power button, the normal powerbutton is working.

in u-boot I would recommend to execute "setenv stdin cros-ec-keyb" and "saveenv" so we no longer get the inputs from the serial console.. Otherwise autoboot would later on not work since it is always interrupted by serial..

If I get the instructions working I might write a script for that..
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby fedup » Mon Jan 07, 2019 2:37 pm

Hello other cb5-311 owners.
I'm running 4.19.13 stable with fedora29 and also not getting the extra 2GB of ram with LPAE compiled in. Its seems to have been broken since 4.19 RC1. I noticed also that the tegra124-nyan.dtsi changed at the same time:
memory@80000000 {
reg = <0x0 0x80000000 0x0 0x80000000>;
};
it was
memory {
reg = <0x0 0x80000000 0x0 0x80000000>;
};
I'm now using zram so at least I'm not running into exhausted memory problems. I booted 4.18.15 with LPAE and I had 4GB but zram didn't enable swap. I'm going to file a kernel bug has anyone got any ideas about changes that may have caused the bug?
Couple of questions??
1. Has anyone been able to suspend to ram. I've been running with the chromeos kernel for the last year so. I Tried the mainline kernel sometime in 2017 and the system froze on suspend, Still the case on latest kernel
2. I've enabled cpufreq as it was disabled in the dsti. I'm getting far better battery life and running cooler with this enabled. Seems strange to disable cpufreq instead of fixing the suspend issues.
3.I've noticed problem with dithering as if the display is not using 24bit colour depth. It's really obvious if you set the xfce4 background to gradient with bands running across the screen. Sometimes I don't have the banding but can't understand why. Seems the same if I run with nouveau enabled.

Just to add I'm booting with u-boot off an sdcard
fedup
 
Posts: 32
Joined: Mon Jan 07, 2019 2:02 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Wed Jan 09, 2019 6:01 am

Hello @fedup, welcome to the forum!

I'll try to answer your questions best I can, then ask you a couple of questions I'm really interested in. :D

1. Suspend to ram never worked for me. I'd like to have it too, like on ChromeOS, but it is relatively less important, thanks to the high startup speed of the CB5-311 with Arch installed. I'm getting:

$this->bbcode_second_pass_code('', '
# systemd-analyze
Startup finished in 4.291s (kernel) + 10.129s (userspace) = 14.420s
')

This is a lot faster than e.g. my work computer, an expensive (high end) Intel machine.

2. cpufrequency scaling - I did not know this was supported on our machines! Can you elaborate on what you did? What I'm currently at:

$this->bbcode_second_pass_code('', '
# cpupower frequency-info
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
')

3. I haven't noticed any color related problems. I'm running nouveau pretty much all the time, and either XFCE or KDE with pretty much the default settings. I do like gradients, which is why my private website (here with artefacts in a jpeg screenshot from 2001) is using them by default (since the 1990s, when quite some machines were still running on less than 24bit color).

So about your boot setup, which seems the most sensible to me (why add another layer of complexity with chain-loading Grub?):

Did you configure U-Boot in any way? Specific compile-settings? Runtime-configuration? A configuration file? How does it know where to look for kernel (and dtbs)?

Too bad U-Boot does not solve the memory issue... but what about the dark display issue? Did you encounter that problem at all? An unpatched 4.19 kernel would just show a dark screen on our hardware, when booted straight from the kernel partition (without U-Boot).
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby fedup » Wed Jan 09, 2019 8:27 pm

Hello vman
to get cpufreq working open arch/arm/boot/dts/tegra124-nyan.dtsi
As you can see I commented out status = "disabled" and changed to status = "okay".

/* CPU DFLL clock */

clock@70110000 {
status = "okay";
/*status = "disabled";*/
vdd-cpu-supply = <&vdd_cpu>;
nvidia,i2c-fs-rate = <400000>;
};
Rebuild the dtbs and if using u-boot copy the zImage and tegra124-nyan-big.dtb to the /boot patition. If your not using u-boot you'll need to rbuild the FIT with mkimage and sign the chromeos way

In order to load with u-boot I created a sdcard with gpt table with the partions
1 Label: "uboot" Type: ChromeOS kernel 30MB
2. Label: "boot" Type: Linux data 100MB - ext4
3. Label: "rootfs" Type: Linux data rest of the card - ext4
You need to set the boot partition to Legacy boot in fdisk.

#In the root of you kernel build
cp arch/arm/boot/dts/tegra124-nyan-big.dtb /boot
cp arch/arm/boot/zImage /boot
#configure boot options in /boot/extlinux/extlinux.conf
mkdir /boot/extlinux

cat <<EOF > /boot/extlinux/extlinux.conf
TIMEOUT 20
DEFAULT primary

MENU TITLE tegra124-nyan-big MMC boot options

LABEL primary
MENU LABEL v4.19.13 kernel
LINUX ../zImage
FDT ../tegra124-nyan-big.dtb
APPEND console=tty0 root=/dev/mmcblk2p3 noinitrd rw rootwait lsm.module_locking=0

EOF
fedup
 
Posts: 32
Joined: Mon Jan 07, 2019 2:02 pm

Re: Acer Chromebook CB5-311 mainline

Postby NoDiskNoFun » Fri Jan 11, 2019 11:09 am

@reey: To enable cpufreq seems to be a easy thing, could you add this to your kernel release, please? Also i wonder if it isnt possible to run our K1 at stock frequency? I mean, i dont know if it already run at 2,3Ghz with mainline kernel (is this also managed with dtb file?), but Acer shipped it at 2Ghz. Another thing is that my Shield Tablet also does 2,5Ghz with OC-Kernel, is this also possilbe with our CB5-311?
NoDiskNoFun
 
Posts: 31
Joined: Fri Sep 16, 2016 2:34 am

Re: Acer Chromebook CB5-311 mainline

Postby haagch » Fri Jan 11, 2019 11:16 am

Shouldn't it be just reverting this commit?
https://git.kernel.org/pub/scm/linux/ke ... 8e8db5d1fc
Since the chromebook hasn't even been able to suspended at all for several kernel releases I don't see why this should still matter.
For a while suspending worked pretty well, I think around linux 4.5, but then something broke it and nobody bothered to fix it...
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Fri Jan 11, 2019 10:24 pm

@NoDiskNoFun

I've built a working kernel 4.20.1 which has cpufreq enabled:
https://github.com/reey/PKGBUILDs/releases/tag/v4.20.1
The kernel was built with a minimal defconfig, which saves time compiling.
If something is not working for you, just tell me.

It seems like overclocking should also be working with a custom kernel:
https://github.com/torvalds/linux/blob/ ... fcpu.c#L32
https://github.com/torvalds/linux/blob/ ... a124.c#L61

Our Chromebook seems to have cpu_speedo_id set to 2 and since the max cpu frequency is:
[alarm@alarm linux-nyan]$ cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq
2116500

we might be able to just change this line:
https://github.com/torvalds/linux/blob/ ... fcpu.c#L35
to the values of this line:
https://github.com/torvalds/linux/blob/ ... fcpu.c#L36

Edit:
you can find the patch I applied to overclock the CPU here:
https://github.com/reey/PKGBUILDs/blob/ ... nyan.patch
and a release here:
https://github.com/reey/PKGBUILDs/relea ... v4.20.1-oc
sudo cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq reports that I'm running at 2.5 GHz :)
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby NoDiskNoFun » Sat Jan 12, 2019 1:17 pm

@reey Thanks, kernel is working fine, except of zswap and using lz4 for zswap but i'm fine with that.
Just for clearification: You need to patch kernel not dtb for OC?
Big thanks for your work :mrgreen: :mrgreen: :mrgreen:

Edit: If i want some more modules i need to edit your PKGBUILD and remove the line

make defconfig nyan-big_defconfig

without loosing the abilitiy to OC am i right?
NoDiskNoFun
 
Posts: 31
Joined: Fri Sep 16, 2016 2:34 am

PreviousNext

Return to nVidia

Who is online

Users browsing this forum: No registered users and 9 guests