Zum Inhalt

Schlagwort: power

Linux: Make uPD720201 great again!

After returning my first USB3 PCIe Card because it randomly stopped working and, just to experience the same problems with the card I got in exchange – thanks amazon – i finally found the root cause and permanent fix.

The Renesas uPD720201 USB 3.0 Host Controller seems to have broken S3 power saving implenented. Since you probably are not using your full size PCIe card while on battery, you can safely disable power saving features.

Edit your /etc/default/grub and add usbcore.autosuspend=-1 to your GRUB_CMDLINE_LINUX_DEFAULT. Afterwards run update_grub.

Turn your PC off and unplug from the wall outlet, this will bring your card out of S3 sleep.

Then boot your PC again – problem solved!

Leave a Comment

Asus ZenBook 13 (UX331UN) with Ubuntu: Battery drain while in suspend

When i got my shiny new ZenBook 13 UX331UN in July, i immediately wiped it and installed Ubuntu 18.04 (Bionic Beaver).

But I soon realized something was wrong with suspend: The laptop would go to sleep and over night the battery would either almost (10-ish percent) or completely drain, leaving the laptop completely powered off.

On other laptops the suspend state would eat about 5% charge per day, leaving you able to suspend around 3 weeks in theory, but something was using the battery in suspend here.

Here's the problem analysis:

Suspend your laptop. Wake it up again. Now check the output of

sudo journalctl | grep "PM: suspend" | tail -2

May 13 18:41:00 mex kernel: PM: suspend entry (s2idle)
May 13 20:52:36 mex kernel: PM: suspend exit

If you end up with 

Your laptop is only entering "s2idle" sleep (which is basicallynot saving much more than with blanking out screen and disabling the network). What we really want instead is the "deep" sleep.

You can also check

cat /sys/power/mem_sleep

which yields

[ s2idle] deep

meaning the s2idle state is active in standby, because it's written in brackets.

The permanent fix:

Edit your grub bootloader config to add a parameter to your Linux kernel when it boots. Type

sudo gedit /etc/default/grub

and replace the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

Save the file and exit. Now run

sudo update-grub && sudo reboot

To apply the changes and reboot. Test. Done.

IMPORTANT: If you now have troble waking your laptop up, DO NOT USE THE NVIDIA DRIVERS. They suck. Use noveau.

EDIT: The above works and is tested, but i now have the problem that the laptop won't resume when on battery. When it's on power supply it can resume. Any ideas!?

EDIT: You're  not alone: https://bugzilla.kernel.org/show_bug.cgi?id=201307 and https://askubuntu.com/questions/1071855/ubuntu-18-04-does-not-wake-up-from-suspend-on-asus-zenbook

16 Comments

Intel NUC: Lautes brummen aus dem Lautsprecher, wenn keine Anwendung Ton abspielt

Ich habe heute einen Intel NUC mit CentOS7 neu installiert und beobachtet, dass etwa 5 Sekunden nachdem die Audiowiedergabe stoppt – beispielsweise VLC – die Lautsprecher extrem laut zu brummen anfangen, so als würde man das Klinkenkabel nur halb einstecken.

Meine Vermutung, CentOS schaltet die Soundkarte ab, war dann auch tatsächlich richtig, der Workaround ist hier:

echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save_controller
echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save

Um das permanent zu bekommen, packt man das in die Datei /etc/rc.local und vergisst natürlich nicht, die auch gleich noch mit chmod +x Ausführbar zu machen.

Die Methode, dem Intel-Soundkartentreiber in /etc/modprobe.d Parameter mitzugeben funktioniert bei mir übrigens nicht, der Treiber ignoriert diese.

Leave a Comment