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