woodruffw / screenfetch-c

A rewrite of screenFetch in C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rasbpian issues.

diantahoc opened this issue · comments

Howdy? I am the /g/uy who had issues with high CPU usage on the raspberry pi.

I had the same issues as yesterday, (high CPU usage, no output), I have tried both manual compilation and using the install.sh script, with no results (I even tried to compile with -mfloat-abi=soft, but that won't work since hard and soft ABI are not compatible for linking).

So I decided to tinker with the code, first I modified the while ((c = getopt(argc, argv, "mdvnsD:EVh")) != -1) section by adding a default case to print ebin.

192 168 0 109 - putty_2013-10-16_05-11-10

and ran the program, and started to spam ebin on the output.

192 168 0 109 - putty_2013-10-16_05-11-36

So I commented out the while ... section, and compiled the program again, and it worked!

192 168 0 109 - putty_2013-10-16_05-18-15

And a few notes aside:

When I run screenfetch -V, the terminal font color is not restored to grey.

192 168 0 109 - putty_2013-10-16_05-12-51

Thanks man!
I fixed the looping by explicitly declaring the getopt char as signed (ARM distros apparently default to unsigned), and fixed the color bleedover from the -V flag.
I also added a conditional in detect_res that allows "No X Server" to appear instead of "Unknown" on headless computers.

Great! I am glad to help.