Sample Header Ad - 728x90

Unix & Linux Stack Exchange

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

Latest Questions

5 votes
2 answers
2009 views
ACPId suspend-to-ram: can you specify waking up using keyboard events?
This is Gentoo Linux with OpenRC (updated to systemd later on), and [ACPI][1] + some power management features in the kernel for Intel. ACPId is up and running. I can suspend to ram [using][2]: echo -n "mem" > /sys/power/state This works, but I need to use the power button to wake up. Is there a way...
This is Gentoo Linux with OpenRC (updated to systemd later on), and ACPI + some power management features in the kernel for Intel. ACPId is up and running. I can suspend to ram using : echo -n "mem" > /sys/power/state This works, but I need to use the power button to wake up. Is there a way to wake up from keyboard events like pressing the space bar? The keyboard is a wireless USB keyboard. I've looked at the content of the script in /etc/acpi and it offers no insight into doing this. Most of the information I find is usually geared at laptop users. Do I really need something like the old pm-utils to accomplish this and is there anything wrong with just using acpid? cat /proc/acpi/wakeup Device S-state Status Sysfs node P0P2 S4 *disabled P0P3 S4 *disabled pci:0000:00:06.0 P0P1 S4 *disabled pci:0000:00:1e.0 PS2K S4 *enabled pnp:00:0b EUSB S4 *enabled pci:0000:00:1d.7 USBE S4 *enabled pci:0000:00:1a.7 P0P4 S4 *disabled pci:0000:00:1c.0 P0P5 S4 *disabled P0P6 S4 *disabled pci:0000:00:1c.2 P0P7 S4 *disabled P0P8 S4 *disabled P0P9 S4 *disabled GBEC S4 *disabled USB0 S4 *enabled pci:0000:00:1d.0 USB1 S4 *enabled pci:0000:00:1d.1 USB2 S4 *enabled pci:0000:00:1d.2 USB3 S4 *disabled USB4 S4 *enabled pci:0000:00:1a.0 USB5 S4 *enabled pci:0000:00:1a.1 USB6 S4 *enabled pci:0000:00:1a.2 MBT4 S4 *disabled Seemingly relevant kernel options used (3.10.25-gentoo SMP, 64bit, IA32emul=off, no-multilib): - CONFIG_HOTPLUG_CPU=y and with cpu0_hotplug by default - Suspend to ram and standby Hibernation - Power mgmt debug support - Suspend/resume event tracing - ACPI support - CPU idle PM support - Cpuidle Driver for Intel Processors - Support for systemd through Gentoo option in kernel was enabled BIOS setup is pretty standard: - I've enabled ACPI2.0 extra tables - Not seeing any wake events for USB but I've tried wake up events from PCI/PCIe/PS2 etc but indeed this is a wireless usb keyboard - Board is old school winner Maximus Formula with Q6600 Core2quad OpenRC was updated to systemd and the kernel was recompiled to support that. Configuration was also updated like so . With systemd, apcid is not required in all instances. For instance without running you can issue systemctl suspend and the behavior is... the same as before i.e. wake up only from power button... pstree output: systemd ├─acpid -f ├─at-spi-bus-laun │ ├─dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork--print-addres │ └─2*[{at-spi-bus-laun}] ├─at-spi2-registr --use-gnome-session │ └─{at-spi2-registr} ├─dbus-daemon --system --address=systemd: --nofork --nopidfile--systemd-activation ├─dbus-daemon --fork --print-pid 5 --print-address 7 --session ├─dbus-launch --sh-syntax --exit-with-session ├─dhcpcd -q --nobackground ├─login -- │ └─bash │ └─startx /usr/bin/startx │ └─xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xserverrc :0 -auth... │ ├─X -nolisten tcp :0 -auth /home/user/.serverauth.3329 │ └─openbox --startup /usr/libexec/openbox-autostart OPENBOX │ ├─firefox │ │ ├─plugin-containe ... │ │ │ └─6*[{plugin-containe}] │ │ └─35*[{firefox}] │ └─vlc │ └─4*[{vlc}] ├─lxterminal │ ├─bash │ │ └─htop │ ├─bash │ │ └─su │ │ └─bash │ │ └─grc /usr/lib/python-exec/python2.7/grc tail -f ... │ │ ├─grcat /usr/lib/python-exec/python2.7/grcat conf.log │ │ └─tail -f /var/log/emerge.log │ ├─bash │ ├─gnome-pty-helpe │ └─{lxterminal} ├─mount.ntfs /dev/sdb1 /mnt/div -o rw ├─roxterm │ ├─bash │ │ └─su │ │ └─bash │ │ └─pstree -a │ ├─gnome-pty-helpe │ └─{roxterm} ├─systemd --user │ └─(sd-pam) ├─systemd-journal ├─systemd-logind ├─systemd-udevd ├─wbar --pos bot-right --taskbar --isize 24 └─xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55
user44370
Jan 10, 2014, 09:50 PM • Last activity: Jul 27, 2025, 11:03 PM
0 votes
0 answers
17 views
Run program (or write to socket/FIFO) on battery status/percentage change
Currently, I populate my status bar with my battery percentage by occasionally reading from `/sys/class/power_supply/macsmc-battery/status` and `/sys/class/power_supply/macsmc-battery/capacity`. **Is there a way to let my system (perhaps acpid or something) run a custom program (or even better, writ...
Currently, I populate my status bar with my battery percentage by occasionally reading from /sys/class/power_supply/macsmc-battery/status and /sys/class/power_supply/macsmc-battery/capacity. **Is there a way to let my system (perhaps acpid or something) run a custom program (or even better, write to a FIFO or UNIX domain socket) on power percentage and power status changes?** Note: As far as I can tell, this is not a duplicate of [Running applications depending on battery or charging](https://unix.stackexchange.com/questions/158597) as that solution depends on polling.
Runxi Yu (143 rep)
Feb 22, 2025, 03:58 AM
2 votes
1 answers
1511 views
How to control laptop lid behaviour in Debian 12 in XFCE
I have recently installed Debian 12 amd64 on a Lenovo IdeaPad 100s. There seem to be a problem with the laptop lid, in paricular I do not find where the behaviour the system should take is set. In `xfce-power-manager` gui I have set to "Do nothing". Still when I close the lid the system goes to hibe...
I have recently installed Debian 12 amd64 on a Lenovo IdeaPad 100s. There seem to be a problem with the laptop lid, in paricular I do not find where the behaviour the system should take is set. In xfce-power-manager gui I have set to "Do nothing". Still when I close the lid the system goes to hibernation. After I reopen the lid it goes in a strange mode in which it is not fully out of hibernation in the graphical session. Still the system is "awake enough" that I can go in the second log in (CTRL-ALT-F2) and log in text mode and reboot. I have tried to chance "Do nothing" in other settings, but the system always does the same, as if xfce-power-manager were not really setting anything. I have tried to modify by hand /etc/systemd/logind.conf changing the lines
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
leaving the rest fully commented as I found it
...
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
...
After restarting the service systemctl restart systemd-logind.service and even after rebooting the behavior of the closure of the lid did note change. I doubt systemd-logind is doing anything here because all options are listed as inactive because systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target returns
○ sleep.target - Sleep
     Loaded: loaded (/lib/systemd/system/sleep.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ suspend.target - Suspend
     Loaded: loaded (/lib/systemd/system/suspend.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ hibernate.target - System Hibernation
     Loaded: loaded (/lib/systemd/system/hibernate.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ hybrid-sleep.target - Hybrid Suspend+Hibernate
     Loaded: loaded (/lib/systemd/system/hybrid-sleep.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)
At this point I am left to wonder which program is handling the lid .. Please note that if I use the logout button to do anything like suspend or hibernate or sleep it does it correctly and I am able to wake the machine getting back to a working state. Only when the lid is closed I get this mess ...
Rho Phi (329 rep)
Jan 7, 2024, 09:40 PM • Last activity: Oct 31, 2024, 12:30 PM
0 votes
1 answers
724 views
Switch Pulseeffects profiles on headphones connection/disconnection
this is related to... [https://unix.stackexchange.com/questions/25776/detecting-headphone-connection-disconnection-in-linux][1] as the title states, I wanted to switch pulseffects profiles on headphone connection/disconnection. I've referred to the link below for setting profiles via the terminal bu...
this is related to... [https://unix.stackexchange.com/questions/25776/detecting-headphone-connection-disconnection-in-linux] as the title states, I wanted to switch pulseffects profiles on headphone connection/disconnection. I've referred to the link below for setting profiles via the terminal but these do not work on the pulseeffects flatpack. https://askubuntu.com/questions/1200332/how-can-i-toggle-selected-pulseeffects-equalizer-profile-from-command-line after a bit of googling, I figured out that i could use, flatpak run com.github.wwmm.pulseeffects -l to change the profile as necessary. I assume that I'll have to use acpid to execute the aforementioned on jack/headphone plug/unplug events. https://linux.die.net/man/8/acpid . Later, I found this link. https://unix.stackexchange.com/questions/559326/how-do-i-actually-write-acpid-event-scripts-that-detect-when-headphones-are-plug ...and have now created two events headphone-jack-plug event=jack/headphone HEADPHONE plug action=/etc/acpi/headphone-jack.sh plug headphone-jack-unplug event=jack/headphone HEADPHONE unplug action=/etc/acpi/headphone-jack.sh unplug the script, however exits with status 1 on running sudo journalctl -u acpid -f for both events. #!/bin/sh if [ "$1" = plug ]; then flatpak run com.github.wwmm.pulseeffects -l HdPhDlbCnv elif [ "$1" = unplug ]; then flatpak run com.github.wwmm.pulseeffects -l DolbConv fi on redirecting the error to a file i see... error: app/com.github.wwmm.pulseeffects/x86_64/master not installed but running the flatpak command in a terminal works... how do i fix this?
NGStaph (1 rep)
Dec 26, 2020, 03:18 PM • Last activity: Apr 10, 2024, 02:20 PM
0 votes
1 answers
115 views
IceWM. How to lock screen after laptop lid is closed?
I use the IceWM window manager. I would like the screen to lock after closing the laptop lid. I've found a couple of guides that looked promising ([1](https://unix.stackexchange.com/questions/260737/switch-off-display-and-lock-screen-in-xfce-power-manager-when-laptop-lid-is-clos), [2](https://help.u...
I use the IceWM window manager. I would like the screen to lock after closing the laptop lid. I've found a couple of guides that looked promising ((https://unix.stackexchange.com/questions/260737/switch-off-display-and-lock-screen-in-xfce-power-manager-when-laptop-lid-is-clos) , (https://help.ubuntu.com/community/LaptopLidAndDockScripts)) but unfortunately didn't work for me. Maybe there is a solution that I'm currently missing?
Fyodor (3 rep)
Mar 16, 2024, 04:29 PM • Last activity: Mar 17, 2024, 07:55 AM
1 votes
0 answers
81 views
Thinkpad Fn keys randomly stop working
Running void linux on a Thinkpad E15 with KDE. Sometimes, my Fn keys (F1 to F12) stop working. What's interesting is that the FnLock and Fn+Space to toggle keyboard backlight work normally. Just like in [this question][1], but the solution didn't work for me. I tried enabling the acpid service (pres...
Running void linux on a Thinkpad E15 with KDE. Sometimes, my Fn keys (F1 to F12) stop working. What's interesting is that the FnLock and Fn+Space to toggle keyboard backlight work normally. Just like in this question , but the solution didn't work for me. I tried enabling the acpid service (presumably the generic one, different from thinkpad_acpi), and that fixed the F1-F12 keys, but the power button started behaving differently. Previously, it would open the KDE logout menu, but now it turns the laptop straight off, which is not what I want. lsmod outputs this for thinkpad_acpi, suggesting it's not used: thinkpad_acpi 200704 0 Any ideas about what might be causing this issue?
dave (11 rep)
Feb 28, 2024, 10:07 AM
40 votes
4 answers
127040 views
message at shutdown: watchdog did not stop!
At shutdown I often get the message watchdog did not stop! and then the laptop freezes after few other lines without shutting down. Any idea on how to fix this? Recently it happened very often, usually when the laptop was powered on for some time. I am using Debian 8 on an Asus UX32LA I found this s...
At shutdown I often get the message watchdog did not stop! and then the laptop freezes after few other lines without shutting down. Any idea on how to fix this? Recently it happened very often, usually when the laptop was powered on for some time. I am using Debian 8 on an Asus UX32LA I found this systemd file (it shows a conflict with the shutdown.target), if it may help. My impression is that the problem depends on some issue coming from me trying to fix the backlight (which actually only works with the grub paramenter "acpi_osi=" ) [Unit] Description=Load/Save Screen Backlight Brightness of %i Documentation=man:systemd-backlight@.service(8) DefaultDependencies=no RequiresMountsFor=/var/lib/systemd/backlight Conflicts=shutdown.target After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service Before=sysinit.target shutdown.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/lib/systemd/systemd-backlight load %i ExecStop=/lib/systemd/systemd-backlight save %i
Reyx_0 (1041 rep)
Dec 16, 2015, 06:55 AM • Last activity: Nov 21, 2023, 01:54 AM
2 votes
0 answers
2128 views
How to disable KDE power devil?
For some reason, KDE's power manager doesn't work for me (laptop doesn't go to sleep properly when the lid is closed). I would like to use [ACPI events](https://wiki.archlinux.org/title/Power_management#ACPI_events) to handle the power management However, when I run `systemd-inhibit`, I see that KDE...
For some reason, KDE's power manager doesn't work for me (laptop doesn't go to sleep properly when the lid is closed). I would like to use [ACPI events](https://wiki.archlinux.org/title/Power_management#ACPI_events) to handle the power management However, when I run systemd-inhibit, I see that KDE's power devil is a inhibitor How can I disable Power Devil? I'm on Arch
Simon Tran (121 rep)
Sep 15, 2022, 05:32 PM
2 votes
0 answers
66 views
Problems with brightness media buttons
While setting up hotkeys in my window manager I find out that if I would press the brightnessup\brightnessdown button(which changes brightness as it should) and after that go to terminal, pressing 'Enter' there would lead to the change of screen brightness, or in other words the same result as if I...
While setting up hotkeys in my window manager I find out that if I would press the brightnessup\brightnessdown button(which changes brightness as it should) and after that go to terminal, pressing 'Enter' there would lead to the change of screen brightness, or in other words the same result as if I pressed the same brightness button again. After checking my window manager config, in order to be sure that there is not problem, I started acpi_listen in order to check if there are multiple button press. It have shown that each brightness button press adds video/brightnessup BRTUP 00000086 00000000 K and each enter press in terminal adds video/brightnessup BRTUP 00000086 00000000 (The same behavior is for brightnesdown but with change of numerical code) So questions are: - What means K in the acpi_listen output?(I have searched it but man-page for acpi_listen does not explain the structure of the output) - What could lead to creation of this acpi events: video/brightnessup BRTUP 00000086 00000000 without K? - If there is no way to get rid of such events, is there a way to ignore events for the button without K? Thanks, in advance
TheShellOfAMan (41 rep)
Sep 1, 2021, 10:43 AM • Last activity: Sep 1, 2021, 10:48 AM
1 votes
0 answers
374 views
Capture sleep, hibernate and wakeup events on Linux
I need to capture these on both laptop and desktop environmetns. Explored 2 options, but unfortunately none of them worked as expected. 1. DBus works on desktop but these events also need to be captured on laptops and environments without any GUI. Is there a way to use DBus in both such situations?...
I need to capture these on both laptop and desktop environmetns. Explored 2 options, but unfortunately none of them worked as expected. 1. DBus works on desktop but these events also need to be captured on laptops and environments without any GUI. Is there a way to use DBus in both such situations? 2. Acpid requires us to write scripts and put these scripts in specific paths and in turn these scripts call the required running application. In the opensource implementation, the latest version uses netlink sockets to catch the signal. Tried to capture the events using netlink and it worked for sleep and wakeup when running on Ubuntu 20.04 on Oracle VM but unfortunately, did not work on when tested on Ubuntu 20.04 physical machine. Is there any other way to capture these events?
apoorva-ask03 (11 rep)
Apr 1, 2021, 06:36 AM
6 votes
2 answers
13973 views
SMBus/IPMI/GenericSerialBus write requires Buffer of length 66, found length 32
today my nas debian 9 based started to write out this error in the startup phase, the same is reported in red by calling `journalctl -xe`: ACPI Error: SMBus/IPMI/Generic write requires Buffer of length 66, found length 32 (20160831/exfield-427) ACPI Error: Method parse/execution failed [\SB.PMIO._PM...
today my nas debian 9 based started to write out this error in the startup phase, the same is reported in red by calling journalctl -xe: ACPI Error: SMBus/IPMI/Generic write requires Buffer of length 66, found length 32 (20160831/exfield-427) ACPI Error: Method parse/execution failed [\SB.PMIO._PMM] (Node ffff8a71878aeaf0), AE_AML_BUFFER_LIMIT (20160831/psparse-543) ACPI Exception: AE_AML_BUFFER_LIMIT, Evaluating _PMM (20160831/power_meter-338) I have a double raid1 (**sda/sdb** and **sdc/sdd**) inside this nas, could it be that one of the disk is going to be defective ? Should I be worried ? What could have caused this error and how can I fix it? Could it be an error given by the fact that I pressed the power off sometimes instead of login and write manually shutdown -h now ? Thanks
user3450548 (3094 rep)
Feb 5, 2018, 07:15 PM • Last activity: Mar 11, 2021, 09:45 AM
0 votes
2 answers
1035 views
Root does not have access to Master control
TL;DR: root doesn't have access to the `Master` controls on ALSA ## My problem I cannot control volume with my keyboard ## The diagnostics I have done - `journalctl -f` reveals the error `amixer: Unable to find simple control 'Master', 0` - `amixer` works fine if I run it from the terminal This lead...
TL;DR: root doesn't have access to the Master controls on ALSA ## My problem I cannot control volume with my keyboard ## The diagnostics I have done - journalctl -f reveals the error amixer: Unable to find simple control 'Master', 0 - amixer works fine if I run it from the terminal This leads me to believe that it's a permission problem ## My environment - My acpid config file for volume down looks like this:
events=button/volumedown
action=amixer set Master
- I dual-boot Arch Linux and Windows. - I used to use xfce but uninstalled it in favour of dwm/lxde depending on my mood. - I use PulseAudio for bluetooth support. ## What I have tried so far - Using doas (like sudo) - Exactly the same error at journalctl -f, except that there's a line before that says root ran command amixer set Master 5- as vince from / (my username is vince) - Using pactl - Same problem ## What I hope for from a solution - It gives root access to the Master controls - I'd rather not rely on sudo or doas because that doesn't really scale to multiple users (I'm willing to use it as a temporary workaround though) - Works for both the console and X - It doesn't have to work for all users but I'd prefer it if it did (It's okay if an answer doesn't fulfill all of these, I just want to use my volume keys)
Vincent Bechmann (46 rep)
Feb 21, 2021, 09:23 AM • Last activity: Feb 22, 2021, 11:06 AM
1 votes
1 answers
999 views
Debian 10 fails to manage laptop battery (was working fine few days ago)
Debian 10 fails to manage laptop battery (was working fine few days ago). is battery still detected ? : upower -i /org/freedesktop/UPower/devices/battery_BAT0 native-path: BAT0 vendor: ASUSTeK model: G750-59 power supply: yes updated: Fri 28 Aug 2020 08:43:24 PM CEST (17 seconds ago) has history: ye...
Debian 10 fails to manage laptop battery (was working fine few days ago). is battery still detected ? : upower -i /org/freedesktop/UPower/devices/battery_BAT0 native-path: BAT0 vendor: ASUSTeK model: G750-59 power supply: yes updated: Fri 28 Aug 2020 08:43:24 PM CEST (17 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: charging warning-level: none energy: 0.12 Wh energy-empty: 0 Wh energy-full: 8.3 Wh energy-full-design: 89.208 Wh energy-rate: 0 W voltage: 15.12 V percentage: 1% capacity: 9.3041% technology: lithium-ion icon-name: 'battery-caution-charging-symbolic' History (charge): 1598640204 1.000 charging so it is ok acpi & xfce-power-manager & upower services are up & running Battery is now so low I cannot even unplug the power-plug adapter without crashing the laptop. What can I do / check to investigate ? (*I don't think battery is dead until last week I used the laptop for about 2hours on battery*). So I think it is 90% sure pure software issue (*I also remember I did a big updates/upgrades on last monday*).
francois P (1289 rep)
Aug 28, 2020, 06:54 PM • Last activity: Sep 3, 2020, 11:57 AM
-1 votes
1 answers
2124 views
Debian 10 - Power off server using power button, how can I test acpi?
I want to be able to power off my server using the power button on the front of the case, rather than having to login and power it off manually. From my research thus far I believe I have to install acpi to do this, which I have done. I have started the acpi service, and enabled it with systemctl. T...
I want to be able to power off my server using the power button on the front of the case, rather than having to login and power it off manually. From my research thus far I believe I have to install acpi to do this, which I have done. I have started the acpi service, and enabled it with systemctl. The status is now "active". However when I press the button, I have no idea if the system is powered off, or sleeping. I suspect it is sleeping and not powered off, because it boots quite quickly again if I press it again. How can I test if acpi is working? I tried to look in the system log file /var/log/syslog, but there's a lot in there and I don't know exactly what to look for.
user3728501 (977 rep)
May 25, 2020, 06:21 PM • Last activity: May 26, 2020, 12:19 AM
3 votes
2 answers
676 views
Which daemon or Linux command makes init 0 or shutdown happen when I press the power button?
When I press the power button, Linux goes to init 0 (or shutdown clean). In the old times (2003) I had to configure acpid to give the shutdown function to the power button. Today on Slackware-current I did: cat `/etc/apci/event/default` #event=button power.* #action=/sbin/init 0 and I see the functi...
When I press the power button, Linux goes to init 0 (or shutdown clean). In the old times (2003) I had to configure acpid to give the shutdown function to the power button. Today on Slackware-current I did: cat /etc/apci/event/default #event=button power.* #action=/sbin/init 0 and I see the function is commented with # which mean disabled. So the question is: which daemon provides the init 0 function when I press the power button? Other distributrion mnay have systemd, but on Slackware we don't have systemd. Is it acpid even though the power button lines are commented?
elbarna (13690 rep)
May 22, 2020, 11:01 AM • Last activity: May 24, 2020, 01:17 PM
0 votes
1 answers
2138 views
Why journalctl don't save my logs of the boot before forced shutdown?
My PC freezes a third time and I have to shut it down forcibly. Why doesn't `journalctl` save the boot logs before forced shutdown? When I do `journalctl --list-boots` I only get the boot after crash. I'm not sorting well or misconfiguration? System: ArchLinux (5.4.8-arch1-1)
My PC freezes a third time and I have to shut it down forcibly. Why doesn't journalctl save the boot logs before forced shutdown? When I do journalctl --list-boots I only get the boot after crash. I'm not sorting well or misconfiguration? System: ArchLinux (5.4.8-arch1-1)
dlag (15 rep)
Jan 10, 2020, 12:04 AM • Last activity: Jan 10, 2020, 06:05 PM
2 votes
1 answers
711 views
How do I actually write acpid event scripts that detect when headphones are plugged in?
I'm using `acpid` to detect when my headphones are plugged in. According to `acpid_listen`, the relevant events are jack/headphone HEADPHONE unplug jack/headphone HEADPHONE plug I created the file `/etc/acpi/events/headphone_jack` like this: event=jack/headphone.* action=/etc/acpi/actions/headphone....
I'm using acpid to detect when my headphones are plugged in. According to acpid_listen, the relevant events are jack/headphone HEADPHONE unplug jack/headphone HEADPHONE plug I created the file /etc/acpi/events/headphone_jack like this: event=jack/headphone.* action=/etc/acpi/actions/headphone.sh "%e" The event still doesn't trigger if I use jack[ /]headphone instead. The script /etc/acpi/actions/headphone.sh looks like this: amixer set Master off In other words, every time the headphones are plugged in or unplugged, the volume is muted. This amixer command works in the terminal. I restarted the acpid service with sudo /etc/init.d/acpid reload, but the event still isn't triggering. What am I doing wrong? I'm using Debian 10 ("buster") x64 on a Thinkpad X1 Carbon 4th generation.
Michael A (1713 rep)
Dec 28, 2019, 09:36 PM • Last activity: Jan 3, 2020, 11:18 PM
9 votes
3 answers
3348 views
Do I need acpid in a virtual machine?
I'm always wondering if power management facilities in a virtual machine is necessary? i.e acpid. And I'm not sure if they still function in a virtual machine.
I'm always wondering if power management facilities in a virtual machine is necessary? i.e acpid. And I'm not sure if they still function in a virtual machine.
daisy (55777 rep)
Apr 27, 2013, 09:27 AM • Last activity: Nov 11, 2019, 08:57 PM
2 votes
1 answers
1910 views
Is there a way to restart acpid on reboot?
I've installed a package called `thinkpad-scripts`. Simply put its a bunch of scripts that activate various functionalities on thinkpad devices on linux that wouldn't work out of the box on fresh installations. I've got the script to work and etc, but whenever I reboot my machine. The auto rotate fu...
I've installed a package called thinkpad-scripts. Simply put its a bunch of scripts that activate various functionalities on thinkpad devices on linux that wouldn't work out of the box on fresh installations. I've got the script to work and etc, but whenever I reboot my machine. The auto rotate functionality doesn't work when converting my laptop into tablet mode. I noticed the culprit has to do with acpid. When I restart acpid in terminal, it works again. Is there a way I can automate restarting acpid when I reboot, so I won't have to tediously do this over and over again ? I'm running 64-bit Debian EDIT: I tried making a cronjob with crontab -e And wrote at the end of my file leaving a newline at the end @reboot sh $HOME/acpid_restart.sh The script acpid_restart.sh includes
#!/bin/sh 
systemctl restart acpid
But this still fails....
PrimRock (133 rep)
Jul 14, 2019, 01:10 AM • Last activity: Jul 14, 2019, 05:34 AM
5 votes
1 answers
3040 views
Setting up kernel keyboard mapping
I already got the keycode from kernel, but `acpi_listen` won't recognize it in Arch Linux: # /usr/lib/udev/keymap -i /dev/input/by-path/platform-thinkpad_acpi-event Press ESC to finish, or Control-C if this device is not your primary keyboard scan code: 0x1A key code: micmute Now I try to map the ke...
I already got the keycode from kernel, but acpi_listen won't recognize it in Arch Linux: # /usr/lib/udev/keymap -i /dev/input/by-path/platform-thinkpad_acpi-event Press ESC to finish, or Control-C if this device is not your primary keyboard scan code: 0x1A key code: micmute Now I try to map the key by: # /usr/lib/udev/keymap /dev/input/by-path/platform-thinkpad_acpi-event 0x01a micmute setting scanode 0x1A to key code 248 But acpi_listen still got no output here. How should I make acpi_listen recognize it? **UPDATE2** Well , evdev driver doesn't seem to recognize this , I heard someone saying that xorg won't route key event number that went beyond the limit.. It has to be solved as a acpi event , but don't know how **UPDATE** Seems to be complicated, $ xmodmap -e 'keycode 248 = XF86MicMute NoSymbol XF86MicMute' xmodmap: commandline:1: bad keysym name 'XF86MicMute' in keysym list xmodmap: commandline:1: bad keysym name 'XF86MicMute' in keysym list xmodmap: 2 errors encountered, aborting.
daisy (55777 rep)
May 18, 2012, 01:32 PM • Last activity: Apr 20, 2019, 03:02 PM
Showing page 1 of 20 total questions