@Alex Hung (alexhung) Thank you for the temporary tweak.
After disabling XHC as wakeup, ALS is not waking up the suspended Ubuntu.
But, there should be some fine way to stop only ALS from wakeup rather than the
XHC (USB 3.1 controller) whole.
I think this seems to be a bug.
Fo the moment I did this -
1. Create a script file wherever you wish. Ex: `~/Scripts/disable-
devices-as-wakeup.sh`.
```bash
#!/bin/bash
declare -a devices=("XHC") # <-- Add your entries here
for device in "${devices[@]}"; do
if grep -qw ^$device.*enabled /proc/acpi/wakeup; then
sudo sh -c "echo $device > /proc/acpi/wakeup"
fi
done
```
2. Test it by executing it from the terminal.
3. If everything is okay then let's make a service.
`touch ~/Scripts/disable-devices-as-wakeup.service`
`chmod u+x ~/Scripts/disable-devices-as-wakeup.service`
~/Scripts/disable-devices-as-wakeup.service -
```bash
[Unit]
Description=Disable devices as wakeup
[Service]
ExecStart=/home/username/Scripts/disable-devices-as-wakeup.sh
Type=oneshot
[Install]
WantedBy=multi-user.target
```
4. Copy paste or move the service to `/etc/systemd/system/`.
`sudo cp ~/Scripts/disable-devices-as-wakeup.service
/etc/systemd/system/`
5. Enable the service.
`systemctl enable disable-devices-as-wakeup.service`
6. Restart the OS and check the status.
`systemctl status disable-devices-as-wakeup.service`
Detailed explanation found on https://access.redhat.com/documentation
/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-
managing_services_with_systemd
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1915264
Title:
ALS (Ambient Light Sensor) wakes up the suspended Ubuntu
Status in linux package in Ubuntu:
Confirmed
Bug description:
After suspending the Laptop, ALS (Ambient Light Sensor) is waking it
up.
System Information -
Product Name: HP ZBook Studio x360 G5
SKU Number: 5LA90PA#ACJ
OS Information -
> uname -a
Linux *** 5.8.0-41-generic #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC
2021 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04
I am able to disable ALS as follow -
> sudo modprobe -rv hid_sensor_als
modprobe: FATAL: Module hid_sensor_als is in use.
So, I blaclisted hid-sensor-als by appending following text in
/etc/modprobe.d/blacklist.conf -
# ALS
blacklist hid-sensor-als
Restarted the system and checked if the module is really blacklisted using -
> lsmod | grep hid_sensor_als
But the issue still persists that ALS wakes up the suspended Ubuntu.
Also, BIOS doesn't have the option to disable ALS.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC0: hrk 1599 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2021-02-05 (5 days ago)
InstallationMedia: Ubuntu 20.04.2 LTS "Focal Fossa" - Release amd64 (20210204)
MachineType: HP HP ZBook Studio x360 G5
Package: linux (not installed)
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.8.0-41-generic
root=UUID=f9e396bc-107a-4b6f-80f6-8b950207e827 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.8.0-41.46~20.04.1-generic 5.8.18
RelatedPackageVersions:
linux-restricted-modules-5.8.0-41-generic N/A
linux-backports-modules-5.8.0-41-generic N/A
linux-firmware 1.187.9
Tags: wayland-session focal
Uname: Linux 5.8.0-41-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 07/29/2020
dmi.bios.release: 12.0
dmi.bios.vendor: HP
dmi.bios.version: Q71 Ver. 01.12.00
dmi.board.name: 844F
dmi.board.vendor: HP
dmi.board.version: KBC Version 16.48.00
dmi.chassis.asset.tag: 5CD849CC7L
dmi.chassis.type: 31
dmi.chassis.vendor: HP
dmi.ec.firmware.release: 22.72
dmi.modalias:
dmi:bvnHP:bvrQ71Ver.01.12.00:bd07/29/2020:br12.0:efr22.72:svnHP:pnHPZBookStudiox360G5:pvr:rvnHP:rn844F:rvrKBCVersion16.48.00:cvnHP:ct31:cvr:
dmi.product.family: 103C_5336AN HP ZBook Studio x360
dmi.product.name: HP ZBook Studio x360 G5
dmi.product.sku: 5LA90PA#ACJ
dmi.sys.vendor: HP
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1915264/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp