Welcome to our peer-to-peer forums, where owners help owners. Need help now? Visit eSupport here.

English Community

Linux Operating SystemsOther Linux Discussions
All Forum Topics
Options

1 Posts

06-16-2018

United States of America

1 Signins

49 Page Views

  • Posts: 1
  • Registered: ‎06-16-2018
  • Location: United States of America
  • Views: 49
  • Message 31 of 474

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

2018-06-16, 16:20 PM

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.

Reply
Options

2 Posts

06-07-2018

United States of America

5 Signins

59 Page Views

  • Posts: 2
  • Registered: ‎06-07-2018
  • Location: United States of America
  • Views: 59
  • Message 32 of 474

Idea for lenovo

2018-06-18, 21:38 PM

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.

Reply
Options

136 Posts

11-21-2013

United States of America

124 Signins

1654 Page Views

  • Posts: 136
  • Registered: ‎11-21-2013
  • Location: United States of America
  • Views: 1654
  • Message 33 of 474

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

2018-06-23, 4:27 AM

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

Reply
Options

136 Posts

11-21-2013

United States of America

124 Signins

1654 Page Views

  • Posts: 136
  • Registered: ‎11-21-2013
  • Location: United States of America
  • Views: 1654
  • Message 34 of 474

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

2018-06-23, 4:34 AM

 wrote:

Actually that repo is mine ;) 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.

Reply
Options

7 Posts

03-30-2018

Italy

18 Signins

147 Page Views

  • Posts: 7
  • Registered: ‎03-30-2018
  • Location: Italy
  • Views: 147
  • Message 35 of 474

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

2018-06-23, 8:20 AM

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

Reply
Options

136 Posts

11-21-2013

United States of America

124 Signins

1654 Page Views

  • Posts: 136
  • Registered: ‎11-21-2013
  • Location: United States of America
  • Views: 1654
  • Message 36 of 474

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

2018-06-23, 15:01 PM

 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  

 

Reply
Options

7 Posts

03-30-2018

Italy

18 Signins

147 Page Views

  • Posts: 7
  • Registered: ‎03-30-2018
  • Location: Italy
  • Views: 147
  • Message 37 of 474

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

2018-06-23, 16:35 PM

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 :)

Reply
Options

136 Posts

11-21-2013

United States of America

124 Signins

1654 Page Views

  • Posts: 136
  • Registered: ‎11-21-2013
  • Location: United States of America
  • Views: 1654
  • Message 38 of 474

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

2018-06-23, 19:29 PM

 wrote:

I suggest you to stick with my install script :)


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.)

Reply
Options

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

2018-06-26, 12:44 PM

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?

Reply
Options

37 Posts

06-16-2017

United States of America

77 Signins

746 Page Views

  • Posts: 37
  • Registered: ‎06-16-2017
  • Location: United States of America
  • Views: 746
  • Message 40 of 474

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

2018-06-30, 23:25 PM

totally (!) offtopic, please exuse the spam

 


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

 

OMG., I'm reading this whole topic, Reddit and GitHub - all serious, trying to stay on top of things, as I'm on a phone & can't try any of it - and then this comment!.. TYVM, gave me a good laugh; nice one, LOL! xD

 

(Hope you've managed, though!.:))

 

EDIT: Need to make a new topic, somewhere in Support (!?), as formatting is displayed while posting and editing; but, when viewing a topic: can't see any of it - don't know whether it's the forums, or my (local) browser - screenshots are (1) https://ibb.co/f8TCbd and (2) https://ibb.co/e6uUNJ

Reply
Forum Home

Community Guidelines

Please review our Guidelines before posting.

Learn More

Check out current deals!

Go Shop
X

Save

X

Delete

X

No, I don’t want to share ideas Yes, I agree to these terms