After hibernation or after suspend resume cycle, multimedia keys or the mouse failed in Ubuntu MATE
Problem:
Some keys in the keyboard or mouse failed (stop working) after hibernation.
Solution:
Modify the grub configuration.
Step by step:
(remember execute just the lines beginning with $)
- Identify the path of your swap file
cat /etc/fstab
- Identify the UUID of the filesystem containing the swap file and the offset of the swap file. Remember replace
/swap.imgwith the path you get in step 1.$ findmnt -no UUID -T /swap.img 5c00dcfe-aa4a-47e4-88ad-0cb9de4a4144 - Find the
physical offsetof theswap.imgfile within its filesystem.
$ sudo filefrag -v /swap.img | head -n 4
Filesystem type is: ef53
File size of /swap.img is 8589934592 (2097152 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 0: 29923328.. 29923328: 1:
This commands will extract the specific (first) value for the physical_offset:
$ sudo filefrag -v /swap.img | awk '$1=="0:" {print substr($4, 1, length($4)-2); exit}'
29923328
- Edit the GRUB configuration.
Locate the GRUB_CMDLINE_LINUX_DEFAULT line and add or modify the resume and resume_offset parameters.
a. Open the file /etc/default/grub
sudo nano /etc/default/grub
b. Locate the GRUB_CMDLINE_LINUX_DEFAULT line and add or modify the resume and resume_offset parameters. Replace
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=<your_filesystem_UUID> resume_offset=<your_swapfile_offset>"
c. Save the file and exit nano.
- Update GRUB and reboot your computer.
sudo update-grub
reboot
Source:
- Google search: https://www.google.com/search?q=after+hibernation+multimedia+keys+failed+in+ubuntu+mate&oq=after+hibernation+multimedia+keys+failed+in+ubuntu+mate&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIHCAEQIRigATIHCAIQIRigATIHCAMQIRigATIHCAQQIRigAdIBCTExNzY3ajFqN6gCALACAA&client=ubuntu-chr&sourceid=chrome&ie=UTF-8
- https://www.youtube.com/watch?v=coiPtCFnO-0&t=40s
- https://ubuntu-mate.community/t/after-suspend-resume-cycle-keyboard-mouse-are-not-working/22110