Tushta

joined 1 year ago
[โ€“] Tushta@programming.dev 1 points 9 months ago

I have a Windows dual boot, and Windows did install some updates, and Lenovo site indicates that the latest BIOS version was released mid November, so that could be it.

[โ€“] Tushta@programming.dev 2 points 10 months ago

running sleepgraph crashes the computer same way deep sleep does ๐Ÿ˜–

[โ€“] Tushta@programming.dev 1 points 10 months ago

Yeah, if the bracket is on deep, it crashes and enter the BIOS recovery thingy. If it's s2idle, it does what it says on the tin.

[โ€“] Tushta@programming.dev 3 points 10 months ago

No, hibernation saves state to disk, and turns the computer off, drawing no power. Deep sleep is what was for me just sleep until recently: it uses power to keep data in ram, so it's faster to wake up than hibernation. The amount of power used is really small, so unless you don't use your lap top for a couple of days, it won't deplete the battery. New hardware has this new "S2 Idle" state, that is basically an "On" state minus the screen and it's OS's job to try to use as little power as possible usually by telling each and every device to chill as much as possible (this is my understanding, but don't quote me on this). On Windows, with the first party device drivers, this sorta works OK + OS drops to deep sleep or hibernation depending on battery or something.

[โ€“] Tushta@programming.dev 1 points 10 months ago (2 children)

It's 2021 Lenovo ThinkBoot 15 G2 Intl with Intel i3-1115G4, 8GB onboard ram, integrated GPU and two NVME slots.

Here are some lines from dmidecode if they mean anything to anyone:

Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
        Vendor: LENOVO
        Version: F8CN42WW(V2.05)
        Release Date: 06/28/2021
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 16 MB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 2.42
        Firmware Revision: 2.42

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: LENOVO
        Product Name: 20VE
        Version: ThinkBook 15 G2 ITL
        SKU Number: LENOVO_MT_20VE_BU_idea_FM_ThinkBook 15 G2 ITL
        Family: ThinkBook 15 G2 ITL

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: LENOVO
        Product Name: LNVNB161216
        Version: SDK0J40700 WIN
[โ€“] Tushta@programming.dev 4 points 10 months ago

So... Bios update broke deep sleep, because fuck you, that's why?

 

I was running KDE Neon on ThinkBook 15 G2 and had deep sleep working after adding mem_sleep_default=deep to GRUB_CMDLINE. It worked for a while until it didn't. I didn't do anything other than running regulat updates. Since couple weeks back, when going to sleep, it shows BIOS Recovery progress bar or something and restarts.

I switched to Debian and the behavior is the same. S2 sleep is next to useless as it drains something like 10% battery / hour, and the lap top is warm to touch.

[โ€“] Tushta@programming.dev 19 points 1 year ago (2 children)

Gasp Don't remind me how old I'm getting. Joel's blog was really big deal, upto ~15 years ago when he stopped blogging. He and Jeff Atwood created Stack Overflow.

 

There is a commonly shared view in the programming community that algorithm puzzles are something you do to prep for an interview and than you never use in the actual job. This certainly rings true as in 15 years of programming, i feel I can count on fingers the number of times I needed to stop and think about data structure / algorithm, rather than usual workload of thinking about what's even the problem being solved; how to structure code; what's the interface at the module/service/package boundary; how to make code testable/maintainable/flexible etc... Iterating though a list or a dict is all ds/algo you'll need 99% of the time.

FF to now when I'm on a burnout induced sabbatical, and after a while I got itchy to write some code again. Problem was that all the ideas for projects I'd like to do are, well... projects. I still don't feel like digging through manuals for libraries and frameworks and writing boilerplate and doing all the things that need to be done to push things through. Anyhow, I was sitting in a coffee shop with my illustrator friend, who, at some point, just pulled out a notebook, spent 20-ish minutes drawing something that caught his eye and was like: "that's it for today". That's it... 20 minutes, it's done, tomorrow something else, new blank page... So I got into puzzles. Now, the first thing I do in the morning is solving a daily puzzle on leet code. If I feel like it, I might also do problems from an old competition. And I'm having a blast!

Which brings us to the question from the title: is there a direction I can push this forward? I mean, I don't mind this just being fun, but I was curious, is there something out there in the "Real World" that I'm missing that is closer to this kind of problem solving from what i was doing so far?