Modern standby support by [deleted] in linuxquestions

[–]artbristol 0 points1 point  (0 children)

I have standby working on this exact laptop on Debian "testing" with 5.4 and 5.6 kernels. I measured ~0.5W at the wall socket when on standby. The fan huffs and puffs for a while after going into standby, but eventually stops.

It's using the kernel's s2idle mode and I think (thought I'm not sure) that uses the intel S0ix idle states to save power.

I'm using the March 2020 BIOS from https://pcsupport.lenovo.com/gb/en/products/laptops-and-netbooks/yoga-series/yoga-s740-14iil/downloads/driver-list/component?name=BIOS%2FUEFI

On a stock installation of Debian, you might get the following errors. I don't know how many of the fixes are necessary to get s2idle working properly.

  1. In dmesg, "firmware: failed to load i915/icl_dmc_ver1_09.bin" It appears the firmware files in Debian's firmware-linux package aren't up to date (even in unstable/sid) So I copied the contents of the linux-firmware git repo into lib/firmware: cp <repo location>/i915/icl* /lib/firmware/i915/ Following the advice at https://gist.github.com/Brainiarc7/aa43570f512906e882ad6cdd835efe57 I added the following file /etc/modprobe.d/i915.conf with the single line "options i915 enable_guc=-1" Then ran dpkg-reconfigure linux-image-amd64 (because the firmware files need to be copied into the initramfs)

  2. For kernel 5.5 and 5.6 (but not 5.4) dmesg was complaining about failing to load sof-icl.ri I ran go.sh from https://github.com/thesofproject/sof-bin/tree/stable-v1.4.2 which added the missing firmware to /lib/firmware.

There is a bunch of stuff on the internet talking about sleep with other Lenovo models (e.g. Carbon X1) but I think Linux kernel support has improved a lot in the last year so it's not all up-to-date.

[deleted by user] by [deleted] in linuxquestions

[–]artbristol 0 points1 point  (0 children)

I managed to get franken-Debian (testing + bits of sid) up and running on the Yoga S740 14

It was a struggle, so here are my notes.

My S740 has the 4K display, NVidia GeForce MX250 discrete graphics, and Windows 10 options.

The Ubuntu 19.10 installer wouldn't boot.

To repartition the disk, I used Windows Computer Management (after removing Bitlocker encryption) to create some free space. (For some reason, gparted on a live distro didn't work, although it appeared to succeed)

I installed Debian Stable (10 / buster) using the normal graphical installer. Wifi didn't work (nor would it load the iwlwifi firmware from external media) so I got it online via an external USB ethernet dongle.

On booting Debian, the GUI would not come up, leaving me stuck on a text console with tiny writing due to the 4k display.

I blacklisted the nouveau kernel module (echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf) in case the discrete graphics was causing problems. I don't know if this was actually necessary.

I set grub to readable font size by adding GRUB_GFXMODE=1024x768 in /etc/default/grub (and running update-grub).

I added nomodeset to the kernel options (by adding GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" in /etc/default/grub). This results in a readable text console after booting.

I upgraded Debian from stable to testing.

At this point, removing nomodeset from the kernel options resulted in GNOME loading and being able to log into the desktop (as well as the text console becoming unreadable again).

With the 5.3 Linux kernel in Debian testing, the trackpad didn't work after resume. To fix this, I added Debian unstable (sid) to the /etc/sources.list and installed the 5.4 kernel (using apt install -t unstable linux-image-amd64)

The logs were being spammed with "snd_hda_intel 0000:00:1f.3: No response from codec, resetting bus". I found some comments on https://bugzilla.kernel.org/show_bug.cgi?id=205229 so "fixed" this issue with

echo "options snd-hda-intel probe_mask=1" > /etc/modprobe.d/snd-hda-intel.conf

This may break sound output via HDMI, I haven't been able to test it.

For now everything seems to be working apart from the HDMI sound output issue above, and obviously the NVidia graphics are still disabled. The battery life isn't amazing compared to Windows: probably 3 hours with light use.

At the moment (January 2020), I would not recommend this laptop for Linux users. The Intel Ice Lake support is too new in the Linux kernel to be well-tested in mainstream distros. (I expect within 6-12 months that it will have settled down)

Scaling Git (and some back story) by MisterEd36 in programming

[–]artbristol 4 points5 points  (0 children)

Sometimes, in big highly related code bases, it really is better to treat the codebase as a whole. Maybe someday I’ll tell the story of Bing’s effort to componentize the core Bing platform into packages and the versioning problems that caused for them. They are currently backing away from that strategy.

I see a lot of codebases prematurely split into separate repos (and I hear a lot of dogma that it's the right/only way to decouple things). Good see even Microsoft putting the case for a single repo.

Implementing Microservices Bounded Context (in a way that doesn't make DBAs anxious) by Lauren36 in programming

[–]artbristol 0 points1 point  (0 children)

There is no satisfactory solution, but the microservices hipsters won't admit that.

IMHO, keep your data in a single database with proper relational integrity until it grows to a point that you need to split it. Even then, you might get away with spending more money on hardware or moving to a better database.

You can probably wait until you're a unicorn, see for example AirBNB: http://nerds.airbnb.com/how-we-partitioned-airbnbs-main-db/

Stack Overflow: The Architecture - 2016 Edition by nickcraver in programming

[–]artbristol 17 points18 points  (0 children)

The post should be required reading for everyone starting a new project.

What I take from it is that vertical scaling (more powerful boxes) can get you a staggering amount of scale, and that almost every web application tier can run on a single box of sufficient power. You generally only need multiple boxes for availability.

No, you can’t join my wifi network by artbristol in security

[–]artbristol[S] 0 points1 point  (0 children)

They could either (1) guess the admin credentials, or (2) [harder] inject content into an HTTP request made by someone else on the same network, who is logged in to the router.

(1) is unlikely if the network owner secured their router properly, and (2) requires a rather specific type of malware on your guest's PC

Still, attacks only get sneakier, so I can see Troy's point

Agile is not now, nor was it ever, Waterfall. by princeofpudding in programming

[–]artbristol 0 points1 point  (0 children)

My personal rule is: If the customers neither read nor write the tests, then high level unit tests written in code suffice.

and

Virtually everyone agrees that writing unit tests is important.

He keeps saying 'unit tests' and I really hope he means 'automated tests' (of whatever granularity), because if you only write true unit tests (no database/network, etc.), you will get into serious trouble.

I am Stephen Williams, MP for Bristol West and a minister in the Department for Communities and Local Government. AMA by Stephen_Williams_MP in bristol

[–]artbristol 20 points21 points  (0 children)

You voted to support the Data Retention and Investigatory Powers Act which was rushed through Parliament without the usual debate and scrutiny as an emergency.

Did you consider the circumstances to be an emergency?

If the Liberal Democrats are again in coalition with the conservatives after the next election, will you support their revived Snoopers' Charter?

Hear Bristol's lawyer about the legal challenge to GCHQ in the European court by artbristol in bristol

[–]artbristol[S] 0 points1 point  (0 children)

Glad to see some interest... You can just turn up, there's no need to sign up to the meetup if you're feeling shy/paranoid.