Score:0

Trying to patch Linux kernel to enable 15khz video output but the patch process seems to hang endlessly

gb flag

I put together a computer with the intention of emulating games to a CRT TV by following online guides such as this one. I'm still relatively new to Linux so I thought this would be a good opportunity to learn and get my hands dirty without the fear of messing up my main computer.

Anyway, part of the process of getting Linux to work with a CRT TV involves patching the Linux kernel to enable 15khz video output. I've been following this guide to help, installing the recommended packages and downloading the source code for my current kernel by running

apt-get source linux-image-unsigned-$(uname -r)

which downloads the source to the /usr/src directory. My goal is to patch this source with a patch from this repository (in my case it's the Linux-5.13 patches in particular). I started by downloading the patch and unzipping it to my Downloads folder in the Home directory. However, when I navigate to the kernel source code directory and run

$ patch -p1 /home/[redactedusername]/Downloads/linux_kernel_15khz-master/linux-5.13/01_linux_15khz.diff

the terminal goes to the next line as if initiating the patching process, but nothing happens after that. If I try to close the terminal, a prompt asks me whether I want to cancel the patching process. At first I assumed that the process of patching was a little time consuming so I stepped away from the computer for an hour or so, but nothing happened when I came back. Later on I ended up leaving the process going for about 7 hours and got the same results (that is to say, none). Since then, I've tried running the patch from the /usr/src directory, I've tried downloading the source to my home directory and patching it there, and I've even tried downloading a different kernel source and patching that one. No matter what, the result is the same every time.

So my question is, am I doing something wrong here? Is there a problem with the patch itself? Or does the patching process actually take 24 straight hours and I'm just being too impatient? Maybe "hang" isn't the correct term for this phenomenon but its the best I've been able to find so far to describe the problem.

Like I said, I'm pretty new to this, so any help is appreciated. And please let me know if there is any important information I've neglected to share that would help answer the question. Thanks!

Score:0
cn flag

It looks to me like you've managed to tell the patch program to wait while you type it in from the keyboard. I don't know much about the patch command, but the examples I found seem to have a redirection for the input, so, something like

patch -p1 < someplace/somefile.diff

should give you better results.

gb flag
Feeling like an absolute fool right about now. This worked immediately. Thanks!
cn flag
Been there; done that. I was tempted to write a long post about redirection and keyboard wait and looking at the job status from another window, but then I thought most people know about this and as soon as you recognize what it's doing it all becomes obvious. But I'm glad I guessed right and you are able to carry on!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.