That’s what I’m gonna do Thank you again, you did an amazing job!
Solved touchpad issue with another script:
#!/bin/bash modprobe -r i2c-hid modprobe i2c-hid echo "Touchpad restarted"
added it to gpu hook:
[Unit] Description=nvidia gpu on/off hook Before=sleep.target StopWhenUnneeded=yes [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/turn_on_gpu.sh ExecStop=/usr/bin/touchpad_reset.sh ExecStop=/usr/bin/turn_off_gpu.sh [Install] WantedBy=sleep.target
Works like charm
What a crazy run that was my friends! I think I’ve got enough of troubleshooting for some time I’m actually thinking about selling this laptop and buying something more linux-friendly as probably these issues will come back sooner or later. Anyway I will add this also to solution post as it might help someone.
Thanks for the update. You should really write a tutorial on this. You can post it here:
now that you have a fully working system, have timeshift run another backup.
great idea since the only thing you would need to add is a little description of why you needed to do it the way you did. i know why, you know why, others will just ask why…,… everything else on solution post looks great.
I will do that after I solve another issue I didn’t think of before - we need to turn gpu on again at logout too. I already did it on my system by adding contents of turn_on_gpu.sh to /etc/gdm/PostSession/Default but that will work only for gnome. I will look into xfce solution tomorrow. Or is there any way that’s not relevant to GUI?
I’ve found this answer for running scripts at logout in xfce, could someone test it to confirm it works? I only need confirmation you can actually run scripts this way.
Change the /usr/bin/xfce4-session executable with a shell script which runs the original xfce4-session and your logout script if xfce4-session finished. # mv /usr/bin/xfce4-session /usr/bin/xfce4-session.orig The new /usr/bin/xfce4-session file: #!/bin/bash /usr/bin/xfce4-session.orig echo "my logout script" > /tmp/testfile Don't forget to set the execute permissions: # chmod a+x /usr/bin/xfce4-session (Tested on Debian Squeeze.)
This is a terrible and “maniac” way of doing things, especially if there are other ways to do the same. That is replacing the original file provided by a basic xfce package. The simplest excuse for not doing it is that it will be replaced/overwritten after a package update.
This brings up the event that you haven’t posted any System info in your initial inxi report.
inxi -Sxxx or tell us what are your DEs/DM.
Your “Gnome” solution uses GDM/DM to handle the script. So, you have GDM as DM and this method should also work for any other DE-logout.
If not, we can figure out something…
lightdm would be adding the script to
/etc/lightdm/lightdm.conf mine for example would end up looking something like this? no?
if logout freezes you could turn on gpu on logout??
(remove # to uncomment)
seems iffy, someone else would have to weigh in on this
You are right, for some reason I connected GDM to gnome in my head.
inxi -Sxxx System: Host: jakub-pc Kernel: 4.20.3-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: Gnome 3.30.2 wm: gnome-shell dm: GDM 3.30.2 Distro: Manjaro Linux
My setup however doesn’t matter at this point. Nothing we did until now is in any way related to DM or WM setup. Only reason we have to mess with DM is the necessity of running the script at logout. If there is no “universal” way to do it I just have to write solution for all main DM’s or at least point whoever is interested in it to the right path.
your probably better off just stating “the logout/login setup is for gnome/gdm only. if using a different DM you will have to set this part on your own since i have not tried this with other desktop managers yet”
i think what’s been put together is a pretty decent tutorial.
You are probably right, if I cannot test and confirm the solution it will be smarter to do as you say.
yes! i agree, spread the word!