Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

168 votes
2 answers
182215 views
How to disable auto suspend when I close laptop lid?
I'm using archlinux. It never auto-suspend before a recent system upgrade(maybe I updated the kernel?). I think it is related to `laptop-mode` or `acpid`, so I stop them: /etc/rc.d/laptop-mode stop /etc/rc.d/acpid stop I also edit `/etc/laptop-mode/laptop-mode.conf`: ENABLE_LAPTOP_MODE_TOOLS=0 Then...
I'm using archlinux. It never auto-suspend before a recent system upgrade(maybe I updated the kernel?). I think it is related to laptop-mode or acpid, so I stop them: /etc/rc.d/laptop-mode stop /etc/rc.d/acpid stop I also edit /etc/laptop-mode/laptop-mode.conf: ENABLE_LAPTOP_MODE_TOOLS=0 Then I edit /etc/acpi/actions/lm_lid.sh, commented out the last line: # /usr/sbin/laptop_mode auto But all of above don't work. Following lines were found in /var/log/kernel.log(unrelated lines omitted): Oct 23 15:29:20 localhost kernel: [18617.549098] PM: Syncing filesystems ... done. Oct 23 15:29:20 localhost kernel: [18618.001898] PM: Preparing system for mem sleep Oct 23 15:29:30 localhost kernel: [18618.039565] Freezing user space processes ... (elapsed 0.01 seconds) done. Oct 23 15:29:30 localhost kernel: [18618.052596] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done. Oct 23 15:29:30 localhost kernel: [18618.065999] PM: Entering mem sleep Oct 23 15:29:30 localhost kernel: [18618.066167] Suspending console(s) (use no_console_suspend to debug) Oct 23 15:29:30 localhost kernel: [18618.097917] sd 0:0:0:0: [sda] Synchronizing SCSI cache Oct 23 15:29:30 localhost kernel: [18618.098103] sd 0:0:0:0: [sda] Stopping disk Oct 23 15:29:30 localhost kernel: [18618.270537] snd_hda_intel 0000:00:14.2: power state changed by ACPI to D3hot Oct 23 15:29:30 localhost kernel: [18619.274374] PM: suspend of devices complete after 1196.192 msecs Oct 23 15:29:30 localhost kernel: [18619.274691] PM: late suspend of devices complete after 0.313 msecs Oct 23 15:29:30 localhost kernel: [18619.440877] ohci_hcd 0000:00:14.5: wake-up capability enabled by ACPI Oct 23 15:29:30 localhost kernel: [18619.642144] ACPI: Waking up from system sleep state S3 Oct 23 15:29:30 localhost kernel: [18620.049424] PM: noirq resume of devices complete after 333.503 msecs Oct 23 15:29:30 localhost kernel: [18620.049852] PM: early resume of devices complete after 0.334 msecs Oct 23 15:29:30 localhost kernel: [18622.418605] PM: resume of devices complete after 2371.906 msecs Oct 23 15:29:30 localhost kernel: [18622.419018] PM: Finishing wakeup. Oct 23 15:29:30 localhost kernel: [18622.419019] Restarting tasks ... done. Oct 23 15:29:30 localhost kernel: [18622.464752] video LNXVIDEO:01: Restoring backlight state I think this is not caused by pm-susend, because /var/log/pm-suspend.log don't log anything. I don't want my laptop go to sleep when I close the lid. How to do it? Kernel version: 3.6.2-1-ARCH
heiz (1833 rep)
Oct 23, 2012, 08:05 AM • Last activity: May 12, 2021, 11:48 PM
2 votes
1 answers
2883 views
Hard disk spins down and up too frequently when on battery
I'm using Debian Wheezy No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.3 (wheezy) Release: 7.3 Codename: wheezy $ uname -a Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux on Lenovo G580 with Seagate 1TB Hard Disk. The problem I'm facing is tha...
I'm using Debian Wheezy No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.3 (wheezy) Release: 7.3 Codename: wheezy $ uname -a Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux on Lenovo G580 with Seagate 1TB Hard Disk. The problem I'm facing is that the hard disk spins down and up too frequently when on battery. I tried using hdparm and used the following commands, but that didn't work. Also installed laptop-mode and edited laptop-mode-conf to LM_AC_HD_IDLE_TIMEOUT_SECONDS=2000 LM_BATT_HD_IDLE_TIMEOUT_SECONDS=2000 NOLM_HD_IDLE_TIMEOUT_SECONDS=7200 after reading similar posts, but that too didn't work, and so, I uninstalled it.
M4ver1k (121 rep)
Dec 30, 2013, 04:32 PM • Last activity: Nov 25, 2018, 12:37 AM
1 votes
0 answers
753 views
laptop-mode-tools causes power saving behavior on the intel HDA sound card, despite /sys/module/snd_hda_intel/parameters/power_save being 0
I've run into a peculiar issue. Let me describe: (please read EDIT2 as it gives the most important piece of the situation) 1. On boot, from GRUB I pass arguments snd_hda_intel.power_save=0 snd_hda_intel.power_save_controller=N 2. Laptop mode tools starts up, power saving for snd_hda_intel is disable...
I've run into a peculiar issue. Let me describe: (please read EDIT2 as it gives the most important piece of the situation) 1. On boot, from GRUB I pass arguments
snd_hda_intel.power_save=0 snd_hda_intel.power_save_controller=N
2. Laptop mode tools starts up, power saving for snd_hda_intel is disabled: See text file at https://pastebin.com/R6SMzTAT 3. /sys/module/snd_hda_intel/parameters/power_save is set to 0, but the system still shows power saving behavior – the characteristic clicking in headphones a while after stopping sound playback, and again when starting sounding as the card powers on. 4. If I use powertop, go to Tunables, it says Audio codec power management is off. Now, if here, pressing Enter is turn the power management on and then off, the issue is fixed, no more power saving. I'm puzzled why this is needed though. Also, maybe im being silly, but powertop claims it runs the command
echo '' > '/sys/module/snd_hda_intel/parameters/power_save'; 
to turn this off. Running this from the terminal however gives an error bash: echo: write error: Invalid argument I can do echo '0' > /sys/module/snd_hda_intel/parameters/power_save but that parameter is supposedly already set to 0, and this command doesn't fix the issue. I need to enable and disable in powertop. Any explanation for this and how to fix it without having to do the powertop trick afer every boot? And why does powertop claim to run a command that gives an error when I try top execute it? Why is power saving going on when the power_save parameter is 0 (and power_save_controller=N too)? Some more info: Linux gentoo 4.19.1-gentoo #1 SMP Mon Nov 5 21:27:35 CET 2018 x86_64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz GenuineIntel GNU/Linux Sound card: 00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31) EDIT: Also an interesting fact – if I do the powertop thing, and then stop laptop mode tools: systemctl stop laptop-mode that causes the power saving behavior to come back, and the powertop trick is needed. So clearly laptop mode tools does something weird here. Booting the system with laptop mode tools disabled makes everything okay too – no annoying power saving on the sound card. EDIT2: Okay, i have no idea why powertop claims to do echo '', because after investigating the source code, it clearly does ofstream file; file.open("/sys/module/snd_hda_intel/parameters/power_save", ios::out); file /sys/module/snd_hda_intel/parameters/power_save echo '0' > /sys/module/snd_hda_intel/parameters/power_save works. laptop-mode-tools must be doing something weird, but overall this has to be a bug in the driver, am I correct?
gimex (11 rep)
Nov 6, 2018, 08:14 PM • Last activity: Nov 11, 2018, 03:22 PM
1 votes
2 answers
847 views
Can't set a blacklist for usb autosuspending
I'm trying to disable usb autosuspend for my wireless USB mouse: CONTROL_USB_AUTOSUSPEND="auto" AUTOSUSPEND_USE_WHITELIST=0 AUTOSUSPEND_USBID_BLACKIST="046d:c52f" I already put these values to `/etc/laptop-mode/conf.d/usb-autosuspend.conf`, and restarted `laptop-mode`, but that just don't work (it s...
I'm trying to disable usb autosuspend for my wireless USB mouse: CONTROL_USB_AUTOSUSPEND="auto" AUTOSUSPEND_USE_WHITELIST=0 AUTOSUSPEND_USBID_BLACKIST="046d:c52f" I already put these values to /etc/laptop-mode/conf.d/usb-autosuspend.conf, and restarted laptop-mode, but that just don't work (it still stuck for one second when I move my mouse)
daisy (55787 rep)
Oct 20, 2012, 02:14 AM • Last activity: Dec 13, 2014, 07:48 PM
1 votes
0 answers
1657 views
Where are pm-powersave settings on OpenSUSE 13.2, and are they used?
I am trying to sort out powersaving for OpenSUSE 13.2 running on a laptop. I found this guide: https://en.opensuse.org/Powersaving for understanding Powersaving on OpenSUSE. However, it appears to not have been changed since 2011, so I feel the information there might be a little out of date. Now, i...
I am trying to sort out powersaving for OpenSUSE 13.2 running on a laptop. I found this guide: https://en.opensuse.org/Powersaving for understanding Powersaving on OpenSUSE. However, it appears to not have been changed since 2011, so I feel the information there might be a little out of date. Now, in that guide they mention pm-utils are being used for powersaving, and that the scripts live in "/usr/lib/pm-utils/power.d" However, on my installation, this directory does not exist. There is a "/etc/pm/power.d" but this directory contains nothing. pm-powersave is installed, and I can invoke it with sudo pm-powersave true but without any files in the correct folder (which one should the files go in), does this command actually do anything? I also noted that the guide referenced using laptop-mode-tools, which is available in the standard repos; however, according to https://askubuntu.com/questions/312005/is-laptop-mode-tools-still-relevant-on-13-04 https://askubuntu.com/questions/172391/is-laptop-mode-tools-still-relevant-for-12-04-and-the-3-x-kernels for Ubuntu, which uses the pm-powersave scripts, laptop-mode-tools is redundant. Does this apply to OpenSUSE, and if so, where are the configuration files for pm-powersave? --------- EDIT ----------- I found http://newsgroupstats.info/article.jsp?server=nntp.novell.com&group=opensuse.org.help.install-boot-login&postid=157199 which suggests pm-utils is not used.
Jonathan Gallagher (171 rep)
Dec 10, 2014, 09:20 AM • Last activity: Dec 10, 2014, 10:46 AM
2 votes
1 answers
2762 views
laptop-mode-tool not working in Arch Linux
I've installed `laptop-mode-tools` and optional dependencies on Arch Linux. Then I've enabled `laptop-mode.service` and rebooted the system. If I check if the service is actually working according to [this][1] (Para 3. Is Laptop Mode Enabled?) I get the following: $ cat /proc/sys/vm/laptop_mode 0 Th...
I've installed laptop-mode-tools and optional dependencies on Arch Linux. Then I've enabled laptop-mode.service and rebooted the system. If I check if the service is actually working according to this (Para 3. Is Laptop Mode Enabled?) I get the following: $ cat /proc/sys/vm/laptop_mode 0 The file /var/run/laptop-mode-enabled is not found. Finally systemctl tells me: laptop-mode.service loaded active exited Laptop Mode Tools All the above "symptoms" tell me that the laptop-mode service is not actually working. What am I missing? **EDIT** I have noticed that $ cat /proc/sys/vm/laptop_mode gives 0 even after doing thinks like in my answer below if I boot up on battery. Then if I connect the ac adapter for a few seconds and then disconnect it, $ cat /proc/sys/vm/laptop_mode will give 2. In any case now my battery seems to last much longer
lviggiani (3619 rep)
Apr 30, 2014, 11:52 AM • Last activity: Oct 7, 2014, 07:42 AM
1 votes
1 answers
916 views
why is my laptop-mode configuration being ignored?
I am running Debian GNU/Linux Jessie (testing) on my laptop. I enabled the systemd laptop-mode service: $ sudo laptop_mode Laptop mode enabled, active [unchanged] and in my `/etc/laptop-mode/conf.d/cpufreq.conf` I have (trimmed everything else, using defaults) CONTROL_CPU_FREQUENCY=1 BATT_CPU_GOVERN...
I am running Debian GNU/Linux Jessie (testing) on my laptop. I enabled the systemd laptop-mode service: $ sudo laptop_mode Laptop mode enabled, active [unchanged] and in my /etc/laptop-mode/conf.d/cpufreq.conf I have (trimmed everything else, using defaults) CONTROL_CPU_FREQUENCY=1 BATT_CPU_GOVERNOR=powersave LM_AC_CPU_GOVERNOR=powersave NOLM_AC_CPU_GOVERNOR=performance which are modes supported by all my CPUs: cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors performance powersave performance powersave performance powersave performance powersave However, if I reboot with AC (or plug in the mains) and look in cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor powersave powersave powersave powersave all the CPUs are using powersave. So why is my config being ignored? How can I fix this? Relevant info: * I do not have pm-utils or acpid installed (because they are known to conflict with systemd and laptop-mode in various ways) * this was on a fresh install and there are no legacy CPU config options left over in any other laptop-mode config file.
fommil (682 rep)
Sep 13, 2014, 06:55 PM • Last activity: Sep 13, 2014, 06:59 PM
Showing page 1 of 7 total questions