I can't f-ing escape Windows
SOLVED: u/DenSpirit said
This page on Archwiki, among other things, describes the process with which you can switch your battery between 50% and 100% charge, via an ACPI call. Your laptop is of different version, but it could still work. Link: https://wiki.archlinux.org/index.php/Lenovo_IdeaPad_720s#Battery_Conservation_Mode
It worked for me and my laptop battery is now at 100% I'm astonished that this thread got 76 comments and I'm so happy that everyone helped. I think that one of the best things about Arch Linux is the wiki and community. In return I will release the notes that I made while installing Arch to my old laptop that I used while installing it to this one (my main computer) https://www.reddit.com/r/archlinux/comments/bfhbef/notes_i_made_to_install_arch_linux_with_xfce4/ I hope someone finds them useful! Good night from Finland!
-------ORIGINAL---POST----------------
Literally yesterday I removed the Windows partition and installed Arch on my main computer. I installed all apps that I need, Steam, some games, configured everything and got the mic and the headphones working. The only issue I cannot solve is the laptop's battery doesn't charge over 60% because I had used Lenovo's battery conservation mode. I googled it and seems like for my model I have to reinstall Windows just to flick one switch. I'm scared the installer will break my linux. This is my last cry for help before I do it.
80YY Lenovo (Legion) Y520-15IKBM
Edit: accidentally found a folder in /sys/class called powercap. I believe it contains the thereshold but it is so spaghetti I have no idea how to change it. Screenshot: https://ufile.io/458wvbc2
Thanks to everyone that has been helping me!
Edit: seems like it is recursive and goes on and on https://ufile.io/84cjub5p Im updating the thread so please check back on it
Edit: Im almost home ill upload the whole power_supply and power_cap folders from the /sys/class/ folder so everyone who wants can look at it. Thanks to everyone! We got a good community going for us
Edit: cant figure what to make of this but https://ufile.io/d4zm218j
Tomorrow I will go through all the comments, try things and if it doesn't work, I will backup and install windows temporarily. What are some good apps for that?
Thank you all!
Edit: I believe this is important https://www.mjmwired.net/kernel/Documentation/power/powercap/ (thanks to u/nxnt for linking it) I still don't know how to edit it because it contains so many different things so its still a problem
EDIT: omfg its now at 69% after I tried u/DenSpirit 's method! also 69 comments on this thread. I cant help but say
NICE
ill post an update when/if it gets to 100% I hope it doesnt go over that lol
Edited 20 Apr 2019. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 174 · 100% up
- Kind
- Text
- ID
- bfd5ld
82 comments
The installer will probably overwrite your MBR/boot sector. But that's simple enough to repair from a Linux live system. Other than that, I don't think anything can break.
u/Discapotato The last time I installed Windows after installing Arch for dual boot, it did nothing to the boot sector and only changed the boot option in UEFI. Grub could then be moved back in the #1 boot option and all was well. Just preallocate the partition you want to install Windows to beforehand.
Even so like stated above, it's a very easy fix using a live USB, mounting the partitions properly, chrooting into the install, and reinstalling grub or re-configuring it back to normal.
Edit: Misspellings.
Yeah if I cant find a solution ill back it up and hope for the best. Also I edited my post
That is fortunately only true for MBR systems, which booted computers by literally executing from the first sector. Because of that, OSes all had to dump their bootloader code there and thus installing Windows would overwrite this.
With UEFI, the firmware actually reads the GPT partition table, finds the EFI partition, reads it and execute a binary from there. So nowadays, Windows just adds its own stuff there, adds a UEFI boot entry and makes it default. You can just reboot into the firmware and make the Linux entry default again and good to go! You can technically even let go of bootloaders entirely and have it boot your Linux kernel directly.
That's good to know. My only dual-boot setup is on a machine from 2011, which still has a BIOS with MBR, so I don't really have any experience with UEFI.
This page on Archwiki, among other things, describes the process with which you can switch your battery between 50% and 100% charge, via an ACPI call. Your laptop is of different version, but it could still work. Link: https://wiki.archlinux.org/index.php/Lenovo_IdeaPad_720s#Battery_Conservation_Mode
Also I love that you have been on reddit for two years without outputting anything and your first comment just made someone's week!
Deleted before we saved it.
Ayy ya got us both gold
Did it lets see the results
u/DenSpirit
If you used Lenovo's software to turn on the setting, IMO you'll need it again to turn it off. In other words, yes you will need a functioning Windows environment running on the laptop. However, it doesn't have to be a dangerous process, because there are ways of getting into Windows without touching your boot drive. Personally, I would recommend Hiren's BootCD PE. It's a bootable Windows installation that I know at the very least has internet support (among other useful things), so you should be able to download the Lenovo tool and use it form there.
I absolutely second this. Use Hirens BootCD PE.
I read this and thought "that can't be right" but wow, what a terrible feature. I'm guessing you've tried disabling it in firmware? All the posts I found about this were suggesting what you said, to boot to Windows.
Boot the install iso, open a command prompt and run whatever you need from there. No need to actually install.
Can you run commands from the installer? If so good but I need to install the Lenovo Companion app
You can press shift F10 during a windows install to get a command prompt.
It's a little limited but you can run commands just fine. Even gui stuff.
Get a small HDD that can be installed for the windows install.
Or
Take an image of your HDD as it is, clonezilla is one, install windows do what you need that restore your Arch install by using clonezilla to put your HDD image of Arch
Yeah I probably would back up anyway thx ill check clonezilla out
Did you try wine to install the lenovo app?
Doesn't work
Edit: maybe it will, im not familiar with Wine i just assumed that Lenovo Companion wont think to modify files in /sys/class/...
That is a problem of wine, I guess, it will map windows call to correct Linux call.
I even use it to update the BIOS and worked (don't try this at home! Not if your are not OK with the risk of brick it :) )
Or a virtual machine?
Are you sure you need to install Windows for this?
On my Lenovo machine (thinkpad E490) I can just edit the following files: /sys/class/power_supply/BAT0/charge_stop_threshold /sys/class/power_supply/BAT0/charge_start_threshold
Wait there is a folder called powercap next to power_supply. Investigating
Also
tlpis a useful tool for doing this (it works the same way). It's what I use on my T450S to manage charge thresholds... I have no idea if that will fix your issue, but it seems likely.Yeah already checked dont have those files
Check the edit
Unplug your HDD, install windows to USB, profit.
Unless your specific laptop is a one-piece shell design that can't be opened, there's nothing about this that isn't possible on most laptops.
Can you swap out the hard drive? Remove the arch disk, put in a spare, install windows, flip the switch, remove the drive and reinstall the arch disk.
Deleted before we saved it.
Lol opening your laptop doesn't void the warranty, nor does replacing the hard drive. Source: former retail computer repair tech.
i feel your pain. I feel like I need Windows even though I never use Windows specific apps. So I keep my linux in a vmware vm and live out my semi charmed life
Why do you need windows? I would do the other way around
mainly for games that I rarely ever play
Did you tried with Wine or running windows in a virtual machine ?
edit: On second thought VM is probably a dead-end given it has no access to the hardware, most of the time...
Yea
Isn't it an option in BIOS?
No
So where is this setting stored then since you wiped out Windows completely?
Make an image of your hdd and reimage after the windows debacle. I wonder whether windows container could fix this.
You know tools for making the image?
We're just dipping into Windows containers so no decent answers for now I'm afraid :(
Deleted before we saved it.
u/1000dinari
Check the edit
Deleted before we saved it.
If you wanted, you could shrink arch’s partition, and make a small 32 gig partition for windows to dual boot
Yeah thats what I would do but i think it might mess up the whole partition table
According to this site : Lenovo Forum you unfortunately seams to have not only install Windows but you also must create a Microsoft account to get the software necessary to fix your problem.
But some workaround seams to work on the ThinkPad sires according to this forum: Ubuntu Forum. I don't know if those work on your Legion but perhaps is worth a try.
Don't give up, profit is just around the corner.
Check edit
My Dell also has a similar mode but it can also be configured using BIOS. From your screenshot, constraint_0_time_window_us seems to be the limit. Its value is 60% of total. It seems to be in micro watt. Change it to 45000000.
Edit: https://www.mjmwired.net/kernel/Documentation/power/powercap/ check this link
Ty! ill look at it
Following...
u/A4orce84