Cara Mengatasi Scroll Tidak Berjalan Setelah Suspend di Ubuntu 18.04 GNOME

white and black corded mouse
Photo by Soonios Pro on Pexels.com

Setelah login saat laptop dinyalakan sehabis laptop suspend karena idle / lama tidak digunakan biasanya scroll mati tiba-tiba.

Ada dua cara untuk mengaktifkan kembali scroll yang mati, bisa dengan manual restart touchpad

sudo sudo modprobe -r psmouse && sudo modprobe

atau dengan cara otomatis, yaitu dengan membuat service untuk mengeksekusi perintah tersebut saat login setelah suspend.

Pertama masuk ke folder system

cd /lib/systemd/system

lalu buat file .sh yang digunakan untuk mengeksekusi perintah restart touchpad

sudo touch /lib/systemd/system/restart-touchpad.sh

Setelah itu edit file tersebut

sudo nano /lib/systemd/system/restart-touchpad.sh

Isi file tersebut dengan

#!/bin/bash

modprobe -r psmouse && modprobe psmouse

Lalu buat service untuk menjalankan command tersebut, buat file baru bernama restart-touchpad.service

sudo nano /lib/systemd/system/restart-touchpad.service

kemudian isi file service tersebut dengan

[Unit]
Description=Run user script after suspend
After=basic.target suspend.target hibernate.target

[Service]
User=root
Environment=DISPLAY=:0
ExecStart=/lib/systemd/system/restart-touchpad.sh

[Install]
WantedBy=basic.target suspend.target hibernate.target

Simpan lalu buat file restart-touchpad.sh menjadi executable

sudo chmod -x restart-touchpad.sh

Lalu reload system daemon

systemctl daemon-reload

Setelah system daemon direstart lalu buat file service restart-touchpad.service tadi berjalan

sudo systemctl enable restart-touchpad.service

Semoga bermanfaat !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s