19:09 lovesegfault: karolherbst, imirkin: I got multiple monitors working!
19:09 lovesegfault: The only remaining issue I have is that on battery nouveau seems to go insane a little bit
19:34 karolherbst: lovesegfault: might be the runpm issue.. tlp or laptop-mode-tools or whatever might disable runpm when on AC.. but we have some workaround to fix that on the kernel side
19:35 lovesegfault: Yeah, I have TLP but I blacklisted my GPU so it shouldn't touch it
19:35 imirkin_: what about the hda adapter
19:35 lovesegfault: The bugs I get are weird, it will work for a little bit, so much so that I can log in and open a terminal, and then it stops working
19:35 lovesegfault: I can't open any new windows, etc
19:35 imirkin_: which is a child of the gpu adapter
19:35 lovesegfault: I traced it back to nouveau by disabling it and everything worked
19:36 lovesegfault: and also alacritty wouldn't launch, but terminator would
19:36 karolherbst: lovesegfault: sounds like kernel memory corruption I encounter as well when runpm messes up
19:36 lovesegfault: which makes sense since the former uses openGL etc
19:36 karolherbst: lovesegfault: check if booting with nouveau.runpm=0 fixes it as well
19:36 lovesegfault: karolherbst: Will that make it hog power?
19:36 karolherbst: well.. it's just to verify it's the bug
19:36 lovesegfault: Got it, will do
19:37 karolherbst: this patch would fix it if that's the same bug: https://github.com/karolherbst/linux/commit/1e6cef9e6c4d17f6d893dae3cd7d442d8574b4b5
19:37 karolherbst: imirkin_: ohh btw, I've sent out an updated patch for the runpm thing
19:38 lovesegfault: Alright, let's see
19:38 imirkin_: karolherbst: i saw
19:38 lovesegfault: Oh, also, karolherbst: are you ok with me adding your patches to NixOS's kernel?
19:38 imirkin_: hopefully that should be ok? :)
19:38 imirkin_: that way it doesn't fix it for blob
19:38 imirkin_: heh
19:38 karolherbst: lovesegfault: I might be, others might not (others as in kernel pci upstream devs)
19:39 karolherbst: downstream patches are always soo annoying
19:39 lovesegfault: They are, but better to have them than not!
19:39 karolherbst: lovesegfault: nixos doesn't have binary drivers, right?
19:40 lovesegfault: you mean proprietary?
19:40 imirkin_: not-source-based
19:40 karolherbst: ohh wait.. it's nixos not cubeos
19:40 karolherbst: *qubesos
19:40 lovesegfault: NixOS has binary blobs
19:40 imirkin_: which run on cpu?
19:41 karolherbst: okay, but they still get compiled on the target machine through akmods, dkms, whatever, right?
19:41 lovesegfault: Yes
19:41 karolherbst: the problem is, that my patch changes the pci struct and this _could_ cause issues with binary drivers if they are stupid
19:41 lovesegfault: :O
19:42 karolherbst: well.. nobody sane would use the structs directly.. but who knows
19:42 lovesegfault: I'm going to test the runpm disable thing
19:42 lovesegfault: I don't have a bouncer, so brb
19:45 lovesegfault: karolherbst: Yep, that solved it
19:45 lovesegfault: and with the power usage to match
19:45 lovesegfault: 28W
19:46 lovesegfault: https://gist.github.com/55c53769bd004d9513c8f59f9ed4bd6c
19:46 lovesegfault: dmesg log
19:46 karolherbst: ohh, wait. now I know what's happening
19:46 lovesegfault: Should I apply the patch you mentioned?
19:46 karolherbst: lovesegfault: TLP disables runpm on the audio device
19:46 karolherbst: which is _super_ stupid
19:46 lovesegfault:checks
19:46 lovesegfault: Wait
19:47 lovesegfault: how can I check
19:47 karolherbst: SOUND_POWER_SAVE_ON
19:47 lovesegfault: defaults.conf L0031: SOUND_POWER_SAVE_ON_AC="0"
19:47 lovesegfault: defaults.conf L0032: SOUND_POWER_SAVE_ON_BAT="1"
19:47 lovesegfault: defaults.conf L0033: SOUND_POWER_SAVE_CONTROLLER="Y"
19:47 karolherbst: yeah
19:47 karolherbst: the AC one should be 1 as well
19:47 karolherbst: always
19:48 lovesegfault: Alright, one moment
19:48 karolherbst: should be the packaging default
19:48 karolherbst: otherwise the GPU stays
19:48 lovesegfault: Do you want me to make a issue/pr to TLP?
19:48 karolherbst: yeah... although TLP is kind of obsolete these days as everything should be moved into the kenrel
19:48 karolherbst: *kernel
19:48 karolherbst: but yeah
19:49 karolherbst: I mean.. if people argue and think wasting ~8W is fine.. then whatever
19:49 lovesegfault: Should I still apply the patch you mentioned?
19:49 karolherbst: I stopped argue with bad people :p
19:49 karolherbst: *arguing
19:49 lovesegfault: That's a... very wise decision!
19:49 karolherbst: lovesegfault: mhhh, difficult question
19:49 lovesegfault: Let me test again with runpm enabled to see what happens
19:50 lovesegfault: brb
19:50 lovesegfault: .quit
19:55 lovesegfault: karolherbst: yep, I can repro the bug
19:55 lovesegfault: https://gist.github.com/a1a99eedd08d59d5d50d5706f4a12692
19:55 lovesegfault: check it out
19:55 lovesegfault: switcheroo looks good though
19:55 lovesegfault: 0:IGD:+:Pwr:0000:00:02.0
19:55 lovesegfault: 1:DIS-Audio: :DynOff:0000:01:00.1
19:55 lovesegfault: 2:DIS: :DynOff:0000:01:00.0
19:55 karolherbst: soo.. if you want to have fun, execute "lspci" :p
19:55 lovesegfault: oh god
19:55 lovesegfault: here I go
19:56 lovesegfault: it's stuck
19:56 lovesegfault: I can't even ctrl-c it
19:56 lovesegfault: I can't even kill -9 it
19:56 lovesegfault: zomg
19:56 lovesegfault: it's invincible
19:57 lovesegfault: alright karolherbst I'll try that patch now
19:57 lovesegfault: omg I can't even ctrl-z it lol
19:57 karolherbst: yeah.. so hit the bug on AC now as well :p
19:58 lovesegfault: I'm on bat
19:58 lovesegfault: not ac
19:58 karolherbst: ohh, oh well
19:58 karolherbst: if you set SOUND_POWER_SAVE_ON_AC to 1 you should experience the same issue on AC as well now
19:58 lovesegfault: I see
19:59 imirkin_: yay!
20:02 lovesegfault: karolherbst: that patch failed to apply :(
20:02 karolherbst: ehh
20:02 karolherbst: 5.5?
20:02 lovesegfault: 5.5.7 but I think it's because I already had some other patches applied
20:03 karolherbst: mhh, my tree is based ond 5.5.
20:03 karolherbst: 6
20:03 lovesegfault: Here, help me out because I can't open a browser lol: https://github.com/lovesegfault/nix-config
20:03 lovesegfault: then go system -> pkgs -> linux-5.5-fixes.nix
20:03 lovesegfault: there you can see the patches I'm applying
20:04 karolherbst: ehh
20:04 lovesegfault: to see the order I apply look at system -> hardware -> thinkpad-p1.nix L17-21
20:04 karolherbst: you can remove the nouveau-pci-fix one
20:04 lovesegfault: Got it
20:05 karolherbst: but with either patch the issue should have been gone. or were you running a different kernel?
20:06 lovesegfault: Nope, I'm running 5.5.7 with those two first patches
20:06 lovesegfault: (nouveau-gr-fix, nouveau-pci-fix)
20:06 lovesegfault: rebuilding the kernel
20:07 lovesegfault: brb, lunch time
21:04 lovesegfault: back
21:04 lovesegfault: karolherbst: about to test the new patch
21:12 lovesegfault: karolherbst: no luck :(
21:12 lovesegfault: karolherbst: https://gist.github.com/b8d5b6c85cf23cac3a1ab8fb818cbec4
21:12 lovesegfault: same type of failure
21:13 karolherbst: ohh wait...
21:13 karolherbst: that's a totally different bug
21:13 karolherbst: ufff
21:13 lovesegfault: :'(
21:13 karolherbst: it's alread fixed nouveau master though
21:13 lovesegfault: Oh :)
21:13 karolherbst: _but_ I only encountered that with gdb or crazy stuff
21:14 lovesegfault: It happens to be with no extra steps
21:14 lovesegfault: just boot->kaboom
21:14 karolherbst: lovesegfault: what's that pool-gnome-shell thing?
21:14 lovesegfault:looks
21:15 lovesegfault: Oh, it's some split line? pool-gnome-shell is probably from gdm which I use as my display-manager to enter sway (as my wm)
21:15 lovesegfault: the tainted is because I load acpi_call, which is out-of-tree
21:15 karolherbst: no, I doubt it's from gdm
21:15 karolherbst: gnome-shell yes
21:15 karolherbst: but what's the pool thing?
21:15 lovesegfault: I don't know then O.o
21:17 lovesegfault: I'll try and grep nixpkgs
21:17 lovesegfault: nada
21:18 karolherbst: lovesegfault: soo.. the issue is something like the process doesn't use the GPU all the time so the GPU can be suspended, then the process tries to quit and things go wrong
21:19 lovesegfault: Do you want me to try disabling gdm entirely, launching `sway` from the tty, and seeing what happens?
21:20 karolherbst: I am more curious on why that actually happens
21:20 karolherbst: I mean, this pool-gnome-shell application seems to terminate
21:21 lovesegfault: Oh!
21:21 lovesegfault: I think I have something
21:24 lovesegfault: karolherbst: https://gist.github.com/5329b4615979bb40bac0a72100c45dfe
21:24 lovesegfault: journalctl logs
21:25 lovesegfault: not sure if there is anything valuable there
21:26 karolherbst: huh?!?
21:27 karolherbst: why is gnome stopping
21:28 lovesegfault: Because I entered sway, I think
21:28 karolherbst: that might be
21:28 lovesegfault: I can enter gnome proper and see as well
21:28 karolherbst: ahh.. and because you were on the tty for over 5 seconds, the GPU got suspended
21:28 karolherbst: but
21:29 karolherbst: mhhh
21:29 karolherbst: it still doesn't make much sense
21:29 karolherbst: so there are two possibilieties
21:29 karolherbst: 1. this issue is hit by tons of users but we just didn't know
21:29 karolherbst: 2. nobody hits it and this is a weird corner case we have no idea where the issue is
21:30 karolherbst: lovesegfault: this is with displays connected to your laptop driven by the nvidia GPU, right?
21:30 lovesegfault: Nope
21:30 karolherbst: ufff
21:30 lovesegfault: laptop is solo, no power, no hdmi, no cables connected
21:30 karolherbst: so there is not even a reason gnome-shell should use the GPU
21:31 lovesegfault: it's running on wayland
21:31 karolherbst: but
21:31 lovesegfault: I thought that meant it needed a gl ctx
21:31 karolherbst: I guess the GPU reports outputs, so gnome probably listens to hotplug events or so
21:31 lovesegfault:nods
21:31 karolherbst: lovesegfault: sure, but it uses the intel GPU for that
21:32 lovesegfault: So, if I do connect a monitor on HDMI GDM just shows a weirdo black or white screen on it
21:32 lovesegfault: but when I enter sway it works
21:32 karolherbst: heh
21:32 lovesegfault: (assuming I have sound power save disabled)
21:32 lovesegfault: (which prevents the gpu from sleeping and borking everything)
21:33 karolherbst: I might want to reproduce the same issue on my machine
21:34 karolherbst: this is super weird
21:34 lovesegfault: could I work around it by increasing the tty time needed before the GPU shuts down?
21:34 karolherbst: I mean.. we are aware of the issue, we just thought nobody hits it
21:35 karolherbst: lovesegfault: probably
21:35 karolherbst: if you make it 30 seconds or a minute it should be safe
21:35 karolherbst: or just disable gdm entirely :p
21:35 lovesegfault: GDM unlocks my gnome-keyring for me :P
21:35 lovesegfault: how can I change that delay to 1min?
21:35 karolherbst: you don't need gdm for that
21:35 lovesegfault: I don't?
21:36 karolherbst: no
21:36 lovesegfault: O.o
21:36 imirkin_: some kind of agent just has to be running, presumably
21:36 karolherbst: you can do it through pam
21:36 imirkin_: like ssh-agent, but different
21:36 lovesegfault: Hmm, alright, I'll try that then
21:36 lovesegfault: One second
21:37 karolherbst: lovesegfault: https://wiki.archlinux.org/index.php/GNOME/Keyring#PAM_method
21:37 lovesegfault: I can't open a browser ;-;
21:37 karolherbst: ohh wait
21:37 karolherbst: yeah.. and that was still not for sway
21:37 karolherbst: lovesegfault: what are you using for login though?
21:37 lovesegfault: I think I got it
21:38 karolherbst: tty or a login manager?
21:38 lovesegfault: With the change I just made to my config it's now tty
21:38 lovesegfault: I can use lightdm if that's better?
21:38 lovesegfault: I don't mind using the tty
21:38 karolherbst: shouldn't matter? I don't know if the tty login is wired up to pam
21:38 lovesegfault: oh god
21:38 lovesegfault: why wouldn't it be?
21:39 karolherbst: adding "session optional pam_gnome_keyring.so auto_start" to /etc/pam.d/login should make it work
21:39 karolherbst: add the end or something
21:39 lovesegfault: it's already there
21:40 lovesegfault: alright, let's see what happens nw
21:40 karolherbst: lovesegfault: the keyring has the same pw as your user, right?
21:40 lovesegfault: yep
21:41 karolherbst: "password optional pam_gnome_keyring.so" in /etc/pam.d/passwd might help
21:41 lovesegfault: rebuilt with new config
21:41 lovesegfault: rebooting, brb
21:44 lovesegfault: karolherbst: it all works!
21:45 karolherbst: cool
21:45 lovesegfault: plugging in a monitor to see what happens
21:45 lovesegfault: IT WORKS TOO
21:45 lovesegfault: zomg!
21:46 lovesegfault: testing plugging in power
21:46 lovesegfault: also works
21:49 lovesegfault: karolherbst: do you take donations?
21:52 karolherbst: I would, but I am too lazy for the paper work :/
21:53 lovesegfault: Got it :)
21:53 lovesegfault: well, know that I really appreciate the help and work
21:53 karolherbst: although I probably wouldn't get enough that it actually matters
21:53 karolherbst: and then it doesn't matter anyway
21:53 lovesegfault: and if you're ever in SF (god forbid b/c SF sucks) ping me and I'll get you a coffee, or something
21:53 karolherbst: I'd reconsider if more people would ask :p
21:54 karolherbst: I was in SF once.. no twice actually, because of the airport :p
21:54 lovesegfault: I hate it here
21:54 karolherbst: it reminded me of GTA
21:54 karolherbst: the area I mean
21:55 lovesegfault: Yesh, that is an accurate depiction
21:56 lovesegfault: Brazil is in it's worst economic crisis in the last 50 years right now, and my parents came to visit me in SF, looked around, and said "Wow, this place is really delapidated huh?"
21:58 imirkin_: esp walking around civic center? :)
21:58 imirkin_: although i heard no more cars on market now?
21:58 lovesegfault: Yep, no more cars on market st. is really nice
21:59 lovesegfault: I actually live in Berkeley, which I way prefer, but I work in SF
21:59 imirkin_: ah cool
21:59 imirkin_: i used to live in SF a long while back
21:59 lovesegfault: and this goes to you too imirkin_ if you're around this hellscape please let me know :)
21:59 lovesegfault: I moved here <1y ago
21:59 imirkin_: i lived there before it went completely nuts
22:00 imirkin_: it was only partly nuts back then :)
22:00 imirkin_: iirc my decent-sized 1br apt cost like $1300/mo
22:00 karolherbst: uff
22:01 imirkin_: now it's like $13000/mo :)
22:01 lovesegfault: imirkin_: Are you f'ing kidding me
22:01 andi-:thinks they are totally nuts 🙄
22:01 lovesegfault: I pay $3000 for my studio in berkeley
22:01 lovesegfault:cries
22:01 lovesegfault: andi-: o/
22:02 imirkin_: (ok, not quite, but > $3k for 1br i think is common in sf)
22:02 HdkR: It is
22:02 imirkin_: (and of course now i live in nyc, which isn't exactly free either ... )
22:02 imirkin_: lovesegfault: this was in ~2006 :)
22:02 lovesegfault: We have a tiny "office" in NYC
22:02 lovesegfault: It's actually a lease on a room in a WeWork
22:03 imirkin_: heh. those weworks charge crazy high rates too
22:03 imirkin_: for a private office it's like $1k/mo/seat
22:03 lovesegfault: yikes
22:04 imirkin_: regus is a bit cheaper
22:04 lovesegfault: imirkin_: but then you're missing out on all the good vibes man, how can you code without those?
22:10 imirkin_: i actually find wework pretty distracting
22:11 lovesegfault: Me too
22:12 lovesegfault: It's insufferable to try and get work done there
22:12 imirkin_: regus isn't great either
22:13 imirkin_: but at least it's cheaper