cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
npcesstu
Paper Tape
Posts: 1
Registered: ‎06-16-2018
Location: US
Views: 4,389
Message 31 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux

Can we please get an update from Lenovo on when this will be fixed, I am upset that my T480 is gimped and not able to run at the expected speeds/power it can on Windows due to a months old bug. Never goes above 70c temperature on Linux and throttles constantly.

RPulella
What's DOS?
Posts: 2
Registered: ‎06-07-2018
Location: US
Views: 4,243
Message 32 of 65

Idea for lenovo

If its a firmware problem, start supporting fwupd and push out firware updates in a way that linux useser can actualy get them.

If its not a firmware problem, work with at least one group working on the linux kenrel to get this fixed.

MountainX
Token Ring
Posts: 104
Registered: ‎11-21-2013
Location: US
Views: 3,859
Message 33 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux

I can confirm this issue on both the X270 and X280.

MountainX
Token Ring
Posts: 104
Registered: ‎11-21-2013
Location: US
Views: 3,855
Message 34 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux


@erpalma wrote:

Actually that repo is mine Smiley Wink I'm using that script since I wrote it without any issue!


Thanks for your work! What are the dependencies for your script on Arch Linux? I have identified these packaged so far:

 

sudo pacman -S --asdeps --needed python-virtualenv python-dbus python-gobject

Are those correct? Is python-cairo or python-psutil also required?

 

I do not find any python-periphery package in Arch repo or AUR.

erpalma
Fanfold Paper
Posts: 6
Registered: ‎03-30-2018
Location: IT
Views: 3,816
Message 35 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux

Is there a specific reason why you are trying to install python modules from your package manager rather than using pip in a virtualenv?

MountainX
Token Ring
Posts: 104
Registered: ‎11-21-2013
Location: US
Views: 3,748
Message 36 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux


@erpalma wrote:

Is there a specific reason why you are trying to install python modules from your package manager rather than using pip in a virtualenv?


Update: See my update #2 below for the Arch install steps I worked out. They don't follow the preferred Arch approach of using pacman exclusively, but they got the install done for me. My original comment immediately below, about making pacman packages for the python modules is probably how many Arch users would proceed, but I used a combination of pacman and pip because it was easier for me.

 

In Arch, as I understand it, the convention is to use pacman to install all packages, including python modules. This is preferred because pacman can then handle all upgrades.

 

The ArchWiki states on the Python page, "It is always preferred to use pacman to install software." The same page also says one can use pip instead, but many places in the Arch forums they also say stick exclusively with one method (pip or pacman). Since all my python modules so far have been installed with pacman, I was trying to be consistent. But maybe in this case, I'm guessing I'll have to make an exception. (I don't have experience to create my own pacman packages for python modules.)

 

I do also see the statement, "There are also tools integrating pip with pacman by automatically generating PKGBUILDs for specified pip-packages: see Creating packages#PKGBUILD generators." However, because of this first instruction, I do not believe this is the right approach for me: "before you can automate the package building process, you should have done it manually at least once unless you know exactly what you are doing in advance,"

 

Do any Arch Linux users have thoughts about how to install the lenovo-throttling-fix in Arch? Considering that python-periphery is not packaged and that I'm not going to try to package it, which repo packages are required and which python modules need to be installed with pip? EDIT: See update #2 below.

 

EDIT: I recall @erpalma is using Gentoo.Maybe the list of Gentoo requirements together with the python modules installed via pip would be closer to the Arch installation requirements than the given Ubuntu / Debian instructions at https://github.com/erpalma/lenovo-throttling-fix

 

My current guess is that my Arch installation might look like this using pip:

 

sudo pacman -S --needed base-devel python python-pip

sudo pip install virtualenv python-periphery dbus gobject psutil
 

 Anyone have thoughts on that?

 

UPDATE 2: OK, here are the Arch Linux installation steps I worked out:

 

sudo pacman -Syu
sudo pacman -S --asdeps --needed base-devel python python-pip python-virtualenv python-wheel openssl zlib git gobject-introspection

optional: pacman -S turbostat powertop

cd /opt/builds/

git clone https://github.com/erpalma/lenovo-throttling-fix.git

cd /opt/builds/lenovo-throttling-fix/

Copy the original install.sh, then edit install_archlinux.sh as shown below, then run it after editing it:

cp install.sh install_archlinux.sh
./install_archlinux.sh

NOTE: I am not entirely sure if the virutalenv should be deactivated after the pip install step below, but the install did succeed for me using this install script.

 

cat install_archlinux.sh

#!/bin/sh

INSTALL_DIR="/opt/lenovo_fix"

systemctl stop lenovo_fix.service &>/dev/null

mkdir -p "$INSTALL_DIR" &>/dev/null
set -e

cd "$(dirname "$0")"

echo "Copying config file..."
if [ ! -f /etc/lenovo_fix.conf ]; then
        cp etc/lenovo_fix.conf /etc
else
        echo "Config file already exists, skipping."
fi

echo "Copying systemd service file..."
cp systemd/lenovo_fix.service /etc/systemd/system

echo "Building virtualenv..."
cp requirements.txt lenovo_fix.py "$INSTALL_DIR"
cd "$INSTALL_DIR"
/usr/bin/virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate
echo "Enabling and starting systemd service..."
systemctl daemon-reload
systemctl enable lenovo_fix.service
systemctl restart lenovo_fix.service
echo "All done."

The changes to the install script are limited to these lines:

/usr/bin/virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate  

 

erpalma
Fanfold Paper
Posts: 6
Registered: ‎03-30-2018
Location: IT
Views: 3,714
Message 37 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux

Actually with Gentoo (which I'm using) it's kinda the same. But Python is a special beast IMO. I prefer keeping project-specific dependecies isolated in a virtualenv. I also specified the exact version of each module in requirements.txt since, who knows, an update might break the script. So, I suggest you to stick with my install script Smiley Happy

MountainX
Token Ring
Posts: 104
Registered: ‎11-21-2013
Location: US
Views: 3,657
Message 38 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux


@erpalma wrote:

I suggest you to stick with my install script Smiley Happy


Thanks for your reply. Your install script does have to be modified to work with Arch, as per my prior post. I do have one question about the changes I made:

 

The changes to the install script are limited to these lines:

 

/usr/bin/virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate  

 

Is is necessary to deactivate the virtualenv after the pip install? (I'm not a regular user of python virtualenv, so I created the above steps from the Arch wiki.)

superadmin
Fanfold Paper
Posts: 12
Registered: ‎06-22-2018
Location: DE
Views: 3,424
Message 39 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux

Thanks for this. The official Arch Wiki Doc regarding this did not work at all for me. Your tutorial worked nicely. However when executing:

 

$ sudo rdmsr -f 29:24 -d 0x1a2w
5

 

I am getting a 5, not a 3 like in the Arch wiki. Is this ok too, and what does it mean?

zampano
Paper Tape
Posts: 1
Registered: ‎07-03-2018
Location: DE
Views: 2,867
Message 40 of 65

Re: [X1C6/T480s] low cTDP and trip temperature in Linux

Just saw that BIOS Version 1.23 has been released. Did someone tried this Version and does it have an offical fix? Is it save to upgrade if one is using this script https://github.com/erpalma/lenovo-throttling-fix ?

Holiday Deals
HAPPENING NOW!

Get the best deals on PCs and tech now during the Holiday Sale
Shop the sale

Top Kudoed Authors