Skip to content

Commit

Permalink
fix server detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrus75 committed Oct 29, 2021
1 parent dfcfc56 commit 0c5181f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static void set_governor(const char *gov)

void do_cpu_pm(void)
{
if (is_server()) {
if (is_server() >= 0) {
set_governor("performance");
} else {
set_governor("powersave");
Expand Down
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int is_server(void)
if (c == NULL)
break;
if (strstr(buffer, "model name")) {
if (strstr(buffer, "Xeon"))
if (strstr(buffer, "Xeon") || strstr(buffer, "Core(TM) i9"))
ret = 1;
else if ((strstr(buffer, "Core(TM)")) ||
(strstr(buffer, "Celeron")) ||
Expand Down

0 comments on commit 0c5181f

Please sign in to comment.