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.
What does getcap /usr/bin/ping inside the chroot say?
Also, your account in the chroot must belong to certain Android groups to do Android things. Is your chroot user account part of the aid_inet group? (And for that matter, is aid_inet even in /etc/group?)
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.
Tilix can do the drop-down/Quake thing and also supports tiling.
(I quite liked AltYo but I remember having problems with it not showing up at times and it looks like it's not been updated in a while. If you don't mind having KDE libraries installed, Yakuake is also nice.)
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...
Ah, yes, I was meaning to set up zram (it made a bit of a difference on my old Galaxy S3), but forgot about it... Thanks for letting me know about zswap, will definitely look into it
There honestly isn't a theme. I pointed pywal to my wallpaper (link in my details post), which then generated a terminal colour scheme based off it - all my screenshots show urxvt, which doesn't use GTK+ at all, and there's no window decoration shown so there's no (visible) Openbox theme set there
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
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...)
If your phone is rooted, AdAway works in the same way. If not, there's alternatives out there (not on the Play Store - Google disallows them there) - I think they run a proxy server off the device - but I've never tried them.
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
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):
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)
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.
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.
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.
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.
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.
If you know a bit of C, you could write a tiny program to call
ioctlVT_LOCKSWITCH, e.g: https://github.com/benruijl/sflock/blob/master/sflock.c#L144-L151That'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.
That's all fine then. I'd check that your groups are in order, then
What does
getcap /usr/bin/pinginside the chroot say?Also, your account in the chroot must belong to certain Android groups to do Android things. Is your chroot user account part of the aid_inet group? (And for that matter, is aid_inet even in /etc/group?)
X250, SSD (no encryption), minimal initramfs without udev, SDDM->KDE Plasma
Hi,
You need
gnome-packagekitinstalled.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
roor masking the systemd unit that automatically mounts efivarfs would stop tools likeefibootmgraffecting the boot menu.Tilix can do the drop-down/Quake thing and also supports tiling.
(I quite liked AltYo but I remember having problems with it not showing up at times and it looks like it's not been updated in a while. If you don't mind having KDE libraries installed, Yakuake is also nice.)
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...
Ah, yes, I was meaning to set up zram (it made a bit of a difference on my old Galaxy S3), but forgot about it... Thanks for letting me know about zswap, will definitely look into it
There honestly isn't a theme. I pointed pywal to my wallpaper (link in my details post), which then generated a terminal colour scheme based off it - all my screenshots show urxvt, which doesn't use GTK+ at all, and there's no window decoration shown so there's no (visible) Openbox theme set there
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 :)
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...)
Probably something like this. I think Windows CE used to be a pretty popular choice for old standalone navigation devices.
If your phone is rooted, AdAway works in the same way. If not, there's alternatives out there (not on the Play Store - Google disallows them there) - I think they run a proxy server off the device - but I've never tried them.
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
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)
Glad to hear that, thank you for the Gold!
Yeah, honestly, making my KDE look like OS X isn't really something that enthuses me, I'm quite smitten by Breeze :)
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.
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.
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.
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.
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.
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.
Not GNOME, but in KDE apparently: https://www.reddit.com/r/unixporn/comments/3jrx03/kde_plasma_54_running_beshell/
Regarding the app menu thing, http://www.webupd8.org/2011/09/get-global-menu-in-gnome-shell.html once existed but it's not been updated in a long time.
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.