12:44alterjsive: https://www.kernel.org/doc/html/v4.15/gpu/vga-switcheroo.html is this still a thing?
12:45alterjsive: I'm trying to find a way to turn off my RTX 2060 Max q, to use less power, keep the laptop cool
13:02karolherbst: alterjsive: depends on the kernel you are using
13:03karolherbst: but that should just work by default already
13:03karolherbst: and there is nothing you have to do
13:05alterjsive: karolherbst: I'm on 22.214.171.124
13:05karolherbst: that should be new enough
13:05karolherbst: you should be able to check with "sensors" if the GPU is powered on or off, as the GPU sensors won't report anything
13:05karolherbst: but if it's still enabled something else could be messed up
13:06alterjsive: karolherbst I couldn't find sys/kernel/debug/vgaswitcheroo/switch
13:06karolherbst: alterjsive: mind pastebining the output of "grep . /sys/bus/pci/devices/*/power/control /sys/bus/pci/devices/*/power/runtime_status"
13:07alterjsive: on my Suse tumbleweed system
13:07karolherbst: is nouveau blacklisted?
13:07alterjsive: no it's running
13:07alterjsive: 1 sec I'm on my tablet
13:14alterjsive: sorry could you repeat the question?
13:14karolherbst: I need the output of a few commands
13:14karolherbst: 1. "grep . /sys/bus/pci/devices/*/power/control /sys/bus/pci/devices/*/power/runtime_status"
13:14karolherbst: 2. dmesg
13:18alterjsive: karolherbst: https://pastebin.pl/view/9c8d7d63
13:19karolherbst: yeah.. looks like something went wrong :) dmesg might help
13:22alterjsive: I've got a nvidia RTX 2060 maxq
13:22karolherbst: is that AMD + Nvidia?
13:23karolherbst: but yeah.. I already see the issue mhhh
13:24karolherbst: soo. the issue is that something wants to use the nvidia GPU, but we fail to load the firmware
13:24karolherbst: but the code is a bit annoying so powering downt he GPU also breaks due to that
13:25karolherbst: ignore that
13:25alterjsive: I also tried this acpi_power down script
13:25karolherbst: yeah, don't
13:25karolherbst: you have to literally don't do anything
13:25karolherbst: it's just a nouveau bug you are hitting
13:26alterjsive: I removed the nvidia driver, because it also doesn't work
13:26alterjsive: AMD + NVIDIA is hell :(
13:26karolherbst: for nvidia you have to setup a few files to enable it automatically (and enable module options)
13:26karolherbst: but yeah..
13:26karolherbst: prime offloading with nvidia is quite borked
13:27alterjsive: can't I do an ascpi call to power down the nvidia card?
13:27karolherbst: alterjsive: you probably can, but that will break the kernel as long as nouveau is loaded as things might try to use it
13:27karolherbst: you can blacklist nouveau though and do the acpi call then
13:28alterjsive: I see
13:28alterjsive: I can blacklist it again
13:28karolherbst: yeah.. I just don't know how well that works on your machine
13:28karolherbst: the ACPI stuff looks... different
13:28alterjsive: yeah ACPI is not working well on my machine
13:29alterjsive: my Asus G14
13:29karolherbst: anyway, it's a kernel bug and I could give you a patch to try out
13:30alterjsive: I'm on Tumbleweed
13:31karolherbst: a quick hack would be to return -EAGAIN; instead of ret; https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/nouveau/nouveau_drm.c?h=v5.8.8#n992
13:31alterjsive: I've got linux next
13:32karolherbst: no, I mean, you really need a custom build to try it out
13:32karolherbst: you could try with linux-next or the latest rc one and see if the issue goes away
13:32karolherbst: skeggsb might have fixed it already
13:33karolherbst: ohh wait.. any error from resume is fatal
13:33karolherbst: nvm building the kernel then
13:33alterjsive: I don't know how to apply the patch
13:33karolherbst: alterjsive: I think it would be best to try out a newer kernel, 5.9 something and see if the issue goes away or not
13:34alterjsive: ok brb reboot
13:38alterjsive: my system just freezed because of : nvme nvme0: 8/0/0 default/read/poll queues
13:38alterjsive: but yeah off topic
13:39alterjsive: I think it's still the same problem
13:40alterjsive: karolherbst: do you have a tutorial on how to patch the kernel?
13:41alterjsive: karolherbst: I'm on 5.9.0-rc4-next-20200908-1.g3e6b7fe-vanilla
13:42karolherbst: alterjsive: do you still see those nouveau errors in dmesg?
13:43alterjsive: do you have a favorite pastebin?
13:45alterjsive: karolherbst: https://pastebin.ubuntu.com/p/qpDjNqNwYg/
13:45alterjsive: still allot of errors
13:46alterjsive: pff I have to report allot of bugs actually... I just never get to it :/
13:46karolherbst: I am wondering if booting with "nouveau.noaccel=1" would do anything... oh well
13:46karolherbst: alterjsive: right.. but I am midly aware of one of the bugs you are hitting
13:46karolherbst: you just hit two bugs
13:47karolherbst: fixing either would resolve at least the issue that nouveau prevents the GPU from getting suspended
13:47alterjsive: I could try it if you want, no problem
13:47karolherbst: yeah.. might be a quick fix if you don't plan on using the GPU
13:48alterjsive: ok brb
13:48karolherbst: but I am not sure how well the GPU suspending stuff works on an AMD + Nvidia system tbh :/
13:54alterjsive: karolherbst: no lock
13:54karolherbst: mhh.. annoying :
13:54karolherbst: sadly the laptop with a turing gpu I have here just works
13:55karolherbst: 20xx and 16xx series
13:55alterjsive: ah k
13:56karolherbst: I guess the fastest solution for you is probably to try getting it to work with the nvidia driver. And fixing the bug you hit without a machine to reproduce is quite difficult
13:56alterjsive: karolherbst: where do you live ? =)
13:57karolherbst: czech republic atm
13:57alterjsive: karolherbst: too bad about the corona, else I would have come by, beautiful country :)
13:58karolherbst: I will try to figure out if I can get the asus machine somehow through work and get skeggsb to hack on it
13:58karolherbst: skeggsb knows more about the firmware stuff anyway
13:58alterjsive: my laptop is a bug generator
13:59karolherbst: yeah.. well
13:59karolherbst: AMD+Nvidia hybrigs are qite new
13:59karolherbst: and even AMD only laptops are newish or different enough from the 10 years old ones :p
13:59karolherbst: so I suspect a couple of issues on them
14:00alterjsive: the nvidia driver doesn't work ether
14:01karolherbst: well.. does it break or just doens't work?
14:01alterjsive: it breaks
14:01karolherbst: like system freezing?
14:01alterjsive: well it says card unclaimed
14:01alterjsive: after some errors in dmesg
14:01karolherbst: yeah, no idea about that error
14:02alterjsive: no I mean with lshww
14:02karolherbst: there is some docimentation on prime with nvidia: https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/primerenderoffload.html
14:02karolherbst: and runtime suspend/resume: https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/dynamicpowermanagement.html
14:02karolherbst: if you have some spare time you could try to make it work
14:03karolherbst: I know it works in theory, that stuff is just broken on the laptop I've got here :)
14:03alterjsive: yeah I know about that first one, but I figured that if the driver isn't loaded you can't use the driver to configure the laptop
14:03karolherbst: but nvidia fails to reproduce the bug
14:04alterjsive: let's see if I can call asus about this, I doubt they will be much help tough.
14:05karolherbst: yeah.. doubtful
14:06karolherbst: I think getting in touch with nvidia is probably the best idea to get the nvidia issue resolved
14:06karolherbst: they more or less care about that
14:06karolherbst: but it could also be some packaging issue on your end
14:06karolherbst: maybe some nvidia IRC channel or their community board could help? dunno
14:07karolherbst: anyway, will try to check with skeggsb if he has any systems failing in a similiar way or if we have some laptops internally also having this issue
14:10karolherbst: alterjsive: actually.. seems like I found bug on a system I could get a sample for with the same issue
14:10karolherbst: at least, the same error
14:13alterjsive: karolherbst: if you need more info please let me know :)
14:13karolherbst: will do, thanks!