Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mila kunis
Jun 10, 2011
My laptop battery is draining hugely when I put it in sleep. I've looked around a bit and the issue seems to be that my model doesn't support S3 sleep mode, but only S0. I'm not sure why this mode performs so poorly, it's basically consuming as much battery as if I'd just left it on.

Model: Lenovo T14s gen 4 AMD
BIOS version: 1.16
OS: Kubuntu 23.10
Kernel version: 6.5.0-21

Anyone know of any fixes?

Adbot
ADBOT LOVES YOU

mila kunis
Jun 10, 2011

Saukkis posted:

The simple solution is to unplug it first and then put it to sleep, if you can't keep it plugged in. My new work laptop drained the battery few times over weekend, and when I started using that routine it hasn't happened again.

Linus Tech Tips did a video about this issue with some possible remedies.

Microsoft is Forcing me to Buy MacBooks - Windows Modern Standby

I always shut it unplugged.

Goon Matchmaker posted:

Is it warm to the touch if you put it to sleep and then come back to it some time later?

Nope

mila kunis
Jun 10, 2011

Klyith posted:

Have yall checked in the BIOS settings? Some lenovo laptops have a sleep setting where they literally label the options "Linux" or "Windows". Linux is where they re-enable S3 sleep instead of modern standby.

Otherwise, I think what you need to do is make sure hibernation is enabled in your desktop environment settings. And directly hibernate instead of sleep if you want max battery life.

The option to change this is disabled on the latest BIOS versions. I've seen people suggesting flashing older versions of your BIOS to be able to access the old functionality to change this, but I've also seen people saying this is a potentially bad idea, as its possible that newer hardware/firmware simply won't support S3 sleep.

Unfortunately it seems that people have to just live with S0 sleep going forward thanks to horrible decisions from intel/microsoft/whoever. Personally I think computers should just sleep when told to sleep instead of whatever this new mode is doing.

After some digging around, I found debug tools that will help identify what specifically might be causing issues during S0 sleep.

For AMD: https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
For intel: https://github.com/intel/S0ixSelftestTool

In my case, it told me to update the firmware for my wifi card (from here: https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware)

Doing this seems to have worked somewhat, the battery drain is a lot less from my test over a couple of hours. I'll see how it does tonight when I shut it off overnight.

Ultimately I think you're right, I'll probably try and set it to 'sleep after shutting the lid, then hibernate after an hour' or something to save the most battery.

However - I tried setting up hibernate today, but found it was disabled, and the only way to enable it would be to disable Secure Boot. Is this a bad idea?

mila kunis
Jun 10, 2011

Klyith posted:

https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows

Basically, you need to make sure that the linux-native parts of the equation (proton, wine, etc) don't try to treat the NTFS drive like a linux FS and do illegal things.

For DRM-free games run through wine or something like lutris, you can just point to a linux location as the wine prefix in the config. For steam this requires a mount link to a linux FS for the compatdata folder (steam's version of wine prefix).

I tried doing this, and I was under the impression that I could install a game on this one drive, and I'd be able to play from both windows and linux - is that incorret? I tried installing a game while in windows, switched over to linux, and steam in linux couldn't detect the game installed on that drive in my library.

mila kunis
Jun 10, 2011

Klyith posted:

So I don't do this myself, I'm just going off the instructions and various reports that it can work. But for every 1 person that it works for there are 5 who have problems. Good luck!

Did you have other games previously that it did see? Were you able to install a game in Linux and have it work?

Only tried with one game installed in windows and it couldn't see it. I've been able to install a game in Linux and have it work fine. The dream would be that I could boot into either and play without having to download and save elden ring or whatever twice.

quote:


If the game has a native linux version, the linux-steam will ignore the windows-steam version, and you have to override it to use the windows version instead. (This is a useful thing to know for linux gaming in general. I feel like running the windows versions in proton generally work better than the native linux does.)

Also it might just be steam being picky about the appmanifest files. Try repair library? (Settings -> Storage -> ... -> Repair Library)



IIRC when I changed over from windows to linux I directly copied a number of steam games from my old windows partitions to my new linux setup and steam-linux picked them up ok. So steam-linux is definitely able to pick up installs created by steam-windows. But I only did that with a few games, and I wasn't dealing with a foreign filesystem. I moved the games from ntfs to ext4 because I said sayonara to windows.

Will try this, thanks!

mila kunis
Jun 10, 2011
Is updating my linux kernel to the latest from the one that came installed with my distro a bad idea? Saw someone out there suggest updating it might give a performance boost with my hardware.

mila kunis
Jun 10, 2011

spiritual bypass posted:

It is so, so rare that kernel performance increases are noticeable in the real world. Are you having specific performance problems?

Most of the time, you get a new kernel by upgrading your packages and it's no big deal.

Battery consumption seems really high so I'm trying to see if it can be better. I've also seen recommendations for tools like TLP, power-profile-daemon and the like - any recommendations for an AMD laptop?

mila kunis
Jun 10, 2011
drat, installing TLP seems to have made a big difference to power consumption on my laptop. Inflection point here is where I installed it. Wasn't doing much but browsing and youtube, power consumption before seemed pretty abnormally high

mila kunis
Jun 10, 2011

mila kunis posted:

The option to change this is disabled on the latest BIOS versions. I've seen people suggesting flashing older versions of your BIOS to be able to access the old functionality to change this, but I've also seen people saying this is a potentially bad idea, as its possible that newer hardware/firmware simply won't support S3 sleep.

Unfortunately it seems that people have to just live with S0 sleep going forward thanks to horrible decisions from intel/microsoft/whoever. Personally I think computers should just sleep when told to sleep instead of whatever this new mode is doing.

After some digging around, I found debug tools that will help identify what specifically might be causing issues during S0 sleep.

For AMD: https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
For intel: https://github.com/intel/S0ixSelftestTool

In my case, it told me to update the firmware for my wifi card (from here: https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware)

Doing this seems to have worked somewhat, the battery drain is a lot less from my test over a couple of hours. I'll see how it does tonight when I shut it off overnight.

Ultimately I think you're right, I'll probably try and set it to 'sleep after shutting the lid, then hibernate after an hour' or something to save the most battery.

However - I tried setting up hibernate today, but found it was disabled, and the only way to enable it would be to disable Secure Boot. Is this a bad idea?

Well this fixed it for a while but its regressed for (??) reasons.

I'm on the verge of giving up and going back to a mac. I close my company-provided macbook at 100% battery, its at 99% when I open it up in the morning. I close this linux thinkpad at 100% and its at 50% in the morning. I've been banging my head against this for a month now.

It's a shame that hardware issues continually let me down when I try out linux because in all other respects the experience is a lot nicer, I infinitely prefer KDE to the macOS UI, hate mac keyboards so prefer different laptops, other stuff like terminals are better by default.

mila kunis
Jun 10, 2011

Well Played Mauer posted:

Switching my thinkpad to Linux sleep mode in the bios made a huge difference for me. I lose about 7-10% per night which isn’t great but for picking up and putting it down throughout the day is fine. I can’t compare to windows on this specific machine but I don’t remember much better sleep performance on windows 11 on a laptop once I account for battery size.

I also grabbed powertop and let it do its thing and it basically brought my battery life up to what I’d expect from windows. I don’t expect Mac power management because, well, Apple makes the best laptops and can tailor their os to them so they get even better power management out of them.

They disabled "linux" sleep mode (S3 or suspend to ram) in the bios for the recent thinkpad models. I've been told it's being phased out and that it's a bad idea to flash in an older version of the BIOS to try to enable it.

mila kunis
Jun 10, 2011

mila kunis posted:

Well this fixed it for a while but its regressed for (??) reasons.

I'm on the verge of giving up and going back to a mac. I close my company-provided macbook at 100% battery, its at 99% when I open it up in the morning. I close this linux thinkpad at 100% and its at 50% in the morning. I've been banging my head against this for a month now.

It's a shame that hardware issues continually let me down when I try out linux because in all other respects the experience is a lot nicer, I infinitely prefer KDE to the macOS UI, hate mac keyboards so prefer different laptops, other stuff like terminals are better by default.

Okay well, I tried a hail mary and it worked. After digging around I found posts from AMD engineers suggesting that the newer linux kernels had fixed a bunch of issues. Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.

I installed arch linux because I heard its supposed to be the "bleeding edge" distro, and voila. Shut the laptop at 100%, and it was only 97% 8 hours later.

So I guess the solution was "install arch"? I'll see if this sticks, I didn't have any browsers or anything running at all when I shut the laptop and will check and see if it makes a difference.

mila kunis
Jun 10, 2011

mila kunis posted:

Okay well, I tried a hail mary and it worked. After digging around I found posts from AMD engineers suggesting that the newer linux kernels had fixed a bunch of issues. Unfortunately kubuntu was limited to a kernel before the fix, and from what I read its a bad idea to install a kernel your distro doesn't support.

I installed arch linux because I heard its supposed to be the "bleeding edge" distro, and voila. Shut the laptop at 100%, and it was only 97% 8 hours later.

So I guess the solution was "install arch"? I'll see if this sticks, I didn't have any browsers or anything running at all when I shut the laptop and will check and see if it makes a difference.

Woke up to a dead laptop again, ah gently caress it. Gonna return it. If I try Linux ever again it'll probably be from a dedicated linux vendor like system76 or framework rather than bothering with a thinkpad. I've wasted enough time and I'm feeling frustrated enough atm that I'm just gonna pay the apple premium for now I think.

mila kunis fucked around with this message at 23:19 on Mar 19, 2024

mila kunis
Jun 10, 2011

quote:

We even worked with him to fix the valgrind issue (which it turns out now was caused by the backdoor he had added),” the Ubuntu maintainer said. "He has been part of the xz project for two years, adding all sorts of binary test files, and with this level of sophistication, we would be suspicious of even older versions of xz until proven otherwise."

This might be a dumb question but why do there have to be "binary test files", rather than sample data generated from testing code?

mila kunis fucked around with this message at 14:23 on Mar 30, 2024

Adbot
ADBOT LOVES YOU

mila kunis
Jun 10, 2011

waffle iron posted:

xz is a compression algorithm. I believe the xz files containing the object to be injected were part of the tests to see if the built code could uncompress it (and then compare the output to a hash of the uncompressed file) or see if a recompressed version of the file was as compressed or better than some previously recorded result.

You need some sample files to be able to test for correctness and that there have been no performance regressions, but those types of files are expected to be totally benign.

Right, what I'm asking is - can't test code generate these files rather than having strange binaries checked in?



Have your test code make a large file, then test your compression code on it. That way your test data source code is also checked in in and verifiable?

I don't work on this kinda stuff and my knowledge is limited, so wondering if that kinda thing is viable

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply