linux-surface icon indicating copy to clipboard operation
linux-surface copied to clipboard

Battery percentage is not visible on top bar of Ubuntu 20.04 LTS for Surface Pro (Surface_Pro_1796)

Open prchanda opened this issue 6 years ago • 7 comments

I have done a fresh installation of Ubuntu 20.04 LTS on Surface Pro (Surface_Pro_1796) and it seems like there is some issue with battery percentage which supposed to be displayed on top bar of GNOME desktop. Did some research on this and tried the following without any success:

  1. I have no entry for battery under these directories /proc/acpi/battery or /sys/class/power_supply
  2. Ran acpi -b command - no output.
  3. Installed GNOME Tweaks and tried to enable batter percentage but it didn't help.
  4. Installed Linux Surface, but it didn't help as expected since I don't see Surface Pro in the list of supported devices, but gave a try.
  5. Installed Genome extension Vitals but it doesn't show any data of battery.

Any help on supportability of this Kernel for battery would be appreciated on Surface Pro.

prchanda avatar Jul 12 '20 09:07 prchanda

The Surface_Pro_1796 SKU is also called Surface Pro 2017 or Surface Pro 5. Microsoft for some reason chose to market it without any number, which can lead to confusion with the original Surface Pro (which has upstream support and doesn't need a patched kernel). So technically it is supported by this repo, but there are other issues that can prevent it from working.

The releases on this repository are vastly out of date. Their version number is lower than the default Ubuntu kernel, which means that Ubuntu will still boot the stock kernel by default. If you want to boot into this kernel, you need to select it from the advanced submenu.

However, you really should use the releases from https://github.com/linux-surface/linux-surface instead, which are up to date, actively maintained and include additional bugfixes / features.

StollD avatar Jul 12 '20 12:07 StollD

The Surface_Pro_1796 SKU is also called Surface Pro 2017 or Surface Pro 5. Microsoft for some reason chose to market it without any number, which can lead to confusion with the original Surface Pro (which has upstream support and doesn't need a patched kernel). So technically it is supported by this repo, but there are other issues that can prevent it from working.

The releases on this repository are vastly out of date. Their version number is lower than the default Ubuntu kernel, which means that Ubuntu will still boot the stock kernel by default. If you want to boot into this kernel, you need to select it from the advanced submenu.

However, you really should use the releases from https://github.com/linux-surface/linux-surface instead, which are up to date, actively maintained and include additional bugfixes / features.

Thanks @StollD for your pointers, will try to install the kernel from https://github.com/linux-surface/linux-surface and will let you know.

prchanda avatar Jul 12 '20 17:07 prchanda

@StollD - I have followed the setup instructions over here, but I am getting this error while booting.

Screenshot from 2020-07-10 20-00-17

Here are the commands I ran in sequence:

1. wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | sudo apt-key add -

2. echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" | sudo tee /etc/apt/sources.list.d/linux-surface.list

3. sudo apt-get update

4. sudo apt-get install linux-headers-surface linux-image-surface linux-libc-dev-surface surface-ipts-firmware libwacom-surface

5. sudo apt-get install linux-surface-secureboot-mok

6. export GRUB_CONFIG=`sudo find /boot -name "grub.cfg"`

7. sudo update-grub

8. sudo grep 'menuentry ' $GRUB_CONFIG | cut -f 2 -d "'" | nl -v 0

9. sudo grub-reboot 1

10. sudo reboot

Am I missing something else ?

prchanda avatar Jul 15 '20 14:07 prchanda

@StollD - I was able to solve the above boot error by adding GRUB_GFXPAYLOAD_LINUX=keep in /etc/default/grub. But still after booting the kernel Kernel: Linux 5.7.7-surface, the issue remains the same. No battery info being displayed.

Screenshot from 2020-07-16 10-50-54

Any thoughts around this ?

prchanda avatar Jul 16 '20 05:07 prchanda

@StollD - You know I jumped the gun, I am able to see now after doing manipulations from Tweaks :-)

Screenshot from 2020-07-16 10-57-07

Thanks a lot for your help !

prchanda avatar Jul 16 '20 05:07 prchanda

@prchanda I am really new to linux and I'm trying to regain most of my functionality to aide in turning linux into my daily driver on my surface. I am at where you were in the photo with hwmatch error upon boot, how can I run GRUB_GFXPAYLOAD_LINUX=keep in `/etc/default/grub ```

MrWhite1010 avatar Oct 15 '21 05:10 MrWhite1010

@prchanda I am really new to linux and I'm trying to regain most of my functionality to aide in turning linux into my daily driver on my surface. I am at where you were in the photo with hwmatch error upon boot, how can I run GRUB_GFXPAYLOAD_LINUX=keep in `/etc/default/grub ```

@MrWhite1010 - You don't need to run anything. You just need to add the above text in grub file.

prchanda avatar Oct 15 '21 06:10 prchanda