Switching from Windows to Linux: Sharing My Experience and Lessons Learned

Dammit, it happened again even without the Xbox controller albeit a different USB error.

I have found out why the script didn't launch as it needs a password to run.
Logs state

"pam_unix(sudo:auth): conversation failed" _CMDLINE sudo /home/******/resetusb.sh

Instead of using a command action in Stream Deck to launch the script, I do a write text action to run it as if I was typing it in myself directly into the terminal.

It has been suggested on another forum that another option is to just wait 15min and the system may sort it self out

I have also created another macro that restarts Gnome in case that is the problem.
 
Thank you for your reply

The man command is great! I'm liking the examples of command usage much more thorough then the -help I have been using so far.

I have got the resetusb.sh listed in the sudoers.d folder via visudoers but the system still keeps asking for a password.

I think the sleep problem is a hardware one, since I could not get the machine to automatically wake from sleep under Windows either without frequent hangs. I have disconnected all peripherals from the affected USB ports and crossed fingers its been up for 5 days without incident.

Because I couldn’t get the Stream Deck to run my script without a password I went down a different route to come up with a service script:


[Unit]

Description=Restart GDM after resume from sleep (on failure)

After=sleep.target

OnFailure=gdm.service



[Service]

Type=oneshot

ExecStartPre=/bin/systemctl is-active --quiet gdm || /bin/true

ExecStart=/bin/systemctl restart gdm



[Install]

WantedBy=sleep.target



The idea is the service will monitor GDM and restart it if it should fail.


I do see a problem in the future should I want to update the Nvidia drivers I wont be able to shut GDM down prior to installation.

I think I will need to run the following command:


sudo systemctl stop wake-up-restart-gdm.service

Install driver

sudo systemctl start wake-up-restart-gdm.service
 
System locked again with just a blank screen. On a plus side it lasted about a week without locking up.

I know the system is still running as my Stream Deck has Memory, CPU, and CPU temp displayed which are changing every second or so there is life.

The previous script failed with an error "/etc/systemd/system/wake-up-restart-gdm.service:6: Unknown key 'ConditionResult' in section [Unit], ignoring."

I am getting these scripts from copilot as I do not know enough about writing scripts but I am able to understand what is going on a basic level.

I put the old script back through copilot and I got a slightly different script which copilot insists is correct now :-)
Code:
[Unit]
Description=Restart GDM if it has failed after resume from sleep
After=sleep.target

[Service]
Type=oneshot
ExecStartPre=/bin/systemctl is-active --quiet gdm || /bin/true
ExecStart=/bin/systemctl restart gdm

[Install]
WantedBy=sleep.target

Interestingly while my system locked up I remote-ed in using my systems KVM out of band thingie, and the output was Debian 12 splash screen. Unfortunately I could not work out how to access the remote keyboard and it appeared to be stuck. I was able to use the reboot server button from a drop down menu.

I am beginning to think I should make a fresh start, and re-install Debian from scratch again in case my problem is of my own making, as I haven't found any similar issues to mine in all my searching.
 
Can you get to a tty terminal? Try ctrl alt and a function key like F3, F4 etc. Then you might be able to run gdm or try startx as a command and see what happens (IIRC I used startx to reload the gui on earlier ubuntu if x11 crashed, might be irrelevant if you're on wayland). Once you get a working gui again it's probably on ctrl alt F2, you can switch between it and tty's at will. ctrl alt F1 is worth trying too, different distributions might put things on different function keys.

If you're going from scratch again, IMO it wouldn't hurt to try ubuntu or fedora and see if any of the remaining issues just go away. I doubt the sleep issue will go away, that's often a hardware-specific pain point on Linux and my workaround to that would be to just disable sleep.
Can't get to TTY as keyboard does not register typing (no caps lock check). Plugging in a different keyboard doesn't work either. Even emulating via stream deck crtl alt F3 does not work but reboot command does, so something is listening.

Disabling automatic sleep was what I used to do in Windows and was one of the reasons I wanted to move to Linux.
 
With all my tinkering I cannot get Debian as stable as I would like, so I have installed Ubuntu 24.10 as per your recommendations.

On the plus side I did not have to deal with nouveau driver issues as it installs the latest proprietary driver during installation although the Nvidia x-server information seems to be limited to very basic options, ie no G-Sync/VRR which I think is supported in Gnome 47.

Another plus was I no longer need to use Onedriver to access my Onedrive files as the Settings programme lets me access them via the Online Accounts function which I could never get to work in Debian 12.

On the negative side the Ubuntu live iso kept popping up messages about programmes crashing in the background and some images were corrupted probably related due to the nouveau pre-install driver. Despite the errors the OS installed just fine, and I got no errors after booting into the newly installed OS.

I had some trouble importing my ZFS Pool as I could not get Cockpit Utilities to automatically mount the pool like it did when I was using Debian 12. Many hours were spent mounting and unmounting the volume and adding authorisations/permissions. I worked out that the values in fstab needed to be separated by a tab not a space otherwise the OS will fail during boot. In the end it turned out all I needed to do was import the pool via cli “sudo zpool import -f <tank>” and the pool mounted and persisted upon reboot.

The next issue I had was also related to ZFS. The Ubuntu App Centre has way more apps than the default Debian equivalent. I saw that the Steam app was available, so I installed it from there. The Steam client would not let me install games on the ZFS volume. My first thoughts where it must be a permissions problem, so I went about making sure the directory path had create and delete to no avail. By chance I found a forum page about this very issue, and it turned out the App Centre version of the Steam app was programmed to be in a walled garden preventing it from accessing external volumes. The solution was to download the steam_latest.deb from the Steam website and all was well.

Current problem I am investigating is the Brave Browser is very unstable under Ubuntu causing web tabs to become corrupt and window freezes. I have switched to Firefox and everything works fine again.

Going forward I still need to set up a notification system to report any ZFS errors and to run a scrub task automatically on a schedule. Hopefully it will be the same as in Debian to set up.

Time will tell if automatic sleep works better than it did on Debian 12.
 
So it turns out that systemd version 256 has a bug preventing Ubuntu (and other distros) from waking from sleep manual or automatic. I am going to try the Ubuntu 25.4 daily build to see if its fixed
 
The daily build did not fix the problem :-(

Well just for a laugh I thought I would install Ubuntu 24.04.2 LTS since that should be as stable as stable can be.

Code:
Linux 6.11.0-17-generic #17~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 20 22:48:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 24.04.2 LTS
Release:    24.04
Codename:    noble
systemd 255 (255.4-1ubuntu8.5)

And suspend seems to be working! :-)

Online accounts no longer works so I am back to using Onedriver but I can live with that.

Need to update the Nvidia driver as the stock one is too old

Edit: Online accounts started to work after a reboot and the Nvidia driver was 550 dated 15th of Jan so I will leave it along unless I run into problems.
 
Last edited:
That programme is perfect, it found my mouse straight away, however it won't let me assign my mouse button 5 to be a 'LCtrl' key press. I am trying to see if I can set it up from within Ratbag.

Edit: I found a work around by using by making the macro multi key press Ctrl + c + Ctrl and it accepted it. However I am open for anymore suggestions of programmes to do it properly.

Edit 2: Just realized I can use the same button to abort the current task in terminal as well as zoom in and out of web pages using my mouses scroll wheel. :-)
 
Last edited:
Giving up on auto sleep. Ubuntu 24.04 has similar issues to Debian 12, only it sometimes does wake, but loses the network connection for a couple of minutes. The auto sleep bug must be a hardware issue as it was present in Windows too. One thing that did work in Windows was manually pressing the power button to go into sleep. Not sure why that worked, I can only guess its a different shutdown process to the auto one. Manually sleeping Windows also stopped auto wake which was a problematic in itself. Auto wake doesn't appear to be a thing in Linux.
 
Today I learned that there are different cron job tables ( I am assuming crontab is short for cron table) for root and user. My ZFS pool reported a load of errors but I never got the popup message that all was not well. Turned out I was running my zpool_status script as root when it needed to be run by user. I had put both the status and scrub script tasks in sudo crontab -e when I should have put the status script in crontab -e without the sudo.

Can anyone who tell me why I am getting so many non critical read errors on a pool consisting of SSD's? I had three drives with 1 read error and another with 4 read errors and 1 write error after yesterdays scrub. Surely it is not possible for all those SSD's to be failing? The ZFS documentation says it a minor error that does not automatically mean the drives are failing just that they might.

I have run
Code:
sudo zpool clear Tank
to clear the errors and will run the scrub task again.

Edit: Scrub complete and no errors on any drive.
 
Last edited:
Nvidia have released a new beta driver for Linux with an interesting highlight!

Release Highlights​


Highlights since R570 Beta Release, 570.86.16


  • Fixed a bug that could prevent displays from being restored correctly when resuming from suspend on some systems with multiple displays.
  • Fixed a regression which stopped VRR from working on HDMI displays.
  • Fixed an issue which caused stuttering and performance issues when scrolling windows in Wayland with GSP firmware enabled.
  • Fixed a bug that resulted in corruption or application crashes when using PRIME render offloading between two NVIDIA GPUs with modeset=1 enabled in nvidia-drm.
  • Added a new kernel module parameter, 'conceal_vrr_caps', to the nvidia-modeset kernel module. This parameter may be used to enable usage of features on some displays such as ULMB (Ultra Low Motion Blur) which are incompatible with VRR. See the "Direct Rendering Manager Kernel Modesetting" (DRM KMS) chapter of the README for further information.
Its worth one last shot.

Edit: Nope didn't work :-(
 
Last edited:
I am looking for some incremental file backup software.

My rather flaky ZFS volume which had an incident yesterday falsely claiming that several of my SSD's had failed with thousands of errors. My ZFS warning message popup script worked great! A not so quick reboot and suddenly there are no errors at all.

I want to make incremental backups of my Virtual Machines one of which has a 1.5TB disk image to my NAS and some other files on a daily basis. I am remembering the old adage that RAID is not a Backup! I was lucky this time..

I think Timeshift would have to copy the entire disk image every time the contents change which would take too long.

Is there a Linux programme that can do this or am I better creating an image within the Virtual Machines and using Timeshift for the rest?

Edit: Thinking about it I don't think incremental backup of a file works like I thought. I doubt the software wood look for difference within a file and only record the new data.

Edit 2: I have installed Paragon Backup free to take care of the 2 Windows Virtual Machines. Timeshift won't save to a network share unless I am missing something. Would Rsync be suitable? I need to be able to role back files to previous versions of files in the event of corruption.

Edit 3: Paragon Backup turned out to be a disappointment, just as well as it was free. Macrium Reflect free seems to be much better.
 
Last edited:
Aren't incremental backups (snapshots) one of the key features of zfs? Or are you thinking in addition to that, if so then rsync the snapshots perhaps. I went basic with rsync and old school par2 in addition to that.
Yes snapshots should be enough and that's one of the reasons why I am using ZFS. its supposed to be my Fort Knox of storage for me, however I was faced with a situation where my ZFS wrongly claimed several of my drives had failed all at once on a RAIDZ2 which if it was true there wouldn't be enough redundancy to rebuild. The incident made me rethink my backup strategy or lack of it, as I had only prepared a bunch of SSD's to replace any failed ones that might crop up now and then. This lack of forsite could have cost me all the data.

Rsyncing the snap shots could be the answer. I have not heard of par2 and will look into that. I need to have a long think about ways to mitergate the problem should it happen again.
 
If you lost the whole array do you have a backup plan?

RAIDZ2 is what I use but mostly for redundancy and convenience in the case of drive loss or errors; it doesn’t factor into how I ensure my data isn’t lost. I have all my key data backed up onsite again, plus semi-regular updates to a secure cloud storage provider for offsite. So I could start again if needed.

In terms of how to sync/backup I’m using samba shares with the zpool as well as running Time Machine for macs and then my cloud provider has a cli application that I can run to sync. For my onsite backup it’s manual ‘cp’. Maybe I could automate both those but it doesn’t save much time, just easier if I forget I guess. I usually remove the secondary backup anyway just in case I leave it connected and they both get lost. So there’s still a manual step anyway.

I have irregular manual backups of some of my files on my NAS so it wouldn't be a total loss. Off site, I only have 1TB Onedrive for some of the data. I tend to mostly save copies of my Onedrive locally in case something goes wrong. I am accually trying to move my files away from Onedrive as I think its a big target for a hack and is probably subjected to data mining by MS, Its another tie I need to cut in my quest to divest from MS..

In a perfect world I would be able to have a offsite backup for my NAS but I think that would cost a lot as Its half full about 15TB. I suppose I could get an external USB HDD to back up the NAS.
 
Digging around I have found the Nvidia forum for Linux.

Looks like the problems I have had are well known, and sleep has been broken for a long time. There are people with Nvidia powered laptops that can't wake up properly is ridiculous. I had to role back my driver to 565, as the 570 driver struggled to cope with letting the monitor go to sleep, generating pages of Nvidia error log codes and a black screen upon wake, fixable only with a reboot.

I hope this gets sorted or my next graphics card will be team red.
 
I want to end this thread with something positive. I would like to thank everyone for their support and technical knowledge. Your guidance has been invaluable for me to begin to understand Linux. I will admit there have been a few landmines along the way, but I hope they will not discourage anyone else from trying to move to Linux. Distribution wise. I would recommend to anyone thinking starting with Linux go with Ubuntu. Most of the problems I encountered was because I chose Debian 12 not realising it was 2-3 years old, and how Nvidia drivers and hardware have changed since it was released.

I will admit that I am hooked on Linux now, even though its not perfect. I have been able to configure pretty much everything to my liking, creating custom scripts, setting up ZFS, excellent 3rd party Apps to run my Stream Deck, and Logitech mouse.

Windows now feels slow and cumbersome on the odd occasion where I must use it due to obscure hardware not having a Linux driver. This can be overcome with spinning up a small Windows virtual machine using VirtualBox.

Gaming wise I have not had any issues with games being run on Steam Proton. The only configuration you must do is a checkbox to enable non tested games to run on Proton in the settings menu. Launching games is the same as in Windows.

Finally, the freedom that comes with Linux being open source, free forever, and free from intrusive data mining makes it an unbeatable choice for not only the privacy-conscious but also those who value performance and customisation. The ability to run Linux on just about any hardware old and new. I want to run it on everything now!

Thank you all once again for your support. :-)
 
Back
Top Bottom