01:30mupuf: imirkin: 168548 sample points for the fan
01:30mupuf: automation is great, isn't it?
01:31mupuf: Summary: 168548 results, 149865 pass (88.92%), 18683 fail (11.1%)
01:31mupuf: that's when I allow an off by one
01:32mupuf: but anyway, will work on that a little more before sending the email to nvidia
01:33mupuf: and I will make a safe model, that will make the fan louder than we could, but not as loud as currently
04:01Aristar: "Nouveau openGL drivers don't support multithreaded rendering" <--is tihs still true? I just saw this when trying out the latest qupzilla browser
04:08Aristar: or maybe older kernel/userspace? hrrm
04:08airlied: no I think it's still accurate
04:08Aristar: fairly recent here though really old gpu
04:08Aristar: Kernel 4.13.10, X11 1.19.5, OpenGL 3.3, Mesa 17.2.4 (compat-v: 3.0), GPU: NV86 (G86M)
04:09Aristar: yeah i guess it makes sense, most webkit browsers have issues
04:09Aristar: "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU."
04:09Aristar: not that i need it for this one anyhow
04:19imirkin: Aristar: it's still true.
04:19imirkin: Aristar: qt does stuff which kills nouveau.
04:20Aristar: gnome seems to as well lately
04:20Aristar: once in awihle i get curious how bad gnome is and i give it a try
04:21Aristar: even on fedora where i believe the most gnome devs are
04:22imirkin: very few, if any, games used to do this
04:23imirkin: and then all of a sudden the desktop guys came in and said "yeah, let's just use the GL drivers without worrying about whether they're ready for the totally different usage"
04:23imirkin: otoh i've probably spent more time complaining about it than it would have taken me to fix it
04:24imirkin: but someone else has kinda acquired the lock on that project
04:24imirkin: skeggsb: i think you forgot "git push current-branch"
04:25imirkin: skeggsb: that said, i think the proper move is to just rewrite everything from scratch
04:25imirkin: even if it's not required, it should be a lot more fun
04:28airlied: yeah first line of code in a new driver, pthread_mutex_t driver lock;
04:28Aristar: didn't gnome try thta but ended up reusing lots of code with the same unfixed longstanding bugs?
04:28airlied: skeggsb: where did you get to before you got vmmed?
04:28Aristar: i mean heck i feel bad for MATE maintainers/developers
04:31imirkin: Aristar: dunno. i've had to switch away from gdm now that it uses gnome-shell though.
04:31imirkin: very sad.
04:32Aristar: "You're using gnome-screensaver? Do you want ants? Because that's how you get ants."
04:34Aristar: ...wtf i have 4GB of logs
04:34imirkin: airlied: well, ideally in a way that doesn't cause the driver do do mutex_lock(); sleep(); mutex_unlock()...
04:36imirkin: either way, part of the solution is to move libdrm_nouveau into the nouveau driver - it needs more control.
04:37imirkin: all of which probably means a break from nv30
09:58jolar2: imirkin: Ok, so I have fixed the kernel crashes/oopsing. Is there any way I can force hotplug without your DDX fixes?
09:58jolar2: imirkin: or rather, force detection of the docking connectors
11:01jolar2: I added NULL pointer checks in nv50_mstm_register_connector so we do not call drm_fb_helper_add_one_connector if !drm->fbcon
11:01jolar2: (and the same check in nv50_mstm_destroy_connector)
11:43pmoreau: imirkin: I didn’t went with “val = -imm->reg.data.s32” for fear of some implicit casting going on that would ruin it.
11:43pmoreau: But I agree with getting rid of OP_SUB altogether.
12:55jolar2: Does this look reasonable? https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=101778&attachment=135298
13:43jolar2: Another question: What part of nouveau should guarantee that drm->fbcon is assigned when register_connector is invoked?
13:45karolherbst: jolar2: you should see it in the code
13:47jolar2: karolherbst: Ok, well, wherever it is, I suspect it has not run as it should because of the NULL pointer dereference.
13:49jolar2: karolherbst: could you test my patch and see if it ruins MST for you?
13:49jolar2: with the P50
13:49karolherbst: jolar2: fix I wrote some days ago: https://github.com/skeggsb/nouveau/commit/330db527f14c9893d96d8b647b4153b97d9a88d6
13:50jolar2: karolherbst: I'll grab it as well
13:50karolherbst: it won't help you
13:51jolar2: probably not
13:51karolherbst: just wanted to show, that I fixed an issue where fbcon->helper.fb was NULL
13:52jolar2: karolherbst: thanks
13:52karolherbst: but it is odd that fbcon was NULL
13:52karolherbst: ... mhhh
13:53karolherbst: it shouldn't be afaik
13:54jolar2: karolherbst: no definitely not
13:55jolar2: karolherbst: since there is no point in accessing fbcon->helper if fbcon points at NULL
13:55karolherbst: you should figure out why fbcon is NULL
13:55jolar2: and why it isn't in your P50 case...
13:56jolar2: (or else you would have gotten the oops as well)
13:57jolar2: my current guess is that nouveau_fbcon_create should assign it
13:57karolherbst: no, a fbcon = should do it
13:58karolherbst: in nouveau_fbcon_init
13:58karolherbst: you see, there is no way it can be NULL
13:58karolherbst: not really
13:58karolherbst: except there is a reason :)
13:59jolar2: in nouveau_fbcon_init it assigned to drm->fbcon
13:59jolar2: which is NULL
13:59karolherbst: read the function again
13:59jolar2: wrong _init-function
13:59jolar2: that was accel_init
14:00karolherbst: can you get me your lspci line of the nvida GPU?
14:00karolherbst: it doesn't say 3d accelerator, does it?
14:01jolar2: 01:00.0 3D controller: NVIDIA Corporation GM107GLM [Quadro M1200 Mobile] (rev a2)
14:01karolherbst: the fuck
14:01karolherbst: the actual fuck
14:01karolherbst: jolar2: https://github.com/karolherbst/nouveau/blob/master/drm/nouveau/nouveau_fbcon.c#L503
14:01karolherbst: now guess what ;)
14:02karolherbst: like I already knew that would be the case...
14:02karolherbst: usually it says "VGA compatible controller"
14:02karolherbst: and 3d controller means: no display
14:02karolherbst: but there we are
14:03karolherbst: now you only have to hope that dev->mode_config.num_crtc isn't 0 either
14:03karolherbst: you can check with a printk
14:03karolherbst: and you should remove that PCI_CLASS_DISPLAY_VGA line there
14:03karolherbst: because we can't trust it
14:03jolar2: you mean your P50 shows something different in lspci?
14:04jolar2: well, just one thing though... HDMI does work with nouveau without docking
14:04imirkin: jolar2: just restart X and it should pick up the new connectors
14:04jolar2: are you sure this is MST specific?
14:04karolherbst: imirkin: no, it is a nouveau bug
14:04imirkin: karolherbst: nah, 3d controller can have displays
14:04karolherbst: an actual bug inside the kernel
14:04karolherbst: not according to that code
14:04imirkin: karolherbst: it's just frequent that 3d controllers don't have displays
14:05karolherbst: yeah, the code is still wrong
14:05karolherbst: I am sure it will work if that check is removed
14:05imirkin: (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA
14:05jolar2: I'll try it and rebuild nouveau
14:05jolar2: hold on
14:05imirkin: that should still work iirc
14:05imirkin: 3d controller is 0301
14:05karolherbst: well, drm->fbcon is assigned later
14:06karolherbst: then num_crtc is 0?
14:06imirkin: that would mean the DCB is empty
14:06karolherbst: jolar2: did you send us your vbios?
14:06karolherbst: ohh wait, you did
14:06jolar2: can a parallel thread change the values of num_crtc?
14:06karolherbst: I just don
14:06imirkin: oh hm, i lied
14:06imirkin: include/linux/pci_ids.h:#define PCI_CLASS_DISPLAY_VGA 0x0300
14:07jolar2: ok let's try that line first
14:07jolar2: hold on
14:07karolherbst: I think it should be >> 16 and check against that constant above that
14:07karolherbst: there is a group one
14:07karolherbst: but the name is a bit odd?
14:08karolherbst: PCI_BASE_CLASS_DISPLAY, right
14:09karolherbst: and 3d controller is 0302
14:09jolar2: removing the line does not fix the problem
14:09jolar2: so maybe num_crtc is indeed 0
14:09karolherbst: jolar2: can you give me your vbios again?
14:09jolar2: karolherbst: sure
14:09jolar2: karolherbst: where would I upload it?
14:11jolar2: regular cp operation from /sys/kernel/debug/dri/1/vbios.rom fine?
14:11karolherbst: not quite sure
14:11karolherbst: I know that cat works
14:12jolar2: I'll try a send over IRC
14:12karolherbst: good luck
14:14jolar2: karolherbst: got it?
14:14karolherbst: wow, it works
14:14jolar2: <3 irssi
14:15karolherbst: imirkin: well, DCB has 6 valid entries
14:16karolherbst: jolar2: can you put a printk?
14:16karolherbst: just to double check?
14:17jolar2: karolherbst: sure, but then I would have to reboot... is it not possible to do nvkm_debug?
14:17jolar2: but then I would need access to something called "subdev"
14:18karolherbst: jolar2: dmesg | grep DCB
14:18karolherbst: you should get some lines, right?
14:19karolherbst: and are you sure you removed the correct line and recompiled/installed everything correctly?
14:21jolar2: karolherbst: nope no lines
14:21karolherbst: either your dmesg is short or something complety messy is going on
14:21karolherbst: can you give me your entire dmesg?
14:21jolar2: is it possible to access "subdev" in nouveau_fbcon.c?
14:22karolherbst: just use printk
14:22jolar2: but then I would have to reboot I guess?
14:22jolar2: i only have nouveau.debug and drm.debug set
14:22karolherbst: yeah well, your dmesg is full
14:23karolherbst: jolar2: what do you mena by reboot?
14:23karolherbst: you have to reload nouveau
14:23karolherbst: no matter how
14:23jolar2: that is no problem
14:23jolar2: I thought I had to change kernel debug level
14:23jolar2: for printk
14:23karolherbst: just use KERN_WARNING or so
14:23karolherbst: or KERN_ERR or whatever
14:31jolar2: still no output from printk
14:31jolar2: funny thing though, I actually got the display to show up in xrandr this time
14:32jolar2: enabling it threw me into gdm login screen though...
14:32jolar2: printk(KERN_WARNING "num_crtc: %i\n", dev->mode_config.num_crtc);
14:32jolar2: karolherbst: anything wrong with his?
14:33karolherbst: do you see anything related to nouveua in dmesg?
14:33karolherbst: maybe you should disable that drm debugging
14:34jolar2: guess I have to reboot
14:34jolar2: wow... I actually managed to enable the external screen!
14:34jolar2: let's connect the other one
14:35jolar2: works fine
14:35jolar2: maybe that line did do it
14:35karolherbst: well, which one else?
14:35jolar2: well, printk is not probable...
14:35jolar2: unless delays etc matter
14:36jolar2: well, then I would like to extend a pre-emptive thank you
14:36imirkin: karolherbst: there was a time, long long ago, when the class was an inidication of display-or-no-display.
14:36karolherbst: you can write a proper patch and send it to the ML
14:36jolar2: just gotta test this some more
14:36imirkin: karolherbst: that time has long-ago ended however
14:36imirkin: now it's just an indication of "primary" vs "secondary" gpu
14:36jolar2: karolherbst: sure, should we keep the NULL checks? (I was inspired by the intel mst code)
14:36karolherbst: imirkin: well, it isn't the first time people don't care shit about keeping things sane
14:37karolherbst: imirkin: well, not even that
14:37imirkin: indication, not guarantee :)
14:37karolherbst: for me 3d controller == VGA
14:37karolherbst: it makes no differenc whatsoever
14:37karolherbst: you still need the same code for both, don't you?
14:38karolherbst: jolar2: no
14:38imirkin: need to double-check with skeggsb ... it's *possible* that there was some headless Tesla high-end GPU without a display block but with a DCB that indicated heads.
14:38karolherbst: imirkin: well, we can do so on the ML
14:38imirkin: a long time ago
14:39imirkin: in a land far far away (aka australia)
14:40karolherbst: imirkin: https://github.com/karolherbst/nouveau/commit/0a2b44780
14:40jolar2: karolherbst: why not? for performance?
14:40karolherbst: jolar2: no, because it shouldn't be NULL at all
14:40karolherbst: you can keep the ifs, but the there should be BUG() thingies
14:40jolar2: karolherbst: gotcha
14:41karolherbst: what was the evil one, BUG or BUG_ON?
14:41karolherbst: don't remember
14:41jolar2: I'll find out through the internet or something
14:41jolar2: I wanna try a reboot now without all dmesg crap
14:41karolherbst: and the BUG message should indicate that something is screwed
14:41imirkin: karolherbst: erm, what about the modeset things?
14:41imirkin: karolherbst: nouveau.modeset=0 has to continue to work
14:42karolherbst: imirkin: how is that affected when we remove that PCI device class check?
14:42imirkin: karolherbst: just looking at your commit.
14:42karolherbst: imirkin: look at the date of that commit
14:42karolherbst: and the author....
14:43imirkin: oh yeah.
14:43karolherbst: it is just the commit which added that check
14:43karolherbst: so it's broken for a long time now?
14:43imirkin: so i guess we explicitly wanted to avoid running fbcon on those
14:43imirkin: i thought you had just written that commit :)
14:45karolherbst: it is nice when we come closer to the agreement that we can't trust shit, even the vbios is worthless sometimes
14:45karolherbst: I am sure any patch removing that line will be followed by despair stating: "how the fuck do we workaround the GPUs with broken vbios, but no heads?"
14:49jolar2: ok so things work better than ever, but not perfect
14:49jolar2: if I undock, I am thrown out into gdm login screen
14:49karolherbst: at least no crashes, right?
14:49karolherbst: well kernel crashes
14:49karolherbst: jolar2: yeah, because you need that modesetting DDX
14:49karolherbst: not nouveau
14:49imirkin: like i mentioned, nouveau DDX doesn't do connector hotplugging.
14:50karolherbst: right, so it isn't suited for MST useage
14:50imirkin: jolar2: if this is something you actively want, i can look into it over the weekend
14:50imirkin: i suspect it should be trivial
14:50jolar2: imirkin: I do
14:50karolherbst: imirkin: sounds good :) I can test as well
14:50imirkin: you'll have to test though - i don't have anything DP here
14:50jolar2: I will
14:51karolherbst: jolar2: well, for now check with the modesetting DDX though. It sould work with it
14:51imirkin: (actually, i did recently gain a Quadro 400 which has a DP port. but iirc fermi only does 1.1, and even if it did, i have no DP sinks)
14:51jolar2: karolherbst: I cannot use integrated graphics for external connectors, so I really need to use noveau
14:51jolar2: ? :)
14:51imirkin: jolar2: xf86-video-modesetting will work on nouveau semi-ok
14:51karolherbst: use modesetting
14:52imirkin: assuming that you have mesa installed
14:52jolar2: cannot emerge that as it is blocked I think
14:52karolherbst: you don't have to install it
14:52jolar2: but I thought I _was_ using modesetting
14:53karolherbst: it is inside xorg-server now
14:53jolar2: since I removed any xorg.conf
14:53karolherbst: jolar2: I thought you had a xorg.conf?
14:53karolherbst: then remove the nouveau ddx
14:53imirkin: nouveau should get used by default
14:53karolherbst: it is the easier way to get it
14:53imirkin: add an xorg.conf which says Driver "modesetting"
14:54jolar2: I'll test it
14:55jolar2: ok, now I did that
14:55jolar2: and no external displays
14:55karolherbst: jolar2: well, I think you still need to specify everything else or so
14:55jolar2: the only was I have managed to get external displays is: xrandr --setprovideroutputsource 1 0 *with* nouveau
14:55karolherbst: no clue. the xorg.conf is super messy to get correct
14:56jolar2: I'll try to remove nouveau instead then
14:56jolar2: for now
14:56jolar2: I'll remove xf86-video-nouveau
14:56karolherbst: and the xorg.conf file as well
14:56karolherbst: there is one other issues though. I have no idea how to set it up through xrandr if not done automatically
14:57karolherbst: ohh, I use intel for the intel GPU :D
14:57karolherbst: no idea if two providers are shown if both are modestting? but probably?
14:57tobijk: jolar2: if your output is driven by the nvidia card and not the internal intel (or whatever) you have to use xrandr --setpovideroutputsource 1 0
14:58tobijk: it doesnt matter if you use nouveau or modesetting within the xserver
14:58karolherbst: tobijk: does it work if both GPUs are driven by modesetting?
14:58jolar2: xrandr --setprovideroutputsource 1 0 without nouveau does give 3 DP
14:58tobijk: karolherbst: mh i think i have tried that onece, yet i'm not completely sure
14:58jolar2: but... not the docking station connectors
14:58jolar2: could it be the case that the docking station needs the nvidia card?
14:58karolherbst: jolar2: even when docked?
14:58jolar2: karolherbst: yes
14:58karolherbst: try to redock
14:59karolherbst: and plug in a display
14:59karolherbst: do you check with xrandr?
14:59jolar2: they are not there
14:59jolar2: only DP-1-1 to DP-1-3
14:59karolherbst: what does 'xrandr --listproviders" return?
15:00karolherbst: two or one?
15:00jolar2: rovider 0: id: 0x7c cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:Intel
15:00jolar2: Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 3 associated providers: 1 name:modesetting
15:00karolherbst: I have 6 outputs
15:00karolherbst: let me try something
15:01tobijk: wait, i can check if it works with both modesetting
15:01jolar2: could the docking station connectors be nvidia output only?
15:01karolherbst: it should work
15:01karolherbst: I had some troubles at first as well
15:01tobijk: jolar2: it actually is possible, i have an hdmi which is only driven by the nvidia card
15:01karolherbst: let me try to remember
15:02karolherbst: jolar2: try to start X when the dock is connected
15:02karolherbst: and see if that is any better
15:02jolar2: karolherbst: that is what I did
15:02jolar2: towo^work: it could be the case but it is then funny that the P50 and P51 differ in that way
15:03jolar2: towo^work: sorry wrong guy, tobijk left, blame whoever invented tab-completion
15:03imirkin: definitely not the guy who used it :)
15:04karolherbst: jolar2: try to stop X
15:04karolherbst: start X
15:04jolar2: karolherbst: ok
15:05karolherbst: maybe even reboot, no idea if there can be any state being messed up inside the driver
15:05jolar2: karolherbst: same thing
15:05karolherbst: I know that it works since I booted without the nouveau DDX being loaded once
15:06jolar2: all you know is that it works for P50
15:06karolherbst: I had my issues as well
15:06tobijk: both modesetting works fine for me
15:06karolherbst: at some point there were gone
15:06jolar2: tobijk: you have P51?
15:06karolherbst: jolar2: I think you should really try to reboot once and see if it works then
15:07tobijk: jolar2: no but driving an output with intel/nvidia modesetting/modesetting combination works
15:07karolherbst: that's the last idea I have though
15:07tobijk: with a output connected to the nivida card
15:07jolar2: tobijk: that could work, but not possibly through the docking station according the outputs xrandr gives me right now
15:07jolar2: karolherbst: ok
15:08jolar2: karolherbst: I could remove the nouveau useflag and re-emerge stuff as well to be sure
15:08karolherbst: not needed
15:09karolherbst: when the xf86 driver is removed it should be fine
15:09tobijk: jolar2: whats the xrandr output?
15:09karolherbst: if you remove the nouveau flag, mesa won't have nouveau support
15:09jolar2: tobijk: won't paste it all but, except for eDP1, I have:
15:09jolar2: VIRTUAL1 disconnected (normal left inverted right x axis y axis)
15:09jolar2: DP-1-1 disconnected (normal left inverted right x axis y axis)
15:09jolar2: DP-1-2 disconnected (normal left inverted right x axis y axis)
15:09jolar2: DP-1-3 disconnected (normal left inverted right x axis y axis)
15:10jolar2: tobijk: and... when docking station displays are available, I get more displays
15:10tobijk: do you actually have one listed below the second modesetting?
15:10jolar2: tobijk: and... if I do not do the "xrandr --setprovideroutputsource 1 0"-thingy, I do not have DP1-1-X
15:10tobijk: for me with setprovideroutput... https://hastebin.com/hepevihuju.go
15:11jolar2: what computer and and what docking station?
15:12tobijk: jolar2: no dock but a nvidia card driving an output with reverse-prime
15:12karolherbst: well I also have my MST heads
15:12karolherbst: DP-1-1-1 ... DP-1-1-3
15:13jolar2: tobijk: then it is not really relevant :)
15:13jolar2: tobijk: everything works fine but the docking stuff
15:13tobijk: jolar2: if the dock is connected to the nivida card, it is
15:13karolherbst: tobijk: it is ;)
15:14karolherbst: jolar2: I am not quite sure if something needs to be set up for MST though
15:14jolar2: me neither
15:14jolar2: but honestly, I do not mind using nouveau for this
15:15karolherbst: jolar2: did you try rebooting?
15:15jolar2: nah will do now
15:15tarragon: I've got the error!!
15:15jolar2: just for fun, I will switch to the stable 4.12.12
15:15karolherbst: jolar2: I am sure it will work if you boot with the dock connected...
15:15karolherbst: jolar2: no
15:15jolar2: no thne.
15:15karolherbst: jolar2: because you need that kernel patch ;)
15:15jolar2: karolherbst: ok
15:15karolherbst: tarragon: which one?
15:18tobijk: mh imirkin, didnt you mention a missing listener for dynamically adding a new output (such as a dock) yesterday?
15:19tarragon: karolherbst: this one --> http://dpaste.com/0HMGX5D
15:19tarragon: kernel 4.13
15:19tarragon: first one hard lock.
15:19jolar2: karolherbst: you are right, it does work with modesetting and booting with dock connected
15:19karolherbst: jolar2: ;)
15:19tarragon: with a game that never locked before.
15:20jolar2: karolherbst: but the patch is still needed?
15:20karolherbst: jolar2: yes
15:20tarragon: right in the middel of a game BHAM!!
15:20jolar2: so somehow, modesetting DDX accesses nouveau stuff
15:20karolherbst: jolar2: and it would be really great if you try to upstream it yourself
15:20karolherbst: jolar2: it uses kms
15:20tobijk: jolar, care to show us your xrandr --listprovider output once again?
15:20jolar2: tobijk: sure
15:20karolherbst: and kms is implemented by nouveau
15:20karolherbst: more or less
15:21karolherbst: kms is just a more generic API
15:21jolar2: Providers: number : 2
15:21jolar2: Provider 0: id: 0xba cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:Intel
15:21jolar2: Provider 1: id: 0x49 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 6 associated providers: 1 name:modesetting
15:21tobijk: jolar2: pastebin it or so
15:21jolar2: ah you mean xrandr only
15:21karolherbst: and the modesetting DDX uses glamor for 2D acceleration, which uses OpenGL, which ends up using the nouveau parts within mesa
15:21jolar2: complex stuff
15:22karolherbst: it's for no reason one of the bigger things in linux :D
15:22jolar2: karolherbst: what do you mean "upstream it yourself"?
15:22jolar2: karolherbst: you mean send the patch to nouveau development?
15:22karolherbst: jolar2: write the patch, send it to the ML, wait for skeggsb to accept it
15:22jolar2: karolherbst: will do
15:22karolherbst: you get reviews and sometimes you need to change stuff
15:22jolar2: karolherbst: maybe not today, but this week
15:22karolherbst: this entire thing is called upstreaming
15:23karolherbst: yeah, it is fine
15:23karolherbst: jolar2: before friday would be best...
15:23jolar2: karolherbst: I'll see what I can do
15:23karolherbst: jolar2: because 4.14 will be released this weekend most likely
15:24karolherbst: and it would be perflect to have that patch in before that
15:24jolar2: karolherbst: ok
15:24karolherbst: it is fine for a .1 release
15:24karolherbst: but even better for a .0
15:25jolar2: karolherbst: ok, now I just want to test docking/undocking
15:25jolar2: karolherbst: still in X when undocking
15:25jolar2: karolherbst: now redocking...
15:27tobijk: jolar2: if you boot docked, docking and undocking should work fine
15:27tobijk: after that
15:27karolherbst: you never know before trying
15:27karolherbst: just like backups
15:28karolherbst: you do backups, but do you know it works when you have to restore from it?
15:28karolherbst: you tink it works, but sometimes... it does not
15:29tobijk: thats the only thing btrfs is good at
15:29jolar2: tobijk: system hanged
15:29tobijk: jolar2: oh well despited that :/
15:29karolherbst: tobijk: well, you _think_ it works, until btrfs screws up again, which it does
15:29jolar2: re-docking was fine, but hanged upon running "xrandr"
15:29karolherbst: especially if your disc goes south
15:30karolherbst: jolar2: well, don't call xrandr then :p
15:30jolar2: karolherbst: I would love not to, but when i redocked the external displays were off
15:30karolherbst: it hangs for me for like 0.5 seconds as well
15:30jolar2: let me patch 4.12.12 and see where it leads me
15:30tobijk: so the nouveau kernel part is not completely sane when it comes to docks, well who would have guessed
15:30karolherbst: tobijk: well, it works for me
15:31karolherbst: it might be that 4.14 has some fixes, which aren't in 4.13
15:31tobijk: karolherbst: btw xrandr hangs for me as well for 0.5 sec
15:31jolar2: a lot of intel fixed in 4.14 i heard
15:32karolherbst: tobijk: pro tip: don't have all your backups on btrfs
15:32tobijk: jolar2: did you get get the dmesg when the system hung when calling xrandr?
15:32tobijk: karolherbst: hehe
15:33jolar2: tobijk: not sure
15:34tobijk: ah btw karolherbst the new vmm code did not help with tuxkart and my nv86 with 128mb
15:34tobijk: still erros left and right :/
15:34karolherbst: tobijk: sad
15:34karolherbst: is it better though?
15:35tobijk: karolherbst: yep a bit, the main menu is shown completely and not only parts of it
15:35jolar2: just some messed up characters in dmesg
15:35karolherbst: well I was more thinking about the system not crashing
15:35karolherbst: messed up characters are no good in dmesg
15:35tobijk: karolherbst: when starting an actualy race it hangs
15:35jolar2: well the system hanged
15:35jolar2: so I would expect no less
15:36karolherbst: jolar2: so the journal is messed up
15:36jolar2: that is from kern.log
15:36karolherbst: don't trust the journal
15:36jolar2: now, 4.12.12
15:36tobijk: jolar2: better go the other direction :>
15:38tobijk: or even drm-next, if you dare :>
15:39tarragon: karolherbst: was it helpful?
15:39karolherbst: tarragon: not at all
15:39tobijk: karolherbst: you forgot to add my r-b to your NULL check patch :P
15:40karolherbst: tobijk: it basically tells us something went wrong
15:40karolherbst: but why? no idea
15:40karolherbst: tobijk: I didn't, ben just pushed it
15:40tobijk: karolherbst: np, just saw it by chance
15:41karolherbst: tarragon: most likely some MT mess up? or something else?
15:41tarragon: karolherbst: how to get more info then?
15:41karolherbst: hard to tell
15:41tarragon: what's MT?
15:41karolherbst: multi threading
15:41tarragon: karolherbst: this only appeared with 4.13, and not with 4.9
15:41karolherbst: well, have fun bisecting ;)
15:41tarragon: karolherbst: so disable it?
15:41karolherbst: well, I don
15:42tarragon: could be libsdl2 threaded messing up with nouveau
15:42karolherbst: 't know really
15:42karolherbst: might be, might be not
15:42tarragon: crap, I don't wanna get a lockup now :/
15:43tarragon: I wonder if I can run another card and make nouveau lock up but with a still running system
15:43tobijk: tarragon: actually that works for a while, then the system may hang as well :>
15:45tarragon: what multi-threading is being the problem? kernel's, Xorg, glibc, libsdl, mesa???
15:46imirkin: plasmashell, gnome is more likely.
15:46Aristar: hrrm sofar no nouveau crashes on plasma5 with oxygen widget w/o animations. system defaults to GraphicsSystem=raster however which i believe makes QT stuff render with gpu raster
15:46Aristar: widget theme*
15:47tobijk: Aristar: just stay away from kde pim and you should be fine :)
15:47Aristar: OGL3.1 compositor seemed to fallback to software but OGL2.0 compositor seems to work
15:47Aristar: tobijk: does that use any gpu related stuff?
15:47tarragon: I am getting errors abouth this OGL thingy, somethil like oogl.cpp
15:47Aristar: awihle back i was debugging some kde git builds and installed like ALL of kde including all the multilib 32bit stuff
15:48tarragon: where does that come from?
15:48tobijk: Aristar: it uses a nice webengine whit threaded rendering, that upsets novueau a bit ;-)
15:49Aristar: hmm, i know qupzilla disables stuff with nouveau detected, not sure about elsewhere. "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU." [...] "Nouveau openGL drivers don't support multithreaded rendering"
15:50tobijk: Aristar: well yeah then you have a version patched for that specifically
15:50Aristar: it's just the latest qupzilla which released somewhat recently
15:51jolar2: karolherbst, tobijk: 4.14-rc7 did not work well at all
15:51tarragon: where does the OGL part come from?
15:51jolar2: starting X hanged the system
15:51Aristar: org.kde.falkon browser isn't quite ready yet and doesn't seem as recent on commits as qupzilla but they're in the process of merging it into falkon
15:51tarragon: I feel my Xorg is going haywire
15:51karolherbst: jolar2: even with your patch?
15:51karolherbst: ohh wait.. unrelated...
15:51karolherbst: jolar2: can you try rc8?
15:52tobijk: karolherbst: nah i think he still has to apply it?!
15:52jolar2: I of course applied my patch
15:52karolherbst: tobijk: yeah, but for a different reason
15:52Aristar: i believe X.Org 1.19.5 released recently, not sure of changelog
15:53jolar2: I am now a 4.12.12
15:53tobijk: Aristar: it did yeah
15:53jolar2: (with the patch)
15:53jolar2: and as with 4.13.9, I could start X and enable the external diplays
15:53jolar2: now, when I undock and redock, xrandr does not crash the system
15:53Aristar: X.Org 1.19.5/Mesa 17.2.4 here but i wish some of the nouveau nv50 commits made it into 17.2.4
15:54tobijk: Aristar: 1.19.5 is just a bugfix release to fix CVE-2017-12176 - CVE-2017-12187
15:54jolar2: and the external displays are available when i set provideroutputsource, but they appear as disconnected...
15:54karolherbst: jolar2: well there went some nouveau fixes in for -rc8
15:54Aristar: tobijk: ah right, now i remember actually reading the changelog. god i hate RPM distros (having to download the actual rpm to read the changelog)
15:55jolar2: ok, I will try that, but then I have to do some real work
15:55Aristar: why can't they implement the thing mageia does which downloads, reads requested info (changelogs, file lists, etc) and deletes
15:55Aristar: maybe i should port whatever script that is they have hooked into mcc/rpmdrake
15:57Aristar: i'm no fan of apt but it works and has sane utilities to query/search stuff
15:57Aristar: like apt-file <3
15:59Aristar: currently on opensuse testbed due to some contracted work, it's derp in a lot of ways though i can make any distro work for me with enough hacking and syncing my git bashrc/zshrc related stuff
16:03Aristar: i'd be using nvidia binary driver if it was A: portable (this install is used on baremetal and also KVM, qemu, vbox, vmware, etc)) and B: versioning of nvidia-legacy on some boxes which doesn't work on my newer boxes. don't really mind closed source if it works though but too much BS
16:04Aristar: dkms did work for nvidia on rpm distros, borrowed some scripts mageia uses to auto-rebuild on reboots if kernel changed before starting X. but that was only to dump some info
16:05Aristar: (usually precompiled kmods are used)
16:06Aristar: ...then there's the BS of having to switch xorg.conf.d files, though i suspect bumblebee could be configured to toggle between nouvea/nvidia and others
16:08Aristar: most of the libdrm/mesa attention lately seems to be focused on AMD lately
16:11Aristar: sorry for the rant, too much coffee evidently
16:12jolar2: karolherbst: nah it is some kind of regression
16:12jolar2: karolherbst: rc8 also hangs
16:17jolar2: karolherbst: perhaps that safe-guard is there for a good-reason
16:17jolar2: karolherbst: removing it altogether is perhaps not a good idea?
16:17karolherbst: jolar2: doubtful? maybe?
16:17jolar2: I have no idea
16:18jolar2: another funny thing
16:18karolherbst: is something different if you don't apply your patch?
16:18Aristar: hmm i guess kmscon is obsolete, last update 2014, not sure what the intention was or if it's obsolete due to wayland? not sure if it renders console too but i know on chrome os it handles both, weird its in opensuse and archlinux repos
16:18jolar2: karolherbst: yeah think so, but don't have much more time to test today
16:19jolar2: thank you for your time though, I think we made great progress
16:20Aristar: anyway sorry for the spam i'll quit the chatter for more important developer discussions
16:20jolar2: shit is awfully slow now
16:20karolherbst: jolar2: 4K display?
16:20jolar2: with modesetting + external displays
16:21karolherbst: *sigh* yeah no idea, it was kind of slow for me as well
16:21karolherbst: maybe this is glamor doing shitty stuff or so
16:21karolherbst: no idea
16:21jolar2: maybe I should use noveau after all
16:22Aristar: (speaking of glamour; is this limited to newer GPUs and falls back to dri2 stuff? I noticed X here is using dri2)
16:23Aristar: (X11 was built with glamour support though)
16:24Phillemann: I've been running nouveau with "07" as power management state for some time now and I'd like to enable it at boot. What's the correct kernel parameter to accomplish that?
16:25jolar2: karolherbst: this is messy
16:25jolar2: karolherbst: external displays work fine with nouveau but when I turn off the internal display X kind of hangs
16:27jolar2: i am far from convinced that my patch fixes everything, and it may or may not cause instability issues, but for me it is of course better than before, and better than kernel crashse
16:38Moiman: Phillemann: look https://nouveau.freedesktop.org/wiki/KernelModuleParameters/
16:39Phillemann: Moiman: Yeah, I saw that, but was a little confused. Is it nouveau.config=NvClkMode=7?
16:39Phillemann: Sorry, I'm not used to setting kernel parameters
16:43Moiman: Phillemann: Yes that looks correct
16:48Phillemann: Ah, thanks.
16:49karolherbst: imirkin: did I accidentally fix that clocks being reset on resume?
16:50imirkin_: Phillemann: out of curiousity, what does it boot to for you? 07 is pretty frequently the default anyways
16:51Phillemann: There was a command to list the possible values, what was that again?
16:53imirkin_: cat /path/to/pstate
16:54Phillemann: The default is 0a
16:54imirkin_: that's very surprising
16:54imirkin_: what hw is this?
16:55Phillemann: 07 saves me about ~7 degrees in heat :D
16:55Phillemann: GeForce GTX 670MX
16:55imirkin_: that's thoroughly surprising.
16:55Phillemann: How so?
16:55imirkin_: that it boots to 0a
16:55Phillemann: And not 07?
16:56imirkin_: i've never seen a kepler boot to anything but the lowest perf level
16:56imirkin_: (except every so often there's a mega-low one)
16:56Phillemann: Okay, I might have to correct myself. I manually set my pstate to 07. It might have booted to 07 and then changed.
16:56imirkin_: it only changes when you change it
16:56Phillemann: Ah, okay.
16:56imirkin_: the default, btw, is whatever's listed in AC on boot
16:57Phillemann: But the default is hard-coded into the GPU?
16:57Phillemann: Or put differently, nvidia made the decision to not use 07?
16:57imirkin_: the default is hard-coded into the vbios
16:58imirkin_: on boot it runs various init which leaves the GPU in a particular state
16:58imirkin_: which need not be any of the defined pstates btw
16:58Phillemann: Oh, okay.
16:58imirkin_: but often is
17:04karolherbst: imirkin_, Phillemannit doesn't boot to 0a
17:04karolherbst: it's just that the default voltage is higher than the actual required one for 07
17:04karolherbst: so by clocking to 07, the voltage drops
17:04karolherbst: which reduces the heat generation as well
17:14imirkin_: ah that makes more sense
17:39jolar2: karolherbst: I am writing a proper commit now
17:40jolar2: karolherbst: what If I check, 0x0300, 0x0301 and 0x0302 in the init-function?
17:41jolar2: feels safer
17:41imirkin_: 0x03XX is always display
17:41jolar2: and maybe even works with 4.14-rc8 ;)
17:41imirkin_: and only that stuff matches nouveau in the first place
17:41jolar2: so the safe-guard is useless?
17:42imirkin_: pretty sure it was for some annoying situation where the stupid GPU didn't have a display block but had DCB connectors
17:42jolar2: so we cannot enter the init-function with i915-stuff?
17:42imirkin_: there's probably a different way of doing this
17:42imirkin_: which will deal with both cases
17:42imirkin_: or perhasp the code has been moved around enough since then that it just works
17:43jolar2: I just don't want to commit garbage that destroys 4.14
17:44imirkin_: yeah don't worry - zero chance of making it to 4.14
17:44jolar2: or 4.15 for that matter
17:49karolherbst: imirkin_: well, it is a bug fix. If we decide that it is safe enough, it can be added to 4.14
17:49imirkin_: v4.14 is what it is.
17:50jolar2: 4.15 then?
17:58jolar2: karolherbst: Something like this? https://pastebin.com/KFfjCLXU
17:59karolherbst: jolar2: I think it is possible to add messages to BUG
18:00jolar2: karolherbst: ok, not sure what to say more that it is a NULL dereferencing that should not happen
18:02jolar2: karolherbst: I found one example of this.
18:02jolar2: but that would mean I keep the if-clauses as you suggested and then write BUG_ON("blabla");?
18:03jolar2: 19:00 jolar2: karolherbst: ok, not sure what to say more that it is a NULL dereferencing that should not happen
18:03jolar2: 19:02 jolar2: karolherbst: I found one example of this.
18:04jolar2: 19:02 jolar2: but that would mean I keep the if-clauses as you suggested and then write BUG_ON("blabla");?
18:07jolar2: karolherbst: this patch worked better
18:07jolar2: I am on modesetting
18:07karolherbst: jolar2: I can't right now, in an hour I can talk
18:07jolar2: with 3 displays
19:51jolar2: karolherbst1: are you back?
19:54jolar2: karolherbst1: I have seen BUG_ON with a string on some places in the linux kernel, but it is not super common (perhaps not intended?).
19:56tobijk: jolar2: just leave the dmesg here (as a paste) and people will have a look at it :)
19:56jolar2: tobijk: what?
19:56jolar2: tobijk: I was discussing this patch https://pastebin.com/KFfjCLXU
19:56tobijk: if there is a BUG_ON and you did hit it, it should show up in dmesg
19:57jolar2: yeah, but I think karolherbst1 wanted me to add a message to the BUG_ON
19:57jolar2: if that patch looks fine I will submit it to the ML
19:58tobijk: meh, i'm not much for BUG_ON, yet other people wil lrule different
19:59jolar2: personally, I would like to add some kind of safe-guard, be it BUG_ON or whatever
19:59jolar2: i915 uses an if-clause
19:59tobijk: that'd be more to my personal liking,
20:00tobijk: but lets see what karol thinks about it :)
20:00jolar2: that is what I had to begin with, but that only hides an underlying error
20:00jolar2: i'll keep irssi running
20:00jolar2: I think the patch is sound otherwise, and it does work with 4.14-rc8 for me
20:01karolherbst1: jolar2: yeah, now I am back
20:01tobijk: jolar2: yeah the other line looks good to me
20:01jolar2: karolherbst1: so what is your verdict?
20:02karolherbst1: jolar2: ahh, sorry, that BUG_ON thing is actually wrong
20:02karolherbst: use WARN_ON
20:03tobijk: karolherbst: can we at least hide it behind some debug clause :>
20:03karolherbst: or WARN_ON_ONCE
20:03jolar2: karolherbst: but then the kernel crash would occur right?
20:03karolherbst: use WARN_ON_ONCE
20:03karolherbst: ohh wait
20:03karolherbst: well you would do an if around that
20:04jolar2: ok, but just as BUG_ON, I do not think WARN_ON was intended for messages
20:04karolherbst: don't use BUG_ON
20:05karolherbst: BUG_ON is for cases where you really don't want to handle that issue
20:05karolherbst: like if handling the condition would take too much of work
20:05jolar2: ok, hold on, I will make a new patch
20:06tobijk: karolherbst: i dont see why this is not handled by a special clean-up case
20:06tobijk: a yet to create one
20:06karolherbst: we could also do a warning somehow
20:06karolherbst: but this is outside of nvkm
20:07karolherbst: ahh NV_ERROR
20:07jolar2: drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
20:07tobijk: jolar2: NV_WARN if its there
20:07karolherbst: jolar2: well, I think what is best is to use NV_ERROR and return -ESOMETHING
20:08jolar2: this is a void function
20:08karolherbst: then return nothing
20:08jolar2: I have to release the mutex lock
20:08karolherbst: the point is, we shouldn't continue and throw an error
20:08karolherbst: that as well
20:08karolherbst: yeah, well, do the right thing then
20:09tobijk: so, thowing a WARN is enough imho
20:09jolar2: I am not sure we can (I do not know how) at that place
20:09jolar2: I'll do NV_WARN
20:09karolherbst: jolar2: "goto" like every other "sane" C kernel dev does
20:10tobijk: hue? goto has its places, but not here
20:10karolherbst: tobijk: to unlock a mutex?
20:10karolherbst: it depends, but usually those things are last in a function
20:10tobijk: you have to unlock it in every case? no?
20:10jolar2: thing is, the mutex is unlocked and then the connector is registered at the bottom
20:11jolar2: so... this will be an if-else construction
20:11karolherbst: tobijk: if you lock it?
20:11karolherbst: let me read that function again
20:12jolar2: or... I keep the code pretty much as it is, but add NV_WARN instead, since that code is tested.
20:12jolar2: as long as we do not do dereference a NULL pointer
20:12jolar2: we are fine
20:12jolar2: ... ish
20:12tobijk: jolar2: oh that func is short, so yeah having a goto is fine :D
20:12karolherbst: I would actually love to have a place higher up
20:14jolar2: this is what you get
20:14tobijk: jolar2: do what intel does in intel_dp_mst.c:484
20:15jolar2: that is what I do now
20:15jolar2: or, before I introduced BUG_ON
20:16tobijk: karolherbst: if you want it at a higer place, you'd have to change all drivers
20:16jolar2: but then drm_connector_register is invoked even though there is NULL-pointing fbcon
20:16tobijk: yet could be worth it
20:17karolherbst: tobijk: maybe, maybe not
20:18jolar2: ok two options: 1. do like intel do 2. call NV_WARN, unlock the mutex and return
20:18jolar2: or maybe do like intel do + NV_WARN
20:18karolherbst: and the unreference as well? or do it before all that and just return
20:19jolar2: what is the mutex for?
20:19jolar2: do I need to mutex lock to peek at drm->fbcon?
20:19jolar2: ok, then I agree
20:20jolar2: call NV_WARN and just return
20:20jolar2: I'll do the same in nv50_mstm_destroy_connector then
20:20jolar2: both are necessary according to my personal experience...
20:30jolar2: karolherbst: https://pastebin.com/4AbPA7hq
20:31imirkin_: that has the same effect as removing the check
20:32imirkin_: it can only ever be VGA or 3D
20:32jolar2: this does bring up another question then... should intel really register connectors if their fbdev is pointing to NULL?
20:32jolar2: imirkin_: I have 3D...
20:32tobijk: jolar2: AMD is doing it as well
20:32imirkin_: that's my point
20:32imirkin_: previously the check was effectively "!= 3D"
20:32imirkin_: now you've made it "!= 3D || == 3D"
20:32tobijk: maybe haivng a connector without fbdev is ok? not sure
20:33jolar2: imirkin_: I may remember wrong, but, I experienced problems when I removed the check altogether
20:33imirkin_: well, you still want the !num_crtcs check
20:33jolar2: imirkin_: i kept it
20:33jolar2: imirkin_: I mean the other check
20:33jolar2: tobijk: me neither
20:33imirkin_: then it should have the same effect.
20:34jolar2: if you are 100 % sure about this, then I agree
20:34imirkin_: i am.
20:34jolar2: this also mean I remember incorrectly or did something wrong
20:34jolar2: because it cannot be true at the same time as your assertion
20:35jolar2: well, cannot test now without the docking station
20:35imirkin_: you'll have a good time with "this statement is false" then :)
20:35jolar2: that's just plain evil
20:36tobijk: jolar2: btw, splitting the patch would be useful, have the fbdev check as prerequisite
20:36jolar2: messing with logic
20:36imirkin_: there's a star trek episode about that...
20:36jolar2: hmm TNG?
20:37jolar2: or original series?
20:37imirkin_: original. nomad.
20:37jolar2: I bet I have seen it, but not sure I remember the contents
20:37imirkin_: more recently remade in a south park
20:38jolar2: now I 'member
20:40jolar2: not the south park episode though
20:40imirkin_: south park was about funny-bot
20:42imirkin_: this is better - https://www.youtube.com/watch?v=rtDh7FUshxo
20:43jolar2: true ripoff of star trek
20:43jolar2: well, anyway, I'll try out removing the condition altogether
20:44jolar2: if it does not work I'll submit the patch as is, but perhaps split into 2 commits
20:46imirkin_: a ton of stuff is a rip off of star trek, or early dr who, or the twilight zone
20:49jolar2: I still love it