Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 299 300 [301] 302 303 ... 350

Author Topic: The Generic Computer Advice Thread  (Read 572584 times)

LordBaal

  • Bay Watcher
  • System Lord and Hanslanda lees evil twin.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4500 on: March 28, 2021, 10:00:46 pm »

In the best of cases is a software bug of sorts or some weird electromagnetic interference.

Most likely is the flex that communicates the screen with the motherboard, it can be either loose or failing. This is something relatively cheap and easy to replace.

The worst case is your video card is failling, and being a laptop most likely is integrated into the motherboard, so replacing it means replacing the whole motherboard.
Logged
I'm curious as to how a tank would evolve. Would it climb out of the primordial ooze wiggling it's track-nubs, feeding on smaller jeeps before crawling onto the shore having evolved proper treds?
My ship exploded midflight, but all the shrapnel totally landed on Alpha Centauri before anyone else did.  Bow before me world leaders!

AzyWng

  • Bay Watcher
  • Just one of many
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4501 on: March 28, 2021, 10:02:48 pm »

I tried watching a Youtube video on Discord, and throughout, there was no screen flickering at all - so perhaps it's not a hardware issue after all.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4502 on: March 29, 2021, 07:01:23 am »

Horizontal lines? Vertical? (Both?) Are they 'pixel-thick' (perhaps even 'subpixel'-thick if you switch down from best resolution, and they still happen) or wider? Can you get a screenshot as they happen and still see them when you look at that later, not just in front of your eyes at that moment? Does it happen only/mostly with HD Youtube videos vs. never/rarely on SD ones, if you're getting a discrepancy with Discord? (Or is it canvas-on-browser vs something more fullscreen/dedicated app-view?)

I'm actually guessing flex/interference, as well, as first thoughts[1], and the other things mentioned as primary fall-back theories. But that's sight-unseen and maybe a better description (or the screenshot, if it actually shows anything) would widely refine our remote opinions.



[1] If the usual ferrite ring looped with the multicore cable has cracked and fallen off, maybe? Any obvious mechanical rattles associated with the hinge area?
Logged

LordBaal

  • Bay Watcher
  • System Lord and Hanslanda lees evil twin.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4503 on: March 29, 2021, 09:05:38 am »

In fact a picture with your phone would be better, a screenshot from the Print Screen button will most likely show you a regular screen.
Logged
I'm curious as to how a tank would evolve. Would it climb out of the primordial ooze wiggling it's track-nubs, feeding on smaller jeeps before crawling onto the shore having evolved proper treds?
My ship exploded midflight, but all the shrapnel totally landed on Alpha Centauri before anyone else did.  Bow before me world leaders!

AzyWng

  • Bay Watcher
  • Just one of many
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4504 on: March 29, 2021, 11:11:03 am »

The lines are both horizontal and vertical. I haven't tested with smaller resolutions, but they don't seem to appear on programs besides Firefox (they don't show up when I'm playing games, for instance).

I'll try to see if I can get a screenshot/photo some time, but it only appears for a split second, so I don't know if I can actually get an image of it.

I don't hear any rattling when I open or close the laptop...
Logged

methylatedspirit

  • Bay Watcher
  • it/its
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4505 on: April 06, 2021, 04:30:25 am »

I'm trying to create a batch file which requires exponentiation at some point, and needs a for loop to cycle through a list of bitrates. Here's the original (file name changed):
Code: [Select]
FOR /L %%X IN (0,4,64) DO (
ffmpeg -s 32x32 -r 30 -f rawvideo -pix_fmt rgb24 -i foo-bar.raw -b:v %%Xk -c:v libx264 foo-bar-libx264-%%Xk.mkv
ffmpeg -i foo-bar-libx264-%%Xk.mkv -f rawvideo -pix_fmt rgb24 foo-bar-libx264-%%Xk.raw
)

Very naive; just goes from 0 to 64 with a step size of 4. I don't need most of those. I just need the values {1, 2, 4, 8, 16, 32, 64} (and later powers of 2, if the want arises), and I know that the easiest way is just do 2^n. Unfortunately, there is no native way to do that in Batch. You have to do loops. So I extracted this from a Stack Overflow answer:

Code: [Select]
:: calculate x^n
SET x=3
SET n=5
SET result=1
FOR /L %%i IN (1,1,%n%) DO SET /A result*=x
ECHO %result%

Putting this in a batch file and running it from Explorer doesn't quite work. Running from cmd does work. I've redirected the output when running from Explorer, and it simply does not work; yields a result of "0" instead of the expected "243".

How do I patch that code so that it runs correctly running from Explorer? I'm running Windows 10 20H2, if that helps.
« Last Edit: April 06, 2021, 05:03:09 am by methylatedspirit »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4506 on: April 06, 2021, 08:40:18 am »

Make a shortcut that invokes it through cmd.exe ;)

(the shortcut points to cmd.exe, and passes the name and path of your batch file as an argument.)

Alternatively, you might consider a .hta file instead of a .bat or .cmd file.  Those are executed with either the windows scripting host, or by internet explorer, and can contain VBScript, or Javascript, and thus-- have full power to do the needful.

https://599cd.com/tips/hta/beginner/B1/

They can be coaxed to fire off command line invocations--
https://devblogs.microsoft.com/scripting/how-can-i-start-an-application-from-an-hta/

This seems to be a case of "when all you have is a hammer, every problem looks like a nail", when what you really need is a screwdriver, and a screw.  Either VBScript or Javascript will give you full math function, actual variables, arrays, and anything else you could reasonably ask for-- and since you can fire off commandline invocations using a string (and have access to string manipulation functions with VBS and JS), they sky would be the limit.

You could also just invoke the windows scripting host with a .vbscript file directly, and cut out the .hta container completely. (but then you couldn't make a ghetto GUI.)
« Last Edit: April 06, 2021, 08:47:30 am by wierd »
Logged

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: The Generic Computer Advice Thread
« Reply #4507 on: April 06, 2021, 08:50:17 am »

At the point where you're trying to learn to script, just quit jumping through hoops with batch scripting or weird derivatives and just learn a simple scripting language like Python. You can just run shell commands with
Code: [Select]
os.system for most simple use cases. And Python is probably a more long-term useful skill too...
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

methylatedspirit

  • Bay Watcher
  • it/its
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4508 on: April 06, 2021, 10:08:35 am »

I just made my own in Python 3. I'm pretty sure this would be considered "bad" by people who actually know what they're doing, but it works. It fits my odd use case. I'd have to encase almost the entire thing into a FOR loop to cycle through bitrates, but now I actually have proper arithmetic operations. I've wasted lines on splitting portions up for readability, so this clearly isn't the optimal strategy.

Code: [Select]
import os

## Define variables. Change as needed.
filename = "foo-bar"
extension = ".raw"
intermediate_extension = ".mkv"
encoder = "libx264"
inSize = "32x32"
pix_fmt = "rgb24"
framerate = "30"

# Bitrate, given in bits per second.
b = 16000

# Generates input side for encoding command
input_side_enc = " -f rawvideo" + " -s " + inSize + " -r " + framerate + " -pix_fmt " + pix_fmt + " -i " + filename + extension

#### Output filename of encoded file will be used later
output_enc_filename = filename + "-" + encoder + "-" + str (b)

# Generates output side for encoding command
output_side_enc = " -c:v " + encoder + " -b:v " + str(b) + " " + output_enc_filename + intermediate_extension

# Combining to generate full encoding command. "-y" flag used to always overwrite.
cmd_enc = "ffmpeg" + " -y " + input_side_enc + output_side_enc



# Generates input and output sides for decoding command.
input_side_dec = " -i " + output_enc_filename + intermediate_extension
output_side_dec = " -f rawvideo" + " -pix_fmt " + pix_fmt + " " + output_enc_filename + extension

# Generates output side for decoding command. "-y" flag used to always overwrite.
cmd_dec = "ffmpeg" + " -y " + input_side_dec + output_side_dec

## Prints commands used. For debugging purposes; superfluous otherwise
print(cmd_enc)
print(cmd_dec)

## Runs the actual commands
#os.system(cmd_enc)
#os.system(cmd_dec)

And the FOR-looped 2^n version is almost identical, replacing
Code: [Select]
b = 16000with
Code: [Select]
for x in range (0,8):
    b = 1000*2**x

and indenting every line afterwards.
« Last Edit: April 06, 2021, 10:17:17 am by methylatedspirit »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4509 on: April 12, 2021, 09:36:17 am »

I'd definitely recommend subprocess.call() (or a derivative like check_call()) over os.system() in most cases. In your case, it looks to me like you already have arguments split up pretty cleanly, and switching to a subprocess.call()-like function would allow you to pass in a list of individual arguments, as opposed to concatenating them all with spaces (which risks missing a space, or not escaping spaces correctly, etc.). Also, readability is a good thing! Any overhead introduced here is almost certainly going to be unnoticeable compared to ffmpeg.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

ArchimedesWojak

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4510 on: April 16, 2021, 07:19:35 am »

My CPU is complete ass because so much shit is running in the background (I have nothing open) (I doubt i have a virus)
Logged
YET ANOTHER DATA-COLLECTION THREAD FROM MR. "NOT FEDERAL AUTHORITIES."
ArchimedesWojak is very militant against zoophilia due to his deeply held religious beliefs.

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4511 on: April 16, 2021, 08:06:20 am »

Do you have Windows?  :P

(More seriously... It won't be (just) the CPUs fault, I imagine. Have you actually seriously checked for viruses, and with what? I'm imagining you can see processes running, and taking up resources, but what are they? They might be bloatware you can uninstall/neuter.)
Logged

methylatedspirit

  • Bay Watcher
  • it/its
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4512 on: April 16, 2021, 08:13:35 am »

First thing coming to mind is: Is it a CPU bottleneck, a disk bottleneck, or a memory bottleneck?

For any system that's considered slow, there has to be something that is limiting its performance to the point that it gets intolerably slow. I won't discuss malware/software; that's not something I have experience with. The most likely thing, if it's a hardware issue, is a disk bottleneck (which seems to be my favorite line when encountering slow PCs), but I need more information. CPU bottlenecks are rare, as Starver mentioned.

Assuming you're running Windows 10, go into Task Manager, click on the "Performance" tab, and it will show you basic system info. I (or I guess we?) specifically need:
    CPU model number
    RAM size (speed not important; RAM speed is almost never a factor in system usability)
    Full model number of your boot drive (usually C:)

If it's Linux you're running, the command you need is
Code: [Select]
sudo lshw -short -sanitize
And just copy and paste the output here. The -sanitize part is to remove sensitive details. I'll assume that you know how to pipe the output to a text file if you can't directly copy the terminal output for whatever reason.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4513 on: April 16, 2021, 08:21:47 am »

...also, to follow-up my "you're sure it's not a virus?" question. This isn't because you have multiple real-time scanners operating at the same time, is it? That's generally awkward and can even cause problems such as yours.

(Though meth has a good and comprehensive reply that will probably start you off better than my more primitive suggestions.)
Logged

LordBaal

  • Bay Watcher
  • System Lord and Hanslanda lees evil twin.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4514 on: April 16, 2021, 08:30:30 am »

It has always been that slow? If not, have you any idea of when it started to be so slow? Any changes that coincide with that moment? Have a 64 bits OS? How many RAM? Is the disk running the OS okay? Run Crystal Disk to check the status.
Have you cleaned the thing? Run Speccy and check temperatures.
Logged
I'm curious as to how a tank would evolve. Would it climb out of the primordial ooze wiggling it's track-nubs, feeding on smaller jeeps before crawling onto the shore having evolved proper treds?
My ship exploded midflight, but all the shrapnel totally landed on Alpha Centauri before anyone else did.  Bow before me world leaders!
Pages: 1 ... 299 300 [301] 302 303 ... 350