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