#Managarm and related projects

1 messages · Page 3 of 1

upbeat smelt
#

send the whole machine to this address

worn rampart
#

and the 3 digits in the back of your credit card

brittle mauve
native prairie
#

Thanks

#

Yeah your bios is fucked in the head

#

But its good because I can test against that

worn rampart
#

if windows boots its not fucked enough

native prairie
#

They dont even look at the windows debugger shitting itself

#

They just assume if it boots its good enough

worn rampart
#

I mean, why wouldn't it be fine if it boots :^)

native prairie
#

Lmao

brittle mauve
#

Also desktop

native prairie
#

Oh interesting

native prairie
storm plover
native prairie
#

I wonder if it has no _PRT

#

I dont see any errors in the logs above

native prairie
storm plover
#

no

native prairie
#

Dump tables pls if you dont mind

brittle mauve
safe glen
native prairie
#

@brittle mauve ill add additional logging for _PRT to see which one fails, that dump has like 50 different ones

worn rampart
#

given limine itself shows up correctly

#

and I am pretty sure I have used limine on that laptop before

safe glen
#

it's not the first report i hear of managarm presenting a blank screen when attempting to boot it

#

i would still test that iso, which admittedly doesn't necessarily 100% rule out potential issues in the multiboot2 implementation of Limine, but still

native prairie
# brittle mauve Also desktop

might be this thing that fails

    obj = uacpi_namespace_node_get_object(parent);
    if (uacpi_unlikely(obj == UACPI_NULL || obj->type != UACPI_OBJECT_DEVICE))
        return UACPI_STATUS_INVALID_ARGUMENT;
#

maybe the bus device is not a device but something else

#

we're about to see

#

I can remove that check if thats the case

forest bear
#

first time i see someone use unlikely() apart from linux

native prairie
#

well its all over uacpi LULW

worn rampart
#

my CHECK macro usually has unlikely spiced into it

native prairie
#

it does change code gen quite a lot

brittle mauve
#

also if the shutdown would work on my desktop it would be interesting to see if wake by usb works after it because as far as I remember when I perform a shutdown from windows then it doesn't for some reason but if from linux then it does work

native prairie
#

wake requires quite a lot of code on managarm's side

brittle mauve
#

not from sleep but from s5

#

as in turning on the pc when I press a key on the keyboard

native prairie
brittle mauve
#

yes

native prairie
#

can you guys please try this @storm plover @brittle mauve

#

this has more logging if prt fails

storm plover
#

output is still the same

native prairie
#

this adds extra logs

#

can u show what it says?

storm plover
#

I don’t see any extra logs

native prairie
#

what do u see

brittle mauve
#

it just shows the fault

native prairie
#

and the line above the fault?

#

I added this

#

wait im retarded

#

i didnt regen the image

storm plover
native prairie
#

for fucks sake

brittle mauve
#

can you just send the changed kernel

native prairie
#

yup

brittle mauve
#

it would be faster

native prairie
brittle mauve
#

\_SB_.PC00.PEG1.HPEV

native prairie
#

and the error code?

brittle mauve
#

invalid argument

native prairie
#

uhhh lol

#

thats a method

#

why does it try to _PRT on that hmm

#

_PRT exists a level above, in PEG1

#

oh fuck i probably know why

#

try this

#

or actually no

#

dont

#

ill make a better version

#

here

brittle mauve
#

nice, now it works (other than unhandled minor usb revision but thats unrelated)

#

shutdown worked and also it powered up when I pressed a key so thats nice

native prairie
#

yeah it was me being a bit on the retarded side when looking for a device matching an address

#

great to hear

#

did it get to desktop or no because usb?

brittle mauve
#

no because it died inside posix

upbeat smelt
#

usb 3.2 too?

native prairie
#

i see

brittle mauve
#

yeah I guess its usb 3.2

storm plover
#

usb 3.2 fails, shutdown works tho

native prairie
#

okay dammn

#

@upbeat smelt imagine on how many computers this could work if xhci worked

brittle mauve
#

shouldn't be that hard to add the desc tho like I already did for 3.1

native prairie
#

so we got like at least 6(?) I think different computers tested

native prairie
#

@brittle mauve and on these computers lai died for some reason?

brittle mauve
#

on the desktop I haven't tried lai but on the laptop it didn't shut it down when pressing the power button (and uacpi didn't yet work because of the duplicated node thing)

native prairie
#

right

#

lai supports duplicated nodes?

#

thats interesting

#

it supports that yet doesnt support some core aml

upbeat smelt
#

i think that one should be the last one

native prairie
trim eagle
#

@native prairie if you provide me the latest and greatest test image after all fixes are done (if you have any) I’ll test on a few laptops tomorrow

#

Maybe fire up the old desktop too

brittle mauve
#

@native prairie ping me once you have something for the duplicated node thing, I am going to go sleep now but I can test again tomorrow

native prairie
trim eagle
#

Sounds good

native prairie
native prairie
brittle mauve
#

also I made a pr that should fix the usb thing so it should be possible to boot it to the desktop on pcs with 3.2 too (though ig there isn't really anything related to the acpi part that you could do there)

native prairie
#

Ill poll them in if they get merged

#

Although we weren't able to get xhci working on any tested computer today

#

Even those without 3.2

#

Really hoping qookie figures it out

trim eagle
#

Quirks. Quirks everywhere

#

We really should focus on stability and bugfixes for a bit

#

And stuff like make our implementation more compliant

native prairie
#

Yup

trim eagle
#

Which I guess we’re doing somewhat (readlinkat, inotify and recently some socket memes from me, acpi from you, usb 3.2 from qwinci) but for some reason I feel like KDE isn’t it meme (but I will continue debugging that and InitWare tomorrow)

native prairie
#

Isn't it in what sense?

native prairie
#

@trim eagle this should have all the latest fixes

trim eagle
native prairie
#

I see

brittle mauve
#

also disk io performance should be improved somehow KEKW because then wine would probably timeout less often and ig it would be nice otherwise too

trim eagle
#

Yep. Performance in general tho

#

Not just disk

brittle mauve
#

yeah

trim eagle
#

Mind you, probably doesn’t help that a bunch of packages are compiled in debug mode with no optimisations

#

Including the likes of GTK and QT

brittle mauve
#

aren't most of them built with relwithdebinfo?

trim eagle
#

All my ports default to debug

brittle mauve
#

ah I guess its just some of them then

trim eagle
#

Autotools does what autotools does

#

Meson and cmake I set to debug

vestal sapphire
#

Maybe we should do debugoptimized instead

fervent zodiac
#

compile everything with -Ofast -flto -s -fomit-frame-pointer to prevent assertions

safe glen
#

-funroll-loops

native prairie
#

@brittle mauve will you be able to retest with duplicate node support today?

brittle mauve
#

sure

#

did you already make a kernel with the fixes?

native prairie
#

no but i can do that real quick if you're up for testing rn

brittle mauve
#

yeah I could test it if you send it

native prairie
#

ok great

brittle mauve
#

now it boots, but the power button doesn't work (and I don't really know what the log says because the kernel log is invisible after it boots into kmscon/weston

native prairie
#

Probably because its an aml power button object

#

Does it work with lai?

brittle mauve
#

no

native prairie
#

Actually I have your aml dump I can just check

native prairie
brittle mauve
#

yes

native prairie
#

I see

brittle mauve
#

well I don't really know if the presses work but at least it doesn't shut it down

native prairie
#

And on your pc it literally boots into weston?

nocturne tide
#

day 128731273 of waiting for someone to implement kernel log buffer

native prairie
#

Ikr

#

If it does you can Ctrl alt delete to shutdown I think

native prairie
brittle mauve
native prairie
#

yeah your PC doesnt have a fixed event power button

brittle mauve
#

hmm

native prairie
#

u have this tho

Scope (_SB)
{
    Device (PWRB)
    {
        Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */)  // _HID: Hardware ID
#

I could try hacking together a handler for this

#

so we can enable the corresponding GPE and handle it

#

unfortunately your power button is routed in a very modern way

#
Method (_Q33, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
{
    Debug = "=====QUERY_33====="
    P80H = 0x33
    ADBG ("EC PB press")
    PWPR ()
}

Method (_Q34, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
{
    Debug = "=====QUERY_34====="
    P80H = 0x34
    ADBG ("EC PB release")
    PWRR ()
}
#

you have to have an embedded controller driver, then read the query, then schedule the handler to run

#

and then that notifies the system that power button was pressed

#

or maybe it works without an EC as well but we have no kernel logs so no way to check if a GPE gets generated

brittle mauve
#

I think a headless launch should keep the kernel log available

#

Ill try

native prairie
#
Device (EC0)
{
    Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
    Name (_GPE, 0x6E)  // _GPE: General Purpose Events

most likely GPE 0x6E gets generated

#

which uacpi doesnt enable because it has no handler

#

i should really write an EC driver

#

Also your PC recommends PM Profile : 02 [Mobile] mobile power profile for some reason lmao

brittle mauve
#

well its a laptop

native prairie
#

oh

brittle mauve
native prairie
#

the solution is to buy a standalone xhci controller, plug that in, boot off of that and let xhci driver crash

#

then u see logs

wary wing
#

sounds like a plan

brittle mauve
#

or remove the udev rules for vga, that looks to have worked

#

well theres still nothing to be seen when the button is pressed but at least the log is showed

native prairie
#

yeah so no fallback routing for the button if no ec support

#

oh well

brittle mauve
#

I wonder if the lid open/close event is also using the ec

native prairie
#

lets see

#

sure enough

Method (_Q15, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
{
    Debug = "=====QUERY_15====="
    P80H = 0x15
    If (IGDS)
    {
        Local0 = LIDF /* \_SB_.PC00.LPCB.EC0_.LIDF */
        Local0 = ~Local0
        Local0 &= One
        Local0 += 0x02
        If (^^^GFX0.GLID (Local0))
        {
            ^^^GFX0.CLID |= 0x80000000 /* External reference */
        }
    }

    Notify (LID0, 0x80) // Status Change
}
brittle mauve
#

what actually calls that method?

native prairie
#

Also just tested on my main pc, also boots and shuts down just fine, but dies because USB revision

native prairie
# brittle mauve what actually calls that method?

The kernel enumerates the namespace, sees an EC device, calls its _GPE method to find the index of the event that it generates what it has outstanding queries, the kernel then enables that event and installs a handler. Then once that event occurs, it reads a register in EC space called EC_QUERY, that returns the index of the event handler in AML to execute, e.g 0x15 for your lid, then the kernel schedules EC. _Q15 for execution, then that handler notifies the kernel of a status change of lid device by doing Notify(Lid, 0x80)

native prairie
shell timber
woven escarp
#

Though it defaults to using /dev/sda as the root

#

I wonder if there's some kind of way to change it to /dev/sdc since I'm booting off USB

native prairie
woven escarp
#

Haven't tested it yet

native prairie
#

By work fine you mean it boots into desktop?

#

That would be a first

#

Usually it dies in some driver

nocturne tide
#

he said it doesn’t fully boot though

#

“waiting for /dev/sda” means the usb drive was not fully detected

#

it’s not actually looking for /dev/sda to my knowledge, just for a managarm root partition on any drive (that includes usb drives if they are detected)

#

but don’t quote me on that, check the source code yourself if you want to know

#

nevermind, it actually does specifically look for /dev/sda0... interesting

#

i could have sworn i've seen it look for a partition with a specific guid at some point

trim eagle
#

Pretty sure we do look for GUID

nocturne tide
#

ios autocorrect fucking me over

trim eagle
#

Relatable

nocturne tide
#

like how do they not know who mana game is

#

managram*

#

managarm*

#

:)

trim eagle
#

Tho by now I’ve forced it do to it correctly. Managarm Managarm Managarm

#

Capitalisation it sometimes forgets tho

fervent zodiac
#

mangranam

nocturne tide
#

pain

trim eagle
#

.!t managarm

wintry pivotBOT
#

It's Managarm, not Managram

trim eagle
#

*Or any other spellings

fervent zodiac
#

shouldve put that in the tag ig

trim eagle
#

Ig time to update the tag

fervent zodiac
#

but honestly you cant even tell

native prairie
#

aka the driver fucking died

nocturne tide
#

very much possible, hard to tell without a full log

native prairie
#

@woven escarp can you show us how it died

woven escarp
#

I saw along the lines of "mounted /dev/sdc"

#

Which most likely refer to the USB drive

nocturne tide
#

the only message similar to that is "mounted /dev/sda0"

native prairie
#

does your laptop have xhci?

woven escarp
#

Yes

nocturne tide
#

in which case it's even more interesting as to how it failed

native prairie
#

can you actually take the photo of the logs

nocturne tide
#

usb is one of the main failure points in managarm to my knowledge

native prairie
#

yup

woven escarp
#

My laptop has two drives. One is an SSD and another is HDD

#

They're probably mounted as /dev/sda and /dev/sdb in Managarm

#

So the USB would be /dev/sdc

trim eagle
#

No. Unless you have a managarm@root partition there I doubt it. We only mount a partition with the managarm GUID

#

Which was randomly generated by us

woven escarp
#

So any partition in all available drives with the Managarm GUID?

nocturne tide
#

yes

trim eagle
#

The first one it finds I think

native prairie
nocturne tide
#

well yes, the first one it finds

#

that is right

trim eagle
#

Mounting the root is quite hardcoded. We want to just pass the partition uuid on the cmdline like Linux but that’s currently not the case

nocturne tide
#

if you have one on your internal drive and it gets iterated before the usb drive does, then that's the one it will find

native prairie
#

@brittle mauve i'll try to hack together an experimental EC driver for managarm today we'll see if it picks up your power button presses

trim eagle
#

The block stack needs some improvements in general (just like the usb stack)

fervent zodiac
#

wait

#

does managarm handle oom?

native prairie
#

no

nocturne tide
#

define handle

fervent zodiac
#

or is it just like "oops well no ram :/ HEL_CHECK(false)"

native prairie
#

yes

#

it just dies

fervent zodiac
#

lmaoo

nocturne tide
#

that is one way to handle an oom

woven escarp
native prairie
fervent zodiac
#

more like "running away from the problem"

native prairie
#

thats like a userspace shitty command line app oom handling

nocturne tide
woven escarp
#

no

fervent zodiac
native prairie
#

worse, in the kernel

#

block device stack is in usersapce

fervent zodiac
#

oh the kernel dies on oom?

#

oh jesus christ

native prairie
#

...yes

woven escarp
fervent zodiac
#

what are you even doing that allocates

nocturne tide
#

why would you do that

native prairie
#

the kernel has all sorts of dynamic arrays @fervent zodiac

#

including storing allocated memory

fervent zodiac
native prairie
#

not my problem LULW

fervent zodiac
#

either handle errors on that

#

or dont use them :^)

native prairie
#

im just here to provide a stable acpi implemetation

fervent zodiac
#

yeah ik

native prairie
#

that handles oom caret

fervent zodiac
#

does it really handle it?

native prairie
#

yep, every possible allocation is checked and propagated

fervent zodiac
#

what happens if you randomly fail some allocations

native prairie
#

if it happens in the interpreter it cleans up anything that might've been allocated and returns UACPI_STATUS_OUT_OF_MEMORY

fervent zodiac
#

also wait, does this mean that aml can run halfway through

native prairie
#

yup

nocturne tide
#

is uacpi on managarm running in userspace or kernel?

trim eagle
#

Kernel

native prairie
#

kernel ofc, just like lai

fervent zodiac
native prairie
#

the interpreter unlocks them when exiting

trim eagle
#

But yeah OOM handling is also something we need to propagate

fervent zodiac
#

okay at least thats good

nocturne tide
#

not that obvious, lil can run in userspace :^)

native prairie
#

i've specifically written it with oom handling in mind so every single allocation has a check and a way to gracefully handle failure

trim eagle
#

Again, the list of things to do is massive. And my time unfortunately not so. But we’re making some nice improvements in the past week or so. Quite happy with development atm

fervent zodiac
#

instead of dying

#

like go to sleep and maybe hopefully that makes things better

native prairie
#

i dont control that, the kernel is free to do it in the allocation callback

nocturne tide
#

also @trim eagle do you happen to know what kills performance in managarm?

#

the whole thing is awfully slow at times, even without debug prints

native prairie
#

on linux GFP_KERNEL is basically almost infalliable

nocturne tide
#

ls -la /proc/self/fd takes like >1 second to complete

trim eagle
#

The entire thing being unoptimized in most places, and several key userspace components running with debug mode

trim eagle
#

@carmine current might know or have ideas what the big points here are

nocturne tide
#

fs operations that never touch the physical fs

#

does managarm not have a block cache or something

trim eagle
#

I sure hope we do. I’d like to think we do. But you’d need to check source to know

nocturne tide
#

yeah i cant be bothered to read through this code anymore

#

god damn phd code

trim eagle
#

Not now at least

#

We all know what happens at the next managarm development session

#

Which might well be tonight lol

nocturne tide
#

initware

native prairie
#

Kernel log ring?

nocturne tide
#

!!

trim eagle
trim eagle
native prairie
#

ok next coolest thing: KDE

nocturne tide
#

managarm general no..

trim eagle
#

Related to that yes

nocturne tide
#

let me take a look

trim eagle
native prairie
#

yeah i saw the thread, cool work so far

nocturne tide
#

oh the same thing that you posted in voice yesterday

#

nice work :^)

trim eagle
#

If only it worked consistently (or at all meme)

nocturne tide
#

any idea whats up with the input?

trim eagle
#

My best guess is eudev being old and not a fan of booting via systemd / InitWare as a bunch of shit was nuked from it. Udev usually reports via sd-notify that it’s ready to do shit but eudev doesn’t have that anymore

#

So I’ll probably look at replacing eudev

#

It’s unmaintained anyway

carmine current
#

Maybe look at the posix trace and check if there's anything strange

#

This should be just a few calls to posix, right? Like a dozen or so

trim eagle
#

Probably

carmine current
#

And posix can handle many more than that in a sec

trim eagle
#

Yep

nocturne tide
#

how to do the trace thingy

trim eagle
#

Debug-options.hpp enable logRequests and rebuild system

#

Warning, will@spam your log

#

Might wanna redirect to file and inspect after the run

nocturne tide
#

i expect nothing less than that

#

i got a big scollback buffer

#

no worries

#

im only interested in one part of the log anyway which shouldnt be too big

trim eagle
#

Aight. Enjoy the GET_TID supercall spam

trim eagle
nocturne tide
#

fuck i ls -la'd /proc/self/fd

#

i forgot im on the broken tree i was working on

trim eagle
#

That shouldn’t be fatal anymore

nocturne tide
#

ik ik i just havent updated since then

#

we need to update the pr today lol

trim eagle
#

What is wrong?

nocturne tide
#

have you not seen qookie's review?

#

i have no idea what im looking at

#

it doesnt seem to stop at anything for a significant amount of time, so its just a lot of requests and it takes time?

#

huhh... it might be related to this as well: xbstrap: Running ['@SOURCE_ROOT@/scripts/vm-util.py', 'qemu', '--arch', '@OPTION:arch@'] (tools: []) No hardware virtualization available!

#
czapek@raptor-wsl:~/source/managarm/build$ stat /dev/kvm
  File: /dev/kvm
  Size: 0               Blocks: 0          IO Block: 4096   character special file
Device: 0,5     Inode: 81          Links: 1     Device type: 10,232
Access: (0660/crw-rw----)  Uid: (    0/    root)   Gid: (  994/     kvm)
Access: 2024-03-19 09:32:11.769564111 +0100
Modify: 2024-03-19 09:32:11.769564111 +0100
Change: 2024-03-19 09:32:11.769564111 +0100
 Birth: -```
#

¯_(ツ)_/¯

#

the qemu i built seems to be less than capable

#

probably missing some stupid dependency

#

im just gonna reconfigure and install everything i can lol

#

nope i cant get it to work no matter what

#

so annoying

trim eagle
#

Grep the qemu source for the error and trace what it wants

trim eagle
nocturne tide
#
czapek@raptor-wsl:~/source/managarm/src/ports/qemu$ rg "No hardware virtualization available"
czapek@raptor-wsl:~/source/managarm/src/ports/qemu$```
#

hmm

#

yeah its whatever

nocturne tide
#

maybe its ripgrep picking up parent .gitignore and seeing ports is ignored?

trim eagle
nocturne tide
#
czapek@raptor-wsl:~$ source/managarm/build/tools/host-qemu/bin/qemu-system-x86_64 -enable-kvm
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize kvm: Permission denied```
#

hey now that's something

#

oh im not part of the kvm group

trim eagle
#

Are you in the kvm usergroup?

nocturne tide
#

:)

trim eagle
#

Fix that then it should be quicker

nocturne tide
#

yep it works now

#

lmao

#

one could say it is much faster...

#

0.192s with posix logs to ls -la /

trim eagle
#

I sure hope it’s faster

median wharf
#

thousands of lines of phd code just to take 200ms for ls

trim eagle
nocturne tide
#

hey its still pretty good with all the vmexits for the helout

trim eagle
#

yep

carmine current
#

Well, w/o hardware virt, the perf is obviously going to be bad

#

We don't optimize for software virt

cedar cosmos
#

that sucks

trim eagle
#

yeah not surprised there

safe glen
#

for the record ls on Lyre with TCG is pretty much instant still :^p

#

with 100% less PhD code

#

and asserts

trim eagle
#

there's probably always room for improvement meme

safe glen
#

i mean yeah

#

Lyre is still crazy slow compared to Linux

cedar cosmos
safe glen
#

ramdisk

#

but tbh managarm is still slower even off a ramdisk

#

i don't think the bottleneck is storage

native prairie
trim eagle
#

the IPC should be pretty ok. @carmine current benchmarked that a while back no?

fervent zodiac
#

have you tried profiling

#

managarm ipc has fixed requets/reply pairings, right?

#

so copy every ipc request and reply you send and receive to a buffer with a tsc readout

#

and then you can see where its spending time

native prairie
#

#1217009725711847465 message

#

@brittle mauve we can now test on your laptop

#

where power button didnt work

#

it should now send notifications

brittle mauve
#

nice

native prairie
#

also charger, lid, and fn+whatever keys as well

trim eagle
#

Based

brittle mauve
#

@native prairie could you send the kernel with the ec stuff implemented?

native prairie
#

Yup, once I boot into my shitbuntu

#

10 mins

nocturne tide
#

are you dualbooting windows and linux for development?

#

if so, i'd recommend you look into wsl

#

wsl v2 is basically a lightweight linux vm that runs a fully functional kernel

#

supports kvm, and you can use a fairly recent kernel (6.1 i believe) if you compile it yourself

#

on windows 11 it also supports wayland applications and runs an xwayland server out of the box

#

i think you could even do pci and usb passthrough with some powershell memes

#

and i know for a fact you can passthrough raw block devices, so it's really got everything you might ever need :^)

native prairie
#

i develop in wsl almost exclusively yeah

#

for some heavy stuff like managarm i use ubuntu because wsl io is slow as shit

nocturne tide
#

for me its just as if it was running natively

native prairie
#

not when accesing files on windows drive

#

through /mnt/X

nocturne tide
#

oh yeah that one sucks

native prairie
#

ye

nocturne tide
#

just use the root partition lol

native prairie
#

i use native clion and native git fork

nocturne tide
#

oof

native prairie
#

so i must use it that way

nocturne tide
#

clion supports remote workspaces

#

so you could edit via ssh

#

i use it with vscode like that, except there is an official extension that runs a vscode server on the wsl distro

#

but there is also a vscode extension to do the same over ssh

native prairie
#

i see

brittle mauve
#

I have used the vscode open remote extension and it mostly worked fine

native prairie
brittle mauve
#

except that things like saving are a little slower ofc

native prairie
#

idk im kinda used to have things on my windows drive but i know its not good

#

also my nvme is almost out of space

brittle mauve
native prairie
#

this should spam power button notifications

#

but also try charger and lid ofc

#

and maybe some fn keys if u want

#

then its just a matter of installing a notify handler on the button object from managarm

#

if we want to hook that notify

nocturne tide
#

is there a standardized way to install a "power button" notifier?

native prairie
#

there are two standard ways

nocturne tide
#

are these objects named consistently across acpi implementations?

native prairie
#

u never look at the object names, u look at the id returned from _HID (hardware id) or _CID (compatible ids)

#

and yes, they're always the same

#

object names are internal to the aml bytecode

#

they are basically reference handles

nocturne tide
#

oh so the _HID and _CID ids are standard and you can basically use those to listen for specific things?

native prairie
#

usually u enumerate the entire namespace once its loaded and you have some sort of "bus" where all drivers that support ACPI list their IDs

#

this is how I find an EC device for example uacpi_find_devices("PNP0C09", ...

native prairie
#

so basically yes

nocturne tide
#

so technically all vendors use the same _HID/_CID for their power buttons and lids?

#

im sorry if im being dense

native prairie
#

they can use their own extensions and make a custom device and make a new _HID, but still list the classic power button id in the _CID (aka compatible)

nocturne tide
#

but i dont know much about acpi as you can tell

#

ah so _CID is what you want to look for

native prairie
#

yeah, but its not present for all devices, so u inspect both and look for a match

#

some devices have just _HID, some have a _CID with like 10 extra entries

#

depends on how simple or complex a device is

brittle mauve
native prairie
#

daaamn

nocturne tide
#

damn that is poggers

#

can we get a pogchamp in the chat

native prairie
#

u see it trying to Notify?

nocturne tide
#

fr though, good job on this acpi thingy

native prairie
#

thank you

nocturne tide
#

mr portmaster is going to have a lot of fun porting new stuff

brittle mauve
native prairie
#

yeah thats because i disable burst mode

#

and that sends an extra irq

nocturne tide
#

holy shit does acpi just work™️?

native prairie
#

if we wanted to hook those we would install a notify handler

nocturne tide
#

if you have a capable aml parser

native prairie
#

yup

native prairie
nocturne tide
#

well of course meme

brittle mauve
#

also interestingly it looked like long pressing the power button also generates some kind of different event before it powered off

#

didn't really have time to see what it was

native prairie
#

interesting

#

probably "you're about to die"

nocturne tide
#

that is fun

brittle mauve
#

yeah there's not really anything the os could do about it

#

though ig you could try syncing data to disk really quickly troll

native prairie
#

lol

nocturne tide
#

eh you can probably try to do some cleanup in the few milliseconds before you get killed

native prairie
#

i wonder if os can NAK that

nocturne tide
#

hey that would be pretty smart

#

"nah not yet pls"

brittle mauve
#

it would also mean that the os could prevent force shutdown completely

native prairie
#

yea

nocturne tide
#

yeah but for a good reason

#

you can always just cut power completely

#

by taking out the battery

#

:^)

#

nothing they can do about it

brittle mauve
#

except when its not removable :p

nocturne tide
#

im sure that if you hold the power button long enough it just shuts down with no acpi event

brittle mauve
#

though my laptop still has a hole in the bottom that you can push with some screwdriver or whatever to force disconnect the battery

nocturne tide
#

if there is something you can cancel of course

native prairie
#

anyway pogger result

#

the driver is only 300 loc

nocturne tide
#

i wonder how would one control the backlight?

#

since you get notify events when pressing brightness control buttons

native prairie
#

acpi has methods for that

#

the kernel can call them

nocturne tide
#

like a method defined by aml?

native prairie
#

some are non standard and require a separate driver (aka for thinkpads i think)

#

yeah an AML method

nocturne tide
#

interesting

#

that seems really easy

native prairie
nocturne tide
#

thats all the standard shit there is?

native prairie
nocturne tide
#

where do you get that from

native prairie
nocturne tide
#

oh thats so cool, thanks!

native prairie
#

yeah

#

having a working interpreter allows u to do an absolute shit ton of things

#

many people dont realize it

trim eagle
nocturne tide
#

i wonder how wiring it all up to userspace will look like

#

would thor just expose it all over mbus?

native prairie
#

I would think so

nocturne tide
#

and let posix just create sysfs entries for all the shit

trim eagle
#

Yep. Likely

nocturne tide
#

how would one handle the funny "set backlight brightness" with mbus? does it support rpc?

native prairie
#

@nocturne tide for example this is a power button device from qwinci's laptop

Device (PWRB)
{
    Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */)  // _HID: Hardware ID
#

in uacpi u would do install_notify_handler(PWRB, handle_button)

upbeat smelt
nocturne tide
#

i have absolutely no idea

#

also it was a genuine question, i do not know how managarm ipc works at all

#

so i was wondering if you guys have rpc

upbeat smelt
#

mbus is only a list of objects which have properties, and, when bound, give back a handle to an ipc lane

nocturne tide
#

ah i thought mbus also handled ipc

native prairie
#

tbh just starting with ac plug/unplug and battery charge level would be good

upbeat smelt
#

then you just construct the request message, send it over the lane, get the response

nocturne tide
#

so you could just have a "set backlight brightness" message then i guess

#

that makes sense

upbeat smelt
#

we don't do automatic rpc where you only see a function and it automagically generates the code to marshall all the in and out parameters into request and response messages, mainly because korona is not a fan of that idea, and it'd make it potentially harder to add support for other languages

nocturne tide
#

yeah i get it now, i was missing some part of how all of that works

#

so im assuming a server would "announce" an object to mbus and a client can then find it and that allows you to create a connection?

trim eagle
#

You’d publish it if I recall correctly yeah

upbeat smelt
#

yeah you publish an object on mbus, and if the properties match it notifies all pending observers

nocturne tide
#

ok yeah i totally dont get how that works so i'll have to read up on that

#

im just being extra dense so dw

trim eagle
nocturne tide
#

when home

#

we need to fix the pr

native prairie
#

Now we only need for xhci to not suck and managarm will boot on most hardware we tested so far

upbeat smelt
#

currently it uses a push model, where the server sends messages to clients which have active observers, but on my mbus refactoring branch i've reworked it to a pull model, where you send a request to the mbus server, and it will respond once there are matching objects (either immediately, or only after new ones are added, controlled by sequence numbers)

#

ignoring the fact you could just not respond to the server messages and get it stuck, the pull model also integrates into async code in a significantly nicer way

nocturne tide
#

that sounds like a good change

#

are there any docs on how mbus works?

#

or do i have to read the source code

#

i'll read the source code anyway but i was wondering if there was documentation

native prairie
#

theres even a talk

nocturne tide
#

that doesn't say much

trim eagle
trim eagle
upbeat smelt
#

yeah mbus itself is rather undocumented

#

as is the case with most of managarm :^)

#

some day it'd be nice to sit down and document stuff, but there's more pressing issues to work on, and i'm not that good at writing meme

nocturne tide
#

how would one create a new server? what kind of an object do i publish? does the server know which object was used to create an ipc lane?

#

im assuming creating a new server is just spawning a new process that publishes objects on mbus somehow

upbeat smelt
#

every thread is given the lane to talk to mbus over via ManagarmProcessData (obtained via a supercall)

#

the object you publish is just a set of properties (name-value pairs), and (in the current model) after publishing an object the mbus server gives you a handle to a management lane, on which it sends bind requests, to which you respond by preparing a new stream and sending the handle to a lane back

native prairie
#

yeah this is impossible to understand without code examples LULW

nocturne tide
#

yeah ngl it is kinda confusing

#

i'll just take a look at posix in a while, maybe i can understand it after staring at it way too long

upbeat smelt
#

okay lets take usb as an example

nocturne tide
#

mbus definitely does need some docs

upbeat smelt
#

when the xhci driver is done setting up a new usb device, it publishes an object for it, so the other drivers can find it

native prairie
nocturne tide
#

so like xhci.device with properties like vid=..., pid=..., subclass=..., if=... whatever

upbeat smelt
native prairie
#

and thats supposed to be picked up by a hid driver for example?

nocturne tide
#

hm i was close enough

#

im guessing the hid driver then looks for objects that match usb.class/subclass to look for hid devices

native prairie
#

okay makes sense

nocturne tide
#

somehow that feels really inefficient

upbeat smelt
native prairie
upbeat smelt
#

after that they talk directly

nocturne tide
#

that filter thing i mean

#

to check whether the object is what you're looking for

#

i can see it getting slow with all those string compares when there is a lot of objects

upbeat smelt
#

well it's more efficient than serializing all objects and having the client filter them on it's own

nocturne tide
#

unless you're not just mindlessly iterating them all and comparing them

upbeat smelt
#

and besides, you usually filter for like 3 properties at most, and i'd guess mbus objects only have <10 properties on average

#

and you can bail out early if one property doesn't match

#

since in the server's view of the object they are in a map

fervent zodiac
#

device hotplug cant be that common anyway

native prairie
#

also its not the bottleneck of managarm lol

#

nor its core issue atm

nocturne tide
#

oh definitely not

#

i just hate slow code in general

#

im wondering how would you approach making acpi available to userspace

#

since it's handled in kernel are you going to have to have an acpi server built into the kernel?

upbeat smelt
#

the kernel already exposes an mbus object for rebooting, and dennis was working on extending that to include shutdown as well

native prairie
#

you could eventually move the interpreter into userspace

nocturne tide
#

so it is sort of a server built into thor

#

i wonder though how would one handle acl so not everyone can reboot the computer

#

with posix you have uid/gid

#

but you probably can't utilize it effectively for that purpose

#

does managarm have some system wide credentials?

upbeat smelt
#

threads have a set of kernel-controlled credentials that they can present in ipc messages

#

via ImbueCredentials/ExtractCredentials

native prairie
#

lol imbue

upbeat smelt
native prairie
#

the word i found out about because some c++ helper used it

upbeat smelt
nocturne tide
#

ahh that is smart

upbeat smelt
#

currently mbus doesn't have access control though, but i'm working on that on my mbus refactoring branch

nocturne tide
#

all that phd code finally pays off

upbeat smelt
#

to help with that i added token credential objects, which just represent credentials you can send via ImbueCredentials

#

in place of thread credentials

#

the idea is that after publishing an object, you add credentials to the acl for it, and then when someone wants to bind to it they have to send the right credential in the request

#

and to help servers have common credentials, the kernel can have some named ones that it gives to servers, based off of their svrctl configuration

#

so posix-subsystem would list that it needs the power credentials, and then it can include them when it binds to the mbus object

trim eagle
nocturne tide
#

shutdown from userspace can very well be initiated by a random program that just talks to the kernel

trim eagle
#

If it runs as root it’s fine meme

nocturne tide
#

or at least thats my assumption with how mbus works

#

a random process could very well say "hey i want to bind to reboot"

trim eagle
#

Hmm

nocturne tide
#

unless there are some checks that i am not aware of

trim eagle
#

Yes that would work in the current situation I think

upbeat smelt
#

well currently yes, but as i've just said i am working on it

trim eagle
#

As mbus doesn’t do ACL or the like yet

#

Yeah

nocturne tide
#

yes yes i understand

#

i was just objecting to dennis' reply :^)

trim eagle
#

Yeah fair

nocturne tide
#

i like the mbus rework acl approach though

#

managarm kernel sounds like a lot of fun

trim eagle
#

It is. Same for server

#

Until you go insane on PhD code. Like I went almost 4 years ago

nocturne tide
#

yeah, phd code is the not so fun part of it

upbeat smelt
#

it's really not that bad

#

:^)

nocturne tide
#

but im sure once you spend enough time around it you learn how to read it

#

just like with any project

trim eagle
#

Supposedly I should be able to handle it. If I go by the PRs I sometimes can too. Idk how the fuck I’m doing it meme

native prairie
#

Whats the phd code meme lmao

#

what code is phd?

trim eagle
#

Korona started it. Korona has a PhD. Korona code is PhD code. It’s usually good, but not always the easiest to understand (but that’s also cuz it’s quite advanced sometimes)

native prairie
#

lol

nocturne tide
#

ill try and fix one managarm issue today on stream

#

assuming dennis is going to come home meme

native prairie
#

can you stream on twitch and not discord

#

or both

nocturne tide
#

why twitch

native prairie
#

i can watch on tv and ipad

#

and other people as well

trim eagle
#

Discord stream better stream

nocturne tide
#

true

native prairie
#

but why

trim eagle
#

I’m too shy for twitch stream

nocturne tide
#

i could stream on yt but its not gonna be very entertaining

trim eagle
native prairie
#

well thats kind of said

#

sad

trim eagle
#

I might try twitch one day but I like the two way voice comms

nocturne tide
#

same

trim eagle
#

And on twitch I won’t have those

native prairie
#

i mean u can still be in discord voice

nocturne tide
#

anyway you can drink beer at home

trim eagle
#

Maybe it is time to try it

native prairie
#

that way your vod also stays up

#

it could be educational for a lot of people

trim eagle
#

Most of my stream is spamming swear words in logs lol

nocturne tide
#

oh i dont think hours of dennis saying stupid shit and typing "kanker" all over the place would be educational

native prairie
#

lol

trim eagle
nocturne tide
#

if dennis did more coding it could be educational though

trim eagle
#

That requires me to have more than one braincells

nocturne tide
#

same

#

i tend to do good but my adhd is bad and i cant focus for long periods of time

#

and sometimes i just dont have the braincells laying around

upbeat smelt
#

a long while ago i did some streams on twitch of me working on managarm

trim eagle
#

I Just don’t have them

upbeat smelt
#

so it doesn't end up with you just watching youtube videos on stream or something :^)

nocturne tide
#

the problem is i often just cant focus at all

#

so i end up forcing myself to do something rather than watch youtube

trim eagle
nocturne tide
#

sometimes listening to music even distracts me

trim eagle
#

Literally negative iq here

nocturne tide
#

i really need to start working so i can either get insurance through my employer or afford it myself so i can go to a psychiatrist and get a diagnosis lol

upbeat smelt
#

just microdose regular meth instead of prescribed meth

trim eagle
#

It doesn’t always get better with a diagnosis. But yeah

nocturne tide
#

at least i get the meth legally that way

trim eagle
#

True

#

Same

median wharf
#

twitch stream better

trim eagle
#

I’ll consider it

native prairie
#

@brittle mauve do u wanna try the final version on your laptop? I just submitted the PR to managarm

#

I hooked up a notify handler to the power button as well

#

so that should work now

native prairie
#

....and you said that right after i booted into windows

brittle mauve
#

well I can just build it myself

native prairie
#

yeah actually

#

just grab the PR

brittle mauve
#

yeah, Ill have to make a new clone of managarm tho as I only have an aarch64 copy locally and then apply the pr

native prairie
#

cant u just clone my fork directly

#

or just u know git remote add uacpi-fork <url>

brittle mauve
#

yeah that would work or just git fetch origin pull/642/head:uacpi-rewrite

native prairie
#

oh yeah u could do that in github

#

if forgor

brittle mauve
#

the pr lacks uacpi itself btw (a wrap or submodule or whatever)

native prairie
#

no, its just in a different repo

#

its linked to that pr

trim eagle
#

@brittle mauve see the most recent bootstrap PR

#

That should solve your issues

brittle mauve
#

oh yeah

#

well I just cloned it there

#
/var/lib/managarm-buildenv/build/tools/system-gcc/lib/gcc/x86_64-managarm/13.2.0/../../../../x86_64-managarm/include/c++/13.2.0/optional:477: _Tp &std::_Optional_base_impl<helix::UniqueDescriptor, std::_Optional_base<helix::UniqueDescriptor, false, false>
>::_M_get() [_Tp = helix::UniqueDescriptor, _Dp = std::_Optional_base<helix::UniqueDescriptor, false, false>]: Assertion 'this->_M_is_engaged()' failed.
posix: Unsupported flag in recvMsg
thor: Illegal POSIX request type 38
HEL_CHECK failed: recv_resp.error()
    In file ../../../src/mlibc/sysdeps/managarm/generic/fork-exec.cpp on line 459

End of lane


thor: Panic in server /usr/bin/netserver
``` I wonder what is this about (this is unrelated to the pr tho)
#

also it seems to prevent it from going to the desktop like it did on aarch64 too

brittle mauve
#

or at least it doesn't print/do anything

native prairie
#

hmm

#

do fn keys work?

brittle mauve
#

fn keys and lid open/close do work yeah

native prairie
#

lol really strange

#

maybe try rebooting?

brittle mauve
#

still the same

native prairie
#

like literally nothing gets logged?

brittle mauve
#

yeah it doesn't log anything

native prairie
#

hmmm

#

i wonder what changed

#

its not like u somehow enable separate events...

#

we can try experimenting tomorrow a bit

#

if u dont mind

#

spam a bit more logs

brittle mauve
#

yeah

native prairie
#

@brittle mauve I have one simple idea actually, lets try rn

#

I'll send thor

brittle mauve
#

Ill try that

native prairie
#

i moved ec init to post namespace load

#

idk it shouldnt matter but who knows

#

also enabled trace logs

brittle mauve
#

it appears to work now

native prairie
#

holy shit

#

does it shut down?

brittle mauve
#

yes

native prairie
#

damn

#

i see your embedded controller is doing tons of shit in the _REG code

#

maybe it relies on that being run after init

#

@brittle mauve and this laptop is the one with duplicated objects right?

brittle mauve
#

yeah

native prairie
#

okay so you have no ECDT table

#

this means the firmware is not asking for early access to the EC

#

this is probably why

#

ill make it so its only regged early if firmware asked for it

#
Method (_REG, 2, NotSerialized)  // _REG: Region Availability
{
    If ((Arg0 == 0x03))
    {
        OKEC = Arg1
        OSTP ()
        ECFG (One)
        MSFG = (S0ID & One)
        PBOV = (PB1E & One)
    }
}
#

usually this is implemented as a write to one global variable

#

but your aml is doing tons of shit

#

@brittle mauve okay i implemented that properly i think

#

can you verify that it works from the PR head that you built locally?

#

so that we rule out other stuff

#

dont forget to fetch tho

brittle mauve
#

yeah it does work

native prairie
#

YEsss

#

Amazing

#

thank you

#

lucky guess on my part

#

@brittle mauve btw how old is this laptop?

brittle mauve
#

iirc it was released in 2020

native prairie
#

interesting

#

do u know the model?

#

also i think i traced why it didnt work, in the _REG method it sets feature bits via SMI and it detects those based on the OS type global variable. That global variable is not yet initialized at that point if we run _REG too early

#

so it sets the barest feature set possible

brittle mauve
brittle mauve
native prairie
native prairie
#

PR to replace LAI with uACPI just got merged!

#

It's now official

quaint fern
native prairie
#

have you made your decision yet

quaint fern
#

so uacpi is as natural a fit as limine and mlibc for me

#

i will go figure out what all i do with lai (i have been playing with the m68k port of keyronex almost exclusively lately and i need to refamiliarise myself with the amd64 port) and i'm sure uacpi will already provide for it all

native prairie
#

this is the way

safe glen
#

congratulations on getting uacpi merged

#

i'd probably be rushing to replace lai with it in my OSes if i used any ACPI library at all :p

native prairie
mighty gust
safe glen
#

latter

mighty gust
#

omg based!!!

trim eagle
#

Managarm, now booted by InitWare (based on SystemD)

#

I'd like to thank @quaint fern for the help (and @upbeat smelt and @carmine current and @nocturne tide for the debugging today, good session)

nocturne tide
#

amazing work 🎉

native prairie
#

Nice!

#

KDE when

molten meteor
#

interesting

jaunty charm
#

Is InitWare still maintained

quaint fern
#

I am pleased to announce that an agreement has been made to merge Keyronex and Managarm into a new OS, to be called Keyrogarm.

The tech industry in general and software engineering in particular has a rich history of successes borne of mergers that promote the interests of all parties. Who can forget the golden age for IBM technologies in operating systems after their dealing with Bill Gates? Where would modern UNIX be without the acclaimed Project Monterey, the unification of HP-UX, AIX, and DYNIX/PTX?

Managarm is recognised as the greatest profoundly-asynchronous pragmatic microkernel on the OSDev server. Keyronex is recognised as the greatest operating system, targetting Motorola 68k-series CPUs, that was created within the 2020s.

By leveraging common technologies, not least the asynchronous I/O frameworks, the new Keyrogarm can break ground as the greatest profoundly-asynchronous pragmatic microkernel on the OSDev server targetting Motorola 68k-series CPUs that was created within the 2020s.

Immediate directions for the new kernel include a comprehensive rewrite of C++ components into traditional Objective-C, the immediate prioritisation of support for 68k-family machines by repurposing manpower previously allocated towards porting KDE and driving Intel GPUs, and the replacement of kmscon by systemd-consoled.

trim eagle
#

I look forward to this partnership!

upbeat smelt
#

looking forward to learning objective-c

fervent zodiac
#

looking forward to future updates!

#

I assume you will be making the transition through Objective-C++

#

Are you planning to stick to bragi? Or are you going to replace it with a more Objective-C-flavoured interface?

trim eagle
#

Obviously it needs replacing

#

We’re also considering rewriting uACPI in rust so we have blazingly fast AML execution

quaint fern
fervent zodiac
#

Does it though? I mean it might be possible to adapt even Protocol Buffers and gRPC to work natively with Objective-C

fervent zodiac
quaint fern
fervent zodiac
#

Also, what are your plans wrt security on those objects? I believe that one of the reasons they aren't used in macOS much anymore is because of security issues

fervent zodiac
quaint fern
#

to briefly explain how it works

fervent zodiac
#

yeah i get it

#

you could use an optimized JIT compiler to avoid most of the performance bottlenecks though

quaint fern
#

message sent to a proxy object -> method not found handler contacts the remote object to ask for the method signature -> NSInvocation built by consulting stack/registers and interpreting according to the method signature -> serialised and sent to remote -> remote constructs an NSInvocation and invokes it -> remote serialises return value and sends it back -> return deserialised on the other side and stuffed into registers/stack

fervent zodiac
#

that sounds ultra slow

quaint fern
#

it's evil to have to make a roundtrip just to decide how you're going to serialise

fervent zodiac
#

actually, you could do a funny meme with a JIT here

quaint fern
#

NSXPC forces you to designate protocols of proxy objects and permits proxy objects to be given only when in a position where the protocol that the proxy object should understand, so it eliminates that roundtrip, and it also goes asynchronous, and instead of return values, you can pass a block as a parameter, and remote can evaluate the block

fervent zodiac
#

a method not found handler saves all the registers, does the lookup roundtrip, builds a proper JIT thunk, restores registers and runs the thunk

#

and you bind the JIT thunk retroactively into the class

#

so that you only need to do this once

fervent zodiac
quaint fern
fervent zodiac
#

in fact on all of {arm, x86, riscv} enough codegen for marshalling doesn't even need any fancy anything

#

i mean not even fancy regalloc

#

because ~all registers are ~equal

fervent zodiac
trim eagle
#

Oh we were also thinking to compress the IPC data with xz for that amazing security

median wharf
#

based

#

i say we link xz into every binary by default on managarm

#

everyone will need compression at some point right?

trim eagle
#

Yeah

fervent zodiac
#

i propose you link every managarm binary with libsupplychain

#

(which dlopens all dynamic libraries available)

onyx cloud
#

just in case u wanna use another lib

median wharf
#

hey bro I heard you liked shared libraries

onyx cloud
#

sharing is caring

#

😊

#

😍

storm plover
quaint fern
#

let me just say i think it's an outrage that despite a PR open for over a year, managarm has still yet to be added to the http://www.microkernel.info website

median wharf
#

there are even 2 prs open lol

trim eagle
#

Lol

zenith phoenix
#

Looks like maintainer is inactive

#

They don’t have any gh activity this year

vestal sapphire
#

fork it

trim eagle
#

Cringe

quaint fern
#

you managarmers should establish a secretive organisation cloaked in mystery as to what dark money funds it, to be called the Microkernels Group or something like that

cedar cosmos
#

managamers

upbeat smelt
#

after losing my mind only slightly i got mammogram booting on my laptop off of an usb stick with the usb keyboard working at the same time

#

still need to debug why usb hubs don't work, and fix the usb hid driver dying when i give it my mouse (although this i can test in qemu)

#

the laptop touchpad is out of reach for now, i don't feel like writing an i2c driver just yet

native prairie
# upbeat smelt

me when 15 AML blobs, and this is not even including the potential dynamic blobs that arent loaded by managarm yet because no cpu power states

trim eagle
#

AML moment

wild stone
#

reviving the managarm thread to show how our network stack is actually reasonably fast if you compile everything as release with -O3 halfmemeright

#

its a bit random but i dont know if thats my internet or managarm, the highest i got was 65 mbit/s

#

this is using the minibrowser

trim eagle
#

Nice

wild stone
#

also, normally i can only test it once or twice before OOMing

trim eagle
#

That’s why I run with 8 gigs of RAM

#

But we should fix that shit yeah

fervent zodiac
#

also

#

how well does it perform if you use comcast --device=whateverbridge --latency=250 --target-bw=1000000 --packet-loss=10%

wild stone
fervent zodiac
#

so you are losing about 20 megabits not bad

wild stone
#

looking at how id set that up atm

upbeat smelt
#

lol comcast

fervent zodiac
fervent zodiac
abstract coral
upbeat smelt
wild stone
#

i wonder if its less omegakanker to get thor booting without eir rather then relocating thor or eir to a different virtual address, since thor want to be loaded where limine would load eir halfmemeright

nocturne tide
#

you can ask limine to load eir at a different address btw

wild stone
nocturne tide
#

no but you can relocate it above the kernel

vestal sapphire
#

I managed to get phone tethering over USB working on managarm

carmine current
#

very nice

native prairie
#

very nice

shrewd grove
#

very nice

nocturne tide
#

very nice

odd schooner
#

very nice

wild stone
#

very nice

dusk crystal
#

very nice

median wharf
#

very nice

dense umbra
#

very nice

forest bear
#

nery vice

wary wing
#

vicy nere

vagrant thunder
#

very nice

civic vortex
#

very nice

short gazelle
#

very nice

lament grove
#

very nice

abstract coral
#

very nice

indigo urchin
#

very nice

graceful temple
#

nery vice

shy minnow
#

yere nivc

woven escarp
#

very nice

silent oak
#

very nice

mossy swallow
#

vairie naïsse

wary wing
#

ベリーナイス

trim eagle
#

Managarm now shows a notification if a network interface gets an address. May not look like much considering it’s just a window, but it’s a complex operation with multiple moving parts (just like it is on Linux). Of course, this goes over netlink, so we need to broadcast that a new address has been assigned to an interface. On Linux, NetworkManager listens for this and does things with it, here it’s netlink-notify which just notices it and sends away a call with libnotify to the notification-daemon over dbus. We chose for lxqt-notificationd, as we were having some issues with notification-daemon (gnome and kde ship their own in the shell). The daemon then uses Qt6 (in debug mode, so it’s quite slow atm) to display the notification. This process goes over the dbus session bus, not the system wide one, so some dbus memes were needed to not hard rely on elogind. All in all a fruitful endeavor as this work can also be used with mail clients notifying you of new mail for example

fervent zodiac
#

does the notification itself go over netlink?

#

as in the text?

#

or i guess dbus?

trim eagle
#

pretty sure that's all handled over dbus

fervent zodiac
#

i see i see

trim eagle
#

new irc client just dropped (this is konversation)

wary wing
#

yooo

trim eagle
#

when paired with the notification daemon work, I can get notified of incoming messages

#

happy with that

lament grove
#

Have you ever compiled Managarm on a machine running Managarm?

wild stone
#

self hosting does not work on managarm

#

yet meme

lament grove
lament grove
#

BTW: I notice it's always root@, have users not been implemented or is it just configured this way by default?

wild stone
trim eagle
#

You can’t (unless you write a program yourself and call setuid). I can (shadow is marked as broken and hacky, but I can do it). If configured correctly (and by that I mean workarounds) it’ll auto login as managarm, but only in kmscon

#

Permission checking is very limited, but I’m 75% sure we check (e)uid and friends on calls to setuid meme

fervent zodiac
#

the managarm way

#

write the most half-assed internals possible

#

but we have ports

#

where we just carbon copy linux

trim eagle
#

Surprisingly, it works decently

#

That said, there’s a pretty decent base to work on

fervent zodiac
#

did yall go through with the strace """port"""

trim eagle
#

Nah. But we’ll get one eventually. Needs ptrace tho

vestal sapphire
#

porting strace itself it probably ez (if you disregard autotools pain for a sec)

#

ptrace(2) is pain tho