so, I have a weird problem with a Dell Latitude 5285, that’s a 2-in-1 with a detachable keyboard akin to the MS Surface Pro 5. it has an i5-7300u, 16 GB LPDDR3 (on-board), 500 GB NVMe, 12.3" 1920x1280 3:2 touch screen.

I got it second-hand, unknown history, without a battery. they’re stuck at 400 MHz without one, but Thottlestop in Windows and msr-tools in Linux fix the BD_PROCHOT throttling and the machine performed adequately for months.

I’ve sourced a replacement battery, removed the patch and my problems started. there’s weird screen flickering, looks like bad video ram or a flaky connection. it’s intermittent, sometimes it runs without issues for hours, sometimes minutes and sometimes it flickers from the start, so troubleshooting and checking if this or that fixed things takes days.

the artefacts are inconsistent with anything that is or isn’t happening (load, temps, etc) or power source. the problem is mostly exacerbated when the battery is full and/or when waking from sleep, it’s almost always super glitchy then.

here’s a demonstration:

would be great if I could try a different battery or try this one in another device, but don’t have that option.

at no point are there ANY glitches on the external display (tried DP-Alt over USB Type-C and HDMI over Dell WD19 Dock), regardless if the internal screen is enabled or not.

so, bad luck - faulty screen or backlight or RAM or something, right?

except, when I unplug the battery (but leave it in place) and connect it to power and reenable the BD_PROCHOT patch - zero glitches! it runs for hours - videos, GPU and CPU stress test, not one hiccup, tear, nothing!

if it were a normal laptop, I’d just leave it be and use it as a desktop. it feels like such a waste with the functional touchscreen though.

what I’ve tried:

  • different USB Type-C chargers
  • fresh paste on CPU, clean vent
  • latest firmware, tried downgrading, no change
  • memtest passed twice on thorough, all clear
  • internal diagnostics also
  • it never froze or crashed
  • screenshot during glitches doesn’t contain them
  • disabling turbo, upping/lowering the max/boost GPU clock, forcing cores offline, limiting max frequencies with TLP
  • the battery isn’t deformed and doesn’t exert pressure on the screen or any cables; also tried running it with the screen slightly lifted from the case, no change
  • pressing, jerking, wiggling of the internal display cable/connector, no change
  • same issues in Windows 11, Ubuntu 23.04 and Fedora WS 38; rarely but sometimes in BIOS/during boot
  • sadly, can’t undervolt the CPU/GPU (Throttlestop FIVER says it’s locked) but some MSR writes are apparently OK (like disabling BD_PROCHOT works).

at some point, it had both charger and dock with PD attached at the same time to both USB Type-C ports; it’s possible this fried something, although I have no evidence of that.

so, I’m sure this is NOT a linux hardware problem, but I would like to use linux to fix the problem. at this point, I am sure it’s defective, whether it’s age or physical or manufacturing defect or whatever; but since it definitely works perfectly without the battery, I’m looking for some tweaks that makes it perform with the battery the same as without it.

seriously doubt anyone’s seen anything similar but are there any ideas what to look at? what to try?

edit: I’m not asking for free hardware troubleshooting, maybe I haven’t expressed myself succintly. what I’d like is some sort of snapshot of all relevant registers with battery working. and then one without. and then have somehow the difference between those two computed, so I can see which setting I need to tweak. would this be doable?

  • dutchkimble@lemy.lol
    link
    fedilink
    arrow-up
    12
    ·
    11 months ago

    Firstly, hats off to you for trying to properly diagnose the problem and trying everything that you did. Hope you find the solution soon. Some random suggestions if you haven’t already tried - clean the battery contacts (I’m not sure of the best method to do so but I’m sure you can find something online), check to see if the problem exists in different screen refresh rates, turn off auto brightness if its on.

    This is something to try but not sure how to do this in Linux - https://www.dell.com/support/kbdoc/en-us/000152765/why-does-the-screen-flicker-while-running-on-battery

    All the best

    • dingdongitsabear@lemmy.mlOP
      link
      fedilink
      arrow-up
      4
      ·
      11 months ago

      nah, tried that when I had windows on it. that and a bunch of other stuff from the unhelpfulest site on the webz - dell.com. screen rates and resolutions and auto brightness as well. the battery contacts are way too tiny for me to do anything meaningful there. besides, I’m thinking that if the battery is the problem, then there shouldn’t be any issues when running the thing on external power; it’s not like the battery is powering the laptop when connected to external power, it’s running on external power and using the surplus to charge the battery.

  • Rentlar@lemmy.ca
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    11 months ago

    Can you check the battery voltage with a multimeter if you know how to use one? when disconnected at full charge, when connected, and when the strange flickering is happening?

    There are battery voltage monitoring tools on Windows and Linux which could work but I’d trust multimeter numbers more. Check to see if it’s above by more than 15% rated voltage or below rated voltage by any amount at full charge. Check for any strangeness in the charge curve.

    If you see any of those signs your battery is likely busted. Also if your battery looks inflated at all replace it immediately.

    • dingdongitsabear@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      that seems reasonable but I don’t trust my chubby fingers, everything is so tiny I’m afraid I’ll short something.

      • Rentlar@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        You can try the battery monitoring software then. It would likely be a struggle to try to view the status while the screen flickers but if you can get a log then you can review it when you re-enable the fix.

        • dingdongitsabear@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          11 months ago

          this if from a F38 live image.

          idle on battery:

          load on battery:

          charging idle:

          charging load:

          battery is (or should be) 7.6V 42Wh. BIOS rates condition as excellent, 92% battery health. no visible deformations, as stated.

          naturally, during this whole period the screen didn’t flicker once.

          • Rentlar@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            11 months ago

            OK keep monitoring i guess, if its good for now, fingers crossed?

            It could be an Amazon quality battery or a combination of many factors… the design voltage of your battery is on the low side which pushes a lot of current to your display and other components. If that display cable is worn or frayed it can have a chance of busting the screen, or in very rare cases spark/catch fire. Inspect it carefully.

            • dingdongitsabear@lemmy.mlOP
              link
              fedilink
              arrow-up
              1
              ·
              11 months ago

              naturally, it began again after waking from sleep. that’s why it’s so darn tiresome diagnosing it, you never know if the tweak you’ve made has any effect, sometimes it works for hours, sometimes it freaks out after seconds.

              if the battery is the culprit, shouldn’t it stop being a problem when running the device on external power? it’s not like it’s constantly charging the battery and simultaneously draining it; at least, no laptop I know of does that. and if the display cable is faulty, then it should also have those flickers when running it without battery. that never happens.

              • conciselyverbose@kbin.social
                link
                fedilink
                arrow-up
                3
                ·
                11 months ago

                What if the battery is doing something hinky enough to cause very minor interference and the internal cable is close enough to be affected by it? I’m not super familiar with the low level details of battery tech but I think it could theoretically be possible (though obviously would be stupid rare).

                • dingdongitsabear@lemmy.mlOP
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  edit-2
                  11 months ago

                  hmm, there’s an idea. I’ll try to shield the cable from the battery with cardboard and aluminium foil.

                  edit: nah.

    • chirospasm@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      +1 for battery voltage, OP. You may have a faulty battery. If that is the case, how long have you owned the replacement? Is it within a window of returning it?

  • eldain@feddit.nl
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    I would conclude from this that your dc-dc converter is out of whack and only works stable enough for a small range of input voltages. This hardware issue might require a hardware fix at a repair shop :/

    • dingdongitsabear@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      thanks for the input. so no amount of tweaking and kernel switches and MSRs and what not can be utilized to lower or alter the performance so that it behaves? the repair route isn’t likely unfortunately

      • eldain@feddit.nl
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        Would you notice if it doesn’t? The screen flickering is obvious, what if your ram and ssd flicker, too? You can tinker with that laptop and try to reduce 3.3 or 5v power rail load with kernel flags, but until someone checks those power rails electrically I wouldn’t trust that laptop to be reliable for anything but a tinkering exercise. We sadly don’t get redundant power IC’s you could switch to, but the failure is common and the involved parts cheap. I wish competent repair shops were more common.

        • dingdongitsabear@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          sure, it’s a decade old device worth like $100, if that. of course this is a tinkering exercise. but I’m referring to the fact that it works perfectly without battery, it obviously has some power limiting then (no speedstep, no turbo). so I was looking to recreate that behavior with the battery.

  • lvl@beehaw.org
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    I have had an identical problem a few years back, with a Samsung 2 in 1 that worked perfectly on AC, but had exact issues on battery.

    It was the “power saving” capability of the GPU that triggered it on battery. So simply disabling this is the integrated Intel GPU control panel (in Windows) fixed the problem. Laptop is still running now and works with my sister in law.

    • dingdongitsabear@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      thanks for chiming in. yeah, some surface models are prone to have these issues as well, I remember trying that in windows but with no results. in linux, the i915 driver doesn’t have that option any more, or I suck at reading comprehension… anyhow, not sure that’s the same issue, as my device has these spells also when on AC power but with battery installed. the only times it’s functioning properly is when it’s on AC and with battery removed. but this looks like a promising lead to research further.

  • SterbenDeathGun@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    I think everything goes against the battery? Did you try to recalibrate it? Discharge the battery completely, and then go into the BIOS and wait until it turns off. Now charge it for a couple of hours while it stills off.

    I don’t think it is gonna fix anything, because it seems like a battery problem. Maybe try to get one from iFixIt, I had bad experiences with batteries from Amazon (if you got it from them).

  • SteveTech
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    I do kinda agree with the others that this is a power issue, but I was thinking it wouldn’t harm to run a memtest, maybe whatever part of RAM the iGPU is mapped to is dying or something like that.

  • Romkslrqusz@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    11 months ago

    Awesome breakdown and troubleshooting so far!

    I wonder if the previous owner removed the battery because of this issue in the first place.

    The fact that the flickering is full-width bands that don’t appear in screenshots indicates to me that this is a signal issue to or through the display.

    An important variable to pay attention to and experiment with is the display’s refresh rate. It’s possible that is what is changing with and without the battery, though you most likely would have noticed if that were the case.

    Since the problem varies based on battery presence, it would be appropriate to source a replacement battery - especially if you purchased a cheap aftermarket battery. The real deal for your system is available for $80USD from Parts People compared to $20-$40USD for low quality Amazon junk.

    After the battery, my main suspicion is a fault on the mainboard leaking voltage from the battery circuit and affecting the display signals. Even without the infrequency of the problem that would be tricky to isolate and remedy.

    Overall, this screams hardware issue and I don’t believe you will find a software trace of it. The problem is not visible in screenshots, so the software environment does not know that it exists.

    • dingdongitsabear@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      tried a bunch of those, did modinfo i915 and then tried all that looked power management related, and in both directions. here’s one of those attempts:

      just wish I could somehow do a snapshot of all kernel and other settings when with and without battery and deduce the difference, but I’m coming up short.

      I’ll try to rephrase this and post again, as people assume I’m looking for hardware troubleshooting help.

      • jwt
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        I deleted my suggestions as I saw I overlooked the part where you state the problem occurs in bios and Windows too. Good luck, this sounds like a tough nut to crack. I get the feeling it’s more like some component is/has gone faulty or something.

        • dingdongitsabear@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          it is, that’s why I’m looking to linux to overcome the fault; like GRUB can cut out a piece of faulty RAM and work without issues.