Hello everyone.
I new member in Ask Fedora. I have problem with my Fedora.
I want to suspend my laptop with power button, but short press power button make my laptop shutdown, not suspend. I browse and try to use much methode, with gsettings, dconf, GNOME Settings (power button action is suspend in there). Can give me a suggestion to resolve my problem. Thanks for your answer. Sorry my English
You’ll want to look at: man logind.conf
You could try changing HandlePowerKey in /etc/systemd/logind.conf
Recently, I check /etc/systemd/logind.conf
, uncomment HandlePowerKey
section and change default value from poweroff
to suspend
. After that, I restart my laptop. But it can’t change system behaviour
Can you provide more information regarding your laptop/hardware?
Thanks
This my hardware information
anifyuli@x441uv:~> inxi -Fzxxx --pkg
System:
Kernel: 5.17.11-300.fc36.x86_64 arch: x86_64 bits: 64 compiler: gcc
v: 2.37-27.fc36 Desktop: GNOME v: 42.1 tk: GTK v: 3.24.34 wm: gnome-shell
dm: GDM v: 42.0 Distro: Fedora release 36 (Thirty Six)
Machine:
Type: Laptop System: ASUSTeK product: X441UV v: 1.0
serial: <superuser required>
Mobo: ASUSTeK model: X441UV v: 1.0 serial: <superuser required>
UEFI: American Megatrends v: X441UV.316 date: 04/17/2019
Battery:
ID-1: BAT0 charge: 18.5 Wh (68.3%) condition: 27.1/34.6 Wh (78.4%)
volts: 10.8 min: 10.8 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
status: discharging cycles: 743
CPU:
Info: dual core model: Intel Core i3-6006U bits: 64 type: MT MCP
smt: enabled arch: Skylake rev: 3 cache: L1: 128 KiB L2: 512 KiB L3: 3 MiB
Speed (MHz): avg: 552 high: 600 min/max: 400/2000 cores: 1: 500 2: 511
3: 600 4: 600 bogomips: 15999
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: ASUSTeK driver: i915
v: kernel ports: active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2
bus-ID: 00:02.0 chip-ID: 8086:1916 class-ID: 0300
Device-2: NVIDIA GM108M [GeForce 920MX] vendor: ASUSTeK driver: nvidia
v: 510.68.02 arch: Maxwell pcie: speed: 2.5 GT/s lanes: 4 bus-ID: 01:00.0
chip-ID: 10de:134f class-ID: 0302
Device-3: Chicony USB2.0 VGA UVC WebCam type: USB driver: uvcvideo
bus-ID: 1-6:3 chip-ID: 04f2:b52b class-ID: 0e02 serial: <filter>
Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 22.1.2
compositor: gnome-shell driver: X: loaded: modesetting,nvidia
unloaded: fbdev,nouveau,vesa alternate: nv gpu: i915 display-ID: :0
screens: 1
Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
s-diag: 414mm (16.31")
Monitor-1: eDP-1 model: ChiMei InnoLux 0x1493 res: 1366x768 hz: 60
dpi: 112 size: 309x173mm (12.17x6.81") diag: 354mm (13.9") modes: 1366x768
OpenGL: renderer: Mesa Intel HD Graphics 520 (SKL GT2) v: 4.6 Mesa 22.0.3
direct render: Yes
Audio:
Device-1: Intel Sunrise Point-LP HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d70
class-ID: 0403
Sound Server-1: ALSA v: k5.17.11-300.fc36.x86_64 running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.51 running: yes
Network:
Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: ASUSTeK
driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: d000
bus-ID: 02:00.0 chip-ID: 10ec:8136 class-ID: 0200
IF: enp2s0 state: down mac: <filter>
Device-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
vendor: AzureWave driver: ath9k v: kernel pcie: speed: 2.5 GT/s lanes: 1
bus-ID: 03:00.0 chip-ID: 168c:0036 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Bluetooth:
Device-1: IMC Networks type: USB driver: btusb v: 0.8 bus-ID: 1-8:13
chip-ID: 13d3:3423 class-ID: e001
Report: rfkill ID: hci0 rfk-id: 5 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: see --recommends
Drives:
Local Storage: total: 465.76 GiB used: 100.03 GiB (21.5%)
ID-1: /dev/sda vendor: Seagate model: ST500LT012-1DG142 size: 465.76 GiB
speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: SDM1 scheme: GPT
Partition:
ID-1: / size: 457.09 GiB used: 100.02 GiB (21.9%) fs: ext4 dev: /dev/sda2
ID-2: /boot/efi size: 299.8 MiB used: 14 MiB (4.7%) fs: vfat
dev: /dev/sda1
Swap:
ID-1: swap-1 type: file size: 6 GiB used: 3.2 MiB (0.1%) priority: -2
file: /swapfile
Sensors:
System Temperatures: cpu: 42.0 C pch: 37.0 C mobo: N/A
Fan Speeds (RPM): cpu: 3300
Info:
Processes: 318 Uptime: 9h 28m wakeups: 9 Memory: 11.59 GiB
used: 3.73 GiB (32.2%) Init: systemd v: 250 runlevel: 5
target: graphical.target Compilers: gcc: 12.1.1 Packages: 2143 rpm: 2133
flatpak: 10 Shell: Bash v: 5.1.16 running-in: gnome-terminal inxi: 3.3.16
I had a similar issue the first time I installed Linux. Changing the chassis type for my computer fixed it.
First check if it is correct at all by evaluating the output of hostnamectl chassis
. If that is wrong change it with hostnamectl chassis <type>
by entering the correct type. Available types are listed in the man page under “chassis” (man hostnamectl
).
Previously, I change my hostnamectl chassis but not give a effects on my problem
anifyuli@x441uv:~> hostnamectl status
Static hostname: x441uv
Pretty hostname: X441UV
Icon name: computer-laptop
Chassis: laptop đź’»
Machine ID: 3084fb6b51e541c193c1f9f147f56d91
Boot ID: f56cb6b06d804421b4e6e0edb1800326
Operating System: Fedora Linux 36 (Workstation Edition)
CPE OS Name: cpe:/o:fedoraproject:fedora:36
Kernel: Linux 5.17.11-300.fc36.x86_64
Architecture: x86-64
Hardware Vendor: ASUSTeK COMPUTER INC.
Hardware Model: X441UV
Can you take a look at:
cat /sys/power/state
cat /sys/power/mem_sleep
journalctl -k | grep -i acpi | grep supports
Do you have resume in your kernel args?
grubby --info=ALL
Thanks
It is result from that commands
anifyuli@x441uv:~> cat /sys/power/state
freeze mem disk
anifyuli@x441uv:~> cat /sys/power/mem_sleep
s2idle [deep]
anifyuli@x441uv:~> journalctl -k | grep -i acpi | grep supports
Mei 30 21:18:14 x441uv kernel: ACPI: PM: (supports S0 S3 S4 S5)
Mei 30 21:18:14 x441uv kernel: acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
anifyuli@x441uv:~> sudo grubby --info=ALL
[sudo] password for anifyuli:
index=0
kernel="/boot/vmlinuz-5.17.11-300.fc36.x86_64"
args="ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb quiet resume=/dev/disk/by-uuid/6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4 resume_offset=86863872 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4"
initrd="/boot/initramfs-5.17.11-300.fc36.x86_64.img"
title="Fedora Linux (5.17.11-300.fc36.x86_64) 36 (Workstation Edition)"
id="3084fb6b51e541c193c1f9f147f56d91-5.17.11-300.fc36.x86_64"
index=1
kernel="/boot/vmlinuz-5.17.9-300.fc36.x86_64"
args="ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb quiet resume=/dev/disk/by-uuid/6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4 resume_offset=86863872 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4"
initrd="/boot/initramfs-5.17.9-300.fc36.x86_64.img"
title="Fedora Linux (5.17.9-300.fc36.x86_64) 36 (Workstation Edition)"
id="3084fb6b51e541c193c1f9f147f56d91-5.17.9-300.fc36.x86_64"
index=2
kernel="/boot/vmlinuz-5.17.8-300.fc36.x86_64"
args="ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb quiet resume=/dev/disk/by-uuid/6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4 resume_offset=86863872 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4"
initrd="/boot/initramfs-5.17.8-300.fc36.x86_64.img"
title="Fedora Linux (5.17.8-300.fc36.x86_64) 36 (Workstation Edition)"
id="3084fb6b51e541c193c1f9f147f56d91-5.17.8-300.fc36.x86_64"
index=3
kernel="/boot/vmlinuz-0-rescue-3084fb6b51e541c193c1f9f147f56d91"
args="ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb quiet resume=/dev/disk/by-uuid/6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4 resume_offset=86863872 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=6aa8c6ae-74a6-41b3-8996-d89a5f8a23c4"
initrd="/boot/initramfs-0-rescue-3084fb6b51e541c193c1f9f147f56d91.img"
title="Fedora Linux (0-rescue-3084fb6b51e541c193c1f9f147f56d91) 36 (Workstation Edition)"
id="3084fb6b51e541c193c1f9f147f56d91-0-rescue"
Does systemctl suspend
or
echo "mem" | sudo tee /sys/power/state
work?
For other method to suspend such as keyboard shortcut Fn + F1
in my devices, systemctl
and from GNOME power menu can suspend well.
But for echo "mem" | sudo tee /sys/power/state
give result :
mem
tee: /sys/power/state: Input/output error
Thanks for your help. My problem solved with reinstall with automatic partitioning Fedora installer