2021-10-17
00:22hspak has quit [Quit: The Lounge - https://thelounge.chat]
00:23hspak has joined #asahi
01:33alyssa has quit [Quit: leaving]
01:52___nick___ has quit []
01:55___nick___ has joined #asahi
01:55chadmednsklaus: firmware/pre-linux stuff does an asston of hardware initialisation on x86 too, its just that its all proprietary and you dont get to see it happening
02:20phiologe has joined #asahi
02:23PhilippvK has quit [Ping timeout: 480 seconds]
03:05___nick___ has quit [Ping timeout: 480 seconds]
03:18marvin24_ has joined #asahi
03:19marvin24 has quit [Ping timeout: 480 seconds]
03:31kov has quit [Quit: Coyote finally caught me]
03:31kov has joined #asahi
04:41nehsou^ has joined #asahi
07:26xorly[m] has joined #asahi
07:31xorly[m] has quit []
07:31xorly[m] has joined #asahi
07:40chadmed has quit [Quit: Konversation terminated!]
07:41Glanzmann has quit [Quit: leaving]
07:44chadmed has joined #asahi
08:03nehsou^ has quit [Ping timeout: 480 seconds]
08:04nehsou^ has joined #asahi
08:16xorly[m] has quit [Quit: Reconnecting]
08:16xorly[m] has joined #asahi
08:17tertu2 has joined #asahi
08:22tertu has quit [Ping timeout: 480 seconds]
08:54nsklausmarcan: (and chadmed too): my comments were not criticism about m1n1 specificaly, and may have been motivated by a lack of comprehension of how things actualy work, on x86 too. on x86 the bios probably did the same kind of hardware initialisation jobs and i didn't get to see it either, even in the lilo days. but at that time it didn't seems strange to me.
08:55chadmedyeah thats totally understandable. i dont think anyone was trying to have a go at you :)
08:55nsklausi was just trying to justify myself, and why i said what i said. there may have been a part of ignorance from me,
08:56chadmedits hard to accustom yourself to the quirks and procedures of other platforms if all youve known for the past 20 years is x86, as is probably the case for most people
08:57nsklausmy question and comments might look sometimes like criticism, but they're not really that. it's just the way i ask questions to get a better understanding
09:04nsklausabout getting used to a different platform, its differences and quirks, as you were saying, on mac i find it too bad there's no interface to customize settings (like bios on pc)
09:05nsklausbut well.. if linux can just boot, and i can finally get a sane env and ditch maacos i'll just be happy
09:05chadmedyeah, most non-x86 platforms lack that. if we ever see x86 supplanted in a large way in the enthusiast space i suspect we will see firmware implementations that take care of that. if AMD/Intel ever decide to abandon it they will probably make sure that nothing about the PC platform changes except the ISA in the chips, as its vital to their revenue
09:08nsklausj_ey: in a bios with simple interface, one could set boot order, or boot security levels for example or toggle some hardware features on/off
09:08chadmedadditionally, theres nothing stopping current ARM/RISC-V vendors from offering a platform like that. in fact, in the server space ARM machines commonly have ACPI or UEFI. theres just not been a need for any of that in the traditional non-x86 markets (i.e. mobile devices, SBCs, embedded, etc)
09:09nsklauson mac we need to boot the whole bloated macos to be able to have some form of control over those example i gave
09:09aleasto has joined #asahi
09:10chadmedyeah, and its likely that this will continue since thats how apple likes their platform. try not to think of the new macs as PC-equivalent, but rather idevices with a higher tdp, because thats essentially what the platform is
09:11chadmedthermal design power, basically how much thermal energy the chip is designed to disspiate (measured in W) under "normal" operating conditions
09:12chadmedit has traditionally been a pretty decent proxy for chip power consumption, but is becoming increasingly meaningless because of boosting algorithms and how TDP is calculated by chip designers
09:13nsklausyes, i actually like m1 arch so far, lots of crunch power, without hardware heat, and very low power consumption.
09:13nsklausi have a 2015 intel macbookpro with arch linux on it, just having the darn thing on makes it warm
09:14chadmedyeah its insane, the entire M1 mac mini pulls something like 30W at the wall under full load which is ridiculous considering it is performance competitive with PCs double its price
09:19chadmedgonna go to the gym and grab an energy drink in a little while so i can stay up for the event. 3am? childs play.
09:19marcanonly sad thing about the touchbar is M1 MBP owners are likely going to be stuck with a dead ecosystem
09:19marcanI somehow doubt anyone's going to add any kind of integration with desktop environments to support one machine model...
09:20nsklausi'm thinking of exchanging my m1 for a m1x just for the touchbar being gone, but i wouldn't mind the 2x perfs bump too :)
09:33nsklausthe only problem i have with m1 so far, is about the gpu side, on macos i mean, it seems it's tailored for metal api, and it seems it's lacking some functionality compared to opengl and vulkan. the result is that games running through wine don't display well or refuse to run completely for missign feature.
09:34chadmednsklaus: yeah the gpu lacks some hardware implementations of opengl/vulkan functions that some games will assume. hopefully we get some software emulation of this missing functionality at some point but that wont be coming from official sources
09:34nsklausi mean, if full vulkan and opengl will be able to run at all, or not. i'm fearing limitations in the gpu itself
09:35chadmedif you think that's bad, just remember that x86 chips didnt have integrated FPUs until the the 486
09:37nsklauson moltenvk git, cdavis (i think he's one of the lead dev of that project) hinted he would resort to tricks and emulations of said missing feature too, but so far that hasn't happened yet, i compile moltenvk and run it bleeding edge each time i see a commit on their github, but so far result in-game is always the same
09:37chadmedoh theyll definitely be able to run, theyll just require some software emulation of functionality that vulkan/opengl have that metal does not. fortunately though, at the end of the day stuff like that is just abstractions of math concepts, and because all GPUs do virtually the same maths even though the hardware has no explicit support for vulkan/opengl its hardware should be able to handle most of both APIs fairly well
09:39marcanand lots of things are done in shaders, so it seems unlikely we'd run into any horrible showstoppers
09:40nsklausfrom my (limited) understanding, one of the most problematic missing feature so far is the lack of " transform feedback"
09:41mazj_ey: quite often, it is more painful to review the code and explain what it should be like rather than just hack the damn thing and provide the patch, retrospectively writing the review.
09:41nsklausfallout4 running on wine on macos looks very bland and many objects and lights are not showing correctly
09:42nsklauscuriously enough, running the same fallout4 under paralells (macos virtualization app) produce exactly the same errors, so i guess paralells uses moltenvk too for the graphic stack
09:42j_eymaz: :) it compiles at least! will test this afternoon. gotta go for a bike ride while its still dry out!
09:42chadmednsklaus: fallout 4 (or any creation engine game) probably isnt the best tool to use to test an API's stability just saying ;)
09:43chadmedyoud be lucky to get fo4 to look anything but bland/incorrect even on a windows machine with directx
09:43nsklauschadmed: i tested many games, like witcher3 too and many other, and i see similar errors
09:44nsklauson x86 linux, with fully supported vulkan and dxvk all those games, including fallout4 and witcher3 they run fine
09:44chadmedi mean yeah its probably moltenvk i just wanted to make a joke about how awfully optimised bethesda games are
09:46chadmedbut these are definitely questions best directed to alyssa, whether or not moltenvk's level of support can be used as a yardstick to predict how complete our opengl/vulkan implementation will be is something i cant answer for you
09:47chadmedconsider also that there may be bugs with rosetta 2 that prevent the game engine from doing what it needs to do on the cpu
09:47nsklausthere might be that too, but on those issue i suspect moltenvk missing some extension primarily
09:47chadmedagain, not really something im gonna pretend to know how to answer. i am a dumb hardware jock and embarrassingly incompetent at anything software
09:49VinDuvhonestly I’m impressed that the combination wine + moltenvk + rosetta2 even works at all :)
09:50chadmedeven more impressive is that some games are playable. gtav 60+ fps on a macbook air, csgo 100+fps on the same
09:50nsklausVinDuv: performance-wise, it works surprisingly well, considering all the multiple levels of encapsulations and layer the software run through
09:52chadmedcounter strike is especially impressive because it contains an in-engine implementation of toGL, so its dx9-->toGL-->moltenvk-->metal all on rosetta 2
09:53nsklausmy hope though is that we will be having direct vulkan and opengl support without the need for that moltenvk layer
09:56nsklausthose missing gpu features point, it will mean either linux port of moltenvk, or reimplementation of what it does.. either way that will be a tricky part
09:58marcanif it's missing GL features they can be emulated, but that has nothing to do with VK on Metal
09:59nsklausi mean, there's no metal on linux obviously, but i'm talking about glue code for working around missing gpu features and ending with a working vulkan
09:59marcanyes, but that code is going to look completely different on top of metal and on top of bare hardware
10:01nsklausi mean, once the gpu driver reach the point where it need to consider how it will tackle this problem, watch the road it will choose
10:14svenhttps://github.com/AsahiLinux/linux/tree/mailbox/v3 mailbox v3. note that you'll need something like https://f.svpe.de/58a8aa3a0027ea0b2f40ceb0876d0441e294b6a5f883ba0386dcb2e9d3048d1f_rtkit.patch if you want to test with rtkit
10:49pugguu has joined #asahi
10:52pugguu has quit [Remote host closed the connection]
11:38nsklaus_ has joined #asahi
11:40nsklaus has quit [Ping timeout: 480 seconds]
11:56chadmeduh ok so i just realised that the event isnt until the 19th in UTC+10... aaaand its 10pm and i just had an energy drink thinking that the event was this evening...
11:58sveni think the other series i was waiting for that fixed some swiotlb/iommu interaction has been merged at this point
11:59chadmednsklaus: the gpu doesnt "speak" metal, it "speaks" AGX. when we say that it implements "metal" features all that means is that the hardware has optimised blocks to do the maths associated with those functions.
12:01chadmedconsider an "rt core" on an Ampere or Turing gpu. the core doesnt "trace rays" or anything, its just highly optimised for calculating the intersections of matrices, in the case of ray tracing (specifically BVH/culling) that would be the vector representing the ray emitted by the light source, and the matrix representing the coordinates of the bounding volume of whatever the ray is intersecting
12:03j_eymaz: when I went to the office, I couldnt find my desktop machine, I could ping and ssh it, but I wasnt sure where it was :P
12:04chadmedyou could, feasibly, use "rt core" hardware to speed up any similar matrix operations, just as the "metal" hardware in the apple gpu can be used just fine for opengl/vulkan features that do the same maths. for others, you can just build a software model of the maths that the particular opengl/vulkan feature does and run it. we will not need to translate metal to vulkan on linux at all.
12:04mazj_ey: ah! that's because you didn't have a TX2 as a desktop. reboot the box, and you immediately know where it is, thanks to the fan basting out a tornado until EFI takes over.
12:05mazof course, with a mini as a desktop, you immediately lose it under the crap that lands on the desk...
12:15mazI went into the office quite regularly lately. it really felt good being able to design stuff around a white board with actual human beings.
12:17svenin my case it doesn't help that my office right now is ~1.5 hours away because i've been too lazy to actually move closer
12:17mazfor me, the past 18 months have shown that I *can* work fully remotely. but it has also demonstrated that I don't *want* it.
12:17mazyeah, same thing for me. I now have to commute to London, which is a total pain. and I have no intention to relocate there!
12:21svenlet's see if my employers agrees with that once they go back to "normal". otherwise i'll just switch again.
12:21marcanmaz: I was with human beings and a white board earlier, we were discussing chord progressions during the jazz jam ;)
12:22eta<maz> yeah, same thing for me. I now have to commute to London, which is a total pain. and I have no intention to relocate there! ← enjoy spending shitloads on train fares
12:27mazeta: compared to other European countries, the UK trains are pretty crap. even France does better, even with the strikes! ;-)
12:39j_eysven: like your interrupt-cells example comment.. I'll just do it and mention it in the 'changes' line for v4..
13:01j_eysven: did you send a cover letter for the quirk? (might just be slow to reach lore.kernel..)
13:09yuyichao has quit [Ping timeout: 480 seconds]
14:33alyssa has joined #asahi
15:31sven(for trusted devices only for now since untrusted ones require some slightly annoying changes to swiotlb due to min_align_mask)
15:36j_eysven: i assume your dev machine is fast enough.. but geert made this patch to speed up running the bindings check https://paste.gg/p/anonymous/a4b28a344c054e4c908c31f50cc6a5e8
15:36j_eyif you run the dt_binding_check with DT_SCHEMA_FILES=Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
15:37j_eyoh ok, when I was tryin to figure out how I messed up the pinctrl bindings, that patch took runtime to 2s from 2mins lol
15:41j_eyI incorporated maz's patch and put v4 here https://gitlab.arm.com/linux-arm/jg-open/-/commits/pinctrl_apple_v4/ not sent it to the list just yet
16:13svenyou'll just need a new function to allocate a unmanaged domain that allows larger IOMMU pages
16:38doggkruse has joined #asahi
16:39doggkruse has quit []
16:55j_eymarcan: doing more testing.. not sure if this is a typo? https://paste.gg/p/anonymous/7dd3e8ba1845403094151dd90b3d8437
17:08marcanyou could probably pinpoint the exact moment in the "let me just make the HV do SMP" stream where I copypasta'd that and neglected to edit it :)
18:23Glanzmann has joined #asahi
18:23Glanzmannalyssa: I just wanted to try the hdmi hotplug branch, but I'm unable to find it. https://pbot.rmdir.de/GuNOZ7a7OG_wN_fZCm76ow What am I doing wrong?
18:26Glanzmannj_ey: Thanks, will keep that in mind, I thought when I do a git pull it will mention new branches, but maybe I have already pulled before ...
18:34Glanzmannalyssa: Witht he 20211015 branch, X does not longer start for me: https://ab34.de/u/Xorg.0.log
18:35GlanzmannBut this is with a different monitor, with a Eizo FlexScan S2431W-GY hellgrau, 24", 1920x1200, analog/digital, Audio
18:37Glanzmannyes, to fit the corporate identity (I just cut an pasted it from my how file): https://pbot.rmdir.de/VxgILdXoqnBsHPOUjmtffg
18:38rohin has joined #asahi
18:38Glanzmannalyssa: I unplugged the eizo S2431W-GY and plugged, EV2780 and have no picture, rebooting now.
18:41Glanzmannalyssa: Same result with the other monitor. https://ab34.de/u/Xorg.0.log dmesg: https://pbot.rmdir.de/A2Pnbyax_Q4GqJzt7fb_3w
18:50alyssa(Right at the start, at each iteration of the loop, before each PROBE_DEFER return, and before the ENODEV return)
19:00alyssaGlanzmann: re the oops, I would appreciate if you could narrow down what in dcp_flush is doing the deref
19:00GlanzmannHow do I do that, do I have to recompile the kernel with debugging symbles or will gdb help me with that.
19:07Glanzmannj_ey: You certainly teach an old dog some new tricks. :-) (infra) [/scratch/linux-allysa] ./scripts/faddr2line vmlinux dcp_flush+0x2a0/0x400 | pbot -
19:08Glanzmannj_ey: Only thing is that I already started with the printk orgy and than I came back to irc to try the trick. :-)
19:11Glanzmannalyssa: You will not like that but with the patch, when I boot, my monitor gets blank: dmesg: https://pbot.rmdir.de/Xh_UIvU6YSlqwRnBN2WsaA
19:14alyssaThere are two DCPs. Each DCP has its own drm_crtc object, but we want a single drm_device object for both that contains both drm_crtc's.
19:14alyssaThat is, we want to present userspace the impression of dual monitors on one graphics card, in oldspeak.
19:16alyssabut then how do you ensure the display subsystem doesn't probe until both coprocessors boot?
19:16alyssaand in the apple-display driver probe(), check if all the coprocessors from the DT are booted and if not return -EPROBE_DEFER
19:17alyssaThis is racy-- the core logic will stop trying to probe after a while if you DEFER too many times. Depending how fast the DCPs come up, this can be racy
19:17sveniirc EPROBE_DEFER effectively moves the device to a "wait list". and whenever another device has successfully probed everything from that "wait list" is tried again
19:18alyssasven: so it's sae to DEFER on "another device has probe()d" ubut not safe to DEFER on "another device has booted after probing"
19:21Glanzmannalyssa: Did you improve the DCP code? I think the tiering in firefox is gone or might it be because I currently don't have my display rotated?
19:23rohin has quit [Ping timeout: 480 seconds]
19:24jmr2 has joined #asahi
19:25GlanzmannOkay, when I scroll with the mouse I have tearing. But with the page up/down, I don't.
19:33aleasto has quit [Quit: Konversation terminated!]
19:40jmr2I spent some time looking at that "failed to parse display attribs" error on the Air. With http://paste.debian.net/plainh/70634ed9 I get http://paste.debian.net/plainh/79bd9b08
19:43Glanzmannalyssa: I hit bed now, if you have anything for me to try, let me know and I'll do so.
20:42rohin has joined #asahi
20:59rross101 has joined #asahi
21:00rross101FWIW I've documented what it took for me to get from scratch to a login prompt. This is all really basic but might be useful for other newcomers like me. Thanks Glanzmann and j_ey for their help. https://gist.github.com/rross101/84def12f02e1476a4e6d2fd28a89b1a0
21:03rross101Fiar enough! I started with a Mac that had too much data on it to partition. And I figured I needed to be prepared to lose all the data.
21:07povikalyssa: is there any chance the DCP driver as-is will cope with kexec? (assuming both old and new kernel probe the DCP)
21:09steevrross101: also, if you're just gonna accept the default answers, you can use the "olddefconfig" and it should use the defaults instead of prompting you
21:10sventhe "proper" way is to shutdown the nvme co-processor and then use that reset provider marcan implemented
21:10sventhat'll work for ANS, but i think it didn't work for DCP because DCP then probably speaks the iBoot protocol which we don't know about
21:11rross101steev: Thanks - didn't know either of those things. First time using git branches and compiling a kernel.
21:11j_eyoldconfig - Update current config utilising a provided .config as base, dont really get that
21:12steevso your .config is the base, and if there are any new options, it will prompt you for what you want to do with them
21:13steevif you do "make olddefconfig" it's like saying, use this as the base, and any new options, just take their default settings
21:13rross101more importantly - were there any of those questions I should have answered differently?
21:14steevbtw, typo rross101 - 'wget curl https://ab34.de/u/0001-compile-fixes.patch' - you might want to either wget, or curl, but otherwise it'll try to wget the file curl :)
21:15svenpovik: what does that mean? does it use a literal linux kernel which would probe DCP, ANS and everything else? or does it just implement the kexec protocol?
21:16steevrross101: you could also "git am 0001-compile-fixes.patch" instead of patch -p1, not that it truly matters since it's unlikely most people will keep the kernel sources around :)
21:17povikit would be useful by being a linux kernel with minimal userspace appended to m1n1 and fixed in the m1's boot policy
21:19svenif you send the right commands to e.g. ANS2 it will go to hibernation/deep-sleep mode and then the next linux kernel would be able to wake it up again
21:19svenor, if you wanna do it the proper way, send the commands to shutdown ANS2 and then adjust the nvme driver to issue a reset
21:20alyssapovik: It's worth noting I explicitly think using DCP in the bootloader is... a bit silly.
21:20steevj_ey: nah, it's at 2.83gb and only 53% cloned, my torvalds checkout with built files is only 5.9 and it has 11 remotes
21:21alyssathe iBoot simple-framebuffer ought to be sufficient for the first stage bootloader anyway
21:22steevi just wanna see what rross101 was asking about. it's odd because a bunch of new options shouldn't be added post rc1, but i could be wrong (alyssa's config is for rc1)
21:22rohin2 has joined #asahi
21:28steevrross101: yeah, the defaults look fine, the only one that might have been "iffy" was I2C_APPLE, but it defaults to Y
21:31rross101 has quit [Remote host closed the connection]
21:31steevat some point... i'll get around to doing this stuff on my m1 too, but my time is so limited these days :/
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi
22:29yuyichao has joined #asahi
23:23jelly has quit [Read error: Connection reset by peer]
23:24jelly-hme has joined #asahi
23:50kenjigashu has joined #asahi
23:51kenjigashu has quit [Remote host closed the connection]