Nvidia/Nouveau support discussion.
well im on desktop and my pc cant display to my igpu so i can only use discrete so will it ever support nvidia
nvm chromium os is starting to support nvidia and i can get it to boot just crashes to pc reboot after 1 minute at the chromium os logo
@crocer211 Cloudready has nouveau. ChromiumOS is JUST now beggining the preliminary work. There are no chromebooks out with nvidia gpus, excluding ARM64 chromebooks with nvidia Tegra X series SOC's with embedded gpu that uses a mali driver.
I will continue to work on this as I find new info.
BTW chromiumos now has codecs, built in API Keys (to sign in), kernel 5.4, and some more additional packages, including the nice stock wallpaper that was the default for chromiumos from version ~50 to ~80ish
I'm reopening because this is entirely relavent, and something that's been on my radar and todo list for chromiumos for some time now.
ok well i cant actually use this till nvidia works and that may be in a few months or years from now and i wont use cloud ready mainly cause of personal reasons and they never plan on adding android support and i know it can be done as fydeos has done it
Super relevant. Got interested in chromiumos and luck so far isn't with me, as I've described here https://github.com/arnoldthebat/chromiumos/issues/360
@Alex313031 I'd be very thankful if you would give me some insights of what I'm missing on my own builds.
@VitalyVaryvdin When you are making your own builds, how are you doing it. Are you using a vanilla overlay, arnolds overlay, or my overlay? Arnold seems to have stopped with the special builds. My overlay was built on top of his, but I have added quite a bit of stuff since then and updated the linux-firmware package.
BTW, have you tried my build yet on any machine?
Didn't try your build yet actually. Its been stock amd64-generic. Been fiddling around with overlays today, put updated linux-firmware in there and used 5.10 kernel, got it to "semi-boot" at Intel machine at least. Just getting stuck at chromium logo forever so far. Previously it just kept rebooting right after selecting image. Pretty much got the same behavior as arnold's daily builds gave me. Not sure how to debug this tbh.
dmesg reports a few errors
kvm: already loaded the other module
Driver 'memconsole' was unable to register with bus_type 'coreboot'
Driver 'vpd' was unable to register with bus_type 'coreboot'
cors_ec_ipcs: unsupported system
Warning: unable to open an initial console. Fallback to ttynull
udevd: several errors about EVIOCSKEYCODE
tpm: A TPM error (256)
frecon: Chrome did not release master. Frecon will steal master.
Upd: I can confirm "semi-boot" on Ryzen machine Sounds like I have to enable ipcs in kernel for successful boot
@VitalyVaryvdin Firstly, you must enable frecon for anything above 4.19. Secondly, 5.10 is really not ready yet, I would recommend 5.4 , thirdly to use 5.x, cryptohome will fail and you wont be able to actually use it after boot without USE uprev-4-to-5 cryptohome_userdataauth_interface has-kernelnext.
I would strongly recommend using the make.defaults and package.use from this repo, rather than having to show you all the lines that are added. Take a look in there and modify as needed, but it is modified to make a generic amd64 image with kernel 5.4 that is suited for the most devices. You can do a diff between mine and the default ones to see what I've changed. Ive also added comments above alot of the changed lines.
It took ALOT of trial and error, alot of frustration, reading source code, reading arnold the bats overlays and fydeos's overlays, and cloudreadys publicly available subset of their overlays, to get to the state that this repo is now. I am the only person offering vanilla chromiumos builds with codecs and firmware and kernel 5.4, so I'm not recommending you use my make.defaults and package.use just to toot my own horn, but rather because you wont get a working image with kernel 5.x without the stuff in my overlay, and if you dont use it, you'll be going through all the work I went through just to arrive at the same things.
what stuff was added from fydeos into this build anyway unless i didnt read the whole thing i dont see what you added from fydeos which is highly unstable on nvidia anyway
You're right. Sounds much more reasonable to base my work off yours :) Tried your image just now, got artifacts all round my screen and couldn't switch to VT2 to confirm if it boots or not.
I'll try your build on Intel next week, would not have access to it over weekend.
I remember some issue regarding nvidia in the arnold's repo and i believe some one stated nvidia worked in his build.
@crocer211 Fydeos hasn't worked on nvidia anytime ive tried it with various nvidia cards. I added google drive ebuild, and some USE flags in the make.defaults and package.use to enable codecs and vaapi from them. @VitalyVaryvdin The 5.4 builds seem to be kinda flaky on amd. And regarding arnolds, that's impossible, arnolds has no code for nvidia, and has never worked with nvidia in my testing. The general todo is to build the kernel yourself with a kconfig that allows out of tree module loading, then add all the ebuilds for things nouveau needs like RDEP and BDEP, including overwriting some that are already in the chromium source with newer versions, and then adding the nouveau ebuild, and make sure all of this is in the chromeos-bsp file. Its probably more complex than that, and I've tried every ChromiumOS distribution out there, and the only one that works with an nvidia gpu is cloudready, and that is part of their closed source code.
@Alex313031 i actually did get Fydeos to work but the chromium browser kept crashing so it kept crashing the system but i was able to install it on a nvidia card i have no access to a intel gpu and your build boots to the chromium splash and reboots after 30 seconds and with a normal build i never could get it to boot to the splash screen it would either say booting the kernel or be a blank screen it even did this with Fydeos till now the build they have now worked for me but with the problem i stated above and the driver that was loaded was nouveau last i looked when i booted Fydeos btw my gpu is a gtx 1060 the 3gb one not the 6gb one so i do think ChromiumOS is slowly adding nvidia support at least i would think so based on what i've read on there going to be nvidia powered Chromebooks
https://github.com/arnoldthebat/chromiumos/issues/6 thats the issue i've been talking about
Upd: after a little bit of investigation, kernel 5.4 already enables nouveau and all it needs according to its config, mesa nouveau interfaces are also installed as part of mesa src_install. The only thing it seems to be missing is GBM, by default cros uses minigbm which makes sure mesa[gbm] is disabled, and at the same time doesn't specify nouveau as graphics card. Probably should test disabling minigbm and using mesa gbm instead, not sure how it's handled internally though. At some time point this existed https://chromium.googlesource.com/chromiumos/platform/minigbm/+/c65bd8c07617e1fbe219801ea8047d3b409cdc82/nouveau.c
Upd2: there are several configuration points in chromium, default values below
use_ozone = true
ozone_platform_gbm = true
use_system_minigbm = true
use_system_libdrm = true
ozone_platform = "gbm"
"Running ChromeOS UI on Linux" suggests using following values:
ozone_platform_drm = true
ozone_platform = "drm"
use_system_minigbm = false
Upd3: so far got bootable on Intel build with very few changes to stock overlay, just pushed new linux-firmware and used kernel-5_4 profile. Kernel has builtin modules for nouveau, drm and the rest. Still doesn't boot on nvidia after recompiling chromium with drm platform as mentioned before. Not sure what's needed for nouveau exactly. Since bringing in whole xf86-video-nouveau seems to be pretty unreasonable for chromium os
never seen these options but then again i havent thoroughly looked throu the source code
I've been able to boot on Iris graphics as well, just by modifying ebuild for mesa-llvmpipe a little bit for inclusion of Iris gallium driver. Still no progress with nvidia so far, since I couldn't even switch VTs. Stateful parition is encrypted and I can not see logs it produces. Haven't found a way to disable encryption yet, but there's an option to modiy one of init scripts to not encrypt this partition.
Upd:
Kinda weird boot on Iris, it booted only once and seems to fail at /sbin/init. I can sudo start ui and get into UI, however other parts of the system aren't initialized
@Alex313031 your build doesn't boot on i5-8400 pretty much the same way as I described above
This is extremely weird since Arnold's build boots on that machine even without iris_dri.so
Upd2: required additional changes to mesa-llvmpipe.ebuild, boots ok now Tried neverware on Ryzen + Nvidia - same behavior as on my builds Also finally found what use had to be applied to leave stateful unencrypted. Logs are empty after booting into Ryzen
Upd3: managed to get it into bootable state with 5.10 kernel, works ok on previously mentioned devices. On Ryzen + nvidia machine I can finally switch to VT2 and see all of the errors. Getting nvc0_screen_create base screen init failed -19.
your build i can get into the VT2 but i dont have enough time to see any of the errors as it reboots like 5 seconds after switching on just a Kaby Lake processor which i have a i7-7700 and a nvidia gpu card as thats all i can boot with cant boot with a igpu
@VitalyVaryvdin What changes did you make to mesa-llvmpipe? Also, to use kernel 5.x, are you putting uprev-4-to-5 cryptohome_userdataauth_interface has-kernelnext in your make.defaults? Also, another thing you (we) will definitely need with any work to enable nvidia is make sure you have nouveau in your make.defaults towards the bottom in the video cards section. For example mine has i915 nouveau and vmware added like so
# Enable a few more video cards as this is a generic board. i915 is kept for posterity after M90. VIDEO_CARDS="intel i915 i965 llvmpipe nouveau radeon vmware"
My first working boot was without any of these use tags you mention. However, I've tried it with and without and didn't find any difference in the behavior. Currently left them in-place but pretty sure they could be deleted.
Nouveau kernel module is included and being loaded as well, however fails to init screen (but fbcon works?). I've been trying to find any info on mesa error codes and haven't found any so far. It might be missing something else, like proper env vars setup, but I don't see any related logs except for nvc0_screen_create base screen init failed -19
Here's modified mesa-llvmpipe ebuild https://gist.github.com/VitalyVaryvdin/b79c79d01acbf6d4d3dc3939a2cf369e Basically modified several places by following newer mesa.ebuild from Gentoo repo
My number 1 guess is that it gets us nowhere because minigbm lacks NV backend However this should be a matter of switching chrome backend from minigbm to gbm as I've mentioned earlier, according to their docs.
@VitalyVaryvdin WDYM currently left them in place? Did you base your overlay on mine like we talked about earlier and you're saying you tried without those use flags and it still worked? If so, HOW?? The image will build without those and boot, but you cannot use the OS, even in guest mode, as cryptohome wont launch which is used to encrypt the STATEFUL partition and the $HOME dir including the temporary one made in guest mode. Those flags are needed on non-unibuild boards (like amd64-generic) to build an image with kernel 5.x.x that works fully.
Also, Cloudready is becoming Chrome OS Flex, and so some of the source code is already in the ChromiumOS repo. Chrome OS Flex beta can be tested right now as per > https://support.google.com/chromeosflex/answer/11541904?hl=en&ref_topic=11551271
The board name/codename for this is Reven, and you can see that mesa-reven was added to //chromiumos/src/third_party/ with stuff like nouveau and gbm and drm-shim and broadcom firmware that cloudready has. I think taking a look at this will be useful in getting nvidia to work. https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/mesa-reven/src/nouveau/?q=reven&ss=chromiumos https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/mesa-reven/README.rst
No, my build is based off generic amd64. Felt like starting from scratch learning the whole process after your builds didn't boot up on my system either, which gave me more reasons to investigate this a little bit. This ended up being pretty close to your overlay
Well, can't tell you how, but it worked, I'll re-check that when once I get back to it And I've been building R100, maybe this is just result of Neverware work merging into codebase, dunno
Seen reven, its ebuild is quite different from llvmpipe one, didn't have time to trace it's usage back then tho. However, mesa-llvmpipe builds third-party\mesa, which also has all that nouveau stuff and gets worked on.
CloudReady images didn't boot on my system. I hope they'll release overlay used in Flex
Upd: tried flex. That did boot, but got stuck on logo and after a minute it rebooted. Seems like I'm out of luck. Something crucial is missing in nouveau configuration, which is weird. Ubuntu boots just ok with nouveau on my system
i tried flex as well but had the same issue as vital
@VitalyVaryvdin @crocer211 what are you guys talking about "vital" Also, @VitalyVaryvdin can you tell me what you actually changed, because just providing the ebuild isnt good because of updates, i.e. the ebuild might change, so i would like to know what lines you changed so I can modify future ebuilds.
@Alex313031 as in VitalyVaryvdin
@VitalyVaryvdin I saw your post on chromiumos-dev. For some reason, both chromium-dev and chromiumos-dev have made it where anytime I try to post or respond, it says "posted, but pending approval." It says in the about that new users will have their stuff pending approval. But i've been a member of both groups for years, and have successfully made posts and replies in the past. My stuff never gets approved, even after months of waiting, and it makes it where I cant even ask why this would happen. Have you had any issues with this? And would you be able to ask for me, and maybe include my email addresses so someone like mike frysinger or another moderator or long time user can help me out or remove whatever block might be in place.
@VitalyVaryvdin Also, I did a diff with ur mesa-llvmpipe file, and created my own (all I did was add i915): great work! Also, I would highly recommend using (or using lines from that suit your needs) the package.use and make.defaults in the profiles dir in this repo. Another thing I would highly recommend is using build_packages --board=${BOARD} --nowithdebug --nowithautotest when running build_packages to reduce build time and remove debug constructs. The only I would think you might want to change is in the make.defaults in the kernel section to select your kernel. Take a look at both of those files if you want and give feedback, I think they're fairly good so far and I've enabled compiler optimizations in make.defaults like AVX and -O3, same as I use for my Thorium project.
Ive also added comments on almost every line in those files to describe what they do.
Honestly, I don't understand these groups. They tend to respond to ill formed question where author barely understands a thing, and yet don't respond to well formed and reasonable questions. But sure, I'll mention your issue.
I have to look and compare your overlay and mine, we probably should just merge our overlays, if there's any improvement in mine, as they end up being pretty close. I'm just using stripped and modified copy of generic-amd64, with my kernel profiles
I'm currently looking at this. Pretty messy, but people reported nouveau working there back then.
From what I'm seeing so far, he disabled freon and enabled X, fbcon, vtcon. Made sure login manager is started as x root, enabled software compositing in chromeos-chrome. But he's bringing in a lot of X stuff and, after all, uses X which cros ditched long ago.
@VitalyVaryvdin Yeah I would like to compare ours. Can you share your whole overlay dir? And that's cool. And so does your modified mesa-llvmpipe work with iris graphics?
@Alex313031 so i tested your latest build it gets stuck on the chromium bootsplash now and no longer reboots in the VT2 i run dmesg and there is a bunch of frecon errors about master not being released but nouveau is being used it does load it
@crocer211 That build is not intended to work with nouveau yet. It just has fixes and adds stuff to mesa-llvmpipe
Also, @VitalyVaryvdin my two emails that I use both in chromium-dev and chromium-os-dev groups are [email protected] and [email protected]
@Alex313031 it seems tho it will work on its own in a future version tho as if it doesnt just reboot itself anymore it just doesnt get into chromium os yet just the splash screen and the VT2 work
@VitalyVaryvdin @crocer211 I'm going to try to make a build with mesa-llvm excluded entirely, and with mesa-reven set to satisfy the mesa dependency. It might just be that easy, to get a build that will work with all the GPU's that cloudready supports.
Sorry for late response. Yeah, my modified mesa-llvmpipe successfully booted and worked on: i7-4400mq, i5-8400, i3-9400 and some old Celeron. Intel iGPUs from Braswell through Iris are supported, in other words
Unfortunately, mesa-reven won't work on my end :(
Didn't get my hands on releasing my overlay yet, hope to do that the following week
@VitalyVaryvdin @crocer211 I got mesa-reven working with full nvidia support!! ChromiumOS image uploading soon. Also updated my overlay. Also got google drive working. Take a look at the make.defaults, package.use, chromeos-bsp-2.ebuild, and the google-drive-fs directory that I just updated.
I had to look at the build logs of MANY failed build attempts until I was basically able to see what needed to be done. This info seems to be internel only, but I was able to piece it together based on the limited stuff that's open sourced in the mesa-reven dir in the chromiumos tree.
ok i will test it out when you upload it and i'll look through those files to later
@Alex313031 so i tested it i dont know if it was supposed to work on nvidia yet or not but it doesnt work yet but as i said i dont know if it was supposed to work or not
@crocer211 It is supposed to work with nvidia, butttttt. It builds mesa-reven and tells everything that normally depends on mesa-llvmpipe to defer to mesa-reven (which is also built with the llvmpipe USE flag). I think i need to also tell it to use gbm not minigbm, as i noticed that while it did work on a GT8600 and a GTX 750 Ti, it did not work on a GTX 970. What card did you test it on? Were you at least able to get to a VT2?
@Alex313031 i have a gtx 1060 3gb and i can get to VT2 yes
i also have a i7-7700 not the k version so its not a new system kinda old
@crocer211 @VitalyVaryvdin Check out my latest release. I got Widevine working!!! Also, built kernel from scratch and added two more packages. (Look at the release notes it has everything thats changed) https://github.com/Alex313031/ChromiumOS/releases/tag/V102.0.4964.1
@Alex313031 i tried your newest release im still having the same issues but i usually boot the usb in legacy and i noticed it said wrong efi loader when i did that but got to the chromium boot splash i checked dmesg and i got some errors that i dont remember but these errors werent there when i booted into uefi on the usb
@VitalyVaryvdin @crocer211 I have undergone the large amount of work to again try to get nvidia working. So far I have set mesa-reven to be used in all packages that call mesa or mesa-llvmpipe, and set mesa-reven to use libglvnd and gbm. Then, I have build the kernel 5.10 locally with the reven splitconfig that overlays on top of the normal cros kernel config. Then, I modified waffle to use gbm. Then, I used equery to list all packages that depend on minigbm, and changed it to mesa-reven instead, and set !media-libs/minibgm in chromeos-bsp so that minigbm is not built as part of libchromeos.
And finally, modified the ozone flags in chromeos-chrome as per @VitalyVaryvdin suggestion.
All of this to use reven's kernel and reven's mesa, while setting it to build the full gbm and point all packages that rely on minigbm to instead use this full gbm. Packages are building sucessfully so far, and hopefully I will end up with an image that will work with alot more devices (I also udated linux-firmware and enabled broadcom
well i dont have broadcom i have a pretty recent gigabyte network card that runs the ax210 chipset but i also use powerline ethernet adapter so im fine with network
@Alex313031 but maybe it will work on newer nvidia cards
@VitalyVaryvdin @crocer211 I was able to build chromeos-chrome with the flags, and use the reven kernel, and use waffle with gbm, however it would not build without minigbm so minigbm is still in there. The image works like last time, but again I don't have any other nvidia cards to test it on.
@Alex313031 i only have the gtx 1060 and cannot access my igpu cause i dont have a vga cable so maybe i can test it and im also thinking about getting a amd gpu to be honest
do we know if this will work on newer nvidia cards or will we have to test it
@Alex313031 gets stuck on splash screen so i went to VT2 and used dmesg there is a nouveau error, nouveau drm failed to create kernel channel -22
I think the whole overlay needs to be migrated to build chrome with drm, remove gbm including minigbm from everything, and build mesa-reven with classic, gallium, dri, drm, and libglvnd BTW how you like the change to thoriumos? After much testing and personal alpha builds, I finally released a beta. Its chromiumos but with the changes of my thorium project integrated into the browser, as well as branding like the boot splash screen changed. I also added a bunch more packages and made a packages.md file listing all of them, with a new ascii art and larry the cow in the doc for fun.
@Alex313031 well as i can only view the boot splash cause i use nvidia it looks nice matches your pfp but like thats all i can see at the moment due to nvidia
@Alex313031 dont know if your working on this but have you figured out why it doesnt work on nvidia even after all youve done
@crocer211 I havent worked on ThoriumOS in a lil while but its just because Im working on thorium and other stuff. I haven't stopped development and will continue working on it soon. And no im still investigating, but I'm at least closer than I was to getting nvidia to work on cros.
@Alex313031 im assuming that thorium is what your mainly still working on