LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 05-11-2019, 03:57 AM   #1
Bounddyy
LQ Newbie
 
Registered: May 2019
Posts: 3

Rep: Reputation: Disabled
Thinkpad X1 Extreme Fedora won't install due to thermal issue threshold reach.


As the long title says. Got a new thinkpad have never had one and so far on the windows part it runs fine, stays mostly quiet fans spin up occasionally to cool it down. It's hot here already and my windows was installing and updating things. But now on the Linux side I can't get past the first terminal screen after booting from USB. I get temperature warnings and then safety reasons shuts down. On Windows themp sensor seems fine. Haven't tried other Linux versions I'll try Ubuntu and see but I really want to use Fedora as my main.
 
Old 05-11-2019, 04:38 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
You could do the install on removable media (usb stick) on another machine, then boot it on that one. Just an option. Another would be to have "other" fans blowing on the machine to keep the thermals in check. I tend to use my laptops as desktops and prop them up on old soda lids for more ventilation. Or altoid tins, whatever is available and makes sense. Although I tend to favor fanless and low power these days, but not always an option.
 
Old 05-11-2019, 08:10 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
what is your room temp? open a window and get some air in your room. BOX fans etc..

Like Shadow_7 said, prop that laptop up off the table to get a better air flow underneath it and, fans, and in BIOS see if it has a fan always on, I got a script here that throttles CPU for temps I modded it and added it into rc.local so it just runs upon start up. If you are running a Linux with systemD then if you want it to start up when you boot, you need to research how to add a script to your boot up process. it is not that hard, I just do not remember the particulars on that one.

the bold parts are all that I changed in this script so I could put it in the just start up on boot mode.

If you want to give it a try in the terminal just copy paste into a file un-comment out the if statement so it can take in your argument off the cli, and comment out the line under it setting it to 90C. Then you can run it first to see if that helps you any.


Code:
$ cat /usr/local/bin/throttletemp.startup
#!/bin/bash

# Usage: temp_throttle.sh max_temp
# USE CELSIUS TEMPERATURES.
# version 2.20

#cat << EOF
#Author: Sepero 2016 (sepero 111 @ gmx . com)
#URL: http://github.com/Sepero/temp-throttle/
#EOF

# Additional Links
# http://seperohacker.blogspot.com/2012/10/linux-keep-your-cpu-cool-with-frequency.html

# Additional Credits
# Wolfgang Ocker <weo AT weo1 DOT de> - Patch for unspecified cpu frequencies.

# License: GNU GPL 2.0

# Generic  function for printing an error and exiting.
err_exit () {
    echo ""
    echo "Error: $@" 1>&2
    exit 128
}


#if [ $# -ne 1 ]; then
    # If temperature wasn't given, then print a message and exit.
 #   echo "Please supply a maximum desired temperature in Celsius." 1>&2
 #   echo "For example:  ${0} 60" 1>&2
 #   exit 2
#else
    #Set the first argument as the maximum desired temperature.
#    MAX_TEMP=$1
#fi

#ADDED to manually set max temp
#set max cpu temps
MAX_TEMP=90

### START Initialize Global variables.
echo "Starting regulating of CPU temps monitor"
# The frequency will increase when low temperature is reached.
LOW_TEMP=$((MAX_TEMP - 5))

CORES=$(nproc) # Get number of CPU cores.
echo -e "Number of CPU cores detected: $CORES\n"
CORES=$((CORES - 1)) # Subtract 1 from $CORES for easier counting later.

# Temperatures internally are calculated to the thousandth.
MAX_TEMP=${MAX_TEMP}000
LOW_TEMP=${LOW_TEMP}000

FREQ_FILE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies"
FREQ_MIN="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
FREQ_MAX="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"

# Store available cpu frequencies in a space separated string FREQ_LIST.
if [ -f $FREQ_FILE ]; then
    # If $FREQ_FILE exists, get frequencies from it.
    FREQ_LIST=$(cat $FREQ_FILE) || err_exit "Could not read available cpu frequencies from file $FREQ_FILE"
elif [ -f $FREQ_MIN -a -f $FREQ_MAX ]; then
    # Else if $FREQ_MIN and $FREQ_MAX exist, generate a list of frequencies between them.
    FREQ_LIST=$(seq $(cat $FREQ_MAX) -100000 $(cat $FREQ_MIN)) || err_exit "Could not compute available cpu frequencies"
else
    err_exit "Could not determine available cpu frequencies"
fi

FREQ_LIST_LEN=$(echo $FREQ_LIST | wc -w)

# CURRENT_FREQ will save the index of the currently used frequency in FREQ_LIST.
CURRENT_FREQ=2

# This is a list of possible locations to read the current system temperature.
TEMPERATURE_FILES="
/sys/class/thermal/thermal_zone0/temp
/sys/class/thermal/thermal_zone1/temp
/sys/class/thermal/thermal_zone2/temp
/sys/class/hwmon/hwmon0/temp1_input
/sys/class/hwmon/hwmon1/temp1_input
/sys/class/hwmon/hwmon2/temp1_input
/sys/class/hwmon/hwmon0/device/temp1_input
/sys/class/hwmon/hwmon1/device/temp1_input
/sys/class/hwmon/hwmon2/device/temp1_input
null
"

# Store the first temperature location that exists in the variable TEMP_FILE.
# The location stored in $TEMP_FILE will be used for temperature readings.
for file in $TEMPERATURE_FILES; do
    TEMP_FILE=$file
    [ -f $TEMP_FILE ] && break
done

[ $TEMP_FILE == "null" ] && err_exit "The location for temperature reading was not found."


### END Initialize Global variables.


### START define script functions.

# Set the maximum frequency for all cpu cores.
set_freq () {
    # From the string FREQ_LIST, we choose the item at index CURRENT_FREQ.
    FREQ_TO_SET=$(echo $FREQ_LIST | cut -d " " -f $CURRENT_FREQ)
    echo $FREQ_TO_SET
    for i in $(seq 0 $CORES); do
        # Try to set core frequency by writing to /sys/devices.
        { sudo  echo $FREQ_TO_SET 2> /dev/null > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq; } ||
        # Else, try to set core frequency using command cpufreq-set.
        { sudo cpufreq-set -c $i --max $FREQ_TO_SET > /dev/null; } ||
        # Else, return error message.
        { err_exit "Failed to set frequency CPU core$i. Run script as Root user. Some systems may require to install the package cpufrequtils."; }
    done
}

# Will reduce the frequency of cpus if possible.
throttle () {
    if [ $CURRENT_FREQ -lt $FREQ_LIST_LEN ]; then
        CURRENT_FREQ=$((CURRENT_FREQ + 1))
        echo -n "throttle "
        set_freq $CURRENT_FREQ
    fi
}

# Will increase the frequency of cpus if possible.
unthrottle () {
    if [ $CURRENT_FREQ -ne 1 ]; then
        CURRENT_FREQ=$((CURRENT_FREQ - 1))
        echo -n "unthrottle "
        set_freq $CURRENT_FREQ
    fi
}

get_temp () {
    # Get the system temperature.

    TEMP=$(cat $TEMP_FILE)
}

### END define script functions.

echo "Initialize to max CPU frequency"
echo;echo
echo "CPU frequency Started"
echo;echo;echo
unthrottle


# Main loop
while true; do
    get_temp # Gets the current temperature and set it to the variable TEMP.
    if   [ $TEMP -gt $MAX_TEMP ]; then # Throttle if too hot.
        throttle
    elif [ $TEMP -le $LOW_TEMP ]; then # Unthrottle if cool.
        unthrottle
    fi
    sleep 3 # The amount of time between checking temperatures.
done
Though being that it looks like you have not gotten past the usb stick boot yet, that posses a challenge to use this script.

Last edited by BW-userx; 05-11-2019 at 08:35 AM.
 
Old 05-11-2019, 08:52 AM   #4
Bounddyy
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
So it's not really a temp issue, I believe there are some bad readings going on. My room from the night was around 68 and my laptop was off all night just tried to install Ubuntu and it did the same thing. I don't see how the laptop being on for less then 30 seconds can get the temps so high it has to shut down...

Maybe I'm not giving enough details here but my laptop is dead cold brand new and on windows it's dead quiet i can't hear anything from fans when just browsing around I also have HWMonitor running and as you can see the attached it's running stable, fans do work, sensors do seem fine on windows. However, even if it's dead cold and I boot it up from USB to install Linux I get thermal errors and safety shut down. SO,i can never get past literally the first sign of life (linux initializing for run) he laptop shuts down.
Attached Thumbnails
Click image for larger version

Name:	Annotation 2019-05-11 070043.png
Views:	12
Size:	183.8 KB
ID:	30541  

Last edited by Bounddyy; 05-11-2019 at 09:08 AM.
 
Old 05-11-2019, 09:13 AM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Did it ship with an OS, does it run longer than 30 seconds on "that" OS? You're probably looking at faulty hardware IMO.

Seems like that laptop isn't that old and well spec'd. Is it actually turning OFF, or just going to a mode where you can't see anything on the display? If you were booting to an external media type, you could take it to another machine and examine the logs.
 
Old 05-11-2019, 09:20 AM   #6
Bounddyy
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
Did it ship with an OS, does it run longer than 30 seconds on "that" OS? You're probably looking at faulty hardware IMO.

Seems like that laptop isn't that old and well spec'd. Is it actually turning OFF, or just going to a mode where you can't see anything on the display? If you were booting to an external media type, you could take it to another machine and examine the logs.
Yeah I'm thinking the same. Now I've been looking at Lenovo forums and people have reported weird fan noises and honestly after the above mention I was sticking my ear to the fans they were a bit too quiet and then they'd "woosh" on like a sudden jolt. Laptop does stay cool tho and they seem to consistently start and go off after enough cooling can't tell faulty or bad thermal design. Also it's shutting down completely. I can read the Linux log as it types it out all things seem fine except thermal sensor warnings and shutting down. It's a day old I contacted the seller and hoping to get a replacement.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extreme help---extreme newbie at linux jcordero1423 Linux - Newbie 32 01-01-2013 08:47 PM
Apache server extreme slow, while samba server is extreme fast! Geert86 Linux - Server 5 01-17-2010 11:07 PM
CPU fans: thermal pads and thermal paste; newbiesforever General 17 11-23-2009 10:22 PM
2.6.28 kernel gives thermal trippoint shutdowns on thinkpad x60 Peterius Linux - Hardware 1 01-14-2009 10:43 PM
snd_hda_intel + waikiki chip + hp dv8230 us = extreme extreme frustration mlfarrell Linux - Hardware 4 11-18-2007 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration