1

I am going through The Odin Project and being a Windows 10 user, I decided to go for the virtual machine route + Xubuntu. So far so good, though I can feel that the system is a bit sluggish at times. I've been thinking of going to full-blown dual boot setup, but I am concerned about one thing. One thing I use my PC for is recording TV programs with a digital (ATSC) tuner card. The software I use (NextPVR) automatically wakes up the PC a few minutes prior to any TV listing which is set to be recorded. Once it is done, PC idles for about 1 minute and goes to sleep. My concern is whether having a dual boot setup will have some adverse effect on the sleep/wake functionality. I have searched a bit on the subject of Win 10 and Linux dual boot, but most questions focus on installation rather than a specific feature like sleep.

Gaston
  • 113
  • 1
    It should have no effect. – David Oct 12 '22 at 17:06
  • 1
    You need to understand that if you're dual-booting via Grub with the default settings it'll boot Ubuntu every time (unless Windows is manually selected) after waking up. You can either change the default Grub boot order to Windows or set UEFI to boot Windows directly and then using the one-time boot menu to boot Ubuntu when needed. Other than this consideration there's absolutely no difference with or without dual-boot. – ChanganAuto Oct 12 '22 at 17:07

2 Answers2

3

Sleep to RAM

If your computer (in Windows) is set to sleep to RAM then dual boot with Ubuntu should cause no problem with your TV recording setup.

This is because when Windows (or Ubuntu) is in the sleep state, the computer is not fully turned off. When the computer is awakened either manually or by a software, it does not go through the boot sequence. That is, grub the bootloader is not called.

Hibernate to Disk

If your computer is set to hibernate to disk then you will need to make one change in the grub setting so that grub boots to Windows by default.

Grub is the bootloader installed by Ubuntu. When you boot your computer (after you have installed Ubuntu in dual boot mode), grub comes up first and shows you the option to boot Ubuntu or Windows. If you don't do anything it will wait a few seconds and boot Ubuntu. This is the default behavior, but it can be changed. Read all the answers to How do I set Windows to boot as the default in the boot loader? for how to do it.

Time in Ubuntu

Windows and Ubuntu deal with local time differently. See Clock time is off on dual boot for more on this issue.

There are two ways to deal with this problem. Here I will show you how to make Ubuntu use the same method used by Windows, so that the clock does not change the time when you switch between windows and Ubuntu.

Open a terminal in Ubuntu by pressing Ctrl+Alt+T and enter:

sudo timedatectl set-local-rtc 1 --adjust-system-clock

You will need to enter your password. When you enter your password the cursor will not move you will not see anything like *****. This is normal for Ubuntu.

You will need to use this command only once. After using this command Ubuntu will use local time to set the hardware clock (RTC) like windows.

Hope this helps

user68186
  • 33,360
1

A quote... "The software I use (NextPVR) automatically wakes up the PC".

The wake-up would probably use the RTC (real time clock) time.

Windows can have the wrong time in a Ubuntu / Windows dual boot machine. The reason the system time is wrong is not because the RTC battery is dead but because Ubuntu and Windows seem to write to the system clock differently. This is not a problem for Ubuntu because Ubuntu will display the wrong time (interpret what Windows wrote in an Ubuntu-manner) but then makes a correction perhaps by looking at the time zone and the time of year or consulting the internet shortly after a user log in. The Ubuntu time is wrong only between boot up and log in. In a dual boot system Windows will read the Ubuntu-written time (interpreting what Ubuntu wrote in a Windows-manner) and do nothing about it for an unknown time even if the internet is available. Eventually Windows will get the time from the internet but if you're impatient you can manually force Windows to do it by toggling a slider or hitting the a button.

I think the discrepancy was about 1 hour so it might have to do with daylight saving time.

I don't use dual boot anymore so my experience comes from my earlier experiences which were about 4 years ago. I suggest that you own 2 computers and forget about dual boot. YMMV if the operating systems act differently now.

H2ONaCl
  • 9,693
  • Thanks for this info. I would never have guessed that this sort of issue would come up. For my TV recordings, time is the most crucial thing! This would certainly have caused me a lot of grief wondering why the recordings were off. – Gaston Oct 13 '22 at 12:03
  • As an aside, it occurred to me that I could simply have the computer do the recordings while in Ubuntu. NextPVR used to be a Windows only program, but underwent a major rewrite in 2019 which made it cross platform by rewriting it as a web app. (it still works off the local pc). I can test it out in the VM for now, and maybe I'll just migrate over to Ubuntu completely. – Gaston Oct 13 '22 at 15:27
  • A further aside, in case someone out there attempts the same thing: VirtualBox VM's site indicates PCI passthrough as a feature that comes with an extension pack, but it turns out this feature was dropped in an earlier version (in 6.1), according to their changelog. – Gaston Oct 13 '22 at 17:20
  • VirtualBox was asking me to install updates with annoying frequency and the updates seemed to be inconvenient compared to Ubuntu updates which are "fire and forget". I accept Ubuntu's frequent updates because I cannot say with certainty that the updates are not security related. I am more doubtful that VirtualBox updates were security related so I think they should batch their updates to once per year. I no longer use VirtualBox but I appreciate that if a person is traveling to the ISS a person needs to carry fewer computers. – H2ONaCl Oct 13 '22 at 19:48