12:38Alexander_S: Hi, guys. Lately, I've been experiencing screen tearings on a proprietary driver wich I couldn't fix (every solution on the net was either not working or crashing my system).. so I've diceded to try out nouveau drivers. OK, screen tearings are gone, but now it seams I can't make my Nvidia GPU to work (I have a laptop with optimus). xrandr
12:38Alexander_S: --listproviders shows only 1 card: Provider 0: id: 0x44 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:modesetting I have both xserver-xorg-video-intel and xserver-xorg-video-nouveau installed.. what else do I need (and how to check if I have it)?
12:38Alexander_S: Oh.. I'm running Ubuntu 18.04 here.
12:45Alexander_S: Oh.. and I've also read https://nouveau.freedesktop.org/wiki/Optimus/ where it says that I need: An updated graphic stack (Kernel, xserver and mesa). KMS drivers for both GPUs loaded. DDX drivers for both GPUs loaded. But I don't completely understand what it means :( How do I check wich of those do I have and wich I don't?
14:04gunix: on Lenovo X1 extreme, sway is starting with llvmpipe. can anybody help me with troubleshooting this?
16:13imirkin: gunix: pastebin dmesg and sway startup log
16:13imirkin: Alexander_S: pastebin dmesg and xorg log to help understand what's going on
16:29karolherbst: imirkin, gunix: it's a turing gpu
16:29karolherbst: so no OpenGL yet
16:30karolherbst: I think... maybe not? I am confused actually
16:30karolherbst: no, it has a 1650 probably, so yeah
16:30karolherbst: gunix: in case it's not a turing one, dmesg and the log are useful still
16:39imirkin: karolherbst: presumably should still have the intel gpu, no?
16:39karolherbst: not when in discrete mode
16:40imirkin: ah ok
16:40karolherbst: something a lot of users used to do due to the runpm bug as well
16:40karolherbst: let's them keep their external displays working
16:40karolherbst: but yeah
16:41karolherbst: Alexander_S: also.. you mind want to update your ubuntu installation to 20.04.. since back then a lot of stuff went in to make make a lot of things more automatic
16:42karolherbst: like display offloading
16:42karolherbst: so updating could just fix the problem and if not, you still updated what you need to do sooner or later anyway
16:45karolherbst: also 20.04 is based on kernel 5.4 which got the runpm fix
16:58gunix: imirkin: karolherbst: i need to restart everything to get a clean sway log so i will post later
16:59karolherbst: gunix: but are you on dsicrete mode with a turing?
16:59karolherbst: because if so, there is no point in digging into it
17:00gunix: karolherbst: atm i am on hybrid graphics (form BIOS) and running sway
17:00karolherbst: ahh okay
17:00karolherbst: yeah.. then something is broken
17:00gunix: karolherbst: ok so tell me what should paste
17:01gunix: i will restart stuff now to get the logs needed
17:01karolherbst: dmesg and the logs of sway should be helpful
17:01karolherbst: gunix: did you had nvidia installed before? wondering if mesa is just not there or something
17:01gunix: ok so i will go for reboot --> sway -d >sway.log 2>&1 --> post dmesg --> post sway.log
17:02gunix: karolherbst: i have the mesa package installed. i did have nvidia before nouveau
17:02imirkin: sway doesn't dump its log somewhere?
17:02karolherbst: gunix: okay.. so probably nvidia is still in the way or something.. but yeah.. let's see the logs first
17:02gunix: karolherbst: http://ix.io/2neG
17:03gunix: ok, rebooting to have clean logs
17:03karolherbst: ahh, arch
17:05karolherbst: mhh, libglvnd is there as well.. mhh
17:05karolherbst: nothing obvious from the package list
17:06gunix: karolherbst: http://ix.io/2neJ http://ix.io/2neK
17:07gunix: karolherbst: these are logs from my "working" setup. stuff "works" unless I plug in an external monitor
17:08emersion: i'm not sure what these eglQueryDmaBufModifiersEXT errors are about. we changed some EGL context stuff recently, maybe that's related
17:08emersion: the "interesting" part is "GL renderer: llvmpipe"
17:09emersion: there's interesting stuff in the dmesg also
17:10emersion: e.g. "Cannot find any crtc or sizes"
17:10karolherbst: gunix: try booting with nouveau.modeset=0 and see if this changes anything
17:10karolherbst: emersion: I am sure sway is dumb here..
17:10emersion: hm, but then sway won't be able to use it?
17:10gunix: karolherbst: i have to add that as kernel param?
17:10karolherbst: bails because it can't setup the offloading stuff
17:10karolherbst: gunix: yeah
17:10karolherbst: emersion: sure.. but we have no GL with nouveau anyway
17:11karolherbst: I am sure sway is doing something dumb
17:11karolherbst: I mean.. on Turing
17:11gunix: linux /vmlinuz-linux root=UUID=f4c1a382-806e-4005-8b33-bbf2d4dae8ed rw cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot loglevel=3 quiet nouveau.modeset=0
17:11gunix: like this, yes?
17:11emersion: well we just create an EGL device with the GBM platform and nouveau's node
17:11emersion: it shouldn't pick llvmpipe
17:12karolherbst: but it does use intel mesa [render/gles2/renderer.c:584] GL renderer: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
17:12emersion: sway supports multi-gpu
17:12emersion: creates one EGL device per DRM node
17:12karolherbst: emersion: right... but uses it for what?
17:12gunix: btw, in case needed: i7-9750H, GeForce GTX 1650 Mobile
17:13karolherbst: but yeah...
17:13karolherbst: I think this might be fine in the end
17:13karolherbst: gunix: anyway, where did you see it using llvmpipe? in applications?
17:13karolherbst: or just from the log?
17:13gunix: karolherbst: just in log
17:13karolherbst: yeah.. then probably there is no issue
17:13gunix: karolherbst: can you tell from sensors if it is overusing GPU or something?
17:13emersion: the only multi-GPU setup supported rigth now is: composite on card0, then export a dmabuf from card0 to card1, then blit to scan-out FB
17:14karolherbst: emersion: okay.. so the broken one :p
17:14karolherbst: not that any compositor is better
17:14emersion: well there aren't many alternatives
17:14karolherbst: gunix: I think there is no issue on your system
17:14gunix: karolherbst: well, not if I do not plug in an external monitor
17:14karolherbst: it uses the intel driver on the intel gpu
17:15karolherbst: gunix: oh
17:15karolherbst: okay, so what happens if you plug in an external monitor?
17:15gunix: karolherbst: if i plug in the external monitor, sway just crashes
17:15emersion: well it doesn't crash
17:15emersion: since there's no segfault
17:15emersion: it seems to exit
17:15gunix: emersion: ok... sway "exits" when i plug in an external monitor
17:16karolherbst: gunix: okay.. so here is the deal, it can only use llvmpipe as there is no OpenGL support with Nouveau yet
17:16emersion: hm, what do you mean by nouveau doesn't support opengl?
17:16emersion: ah, no opengl for this card?
17:16karolherbst: but.. nouveau.modeset=0 will remove all functionality from the GPU, so ... sway won't exit when you plugin an external display, but it won't display anything anyway
17:16imirkin: no opengl on turing
17:16karolherbst: emersion: yeah
17:16karolherbst: no GL with turing yet
17:17imirkin: or volta, not that it matters
17:17emersion: i see, so llvmpipe is perfectly normal
17:17imirkin: not if there's an intel gpu
17:17imirkin: which should be the primary anyways
17:17karolherbst: imirkin: well, it creates two contexts
17:17karolherbst: one with "GL renderer: Mesa Intel(R) UHD Graphics 630 (CFL GT2)"
17:17karolherbst: the other with llvmpipe
17:17karolherbst: the question is.. why does sway exits
17:17karolherbst: bug in sway :p
17:17emersion: gunix: are you sure there's no segfault?
17:18emersion: coredumpctl -r not showing sway?
17:18emersion: yeah, thanks for clearing the llvmpipe issue up
17:19gunix: emersion: i can give you logs from coredump, but please let's go through procedure first
17:20emersion: karolherbst: regarding multi-gpu, i believe the only other alternatives is (1) import and scan-out directly the dmabuf, which wouldn't work in most cases and (2) go through CPU, which is meh
17:20emersion: is there anything else?
17:20gunix: so... 1. i force "exit" by plugging thunerbolt monitor. 2. I run coredumpctl -r | curl -F 'f:1=<-' ix.io
17:20gunix: is that all?
17:20emersion: hm, yeah, sure
17:21emersion: i think coredumps are persistent anyway, so if sway crashes you should already have a bunch of entries in coredumpctl
17:22emersion: gunix: let's continue the discussion in #sway
17:23karolherbst: emersion: well.. you always have a system RAM to VRAM copy.. so the only benefit you could get is by the nv GPU doing the copy instead of the GPU.. but I doubt it matters much
17:23karolherbst: no idea what mutter and others are doing
17:23karolherbst: maybe having GL on both cards is required.. dunno
17:24karolherbst: but doing a CPU copy is better then not being able to use the second display
17:25imirkin: emersion: you could end up with the same situation on e.g. usb displaylink thing -- no GL on secondary display
17:25karolherbst: ahh, good point
17:26karolherbst: where you'd end up creating two GL contexts on the secondary GPU?
17:26emersion: yeah, i know we need to handle the case where the other gpu isn't display-capable
17:26imirkin: rather render-capable
17:26emersion: err, yes
17:26emersion: it's still a TODO
17:27karolherbst: emersion: might make sense to rewrite sway first, then add new features :p
17:27imirkin: emersion: probably easy to add a error log that indicates this condition to the user
17:27karolherbst: otherwise you rewreite everything later
17:27imirkin: so that they know that they're about to enter a world of pain
17:27emersion: > where you'd end up creating two GL contexts on the secondary GPU?
17:27emersion: we only create one context per GPU
17:27emersion: karolherbst: rewrite? why?
17:28karolherbst: emersion: display local rendering
17:28karolherbst: this is a must
17:28karolherbst: and all compositor need to be rewritten
17:28karolherbst: if not.. the others are useless
17:28karolherbst: it's all fine with 4k displays
17:28karolherbst: .. well
17:28emersion: shouldn't require _that_ many changes tbh
17:28karolherbst: a bit
17:28karolherbst: but imagine 2 8k dispalays on the second gpu
17:28emersion: the problem is that clients use… a GPU
17:28emersion: maybe not the right one
17:28karolherbst: emersion: no, no, no, you miss the point
17:29karolherbst: compositing needs to be done on _all_ gpus
17:29karolherbst: not just one
17:29emersion: the compositor gets buffers from clients
17:29karolherbst: and you composite the parts relevant on the display on the gpu it's connected on
17:29emersion: clients may all use card0
17:29karolherbst: and on two GPUs if the window is shown on two displays from different GPUs
17:29emersion: if you want to composite on card1, you need to copy buffers anyway
17:30karolherbst: emersion: clients don't matter here
17:30emersion: clients can only use a single gpu
17:30karolherbst: it's about where the compositor does it's compositing
17:30emersion: they can't submit two dmabufs to the compositor
17:30karolherbst: and it needs to be on the GPU the displays is connected to
17:30emersion: well, if the clients submits a 4k buffer, what's the difference?
17:30karolherbst: and if you have three gpus and 5 displays, you have 3 GL contexts for each GPU
17:31karolherbst: for compositing
17:31karolherbst: emersion: "clients don't matter"
17:31karolherbst: forget the clients
17:31emersion: wait… 3 contexts for each GPU?
17:31karolherbst: it's a compositor issue
17:31karolherbst: emersion: I meant.. on each gpu
17:31karolherbst: one per GPU
17:31karolherbst: and all for compositing
17:31emersion: i mean, why is it that important to composite on the scanout GPU?
17:31karolherbst: because you want to get rid of the copies over the PCIe bus
17:32karolherbst: again, imagine 2 8k monitors
17:32karolherbst: currently... that's not working at all
17:32karolherbst: not enough bandwidth
17:32emersion: that won't get rid of copies, clients will send more amount of memory than the final buffer
17:32karolherbst: second part: context migration
17:32emersion: you can't just say "clients don't matter"
17:32karolherbst: needs to be supported from gtk and qt5
17:33karolherbst: if they get moved to the other GPU, you kill the context and let them create a new one
17:33karolherbst: so they always stay on one GPU
17:33karolherbst: I never said it's easy
17:33emersion: so, speaking of this
17:33karolherbst: just that's something every compositor needs to do
17:33karolherbst: with eGPUs it's get even funnier
17:33emersion: new wayland protocol change will allow cients to know which GPU they should be using https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/8
17:33karolherbst: but what if you move them?
17:34karolherbst: then you need to recreate the context
17:34emersion: well, that's no the compositor's problem anymore, it's mesa's :P
17:34karolherbst: it is
17:34karolherbst: it needs to tell the clients to recreate their context
17:34karolherbst: or do clients know on which gpus their windows are?
17:34emersion: protocol change linked above
17:34karolherbst: anyway.. it's more of a toolkit issue
17:34karolherbst: this one
17:35karolherbst: and you need to do double rendering on two gpus if you want to get rid of all copies
17:35karolherbst: and then you have the problems of shadows seen on two displays...
17:35emersion: well that isn't going to happen
17:35karolherbst: many details
17:35karolherbst: the compositor supporting all that will be the default compositor in the future
17:35karolherbst: and every other will suck
17:36karolherbst: or toolkits not supporting it
17:36emersion:predicts everything will suck
17:36karolherbst: it already sucks :p
17:36karolherbst: especially eGPUs
17:36karolherbst: no compositor supports any of this
17:36karolherbst: so all need to be rewritten anyway
17:38gunix: well it's a company laptop but if you give me stuff to test and the laptop burns, management will enlarge my holes before they buy a new one
17:38karolherbst: gunix: why would it burn?
17:38gunix: karolherbst: is the era over where software bugs can burn your laptop? :-D
17:39karolherbst: I know we never burned a users nvidia GPU
17:39karolherbst: can't speak for other hardwre
17:39emersion: don't worry, we won't need to rewrite everything
17:39karolherbst: or maybe we burned some in the past? dunno
17:39karolherbst: I didn't hear of anything
17:39RSpliet: I never managed
17:39karolherbst: emersion: anyway.. probably easier to write a new compositor doing everything better from the start though
17:40karolherbst: and just reuse the non graphic bits
17:40RSpliet: And I reverse-engineered features that can make GPUs run hot
17:40imirkin: the only ones that burned were the ones mupuf stuck into his oven
17:40emersion: very likely not
17:40imirkin: all in the name of science :)
17:41karolherbst: emersion: well, people working on mutter are convinced they probably need to rewrite the entire graphic stuff if they want to properly support eGPUs and do local rendering instead of everything on the main gpu.. but maybe sway is better designed? dunno
17:41karolherbst: RSpliet: yeah.. well.. if we disable the therm protection bits.. sure
17:43Alexander_S: imirkin, you adked for my dmesg and xorg.log here they are https://pastebin.com/A7X2RDmf https://pastebin.com/XEYpKmRh
17:43imirkin: Alexander_S: i see no mention of nouveau in your dmesg
17:43imirkin: so that means it's not being loaded
17:44imirkin: if you had blob before, i'd guess you have nouveau blacklisted
17:44imirkin: grep -r nouveau /etc/modprobe*
17:46Alexander_S: karolherbst, yes, I thought about updating.. just need to do a couple of things first and I need a definitely working computer for it :)
17:46karolherbst: ahh, okay
17:48Alexander_S: imirkin, damn! it is. /etc/modprobe.d/bbswitch.conf:blacklist nouveau
17:48karolherbst: Alexander_S: if you have bumblebee installed, remove it :p
17:48Alexander_S: sooo.. I should just remove that string?
17:49karolherbst: Alexander_S: uninstall bbswitch and bumblebee I guess
17:49karolherbst: could remove the file as well
17:49karolherbst: and you won't need any of that anyway
17:51Alexander_S: emm..seems like they are not installed: E: Unable to locate package bbswitch and Package 'bumblebee' is not installed, so not removed
17:51karolherbst: ahh okay
17:51karolherbst: then it might already be uninstalled and those files are stale
17:51karolherbst: so yeah, you can remove them
17:51emersion: karolherbst: mutter is… complicated
17:52karolherbst: emersion: yeah.. I guess supporting X and wayland makes things ugly :p
17:52Alexander_S: fileS? plural? should I delete something besides that /etc/modprobe.d/bbswitch.conf
17:53karolherbst: Alexander_S: no.. it was just a reference to other files related to bumblbee/bbswitch might causing issues
18:04Alexander_s: yaay! xrandr --listproviders now shows 2 cards! thank you guys! :)
18:09Alexander_s: huray! everything's working.. one more question: should I do this "xrandr --setprovideroffloadsink nouveau Intel" each time I reboot or will it be remembered..?
18:11imirkin: it will not be remembered
18:11imirkin: (what would remember it?)
18:12Alexander_s: IDK, that's why I'm asking :)
18:12imirkin: some DE's auto-configure it
18:12imirkin: not sure which ones
18:13Alexander_s: OK, got it
18:14Alexander_s: then I'll just make a shell-script with this line and put it into startup applications :)
18:15imirkin: i seem to recall some patch going into X to auto-guess what the user wants
18:15imirkin: don't remember the details though
20:04Alexander_S: Hey, guys, me again.. Am I missing something here? Everyting seams to be working fine, the system infos in KODI and steam show either Intel or Nvidia video card depending on wether I launch them with or without that "DRI_PRIME=1".. But other then that I fail to see any difference between this two. The graphics and framerate in games stay the same
20:04Alexander_S: (I think).. oh and one more thing: when I was using a proprietary driver - the fan in my laptop went crazy when I launched some game with Nvidia card, and now it stays silent.. So it looks like no Nvidia's GPU is actually working.. do I need to install or run something else to make it work?...
20:05imirkin: Alexander_S: which GPU do you have?
20:06Alexander_S: Umm.. I think it's M8.. something
20:06imirkin: dunno what that is
20:06Alexander_S: I honestly don't remember exactly :(
20:06imirkin: lspci -nn -d 10de:
20:07Alexander_S: 08:00.0 3D controller : NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] [10de:1140] (rev a1)
20:07imirkin: no reclocking is supported on the GF117, sorry
20:08imirkin: so you get stuck at whatever perf level the gpu boots to
20:08imirkin: most likely the nvidia gpu is being used, but just not at the highest clocks, so the fans don't go nuts
20:08Alexander_S: Oh.. so in other words this nouveau is useless to me?.. OK, thanks..
20:09imirkin: it's your call as to its usefulness
20:09imirkin: if what you're looking to do is get the maximum performance out of your nvidia gpu, then it's useless (with any line of their GPUs, actually)
20:10imirkin: if what you're looking for is to not run closed blobs downloaded off the internet in kernel ring 0, then it's quite useful
20:11Alexander_S: Of coarse I want the maximum performance, otherwise I could just use Intel's video.
20:11imirkin: which intel GPU do you have?
20:11imirkin: the GF117 was paired either with sandybridge or with ivybridge, usually
20:12Alexander_S: IDK again.. :) All I know it's i3.. it's an older laptop really :)
20:13imirkin: lspci -nn -d ::300
20:13Alexander_S: 00:02.0 VGA compatible controller : Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b)
20:13imirkin: oh wow, haswell, ok
20:13imirkin: yeah, that GF117 is worthless. even with blob drivers, it's probably not a lot better than the hsw
20:13Alexander_S: So.. what does it mean?
20:14imirkin: haswell was, in my estimation, intel's first actually-useful GPU
20:14imirkin: some people might argue, but ... that's my opinion
20:15Alexander_S: No-no-no! With proprietary "blob" it works fine in games. The problem is as I said in the begining - is that annoying screen tearings :(
20:15imirkin: i understand, but my point is you'd get a similar level of perf with the intel gpu
20:17Alexander_S: Oh.. I see. OK, will try to revert to blob, upgrade to 20.04 and see if that tearings are gone.. I see no other options :) Well, thanks anyway..
20:17imirkin: good luck!
20:17imirkin: i think screen tearing is going to be unavoidable
20:17imirkin: if you run the GF117 as primary
20:17imirkin: and the intel as secondary
20:18RSpliet: Damn you "Remote host"
20:18imirkin: almost as bad as this "Peer" hacker
20:19RSpliet: Heh, oh the good old days where people's quit messages were hardcoded to "connection reset by pineapple"
20:19RSpliet: Nowadays people just don't quit, with their fancy bouncers and stuff...
20:20RSpliet: (and just now it sank in that "Peer" is the Dutch spelling for pear... this makes absolutely no sense in English)
20:21linkmauve: imirkin, I’ve been gaming on Ivy Bridge quite a lot before I was forced to upgrade to this Kaby Lake, so I challenge your Haswell baseline estimation. :p
20:21linkmauve: (I also did on Sandy Bridge, but I’d rather had not. :x)
21:25imirkin: linkmauve: i think hsw had a fairly substantial jump over ivb, whereas skl isn't much faster than hsw
21:27linkmauve: Possibly, I never had an hsw, but the ivb I had had the right levels of performances and features to let me play most games I wanted.
21:27linkmauve: I was actually quite disappointed by this kbl not being so much faster than my previous ivb.
21:28imirkin: can't speak to gen11/12, but the overall perf definitely stagnated for a while
21:34HdkR: My Ice Lake is pretty good aside from the Ice Lake bugs :P
21:37macc24: linkmauve: i was gaming on ironlake laptop
21:38linkmauve: macc24, I was gaming on an… i810 laptop, BUUUUT. :D
21:38HdkR: I was gaming on a Pandaboard!
21:38macc24: linkmauve: i literally played latest ksp on i3 ironlake laptop with no dedicated gpu 4 weeks ago
21:39linkmauve: What is ksp?
21:40imirkin: kerbal space program
21:40imirkin: known for unnecessarily heavy shaders
21:40macc24: imirkin: ksp is heavy on cpu too. especially with bigger rockets
21:40imirkin: i guess it's just bad all around then :)
21:40macc24: i flew rocket to moon in 20fps
21:41imirkin: i think there's a jules verne book about that
21:41imirkin: journey to the moon, in 20fps
21:41macc24: well i had ~40fps in map view
21:41macc24: so that's where i spent most of time during that mission