Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adil192/2a5d3e9227133afc5b8ac7a54ef477c7 to your computer and use it in GitHub Desktop.
Save adil192/2a5d3e9227133afc5b8ac7a54ef477c7 to your computer and use it in GitHub Desktop.
Dell Inspiron 7415 2-in-1 2021 (Ryzen 5000) on Linux Pop!_OS 21.04
#!/bin/bash
gdbus monitor -y -d org.freedesktop.login1 |
while read x; do
if [[ "$x" == *"{'LockedHint': <false>}"* ]]; then
# screen was unlocked
sudo /sbin/rmmod i2c_hid_acpi
sudo /sbin/rmmod i2c_hid
sudo /sbin/modprobe i2c_hid
sudo /sbin/modprobe i2c_hid_acpi
fi
done

Dell Inspiron 7415 2-in-1 2021 (Ryzen 5000) on Linux Pop!_OS 21.04

My Specs

  • CPU: Ryzen 5 5500U
  • RAM: Corsair 32GB (2x16GB) 2666MHz, upgraded from 8GB (2x4GB) 3200MHz
  • Storage: Crucial P2 CT1000P2SSD8 1TB M.2 SSD (Amazon link, was on sale for £60), upgraded from 256GB
  • Optional features: With fingerprint, With backlit keyboard, With Dell PN350M stylus
  • Installed Pop!_OS 21.04 (non-Nvidia variant), now on 21.10

Working

  • Sound
  • Camera
  • Wifi, Bluetooth
  • Sliders for screen brightness and keyboard backlight brightness (along with their buttons on the keyboard)
  • Touchpad gestures: three- and four-finger swipes; scrolling with two fingers and scrolling on the side of trackpad; pinch to zoom gesture
  • Touchscreen, stylus
  • Auto rotation started working after I upgraded my kernel to 5.14.
  • Pop on Wayland: Set WaylandEnable to true with sudo nano /etc/gdm3/custom.conf, then reboot. Before typing in your password, click the cog icon at the bottom right to select Wayland. This gives you much better touchscreen controls in Firefox, for example.
    • Update: I'm no longer using Wayland as I think it was breaking auto-rotation (not confirmed).

Working partially/with config

Suspend issues

  • Most suspend issues are fixed after a kernel update. (I'm on kernel 5.15 at the time of writing)

  • After coming out of suspend, the touchpad loses its acceleration, and gestures/scrolling stops working. Sometimes the touchpad stops working completely.

    • Copy the attached auto-tpfix.sh into your home folder.
    • Then run nano ~/.profile and add the following lines to the end:
      # fix touchpad after suspend
      nohup ~/auto-tpfix.sh &
    • Add the relevent commands to the sudoers file so that the auto-tpfix script can run without needing you to type in your password: run sudo visudo and add these lines at the end. Replace "yourusername" with your username.
      # allow tpfix
      yourusername ALL = NOPASSWD: /sbin/rmmod i2c_hid_acpi, /sbin/rmmod i2c_hid, /sbin/modprobe i2c_hid, /sbin/modprobe i2c_hid_acpi

Fingerprint

  • I don't think all of this is necessary but I got fingerprint working with sudo apt install fprintd libpam-fprintd libfprint-2-dev and installing the (0.6 deb) driver from Dell: http://dell.archive.canonical.com/updates/pool/public/libf/libfprint-2-tod1-goodix/. Then register fingerprints in the Settings app (Users tab).

  • I haven't been able to get my right index and middle finger registered but my other fingers work, for some reason.

Not working

2-in-1 Disabling keyboard

  • The keyboard should turn off when the screen is flipped over 180 degrees. However on pop, it is only disabled when you're fully in "tablet" mode. This makes the "stand" mode almost unusable.

Misc

  • Enable lvfs-testing to get ready for future firmware updates.

    sudo fwupdmgr enable-remote lvfs-testing
    sudo fwupdmgr refresh
    sudo fwupdmgr update
  • I set my laptop to lock (not suspend) when I close the laptop lid, and suspend after having been closed for 30 minutes when not charging.

    • To do this, first edit your /etc/systemd/logind.conf file, and insert the following lines at around line 25. You can check the guide I used to see the other options.

      HandleLidSwitch=lock
      HandleLidSwitchExternalPower=lock
      HandleLidSwitchDocked=ignore
    • Now in the Settings app > Power > Automatic Suspend, enable the "On Battery Power" checkbox and set the delay to 30 minutes (or whatever you want).

@ceezyr
Copy link

ceezyr commented Oct 12, 2021

Hey I've been going crazy trying to get suspend working on any distro. Before I found this I bounced around to a bunch of distros currently on fedora 35 and even with the kernel 5.15.0 suspend refuses to work. Is there some other secret I'm missing here?

@adil192
Copy link
Author

adil192 commented Oct 12, 2021

@ceezyr Does suspend not work at all or are you experiencing issues after coming out of suspend? Suspend started working for me (previously it was just crashing and shutting down if I suspended it) after building my own kernel

@ceezyr
Copy link

ceezyr commented Oct 12, 2021

If I suspend the majority of the time the laptop will not come out of suspend almost all the time. Sometimes if suspend by closing the lid I can reopen it to resume but that is rare and I can't figure out why it happens. It does show the touchpad issue then, but your script fixes it.

@adil192
Copy link
Author

adil192 commented Oct 14, 2021

@ceezyr Which laptop did you get? I can't think of anything specific I did to fix it, but as a stopgap solution you could stop your laptop suspending when you shut the lid with /etc/systemd/logind.conf like above, if you haven't already

@Melissa-Iacovidou
Copy link

Hi, I'm having the suspend issue as well, Dell Latitude 5480, started a few days/weeks after I upgraded to 21.10 Ubuntu. I am on kernel Linux 5.15.0-051500-generic x86_64 and I have tried several things but nothing seems to work. If I try to suspend the laptop shuts down and restarts. Any ideas?

@adil192
Copy link
Author

adil192 commented Jan 20, 2022

@ceezyr @Melissa-Iacovidou Have y'all tried upgrading your BIOS? I saw a few people online that said it fixes suspend

@Melissa-Iacovidou
Copy link

@adil192 Yeah I found some solutions saying to try updating the BIOS, but for some reason when I tried to do that the laptop just restarts without updating... I'm not sure if the instructions I found were wrong or if something else is happening.

@RomainLAU
Copy link

Hey, I'll start by thanking you for all of this, it helped me a lot as I'm a beginner on Linux.
I had a question, do you think next LTS Ubuntu version will fix some issues we currently have ?

@adil192
Copy link
Author

adil192 commented Apr 9, 2022

Hey, I'll start by thanking you for all of this, it helped me a lot as I'm a beginner on Linux. I had a question, do you think next LTS Ubuntu version will fix some issues we currently have ?

Doubt it. The only issue I have is with the fingerprint sensor and Ubuntu doesn't control that (https://fprint.freedesktop.org/)

(Edit: Fingerprint now works for me)

@RomainLAU
Copy link

RomainLAU commented Apr 9, 2022

Hey, I'll start by thanking you for all of this, it helped me a lot as I'm a beginner on Linux. I had a question, do you think next LTS Ubuntu version will fix some issues we currently have ?

Doubt it. The only issue I have is with the fingerprint sensor and Ubuntu doesn't control that (https://fprint.freedesktop.org/)

I was mainly thinking about the touchpad

@adil192
Copy link
Author

adil192 commented Apr 9, 2022

I was mainly thinking about the touchpad

In that case, maybe but unlikely. It's not really a problem with the auto-tpfix script. This probably wouldn't be an issue if this laptop was supported by Dell for linux, but that's only for their pricier models

@jkoehler11
Copy link

I'm on Kernel 6.0 and Tablet Mode is still not working. Also, this laptop is not in LVFS and since the Inpiron 15's are in there I'm guessing that it is unlikely that the 14's will be added.

@RomainLAU
Copy link

Hey, I have an issue with the cursor, the auto tpfix works, but each time I click on my screen using finger, my cursor goes invisible and the only way to show it again when using my touchpad, it's by moving my cursor outside any app, like a page where there is no application or by moving my cursor on a "system based" part of my screen, like my top panel or my bottom dock. Would you have any idea why is that and what I could do to solve this issue ? I'm on Kernel 5.15.0 on Ubuntu 22.04.1 LTS X11

@adil192
Copy link
Author

adil192 commented Nov 29, 2022

I don't have a fix for that, I've just gotten used to moving my mouse down to the bottom until the cursor appears

@p-p-q
Copy link

p-p-q commented Jan 17, 2023

Hey, I have an issue with the cursor, the auto tpfix works, but each time I click on my screen using finger, my cursor goes invisible and the only way to show it again when using my touchpad, it's by moving my cursor outside any app, like a page where there is no application or by moving my cursor on a "system based" part of my screen, like my top panel or my bottom dock. Would you have any idea why is that and what I could do to solve this issue ? I'm on Kernel 5.15.0 on Ubuntu 22.04.1 LTS X11

Maybe this is due to bad calibration of the Wacom Finger touch input device? I have seen something similar with an Inspiron 7425 2-in-1 when there is an external display connected to the laptop. The wrong screen's size was mapped to the (absolute) finger touch input coordinates, unfortunately I was unable to fix it back then. I think there is a Wacom setup utility for calibration, might be worth a try.

@RomainLAU
Copy link

Maybe this is due to bad calibration of the Wacom Finger touch input device? I have seen something similar with an Inspiron 7425 2-in-1 when there is an external display connected to the laptop. The wrong screen's size was mapped to the (absolute) finger touch input coordinates, unfortunately I was unable to fix it back then. I think there is a Wacom setup utility for calibration, might be worth a try.

Hmm, well I'm not sure it's about the calibration as I can click where I want with my finger and it works well, maybe I'm wrong but if it was a calibration issue I wouldn't be able to use the tactile as easily dont you think ?

@RomainLAU
Copy link

And I have something to add, few days ago, I don't know why but I didn't have the issue, when I used the tactile the cursor was following my finger, and when I used the touchpad, the cursor was still there, working as it should be. After I locked the laptop and unlocked it, the issue was back... I don't know if it can help in any way

@RomainLAU
Copy link

RomainLAU commented Jan 18, 2023

I found this on reddit : https://www.reddit.com/r/Ubuntu/comments/v0qltu/mouse_cursor_disappears_after_using_touch_screen/?sort=new
It doesn't seem to be linked to this laptop in particular, but a common issue with X11 and touchpads... And I tried to recalibrate the touchscreen as @p-p-q advised me to do, but it didn't change anything

Edit: After few searches, I found this : https://gitlab.gnome.org/GNOME/mutter/-/issues/2376
Apparently the issue was fixed and will be available on Gnome 43.3 that should be released in January

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment