Skip to content

u/yet_another_usr

In this archive from Aug 2015 to Aug 2020

2
posts
60
comments
3
media
150
score

If that the case, means that with some kernel calls I should be able to reproduce the same, how can I scan the internal calls that he is doing to do reverse engineering?

That's a Windows question; if you ask in the stickied questions thread in r/ReverseEngineering, someone may give you some ideas. I'm not a programmer but the way it works for my ThinkPad is that the laptop has methods in its DSDT that handles telling the embedded controller of the new limits to set. Naturally, you can't call random methods from ACPI tables from user-space Windows programs. Lenovo's hotkey driver, running in the kernel, can do so, however. Lenovo's GUI programs ask said driver to fetch the current thresholds and set new ones.

2 points

Hi,

Do you know exactly when new entries get added? I had Ubuntu on an external USB HDD and whatever Ubuntu used for the EFI's /boot/bootx64.efi would add a new boot entry every time I booted from it. (And printed messages to the console to that effect.)
I worked around that by putting systemd-boot's .efi file in its place and having it start GRUB's EFI executable directly.

If new entries are getting added when Linux is in use and you run a system upgrade, then I think adding an explicit fstab entry mounting /sys/firmware/efi/efivars as ro or masking the systemd unit that automatically mounts efivarfs would stop tools like efibootmgr affecting the boot menu.

1 points

There's actually not all that much running... dhcpcd & wpa_supplicant handle Wi-Fi (usually, I go for NetworkManager, but in past Linux installs, it was mostly the first thing that appeared on systemd-analyze's output. For a laptop that isn't portable at all, I didn't need niceties like a tray icon). Void Linux doesn't start much at all from its init - just udev and agetty. I start only a session D-Bus instance for notifications (dunst), but I could even do away with that if I needed.
I am missing disk auto-mounting as a result, but udevil says it works without D-Bus so I might give that a go (I was never a fan of udisks, udisks2 went even further and hardcoded mount options).
I'm using the urvxt daemon - every window & bash instance takes up just a ~meg or so of RAM. The downside being that if one instance does something naughty, all the sessions are terminated.

I'm not a terminal person :( I like using the mouse and dragging windows around; it's why I went for Openbox here. I never could get into the mindset of using multiple workspaces...

1 points

I have swap space stored on a USB stick (I have quite a few of them, so I'm not bothered about their lifespans). While it's probably not fast, like, at all, I think it does appear to help compared to swapping to the same HDD it's running from. (Setting up flashcache too, thanks to a thread I saw linked in /r/linux is something I wouldn't mind trying to help with load times - Eboostr made quite the difference in Windows)

Luckily for me, there does seem to be plenty of lightweight software around for Linux. Browsing the web is somewhat possible thanks to a hosts file, and the pre-Blink/legacy version of Opera. As long as I keep JS off and limit myself to a few tabs, the experience isn't too bad.

If I'm being honest, though, this is more of an attempt to learn how to do away with a DE when I'm running Linux (GNOME is my usual go-to). While I actually did use this laptop seriously for a couple of months while my main laptop was out of service, this one is definitely a backup laptop

Thanks :)

2 points

Pastebin your rEFInd config. I've never used rEFInd myself, but someone else who has might be able to spot a problem.

(And personally, I recommend systemd-boot. It detects Windows automatically, uses EFISTUB like rEFInd and is very easy to configure. Granted, it's ugly when compared to rEFInd's themes but the only time I ever spend more than two seconds at a bootloader screen is if I need to configure some one-time boot options...)

1 points

What DE are you using? When I ran GNOME on an X230 (HD 4000), if Chromium was maximised, sometimes when pressing PgUp/Down, the screen wouldn't update. I switched to KDE, so I never got a chance to test the CLUTTER_PAINT workaround mentioned here (there's also other suggestions like switching to UXA that you may want to try - I know zilch about graphics so I don't want to say more than this, but AFAIK enabling those CLUTTER_PAINT options will make your laptop work harder drawing stuff): https://code.google.com/p/chromium/issues/detail?id=516679#c15

2 points

I had the same crap with my Centrino 6230, also on a ThinkPad. Not a networking expert, though, so take all this with a pinch of salt.

If like me you can't change the Intel card (IBM and Lenovo need to shove their card whitelists up the arse[s] of the idiot[s] who came up with the idea), and not something like a Realtek, sadly forcing you to use iwlwifi, you can try what I did to mostly solve it (skip the 11n and 5GHz stuff if it's not relevant):

  • use certain module options: http://bernaerts.dyndns.org/linux/74-ubuntu/322-ubuntu-trusty-intel-centrino-6235-slow-freeze - but note

    • if you use Bluetooth too, disabling the coexistence feature may cause interference with it

    • using software crypto and making 11n transmission more aggressive (11n_disable=8 doesn't actually disable it, but you may find you need to anyway if nothing works by setting it to 1) will probably drain more battery

  • if you use NetworkManager, try networkmanager-noscan from the AUR. There's a post on the Lenovo forums about how the newest Windows Intel drivers have problems with scanning while connected and how the feature can be disabled. The issue may be limited to the older cards like mine, which Intel don't provide new drivers for anymore, but I really would not be surprised in the slightest if iwlwifi has the same problem

  • if your card and router supports it, try making sure you're connected to the latter's 5GHz band. Maybe there were too many people using the 2.4 GHz band of my router but as soon as I switched to the 5GHz SSID of my router, a lot of my signal drop-out problems cleared up (although I'm pretty sure I had no problems in Windows with being connected to the 2 GHz band)

3 points

Disclaimer: I have never owned a Mac and I'm not sure what I am saying here is correct.

Have you tried https://github.com/0xbb/gpu-switch? If it is suitable for what you want to do, it sounds like it would enable a bootloader-agnostic approach. It says it works for the 8,2.

These appear to be low-level IO interactions within grub. Is such a thing even possible with Bootctl? I should hope so, because I could not get my laptop to boot with grub.

I'm pretty sure systemd-boot doesn't expose such functionality, but it's possible to do so from EFI code: https://github.com/RehabMan/HP-ProBook-4x30s-Fan-Reset/blob/master/HPFanReset/HPFanReset.c A possible approach would be patching systemd-boot to run the outb commands before starting the Linux EFISTUB, or if all you use SB for is booting Linux then writing a small EFI program that writes to the data ports and then chainloads SB would remove the maintenance overhead from patching systemd-boot. (Unrelated, but I find it interesting that GRUB doesn't work for you - when the EFISTUB bootloader had a bug that was causing it to crash on ThinkPads, GRUB was the only thing that worked for me.)

There's a thread on Mac Rumors about booting Windows 7 in native EFI mode - it's a large thread so there may be alternative approaches in there.

2 points

I'm not sure what's running the fans by default but it appears to be doing something -- the fans aren't stopped, and they go faster with increased CPU temp.

By default, the laptop's embedded controller will take on the task of running the fans higher if they need to be. Like you, though, in Linux I found it didn't really do a good job regulating the speed.

Hmm so you're thinking the fan might actually be generating more heat than it's dissipating, interesting.

Sorry, if that's from my last paragraph, TLP is a set of scripts designed to apply power saving settings. I only mention it because after installing it, while it made my laptop last longer on battery, it was making my laptop far hotter when running on AC because of the performance settings it was applying.

1 points

The steps on the Fan speed control wiki page relates to desktops, I believe. Laptops all have their own non-standard mechanism of controlling the fans. https://wiki.archlinux.org/index.php/Thinkpad_Fan_Control is more relevant, but now that I see it, the T420 wiki link in your post is pretty much the same thing.

  1. I use thermald to control the fans on my X230. It's [mentioned] in the wiki (https://wiki.archlinux.org/index.php/CPU_frequency_scaling#thermald) anyway and I've seen it pop up a fair few times in this subreddit. Ubuntu installs it by default I believe these days - I apply their patches on top of the build in the AUR. It's a set-it-and-forget-it program (though whether it actually makes any difference would have to be judged by you), but with a bit of configuration it can be used to control the fan speeds: https://bbs.archlinux.org/viewtopic.php?id=184483

Though if you prefer thinkfan, stick with that. I got thermald properly set up to control my fans but I'm using a fair amount of hacks to workaround quirks like, for example, the BIOS disabling thinkpad_acpi's manual fan control request when going to sleep.

If you're using TLP, consider toning down the settings it applies when the charger is plugged in. By default, it makes everything run at full power and my laptop would heat up very heavily as a result.

2 points

From my experience with one non-gaming Asus laptop, it's probably not possible if the option is hidden. With this laptop, the Intel card drove the display, and the NVIDIA card worked in Optimus mode - doing extra processing if needed and sending it over to the Intel chip to display. Or something like that.

The option to choose the main graphics chip wasn't present in my BIOS, either; modifying it to forcibly use the NVIDIA card as the main device resulted in me seeing nothing on the laptop's screen.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.