https://bugs.kde.org/show_bug.cgi?id=490239
Bug ID: 490239 Summary: Info Center Sometimes Cannot Display Battery Change Percentage Graph Classification: Applications Product: kinfocenter Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: plasma-b...@kde.org Reporter: eamonn...@protonmail.com CC: sit...@kde.org Target Milestone: --- SUMMARY Sometimes the "Energy" information's Change Percentage tab for my laptop cannot display its graph. There is a bubble that says "This type of history is currently not available for this device". Swapping between the "Change Percentage" and "Energy Consumption" info will eventually get the graph to display. This issue usually happens after taking my laptop from sleep, even just putting it to sleep briefly (less than a minute). Waking from sleep doesn't seem to fix the issue. When running from the commandline in my case, I was able to see these errors. The first one was printed when I opened the "Energy" tab, so that was from a "first load" of the page. The other two were after I switched to the "Energy Consumption" tab and then back to the "Change Percentage" tab (they are buttons but act like tabs, sorry if I used the wrong phrasing, unsure how to describe them). ``` qrc:/kcm/kcm_energyinfo/Graph.qml:56: TypeError: Cannot read property 'x' of undefined qrc:/kcm/kcm_energyinfo/Graph.qml:118: TypeError: Cannot read property 'x' of undefined qrc:/kcm/kcm_energyinfo/Graph.qml:118: TypeError: Cannot read property 'x' of undefined ``` STEPS TO REPRODUCE 1. Open Info Center after a device with a battery has been put to sleep 2. Open the Energy pane 3. Sometimes the "Change Percentage" graph cannot be loaded. 4. Swap between "Energy Consumption" and "Change Percentage" 5. Eventually, the graph should load, it can take a long time though. OBSERVED RESULT Energy Consumption can sometimes not be displayed after taking a device with a battery from sleep. EXPECTED RESULT The information should be available. Maybe this as straightforward as passing some data differently to the graph. Otherwise, Plasma could either try to fetch it and show some kind of loading placeholder for the graph with a spinner. Reading the error again, "not currently available" does seem to have an implication that the data may be available in future. So perhaps this error was placed with the intent to convey that the data should be present, but Plasma couldn't get it right now. In that case, maybe adding a "please try again later" or something to this effect would be good, to indicate that Plasma does know it should display this information for this device, but that it cannot right now. I am not sure if Plasma displays the same warning on a Desktop PC without a battery connected, but if it does, ideally the two warnings should be distinct; something indicating that in this case, the battery is known to be present, but that Plasma just cannot get the requested information for the graph right now. But again, if it is possible to fix this outright, that should be preferred :-) SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.9.8 Linux Zen KDE Plasma Version: 6.1.2 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.2 ADDITIONAL INFORMATION Looking at master, I guess this is `plot` that is undefined: https://invent.kde.org/plasma/kinfocenter/-/blob/be18d5e78711dfa5ddc5a85f90c59fa197ac083d/kcms/energy/ui/Graph.qml#L56 >From skimming the code maybe it isn't able to load some data, which is causing the graph to not display? Maybe there is a deeper firmware issue or something causing this behaviour, I am unsure (although powertop can display battery information fine so I am unsure). Or maybe it takes a while to fetch some of this information / it has to be re-prompted to fetch it, which might be why switching between the two pages with the two graphs eventually gets the information to display? That would mean it isn't necessarily switching the pages that fixes the problem, but that switching them means that effectively the data the Change Percentage page needs has finally loaded and so going back to the page acts like a "refresh" action. I am unsure, I'm not super familiar with the technology here :-) If there are any files I can provide, such as cache files like for a prior issue with QML errors, let me know what to provide and the next time I can reproduce this problem I will attach the necessary files. -- You are receiving this mail because: You are watching all bug changes.