Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

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

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby tincman » Tue Feb 09, 2016 5:18 pm

AFAIK, yes, full DRI3 with rendernodes should let us use the offloading without a separate xorg driver. I was mostly curious/grasping at straws. The "GPUDevice" log message was something I noticed when I was trying a fbdev/modesetting driver combo (in the hopes modesetting would load the mesa drivers but not grab a screen, then use PRIME to offload from fbdev to modesetting...)

Anyways, this was also when I noticed gk20a related commits in xf86-video-nouveau. I'm not sure if a modesetting/glamor setup versus a direct exa setup would be better, but I think with the kepler chip we'll have the option.

Hmm, I don't have any hetereogeneous setups to test PRIME on... I'm not sure if this is just the intel driver lacking the necessary features or what...

Yeah, for the chromebook we'd need "reverse prime" but this [ideally] should also work "out of box" with DRI3 IIRC.

I have not made any progress on EMEM related work... I actually found out the hard way that even using a plain un-encrypted external drive over USB will start throwing "EMEM decode error" after transferring ~700 MB and will eventually lock up my entire system.

I was scouring the device-tree and tegra-mc drivers trying to find differences between the downstream and upstream kernel, but I can't tell if the driver has been refactored heavily, or is missing portions of behavior. I definitely need to start asking around in #tegra, but just need to find the time to do so.
tincman
 
Posts: 25
Joined: Sat Feb 23, 2013 5:27 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby haagch » Mon Feb 15, 2016 4:29 pm

Interesting. I just built 4.5-rc4 with your nyan-emc-timings branch.
With stock nouveau and gnourou's xserver, 3d acceleration works again.

For a moment I thought plasma5 with opengl3 compositing was working fine, but opening and closing the menu a couple of times made the whole thing freeze again. Nothing in the kernel log, but the Xorg.0.log shows that the message
$this->bbcode_second_pass_code('', '[ 2046.044] (WW) modeset(0): Page flip failed: No such device or address
[ 2046.044] (EE) modeset(0): present flip failed')
has been spammed a few thousand times.
Perhaps the driver isn't broken as much as I thought and it's just X locking up.

Edit: Huh. I tried this config file;
$this->bbcode_second_pass_code('', 'Section "Device"
Identifier "Modesetting Graphics"
Driver "modesetting"
Option "PageFlip" "false"
Option "SWcursor" "false"
Option "ShadowFB" "false"
EndSection')
And X still locks up. It doesn't print the pageflip message though, so that is probably just a symptom, not the cause. Instead, I get this in the log:
$this->bbcode_second_pass_code('', 'Feb 15 22:41:02 alarm kernel: nouveau 57000000.gpu: fifo: PBDMA0: 00040000 [PBENTRY] ch 13 [040074e000 Xorg[654]] subc 0 mthd 0000 data 00000000
Feb 15 22:41:02 alarm kernel: nouveau 57000000.gpu: fifo: PBDMA0: 00040000 [PBENTRY] ch 13 [040074e000 Xorg[654]] subc 0 mthd 0000 data 00000000
Feb 15 22:41:02 alarm kernel: nouveau 57000000.gpu: fifo: PBDMA0: 00040000 [PBENTRY] ch 13 [040074e000 Xorg[654]] subc 0 mthd 0000 data 00000000
Feb 15 22:41:02 alarm kernel: nouveau 57000000.gpu: fifo: PBDMA0: 00040000 [PBENTRY] ch 13 [040074e000 Xorg[654]] subc 0 mthd 0000 data 00000000
Feb 15 22:41:45 alarm kernel: nouveau 57000000.gpu: fifo: PBDMA0: 00040000 [PBENTRY] ch 14 [0400803000 Xorg[654]] subc 0 mthd 0000 data 00000000')
And when I try to kill X, it breaks more and prints some kernel messages to the tty that did not end up in the log after reboot.

Some effort with google reveals a maybe similar bug on desktop GPUs: https://bugs.freedesktop.org/show_bug.cgi?id=92971

Edit2: The laptop is getting quite warm with 3d acceleration enabled. Googling doesn't reveal any way to monitor the clock speeds except the pstate file which doesn't exist...
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby janrinze » Thu Feb 18, 2016 7:41 pm

I have been trying to get 4.5-rc4 to boot but I am still stuck at a black screen.
It seems that not many people have the 4GB version of the chromebook and it may be related.
Anyone here experience the same?
janrinze
 
Posts: 4
Joined: Thu Feb 18, 2016 7:24 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby tincman » Thu Feb 18, 2016 9:44 pm

@haagch, 4.5-rc4 doesn't fix my EMEM error problems (the USB problem is actually so bad I can't even pull files off of my USB thumb drive...). Most of the changes for rc4 seem to be related to the mm subsystem, so not sure what changed there (I do know I no longer have a crashing module in the sound subsystem).

As a side note: trying to get my patches upstream, turns out sound drivers can name their channels/jacks whatever they want, and it's up to userspace to translate them. So my copy of rc4 only includes the inversion fix, it doesn't do the rename.

To get headphones to work, I had to add the following to '/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf'
$this->bbcode_second_pass_code('', '
[Jack Headphones]
required-any = any
')

I'm trying to figure out the Alsa UCM syntax so I can [hopefully] just add the rename there (which seems like a better place for it, pulseaudio doesn't seem to have a mechanism like Alsa for per device abstractions).

$this->bbcode_second_pass_quote('', '
')Edit2: The laptop is getting quite warm with 3d acceleration enabled. Googling doesn't reveal any way to monitor the clock speeds except the pstate file which doesn't exist...

It still exists, but they just changed it to be a debugfs interface under '/sys/kernel/debug/dri/128/pstate' (128 is the number associated with the rendernode for the gpu). Which I suppose makes sense, emphasis this is not intended for normal use... shrug

About your errors, yeah I guess it would be related to that? I am not sure, but the error doesn't seem tegra/gk20a specific...

No progress on much else on my part (aside from very slowly trying to get patches upstream...).

@janrize
I don't think that's the problem: the device-tree specifies 2GB by default; the bootloader tells the kernel about our extra 2GB upon booting.

My initial suggestions would be to double check you have the kernel and rootfs on the right partitions, and they are properly tagged/prioritized. Then maybe check your rootfs to see if a log exists (did your kernel make it far enough to mount the rootfs, and is possibly just not showing anything on screen).

I would expect we shouldn't see this problem at this point: the upstream Arch 4.5-rc kernel has the nyan-blaze included in it's .its, and this chromebook should still at least boot with that...
tincman
 
Posts: 25
Joined: Sat Feb 23, 2013 5:27 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby janrinze » Fri Feb 19, 2016 3:05 pm

---
My initial suggestions would be to double check you have the kernel and rootfs on the right partitions, and they are properly tagged/prioritized. Then maybe check your rootfs to see if a log exists (did your kernel make it far enough to mount the rootfs, and is possibly just not showing anything on screen).
---

The 4.5-rc2 does boot with the same configuration and disk. also the same commandline. Nothing is written on disk neither does the USB become active (that's part of the kernel and not as a module on the disk)

do you have a .config I can test out? I'm running out of options due to no feedback from the laptop. (looking for a serial console on the mainboard sofar did not yield any luck)
janrinze
 
Posts: 4
Joined: Thu Feb 18, 2016 7:24 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby tincman » Fri Feb 19, 2016 5:56 pm

Ah ha, that seems unusual then. This is the config I am using "https://github.com/sctincman/PKGBUILDs/blob/nyan-emc-timings/core/linux-armv7-rc/config" but I'm not sure if any of those changes will affect it booting or not.

Are you using the Arch Linux upstream package? My PKGBUILD also includes some other patches for this chromebook you might find useful as well. Specifically including compatability string patches to make sure it pulls the right device-tree.

There were some mmc subsystem changes between rc2 and rc4, I wonder if one of them may be responsible, particularly if your kernel is using the nyan-blaze DT (you could verify this by looking at the previous log entries, search for "Machine model")
tincman
 
Posts: 25
Joined: Sat Feb 23, 2013 5:27 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby janrinze » Sat Feb 20, 2016 9:37 am

got 4.5-4 booting. The tree I was using seems to have an issue and I'm sorting that out now. Vanilla 4.5-rc4 boots with the .config I used for 4.5-rc2.

Next up is finding out why USB fails when enabling LPAE. ( using only 2GB of the available 4GB memory seems a waste.) tegra-mc reports EMEM errors..
Hopefully I can get xHCI support working soon too. (using the tree of Thierry Reding.)
janrinze
 
Posts: 4
Joined: Thu Feb 18, 2016 7:24 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby kristoferus75 » Sun Mar 27, 2016 4:02 pm

Hi !

I have found a homepage who have installed Fedora 23 on the Acer Chromebook and compile a Mainline Kernel on it ! Im not sure but he wrote that glxgears showing a frame rate of 230+ that means that Acceleration works ?!

Xfce is working out of the box

Only the touchpad not work ...

Should we test this kernel with his .config file on arch linux ?

https://kushaldas.in/posts/fedora-23-on ... ebook.html

kind regards

kristoferus
kristoferus75
 
Posts: 9
Joined: Fri Jan 29, 2016 9:59 am

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby haagch » Sun Mar 27, 2016 8:03 pm

Yes, that is what I based this topic on. No, the config is not very good, the mainline config with sctincman's changes works much better, I put everything in the first post.

Now I built mainline 4.6-rc1 with the patches directly from the tarball https://cdn.kernel.org/pub/linux/kernel ... rc1.tar.xz

I see, some charger patches of yours are in mainline: https://github.com/torvalds/linux/commi ... -charger.c, congratulations. :)

Now it boots, but only after a delay and the keyboard doesn't work. (usb keyboard works). The charger module doesn't work, unfortunately. It also hangs when trying to unload the charger module, and because of that can't even reboot...

By the way, what is that? https://github.com/torvalds/linux/commi ... 8e8db5d1fc. "For now simply disable CPUFreq support for Tegra124 Chromebooks to avoid the hang when resuming from suspend." Is that still an issue?
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby tincman » Sun Mar 27, 2016 11:29 pm

$this->bbcode_second_pass_quote('', 'N')ow I built mainline 4.6-rc1 with the patches directly from the tarball https://cdn.kernel.org/pub/linux/kernel ... rc1.tar.xz

I see, some charger patches of yours are in mainline: https://github.com/torvalds/linux/commi ... -charger.c, congratulations. :)

Now it boots, but only after a delay and the keyboard doesn't work. (usb keyboard works). The charger module doesn't work, unfortunately. It also hangs when trying to unload the charger module, and because of that can't even reboot...

By the way, what is that? https://github.com/torvalds/linux/commi ... 8e8db5d1fc. "For now simply disable CPUFreq support for Tegra124 Chromebooks to avoid the hang when resuming from suspend." Is that still an issue?


Thanks! That was the first round of patches, but the DTS is still missing the new parameter I had added. I was mistaken about DT parameter patches (thinking you had to add the new parameter->get accepted->add to DTS w/ reference to prev commit, ....then learned that's only for compatibility string changes...).

Regarding the CPUFreq patch, yeah that turned up in 4.4/4.5 I think? I don't see anything in the 4.6-rc1 log that fixes this... Hopefully they are working on it? IIRC, the DFLL and PLLX clocks were for the main/low-power cores respectively (hence why this was difficult). Regardless, my knowledge doesn't extend much farther than that commit message.

It has been crazy at the day job, however after this week I should have more free time again and be able to test 4.6-rc1/finish the headphone patches (and hopefully get accepted).

I'm still using this as my "main" laptop, and I haven't given up yet on fixing these last few issues ;]

$this->bbcode_second_pass_quote('', '
')
Next up is finding out why USB fails when enabling LPAE. ( using only 2GB of the available 4GB memory seems a waste.) tegra-mc reports EMEM errors..


This is extremely interesting, and I forgot to see if anyone else had tested this out yet. @haagch, I wonder if this would "stabilize" gnurou's drivers? Those EMC errors are the root of a lot of these last problems.

There is significant differences between the upstream tegra-mc, and the downstream smmc/tegra-mc system in the acer kernel, and it's entirely possible there's some annoying edge case that makes LPAE fail in upstream version. However, I never turned up anything reasonable, and never got the time to learn the debugging facilities to try and trace it.

Update:

Tried 4.6-rc1, and indeed my keyboard is not working either :/ My journal doesn't show anything related to cros_ec failing/erroring out (however it does show mwifiex crashing...). I've poured through the commits and can't find anything that was touched directly related to it (except maybe the SPI subsystem, that one was hard to filter...). There was significant IRQ and MM work that may have indirectly affected it...
tincman
 
Posts: 25
Joined: Sat Feb 23, 2013 5:27 pm
Top

PreviousNext

Return to nVidia

Who is online

Users browsing this forum: No registered users and 2 guests