00:49RSpliet: Wait, I just dropped in the middle fo something... nouveau possibly preventing the CPU from entering PC8?
00:50RSpliet: I suddenly jumped up looking round like a manatee... my laptop doesn't even go into pc6
01:00RSpliet: Ah, that's very much nouveau's fault. Dropping the GPU (and audio device) manually into D3 makes my CPU go into pc8 suddenly
01:25karolherbst: RSpliet: yeah, you need to enable runpm on the audio device if something disables it
01:25karolherbst: the CPU doesn't enter deeper pc states if the PCIe bridge controller of the CPU is still active
01:25karolherbst: for me it stops at pc3
01:25RSpliet: karolherbst: neither the GPU nor its HDMI audio subdevice drop into d3hot
01:26karolherbst: then they are in use
01:26RSpliet: the NVIDIA GPU that is
01:26RSpliet: who's using them? I haven't use DRI_PRIME ever
01:26karolherbst: anyway, there is a kernel option for audio runpm
01:26karolherbst: and sometimes userspace breaks that
01:26RSpliet: I just did
01:26karolherbst: like tlp and laptop-mode-tools
01:26karolherbst: on AC they force the audio device to be on by default
01:26RSpliet: sudo setpci -s 01:00.0 CAP_PM+4.b=03
01:26RSpliet: (and 01.00.1)
01:26karolherbst: shouldn't be needed
01:27karolherbst: check the runpm settings of your hdmi alsa driver
01:27RSpliet: let me reboot first ;-)
01:28karolherbst: RSpliet: SOUND_POWER_SAVE_ON and SOUND_POWER_SAVE_CONTROLLER in tlp
01:29karolherbst: /sys/kernel/module/snd_hda_intel/parameters/power_save is the paramter settings btw
01:30RSpliet: after a reboot, powertop tells me runtime PM is enabled for the HDA device and the GM107M itself
01:30karolherbst: I don't think powertop checks it for the driver actually
01:31karolherbst: "enable audio codec power management" is the thing
01:31RSpliet: /sys/kernel/module doesn't exist
01:31karolherbst: module, not kernel
01:32RSpliet: power_save is set to 1 there
01:32karolherbst: I guess you also run a 5.5 kernel?
01:32RSpliet: 5.5.10 Fedora bog-standard
01:33karolherbst: do you know if both devices get runtime suspended?
01:33RSpliet: lcpsi -vv tells me they're both in D0 right now
01:33imirkin: lspci brings them up :)
01:33karolherbst: and /sys/bus/pci/devices/0000\:01\:00.1/power/runtime_status
01:33karolherbst: lspci brings them up :p
01:34karolherbst: both devices?
01:34karolherbst: what does /sys/module/nouveau/parameters/runpm say?
01:35karolherbst: RSpliet: can you check the connectors?
01:35karolherbst: maybe one of them says active
01:35karolherbst: cat /sys/class/drm/card1-*/status
01:36karolherbst: well.. connected rather
01:36RSpliet: There's precisely 0 connectors on card1
01:36imirkin: RSpliet: do you have vgaswitcheroo enabled?
01:37karolherbst: but the audio device is there?
01:37imirkin: RSpliet: does it say that the gpu is in DynOff?
01:37imirkin: karolherbst: yeah, a recent patch auto-enables it
01:37karolherbst: that's unrelated
01:37karolherbst: no audio device on my system
01:37RSpliet: [ 3.424196] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP01.PEGP handle
01:37RSpliet: [ 3.424197] nouveau: detected PR support, will not use DSM
01:38RSpliet: [ 4.482927] vga_switcheroo: enabled
01:38imirkin: RSpliet: cat the debugfs file
01:38imirkin: /sys/kernel/debug/vgaswitcheroo/state or something
01:38RSpliet: 1:DIS: :DynPwr:0000:01:00.0
01:38RSpliet: 2:DIS-Audio: :DynPwr:0000:01:00.1
01:38karolherbst: but I guess some systems are missconfigured
01:38imirkin: RSpliet: you want DynOff there
01:38karolherbst: and report the audio device even if there is no point in doing so
01:39karolherbst: well, yeah
01:39imirkin: so for some reason the power is on the gpu
01:39karolherbst: so either something polls here or something is just weird
01:39imirkin: RSpliet: just to be sure ... cat /sys/kernel/debug/dri/1/clients ?
01:39RSpliet: imirkin: oh you'll love this
01:39RSpliet: systemd-logind 1157 1 y y 0 0
01:40imirkin: actually that's expected.
01:40imirkin: that's basically X
01:40RSpliet: (which is basically X)
01:40imirkin: it's X without the useful features :)
01:41RSpliet: thought I'd shout it anyway, in case one of those features is turning off my GPU :-P
01:41imirkin: can you just pastebin your whole dmesg? perhaps there's something funky in there
01:41RSpliet: imirkin: any good way of making my switcheroo state say DynOff instead of DynPwr (does DynPwr mean "it's dynamic, and it's powered")?
01:41imirkin: it's dynamically determined
01:42imirkin: based on runpm autosuspend and whatnot
01:42karolherbst: I bet something uses the audio device though
01:42imirkin: i don't know why it wouldn't auto-suspend
01:42imirkin: hm - maybe?
01:43imirkin: unless something's playing, i think it'll still power off
01:43karolherbst: lsof /dev/snd/*
01:43karolherbst: yeah.. pulse usually doesn't prevent stuff here
01:43imirkin: oh interesting
01:43imirkin: i wonder if this is some exceptional case
01:43imirkin: [ 13.809552] snd_hda_intel 0000:01:00.1: no codecs found!
01:44karolherbst: good catch
01:44RSpliet: is the lsof still useful?
01:44imirkin: i think that's supposed to say something else
01:44karolherbst: RSpliet: maybe
01:44karolherbst: I have an idea
01:45karolherbst: ehh.. how did the unbind stuff work
01:45imirkin: echo unbind > 0000:01:00.1
01:45imirkin: er, other way around
01:45imirkin: echo 0000:01:00.1 > /sys/.../snd_hda_intel/devices/unbind
01:45imirkin: or something
01:46karolherbst: /sys/bus/pci/devices/0000:01:00.0/driver/unbind ;)
01:46karolherbst: those shortcuts are nice
01:46imirkin: .1 obviously
01:46karolherbst: I don't have that .1 device... so yeah
01:46karolherbst: unbinding the device let's pci core do the runpm stuff instead
01:46karolherbst: and that usually works
01:46karolherbst: even though it's different
01:47karolherbst: RSpliet: okay so nothing even uses the hdmi device
01:47karolherbst: and I guess it's not advertised due to the message imirkin pointed out
01:48karolherbst: pulse just grabs every sound device
01:48karolherbst: so I have it use all of my 3 sound cards :)
01:48imirkin: yeah, but if it's not playing anything, it shouldn't prevent suspend. i think.
01:48karolherbst: it's totoally fine
01:48imirkin: i.e. having the control node open isn't enough to prevent runpm
01:48karolherbst: my audio device is also runtime suspended
01:48karolherbst: well the pci one at least
01:49karolherbst: even my usb-c dock has an audio device.. but with the usb-c dock plugged in, the TB3 controller goes up and spawns an USB controller
01:49karolherbst: so pc3 it is
01:49RSpliet: Anyway, so for now we know that my GPU has an audio device with no associated codec. Which is none of my concern, because it has 0 connectors and is thus essentially dead weight.
01:50karolherbst: RSpliet: did unbinding the device help?
01:50imirkin: the theory is that this lack of codec might prevent runpm
01:50imirkin: due to, ostensibly, a bug in alsa
01:50imirkin: it's a wild theory
01:50imirkin: but easily testable
01:50karolherbst: if a driver is bound to a device, pci core runpm doesn't do shit
01:50karolherbst: and calls into the driver
01:50imirkin: missing codec is probably not a super-common case
01:50RSpliet: I didn't do that on account of you pointing me to the *driver* folder, and I wanted to double-check that this doesn't *also* unbind the real audio device
01:50karolherbst: if the driver doesn't install callback.... then yes, nothing happens
01:50imirkin: RSpliet: they're both real :)
01:51karolherbst: RSpliet: it does only unbind the device you echo into it
01:51imirkin: just one of them doesn't do much
01:51imirkin: make sure you echo the right pci id
01:51imirkin: echo 0000:01:00.1 > /sys/bus/pci/devices/0000:01:00.1/driver/unbind
01:52karolherbst: could be better, but could also be worse :)
01:52RSpliet: now vgaswitcheroo shouts dynoff
01:52karolherbst: yeah, so it's an alsa bug
01:52imirkin: and you should be getting some of your battery back
01:53RSpliet: ny fan instantly switched off. It's a huge fan of this one-liner
01:53karolherbst: RSpliet: mind reporting it to the intel-hda devs? Would be cool to get rid of this :)
01:53RSpliet: I wouldn't mind, but I think I might wait'til april 1... 2nd
01:54RSpliet: Should be sleeping already tbh, have a dissertation due in 6 days and it's not quite finished just yet
01:54karolherbst: btw.. why is the sd card reader not suspended :/
01:54karolherbst: stilly driver
01:54imirkin: RSpliet: pffft. plenty of time!
01:54RSpliet: Thanks for all the help pinpointing the problem
01:55RSpliet: imirkin: it's only 240 pages, I'm sure I'll be able to spot every flaw in that haystack of words
01:55imirkin: if you have trouble falling asleep, you know what to do...
01:57RSpliet: It helps that public life is currently non-existent in Europe. There's not much else to do but be a hermit and write
01:58imirkin: coz otherwise you'd be out hitting the clubs, i'm sure
01:59RSpliet: I prefer clubbing GPUs
01:59imirkin: they don't jump around as much as seals
02:00karolherbst: RSpliet: cooking
02:01karolherbst: imirkin: btw, take care of yourself with such a useless and stupid government...
02:03karolherbst: and stay home :D
02:04RSpliet: Ehh, YEAH! Stupid, useless... government
02:04RSpliet:hides Boris Johnson
02:04karolherbst: at least he saw his mistakes
02:04karolherbst: the U-turn happening in the UK is kind of impressive to be honest
02:04RSpliet: Part facade
02:04RSpliet: NHS is overstrained already
02:05karolherbst: but still
02:06RSpliet: Anyway. que sera sera
02:06karolherbst: I am in a good position to just watch it happening, so you stay safe and I keep my distance :p
14:29imirkin: who was asking in here about HDMI audio without video? did they stick around?
14:29imirkin: anyways, it appears that none of intel, amd, or nouveau support this
14:30imirkin: i'd be a little curious what the blob does in this case ... send bs video data? dunno.
14:30karolherbst: imirkin: is it the display not supporting it or the driver for real?
14:31imirkin: well, HDMI doesn't support this directly
14:31imirkin: so hoops have to be jumped through
14:31karolherbst: ahh, I see
14:31imirkin: and none of the drivers jump through such hoops
14:31karolherbst: yeah, would be interesting to know what's up there
14:32imirkin: the hoops are both on a hw level (i.e. what to tell the hw)
14:32imirkin: as well as on a driver architecture level (how does this integrate with atomic modesetting, for example)
14:33karolherbst: I know there are HDMI audio splitter and I know some work without having a display connected.
14:33karolherbst: dunno what they do internally though
14:33imirkin: it would require driver support
14:33karolherbst: not if they advertise a fake display
14:34karolherbst: which is always connected
14:34imirkin: i think an EDID must be provided
14:34karolherbst: good point
14:34imirkin: not 100% sure where the ELD data comes from
14:35karolherbst: well, those splitters have to modify the edid anyway
17:48karolherbst: imirkin: btw, it seems like big endian support was dropped with Volta. At least the boot1 mmio reg doesn't show anything in regards to big endian. No idea how much time you still spend on doing stuff for big endian
18:17imirkin: my g5's power supply died
18:18imirkin: also it never had pcie to begin with
18:20karolherbst: ahh, I see
18:20karolherbst: doesn't matter then
18:20karolherbst: I guess we should just bail in nouveau then on newer GPUs
18:20karolherbst: no point in supporting that anyway I guess
18:20imirkin: (some g5's have pcie, just not mine)
18:20karolherbst: I mean, on newer syetems
18:20imirkin: i think tesla+ was already dubiously working on be
18:21imirkin: certainly any features like images/ssbo/etc were totally busted
18:21imirkin: it's not entirely clear how that was supposed to work in the first place
18:22imirkin: (mixed-endian, that is)
18:22karolherbst: yeah.. dunno either
18:22RSpliet: Meanwhile, somewhere in the world https://torrentfreak.com/amd-uses-dmca-to-mitigate-massive-gpu-source-code-leak-200325/
18:27karolherbst: oh well
18:29karolherbst: that happens if people don't know how to do home office
18:52HdkR: How do I transfer the source to my home, I know, I'll upload it to my personal github account, pull it and delete the repo </s>
18:52imirkin: is there really any other way?
18:53HdkR: rsync works pretty well
18:53HdkR: ah :)
18:53imirkin: you must not think much of me :p
18:54HdkR: Sometimes the sarcasm gets lost even with such an easy response :D