How to not force restart during boot? https://askubuntu.com/questions/1562824/how-to-not-force-restart-during-boot

Over a few days in the past 2 weeks, I have started the computer to end up stuck in a boot loop (or loading screen). Today and yesterday on every boot-up, when I force shut down and boot up again, there's no issue. It goes straight to login. The laptop is stored in an isolated container in a (currently) cold shed, and the battery is often low to begin with, but that doesn't explain why after a forced restart there are no issues.

libvirt manager Could not open Permission denied https://askubuntu.com/questions/1562823/libvirt-manager-could-not-open-permission-denied

I use virt-manager with Ubuntu 25.04 VM. Sometimes I did external snapshots. After upgrading VM to Ubuntu 25.10 I also saved snapshot. I can start any snapshot except last one. When I start last one (with 25.10) I have this log. How to start it?

Error running snapshot 'init_25.10': internal error: process exited while connecting to monitor: 2026-01-13T09:09:26.823084Z qemu-system-x86_64: -blockdev {"driver":"file","filename":"/home/a/mystorage/libvirt_pool/ubuntu.1757917759","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}: Could not open '/home/a/mystorage/libvirt_pool/ubuntu.1757917759': Permission denied

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 67, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
    callback(*args, **kwargs)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1219, in revert_to_snapshot
    self._backend.revertToSnapshot(snap.get_backend())
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/libvirt.py", line 2456, in revertToSnapshot
    raise libvirtError('virDomainRevertToSnapshot() failed')
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2026-01-13T09:09:26.823084Z qemu-system-x86_64: -blockdev {"driver":"file","filename":"/home/a/mystorage/libvirt_pool/ubuntu.1757917759","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}: Could not open '/home/a/mystorage/libvirt_pool/ubuntu.1757917759': Permission denied

My host system is Ubuntu 25.10

$ virt-manager --version
5.1.0

enter image description here

I don't think the problem is in permissions because all files have similar settings, for example

# stat /home/a/mystorage/libvirt_pool/ubuntu.1757917759
  File: /home/a/mystorage/libvirt_pool/ubuntu.1757917759
  size: 429562527744    Blocks: 20830992   IO Block: 4096   regular file
Device: 4eh/78d Inode: 20712774    Links: 1
Access: (0600/-rw-------)  Uid: (64055/libvirt-qemu)   Gid: (  993/     kvm)
Access: 2026-01-13 18:09:21.092376930 +0900
Modify: 2026-01-01 18:24:48.734965347 +0900
Change: 2026-01-13 18:09:20.997378275 +0900
 Birth: 2025-09-15 16:42:59.929479087 +0900
# stat ubuntu.1763957026
  File: ubuntu.1763957026
  size: 4398186496  Blocks: 8587792    IO Block: 4096   regular file
Device: 4eh/78d Inode: 21876805    Links: 1
Access: (0600/-rw-------)  Uid: (64055/libvirt-qemu)   Gid: (  993/     kvm)
Access: 2026-01-13 18:05:54.913296733 +0900
Modify: 2025-11-24 16:10:01.610686487 +0900
Change: 2026-01-13 18:05:54.770303982 +0900
 Birth: 2025-11-24 13:04:05.271617670 +0900
How to run EAGLE (CadSoft/Autodesk) on Ubuntu 22.04 or later? (Failed to create OpenGL context for format QSurfaceFormat) https://askubuntu.com/questions/1562821/how-to-run-eagle-cadsoft-autodesk-on-ubuntu-22-04-or-later-failed-to-create

I'm trying to run EAGLE from autodesk web page. I extracted the files, set LD_LIBRARY_PATH and use the LIBGL fix from this question. I also symlinked swrast inside /usr/lib/dri and ran apt install libgl1-mesa-dri libxcb-dri3-0. Then also added MESA_LOADER_DRIVER_OVERRIDE=i965 for good measure. This is the command I run:

LD_LIBRARY_PATH=lib LIBGL_ALWAYS_SOFTWARE=1 MESA_LOADER_DRIVER_OVERRIDE=i965 ./eagle

Still, I'm unable to start it due to two or three errors:

LibGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: undefined symbol: xcb_dri3_buffers_from_pixmap_strides

From here I gather the function is provided by lib-xcb3, which is installed. Next we have:

ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler.

Which is said to be caused by missing OpenGL libs. Finally:

Failed to create OpenGL context for format QSurfaceFormat(...

This is the full output:

libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: undefined symbol: xcb_dri3_buffers_from_pixmap_strides (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
QXcbConnection: XCB error: 2 (BadValue), sequence: 438, resource id: 0, major code: 152 (Unknown), minor code: 24
Sandboxing disabled by user.
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
[248615:248627:0113/093459.794345:ERROR:nss_util.cc(808)] After loading Root Certs, loaded==false: NSS error code: -8018
[248615:248632:0113/093500.240881:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.240910:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.240929:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl4.digicert.com
[248615:248632:0113/093500.240935:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com
[248615:248632:0113/093500.241865:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.241878:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.241891:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl4.digicert.com
[248615:248632:0113/093500.241897:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com
[248615:248632:0113/093500.787421:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.787447:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.787484:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl4.digicert.com
[248615:248632:0113/093500.787495:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com
[248615:248632:0113/093500.788380:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.788393:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093500.788408:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl4.digicert.com
[248615:248632:0113/093500.788414:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com
js: Failed to set referrer policy: The value 'same-origin' is not one of 'always', 'default', 'never', 'origin-when-crossorigin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', or 'unsafe-url'. The referrer policy has been left unchanged.
[248615:248632:0113/093501.032500:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093501.032528:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093501.032544:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl4.digicert.com
[248615:248632:0113/093501.032551:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com
[248615:248632:0113/093501.033359:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093501.033370:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: ocsp.digicert.com
[248615:248632:0113/093501.033384:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl4.digicert.com
[248615:248632:0113/093501.033390:ERROR:nss_ocsp.cc(591)] No URLRequestContext for NSS HTTP handler. host: crl3.digicert.com
js: wafErrorsQueue
js: wafErrorsQueue
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBehavior(DefaultSwapBehavior), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
Aborted
How do i optimize the swap usage? https://askubuntu.com/questions/1562819/how-do-i-optimize-the-swap-usage

I am running a "fairly" old laptop ,idea pad 310, 12Gb of ram, and i put a 12Gb swap, can i make it use swap more or more efficiently? Its only uses like 1Gb

(First time Linux user) The keyboard is inactive after lid close, but following repair steps didn't work https://askubuntu.com/questions/1562815/first-time-linux-user-the-keyboard-is-inactive-after-lid-close-but-following

EDIT: I made some clarifying edits. Ubuntu 24.04.3 Desktop LTS (Noble)

I'll do my best to give as much details as I can. This is a new laptop with Ubuntu 24.04 preinstalled. Thanks to Google, I found some tips and steps to take. I read a lot of the new user help section that was included in Ubuntu's apps>help section. I ran some code to make sure all of the apps were up to date.

My first goal was to set the laptop lid to not go into suspend mode when closed. Google gave me some steps (from easy to advanced) which I followed, but I might have messed up something, because I still have the same keyboard issue. I watched some help videos as well. [My immediate end-goal for this laptop is to get the keyboard working how I want it, then to install something like TimeShift to create a Day Zero backup where everything is working correctly, so I can begin using my laptop normally.]

Well, I tried again this evening. Here are the steps I took this evening. I had the following dialog with Google's AI:

I'm a new Linux user on an IdeaPad Slim 3 15ABR8 - Type 82XM. I need to fix this keyboard as it doesn't work after opening the laptop lid. Does this [aforementioned] "best verified fix (for 2026)" work for the "IdeaPad Slim 3 15ABR8 - Type 82XM"?

Yes, the amd_pmc enable_stb=1 fix is highly effective for the Lenovo IdeaPad Slim 3 15ABR8 (Type 82XM). Recent user reports from late 2025 specifically confirm that this method resolves the unresponsive keyboard issue after resume on this exact hardware.

While this fix restores the main keyboard, some users on the 15ABR8 model report a persistent minor side effect where Fn keys (brightness/volume) may still remain inactive until a manual restart.

Updated Steps for IdeaPad Slim 3 15ABR8

Since you are on Ubuntu, follow these specific terminal commands:

  1. Create the Fix File:
    sudo nano /etc/modprobe.d/amd_pmc.conf

  2. Add this precise line:
    options amd_pmc enable_stb=1

  3. Save and Exit: (Ctrl+O, Enter, Ctrl+X)

  4. Critical Ubuntu Step: You must update the initial RAM disk for this to take effect:
    sudo update-initramfs -u

  5. Restart your laptop.

okay, i followed those 5 steps. now what?

After completing those 5 steps, you need to verify the fix and test the hardware.

1. Verify the Fix is Active

Run this command in your terminal to confirm that Ubuntu has successfully loaded the new setting:
cat /sys/module/amd_pmc/parameters/enable_stb

  • If it returns Y or 1, the fix is correctly applied.

  • If it says "No such file" or returns N/0, the module didn't load. Ensure you didn't miss Step 4 (sudo update-initramfs -u) and that you restarted.

2. Perform the "Lid Test"

  1. Save any open work.

  2. Close your laptop lid and wait at least 10–15 seconds to ensure it fully enters "Suspend" mode (look for the power light pulsing or turning off).

  3. Open the lid.

  4. Try to type your password immediately.

that still did not fix the issue, even though I got a "Y". I had to restart via the power menu.

Since the previous steps didn't resolve the issue for your IdeaPad Slim 3 15ABR8 (Type 82XM), we will move to more advanced configurations. This model often has persistent issues with how the Linux kernel initializes its keyboard controller (i8042) during resume.

1. Use the "Dumb Keyboard" Parameter

This is a high-success workaround for laptops where the keyboard fails to respond to driver initialization events after sleep.

  1. Open the GRUB configuration: sudo nano /etc/default/grub

  2. Locate the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" line.

  3. Add i8042.dumbkbd inside the quotes. It should look like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.dumbkbd"

    • Note: You can combine this with the previous fix: "quiet splash i8042.dumbkbd amd_pmc enable_stb=1"
  4. Save and exit (Ctrl+O, Enter, Ctrl+X).

  5. Apply the change: sudo update-grub

  6. Restart your laptop and test the lid close/open again.

2. Blacklist the Lenovo-Specific Driver

Sometimes the ideapad_laptop kernel module conflicts with standard keyboard drivers on newer Slim 3 models.

  1. Run: sudo nano /etc/modprobe.d/ideapad.conf

  2. Paste this line into the file: blacklist ideapad_laptop

  3. Save and exit.

  4. Restart your laptop. This forces the system to use generic drivers that are often more stable for this specific hardware's keyboard.

3. Check for Outdated BIOS

As of late 2025/early 2026, Lenovo released firmware updates specifically to address suspend glitches for the 15ABR8 series.

  • Check your current BIOS version in Ubuntu by running: sudo dmidecode -s bios-version

  • Compare it against the latest version on the Lenovo Support Site.

  • Warning: BIOS updates typically require Windows. If you are strictly on Ubuntu, you may need a bootable Windows PE USB or Lenovo's "Update via USB" tool if available for your model.

So, before moving any further forward, I checked the BIOS version. I currently have KYCN39WW and KYCN40WW is the latest version. Should I update the BIOS before moving forward?

How should I proceed? (Also, do you need me to provide any further laptop information? Hopefully, I've posted this in the correct place and in the correct manner.)

Thank you in advance for any help you're able to provide.

Dual boot W11+Ubuntu24.04 LTS (desktop version/gnome no server) not showing grub menu only when restarting https://askubuntu.com/questions/1562814/dual-boot-w11ubuntu24-04-lts-desktop-version-gnome-no-server-not-showing-grub

I just built my PC, installed Windows 11 and decided to install Ubuntu 24.04. Unfortunately I noticed when restarting the system shut down and then powered on, but a black screen is on and then goes directly into Ubuntu instead of showing the grub menu to select Windows 11 or anything else. This problem is not occurring when I just power off and power on the PC, since grub menu is OK and I can go to Windows 11, Ubuntu or UEFI.

So I decided to delete all, fresh install Windows 11 and Fedora only to test. In Fedora everything works well as the grub menu, but I didn't like Fedora so I redid the Windows 11/Ubuntu 24.04 combination and the boot problem still persists.

How to Install Ethernet Adapter Driver (USB Type C) on Ubuntu 24.04 LTS https://askubuntu.com/questions/1562791/how-to-install-ethernet-adapter-driver-usb-type-c-on-ubuntu-24-04-lts

I'm new on Ubuntu 24.04 and have a Ethernet access (Vention USB-C to Gigabit Ethernet Adapter) but that didn't work.

Bus 004 Device 002: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Installation by pip or pip3 or pipx to beware a consistant system https://askubuntu.com/questions/1562785/installation-by-pip-or-pip3-or-pipx-to-beware-a-consistant-system

Ubuntu-Mate, Ubuntu 24.04.3 LTS

An example :

$ pip install curl-ffi
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

My understanding : curl-ffi must be installed global, but with the risk of breaking the Python installation I can not do it. What can I do to beware my system but also to have curl-ffi global ?

How to implement pam_faillock.so on ssh login attempts https://askubuntu.com/questions/1562766/how-to-implement-pam-faillock-so-on-ssh-login-attempts

Following this answer I need my Ubuntu 22.04 Profiles to lock after 20 unsuccessful attempts for a duration of 15 minutes

I added the three lines with pam_faillock as follows into /etc/pam.d/common-auth

# here are the per-package modules (the "Primary" block)
auth    required            pam_faillock.so preauth audit 
auth    [success=1 default=ignore]  pam_unix.so nullok

# here's the fallback if no module succeeds
auth    [default=die]           pam_faillock.so authfail audit
auth    sufficient              pam_faillock.so authsucc audit 
auth    requisite           pam_deny.so

# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth    required            pam_permit.so

# and here are more per-package modules (the "Additional" block)
auth    optional            pam_cap.so 
# end of pam-auth-update config

I also updated the file /etc/security/faillock.conf with the line deny=4

I was able to replicate account lockout on an Ubuntu 22 server VM. It works as expected when I login locally through VNC. VNC Lockout working.

However when I try to ssh in using the t1 account, the failures are not logged in the faillock count and a lock is not triggered. Below is the output of SSH test

$ ssh t1@192.168.0.100
t1@192.168.0.100's password: 
Permission denied, please try again.
t1@192.168.0.100's password: 
Permission denied, please try again.
t1@192.168.0.100's password: 
Permission denied, please try again.
t1@192.168.0.100's password: 
Permission denied, please try again.
t1@192.168.0.100's password: 
Received disconnect from 192.168.0.100 port 22:2: Too many authentication failures
Disconnected from 192.168.0.100 port 22

The line UsePAM yes is present in /etc/ssh/sshd_config

What else do I need to do so that when a user attempts to ssh into the VM and fails password 4 times, they are locked out and it is shown with command sudo faillock --user t1 ?

Nvidia GPU (RTX 5080 FE) not detected and no additional drivers availible https://askubuntu.com/questions/1562757/nvidia-gpu-rtx-5080-fe-not-detected-and-no-additional-drivers-availible

I recently purchased and build a new PC. I initially started with Ubuntu 24.04 but have upgraded to 25.10 because I have not been able to get Nvidia drivers to recognize the GPU.

All the other hardware is recognized and appears to work correctly (one exception is the audio jack, but I think that has to do with the outdated PC case).

I have been following guides through other help sites and questions. None have answered my problem. This isn't to say that I ran their scripts 100% correctly, but there was no improvement afterward.

So, I need assistance identifying the issues and working through possible solutions.

Info Dump

System Information

Hardware

  • MB: MSI MPG X870E Carbon WIFI
  • GPU: GeForce RTX 5080 Founders Edition
  • CPU: AMD Ryzen 9 7900X

Current Reports (Clean Slate, I can update as progress is made)

lshw -C display

  *-display                 
       description: VGA compatible controller
       product: Raphael
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:77:00.0
       logical name: /dev/fb0
       version: c2
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list fb
       configuration: depth=32 driver=amdgpu latency=0 resolution=3840,2160
       resources: iomemory:f80-f7f iomemory:f80-f7f irq:83 memory:f800000000-f80fffffff memory:f810000000-f8101fffff ioport:f000(size=256) memory:dd700000-dd77ffff

lsmod | grep nvidia

--> none found

inxi -G

Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Raphael driver: amdgpu v: kernel
  Display: wayland server: X.Org v: 24.1.6 with: Xwayland v: 24.1.6
    compositor: gnome-shell v: 49.0 driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
    resolution: 3440x1440~85Hz
  API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 25.2.3-1ubuntu1
    renderer: AMD Ryzen 9 7900X 12-Core Processor (radeonsi raphael_mendocino
    LLVM 20.1.8 DRM 3.64 6.17.0-8-generic)
  Info: Tools: api: eglinfo,glxinfo x11: xdriinfo, xdpyinfo, xprop, xrandr

lspci

--> no sign of Nvidia devices

Previous Threads attempted

UPDATES

Attempt #1 - Script

sudo apt-get update

sudo apt-get upgrade

sudo apt-get remove --purge '^nvidia-.*' (Nothing found to remove)

sudo apt autoremove

sudo reboot

sudo apt install pkg-config libglvnd-dev dkms build-essential libegl-dev libegl1 libgl-dev libgl1 libgles-dev libgles1 libglvnd-core-dev libglx-dev libopengl-dev gcc make

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt update

sudo apt install nvidia-driver-580-open

sudo reboot

nvidia-smi

RESULTS

nvidia-smi

--> NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

lshw -C display lsmod | grep nvidia inxi -G lspci

--> Same results as Clean Slate (nothing found)

spd-say in bash script does not work when called from crontab but works from terminal https://askubuntu.com/questions/1562735/spd-say-in-bash-script-does-not-work-when-called-from-crontab-but-works-from-ter

My system is Lubuntu 22.04.5 LTS on a laptop.

Because I would like to keep my battery as healthy as possible, I want to make sure that the charging level stays between certain boundaries, but the hardware in my laptop does not support battery charge limits, so I turned to make use of a bash script (which I found at Github and modified it to my needs) which is called via crontab every 5 minutes. It then gives me a notification which tells me the battery charge in %, with a message warning me when it becomes to low (when the charger is not connected) or when it is too high (when the charger is plugged in), the third possibility in the notification text is that it just tells me the charge when it is between the given boundaries in the script. This works okay, but the trouble started when I added a spoken message to the script by using a line in the script that is meant to do just that.

The spoken message uses spd-say and the bash script works fine with spd-say giving the audio only when I call the script from terminal. But when the script is called from crontab it also makes the notification text appear alright, but then there is no sound at all to be heard.

I also tried aplay, which plays soundfiles and this gives a similar result, when the script is called from terminal it works, but not when called from crontab.

Here is the script, it is located at /usr/local/bin and it is called battmon.sh:

# ------------------------------------------------------------------
# Script Name:   battmon.sh
# Description:   A Simple Bash Script for Battery Level Charge 
#                Notifications
# Website:       https://gist.github.com/ostechnix
# ------------------------------------------------------------------
# Define thresholds
HIGH_THRESHOLD=80
LOW_THRESHOLD=40
LOGFILE="/tmp/battmon.log"
# Get the battery level
LEVEL=$(acpi -b | awk -F', ' '{print $2}' | tr -d '%,')
# Ensure LEVEL is a valid number
if [[ "$LEVEL" =~ ^[0-9]+$ ]]; then
    # Check for high battery level
    if [ "$LEVEL" -ge "$HIGH_THRESHOLD" ]; then
        echo "$(date) - Battery at $LEVEL%. Sending high battery notification..." >> "$LOGFILE"
        DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 notify-send -t 0 "Accu is vol" "De accu is nu opgeladen tot boven het ingestelde maximale niveau van $HIGH_THRESHOLD % en is nu $LEVEL % , ontkoppel de lader !" >> "$LOGFILE" 2>&1
        spd-say -t female1 -w "stop direct met opladen ! de accu is vol, stop meteen met opladen, want de accu is meer dan $LEVEL% procent vol!"
    fi
    # Check for low battery level
    if [ "$LEVEL" -le "$LOW_THRESHOLD" ]; then
        echo "$(date) - Battery at $LEVEL%. Sending low battery warning..." >> "$LOGFILE"
        DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 notify-send -t 0 "Accu is laag" "De accu is nu ontladen tot onder het ingestelde minimale niveau van $LOW_THRESHOLD % en is $LEVEL %. Sluit nu de lader aan!" >> "$LOGFILE" 2>&1
        spd-say -t female1 -w "begin nu direct met opladen ! de accu is leeg, begin  meteen met opladen, want de accu heeft nog maar $LEVEL% procent lading !"
    fi 
    # Check for good battery level
    if [ "$LEVEL" -ge "$LOW_THRESHOLD" ] && [ "$LEVEL" -le "$HIGH_THRESHOLD" ]   ; then
        echo "$(date) - Battery at $LEVEL%. Sending normal battery level message..." >> "$LOGFILE"
        DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 notify-send -t 10000 "De accu is geladen op een veilig niveau en is nu $LEVEL% procent" >> "$LOGFILE" 2>&1
        aplay /home/paul/Muziek/spraak/ttsmaker-file-2026-1-10-21-23-47-accuniveau-test-2.wav
        spd-say -t female1 -w "de accu heeft nog steeds een goede lading van op dit moment $LEVEL% procent"
    fi
fi

I used

crontab -e

and entered this line:

*/5 * * * * /usr/local/bin/battmon.sh >> /tmp/battmon.log 2>&1

I also tried to use the cron in another way, as I understood that there is the difference in cron for the user and the system, so to try it in the system way and I did:

sudo nano /etc/crontab

and added the same line there:

*/5 * * * * /usr/local/bin/battmon.sh >> /tmp/battmon.log 2>&1

But to no avail...

At this moment I have no clue how to fix this, maybe it is not possible at all to call these sound outputting programs from crontab, but maybe someone does know how to do it right. In either case I am very curious about the why and how.

EDIT-1:

The answer knu gave seems to do a great deal of the trick, i.e. when I followed his answer and called the script from terminal everything worked, notification and sounds (I must add that strangely enough it was the notification that worked yesterday and not the sounds, but this morning it was the other way around, which I could and still can not get my head around, but after adding the line:

export XAUTHORITY=/run/user/1000/gdm/Xauthority

that was fixed (called from terminal). But in the log there was an error message "Cannot autolaunch D-Bus without X11 $DISPLAY" which was only resolved after adding the line:

export DISPLAY=:0.0

but I also saw another error in the log, note that this error only occurs when the script is called from cron, not from terminal: " GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files " for which I found a solution here

But still things are not going as wished:

  1. although everything works when called from terminal, when called from cron the script does not work! (my fault: I accepted the answer as the solution, but this is still not the case...) No notification, no sound.
  2. the log now shows another error (again only when the script is called from cron): "Error calling StartServiceByName for org.freedesktop.Notifications: Failed to execute program org.freedesktop.Notifications: No such file or directory"
  3. After searching for a solution for the error mentioned under 2 above, I found the exact same suggestion as a solution that resolved the previous error, but of course it is clear that this does not work for this second error, because after following the solution for the first error this second one still exists !

So I was too fast in thinking this question has been resolved. I still am looking for a solution...

EDIT-2:

The missing notification has been solved by installing notification-daemon:

sudo apt-get install notification-daemon

Altough the sound output is still missing, the log now does not show any error messages after the installing of the daemon.

EDIT-3:

I did not mention this before, but I do now: I did removed the:

DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000

that stood in front of the notification lines like in:

DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 notify-send -t 0 "Accu is vol" "De accu is nu opgeladen tot boven het ingestelde maximale niveau van $HIGH_THRESHOLD % en is nu $LEVEL % , ontkoppel de lader !" >> "$LOGFILE" 2>&1

because at the time I noticed that after adding

export XAUTHORITY=/run/paul/1000/gdm/Xauthority
export DISPLAY=:0.0

this was not necessary anymore, but I just found out that the suggestion that steeldriver gave in the comments was right, it was still needed before the statements that gives the speech output. So now it reads for instance:

DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 spd-say -t female1 -w "de accu heeft nog steeds een goede lading van op dit moment $LEVEL% procent"
Laptop speaker (Samsung Galaxy Book4 Pro 360) not working on Ubutnu 25.04 https://askubuntu.com/questions/1556744/laptop-speaker-samsung-galaxy-book4-pro-360-not-working-on-ubutnu-25-04

I recently installed Ubuntu 25.04 on a disk partition of my Samsung Galaxy Book4 Pro 360. Now i have windows 11 and Ubuntu 25.04. Unfortunately my speakers are not working on Ubuntu, even if they are working on Windows. I think this is a driver problem.

Everything seems working properly, I have no mistake in tests made .. but the audio is not working. In settings i can see the little bar on output area, like it's working but i hear none.

How can i solve it? Thanks a lot for your help!

Preffered way to install Node.js (LTS) on Ubuntu 24.04 [duplicate] https://askubuntu.com/questions/1525193/preffered-way-to-install-node-js-lts-on-ubuntu-24-04

The apt package manager shows me an older version of Node.js:

sudo apt list nodejs
nodejs/noble 18.19.1+dfsg-6ubuntu5 amd6

https://packages.ubuntu.com/noble/nodejs

So, in Ubuntu 24.04, NodeJS has version 18.19, but the current LTS version of Node.js is v20.17.0. There I have found two ways to install it. The first option is using nvm (Node Version Manager) and the second option is for Debian and Ubuntu based Linux distributions > NodeSource.

Does it matter which variant you use here? Or are there advantages or disadvantages to one of the two variants?

ACPI BIOS error on each boot [duplicate] https://askubuntu.com/questions/1499327/acpi-bios-error-on-each-boot

I have a Windows laptop. I have installed Ubuntu, not as a dual boot, and every time I boot I get this error:

[    0.309208] ACPI BIOS Error (bug): Could not resolve symbol
             [\_SB.PCI0.GPP1.WLAN], AE_NOT_FOUND
             (20221020/dswload2-162)
[    0.309236] ACPI Error: AE_NOT_FOUND, During name lookup/catalog
             (20221020/psobject-220)

[    1.247595] ACPI Error: AE_NOT_FOUND, While resolving a named reference package
             element - \_PR_.P000 (20221020/dspkginit-438)

/dev/nvme0n1p2: clean, 224079/15597568 files, 5199765/62383360 blocks
_
ACPI BIOS error in Ubuntu 20.04 https://askubuntu.com/questions/1463971/acpi-bios-error-in-ubuntu-20-04

This is the error I am getting after choosing Ubuntu as the boot option. Then I am getting the following error. I am not able to boot into Ubuntu. What could be the reason? My BIOS is already up-to-date, and Windows is working fine.

[    0.317593] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PB2], 
AE_NOT_FOUND (20210730/dswload2-162)
[    0.317603] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/ps
object-220)
[    0.317661] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PB2], 
AE_NOT_FOUND (20210730/dswload2-162)
[    0.317664] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210730/ps
object-220)
[    2.699733] hub 6-0:1.0: config failed, hub doesn't have any ports! (err -19)
/dev/nvme0n1p6: recovering journal
/dev/nvme0n1p6: clean, 244628/915712 files, 3579017/3662080 blocks
[    4.638856]
[    4.641095] mt7921e 0000:02:00.0: ASIC revision: 79220010
_
Dell Vostro 5625 ACPI BIOS Error (bug): Could not resolve symbol https://askubuntu.com/questions/1433364/dell-vostro-5625-acpi-bios-error-bug-could-not-resolve-symbol

I have an issue with Dell Vostro 5625 based on Ryzen 7 and Ubuntu (20.04, 22.04) with the newest kernel version.

During login I see this error:

ACPI BIOS ERROR (bug): Could not resolve symbol [\_.SB.PCI0.LPC0.ECO], 
AE_NOT_FOUND (20210730/dswload2-162)

The system starts, but after suspending or closing the lid it doesn't want to wake up.

Removing 'syncthing' from Ubuntu 22.04 https://askubuntu.com/questions/1426651/removing-syncthing-from-ubuntu-22-04

My OS is Ubuntu 22.04 & I installed syncthing. After exploring it a bit, it didn't fit my need (local backup to USB) so I've tried deleting it with no success. I have a remnant somewhere that I can't seem to clean out. This is what I see in apt:

~$ apt list syncth*
Listing... Done
syncthing-discosrv/jammy 1.18.0~ds1-3 amd6
syncthing-gtk/jammy,jammy 0.9.4.4+ds+git20220108+9023143f8b93-1 all
syncthing-relaysrv/jammy 1.18.0~ds1-3 amd64
syncthing/jammy 1.18.0~ds1-3 amd64

These are the things I've tried:

sudo apt remove syncthing*
sudo apt auto clean
sudo apt autoclean
sudo apt autoremove

Then ran sudo apt update followed by apt list syncht* and... they're back!

Tried dpkg with sudo dpkg --purge syncthing with a result of:

dpkg: warning: ignoring request to remove syncthing which isn't installed

Installed Synaptic, found the four modules. Marked them for install, applied, marked for complete removal and applied. Ran sudo apt update and.... they're back!

'whereis syncthing' and 'which syncthing' don't find anything.

I removed the sources list: sudo rm /etc/apt/sources.list.d/syncthing.list

Reran sudo apt update and apt list syncth* and... they're still there.

Tried this which didn't work either:

sudo apt install syncthing-discosrv syncthing-gtk syncthing-relaysrv syncthing

sudo apt purge  syncthing-discosrv syncthing-gtk syncthing-relaysrv syncthing

I am missing something (obviously). Any thoughts on how to remove syncthing-discosrv, syncthing-gtk, syncthing-relaysrv, syncthing from showing up in apt ?

Thanks.

Boot error message on Ubuntu 22.04 https://askubuntu.com/questions/1403557/boot-error-message-on-ubuntu-22-04

I have this boot error message on my laptop Acer Aspire A514-54, on Ubuntu 22.04. Has anyone tip about it?

[    0.160434] ACPI BIOS Error (bug): Failure creating named object
             [\_SB.PC00.XHCI.RHUB.SS04._PLD], AE_ALREADY_EXISTS
             (20210730/dswload2-326)
[    0.160437] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
[    0.160441] ACPI BIOS Error (bug): Failure creating named object
             [\_SB.PC00.XHCI.RHUB.SS05._UPC], AE_ALREADY_EXISTS
             (20210730/dswload2-326)
[    0.160444] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
[    0.160447] ACPI BIOS Error (bug): Failure creating named object
             [\_SB.PC00.XHCI.RHUB.SS05._PLD], AE_ALREADY_EXISTS
             (20210730/dswload2-326)
[    0.160450] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
[    0.160454] ACPI BIOS Error (bug): Failure creating named object
             [\_SB.PC00.XHCI.RHUB.SS06._UPC], AE_ALREADY_EXISTS
             (20210730/dswload2-326)
[    0.160457] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
[    0.160460] ACPI BIOS Error (bug): Failure creating named object
             [\_SB.PC00.XHCI.RHUB.SS06._PLD], AE_ALREADY_EXISTS
             (20210730/dswload2-326)
[    0.160462] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)
[    0.190881] ACPI BIOS Error (bug): Could not resolve symbol
             [\_SB.PC00.DGPV], AE_NOT_FOUND (20210730/psargs-330)
[    0.190890] ACPI Error: Aborting method \_SB.PC00.PEG0.PCRP._ON due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
Escape code sequence for copying file content https://askubuntu.com/questions/1376179/escape-code-sequence-for-copying-file-content

I found from here that you can use ANSCI Escape sequence to copy from a remote ssh session like so,

printf "\033]52;c;$(printf "%s" "blabla" | base64)\a"

I have tried issuing command,

$ (file=README.md; printf "\033]52;c;$(base64 $file)\a")

But I am able to print only the first few characters (~57 characters). Is there a way to copy the whole content of a file with the Escape sequence?

Ubuntu 20.04 booting issue in Legion 5i https://askubuntu.com/questions/1279500/ubuntu-20-04-booting-issue-in-legion-5i

I installed Ubuntu 20.04 in my Legion 5i, but there was ACPI error (bug) and AE_NOT_FOUND. I have done modifications in GRUB by adding nomodeset at the end of the line GRUB_CMDLINE_LINUX_DEFAULT=... Now it finally boots up, but the initial errors still persist.

This is what the screen looks like:

[    0.213475] ACPI BIOS Error (bug): Could not resolve symbol [_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20190816/dsU)load2-162)
[    0.213492] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20190816/ps object-220)
[    0.213530] ACPI BIOS Error (bug): Could not resolve symbol [_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20190816/dswload2-162)
[    0.213535] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20190816/ps object-220)
[    0.612012] Initramfs unpacking failed: Decoding failed
[    0.776366] integrity: Problem loading X.509 certificate -65
/dev/sda4: clean, 208217/33406976 files, 4383755/133619712 blocks
[   29.269500] iwlwifi 0000:00:14.3: BIOS contains HGDS but no WRDS
_
Limiting memory of snap packages https://askubuntu.com/questions/1208584/limiting-memory-of-snap-packages

Some snaps (e.g. Slack) will given the opportunity eat up an almost unlimited amount of memory. In the pre-slack post systemd world I could create a namespace, limit its memory/CPU, etc. and force Slack to not eat the world by executing it inside of that namespace.

What's the proper way to add a similar limit to a snap package? Since snaps are already executed inside of some cgroup wizardry I'm hoping its as simple as a snap modify <snappackage> -addmemlimit 1G or something.

Error message on boot https://askubuntu.com/questions/1163157/error-message-on-boot

This message appears briefly on boot. My computer does boot after this, but I'm wondering if there's anything I can do about it.

[    0.000000] DMAR-IR: [Firmware Bug]: ioapic 2 has no mapping iommu, interrupt
             remapping will be disabled
[    0.062675] ACPI Error: Needed type [Reference], found [Integer]
             (ptr val) (20170831/exresop-103)
[    0.062684] ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
             [Store] (20170831/dswexec-461)
[    0.062702] ACPI Error: Method parse/execution failed \_PR.CPU0._PDC, AE_AML_
             OPERAND_TYPE (20170831/psparse-550)
[    1.602308] Couldn't get size: 0x800000000000000c
[    1.602407] MODSIGN: Couldn't get UEFI db list
[    1.642152] Couldn't get size: 0x800000000000000c
How to fix -> Clearing orphaned inode [number] https://askubuntu.com/questions/1149884/how-to-fix-clearing-orphaned-inode-number

So this happened.

I wasn't doing anything on my laptop . I turned it off and turned it back on again . A black screen with "Clearing orphaned inode" and then takes me to a screen where it asks me to put my root password or press ctrl+D. I tried my ubuntu password and I am sure I insert it correctly but it says it's wrong .

What are my options ?

Also, I tried reinstalling ubuntu ... which is not ideal ... but hey ... and when I select the booting devices and insert my bootable drive press ESC and F9 the usb doesn't show up (only the installed OS and the UEFI something).

My laptop is a dell da0135nq and the Ubuntu is LTS 18.04

Lubuntu 18.04 NVIDIA https://askubuntu.com/questions/1080687/lubuntu-18-04-nvidia

Lubuntu 18.04. Installed today. Selected update and install proprietary drivers during install.

The ubuntu tool detects nothing:

Sofware & Updates - Additional Drivers

lspci | grep -i vga
00:0d.0 VGA compatible controller: NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2)

The following command does nothing. No error message, nothing.

sudo ubuntu-drivers devices     

antiX has a driver install routine that installed the driver, but I didn't like that distro. I liked Lubuntu because it made NVIDIA easy. That no longer seems to be the case.

How do I get this driver installed, please?

Play youtube videos in vlc in 1080p quality https://askubuntu.com/questions/839383/play-youtube-videos-in-vlc-in-1080p-quality

Since neither firefox nor chrome seem to use hardware acceleration for youtube videos I am now trying to play them using vlc. That does work but I am experiencing two problems:

  • When I jump to a given position using the slider the playback does not seem to resume normally from that position but it is constantly buffering and then playing a few seconds. Does anybody know why this is?
  • Regardless of what the quality setting are the video always plays in 720p quality. Can I somehow force vlc to play in 1080p? I also downloaded livestreamer and interestingly this program also doesn't list 1080p as available for a video that can clearly be played in 1080p via the youtube webpage.

Thanks for your help! :)

No DEFAULT or UI configuration directive found! https://askubuntu.com/questions/822041/no-default-or-ui-configuration-directive-found

I am trying to run/install Ubuntu on my laptop (this runs on Win10 - upgrade from a Win7[Legacy BIOS]). I have created a bootable Ubuntu USB. Each time I restart my laptop with the bootable USB I get the following: No DEFAULT or UI configuration directive found!

I have renamed 3 items as suggested in previous posts: isolinux –> syslinux (folder) / isolinux.bin –> syslinux.bin / isolinux.cfg –> syslinux.cfg

I have also read that the USB will need to be formatted using FAT16 instead of FAT32.

But still no luck.

My questions are: How do I format and create this bootable USB with FAT16 as the software I am using creates doesn't give me an option of FAT16 (am using Rufus).

Is there anything else I need to be doing/checking?

thanks

How to install the latest versions of NodeJS and NPM? https://askubuntu.com/questions/594656/how-to-install-the-latest-versions-of-nodejs-and-npm

I noticed over at the https://nodejs.org/ website that node is currently at v 0.12.0.

Can someone let me know how to install the latest version of node together with npm (terminal commands please)?

Creative Sound Blaster Z not working under Ubuntu 14.10 https://askubuntu.com/questions/560684/creative-sound-blaster-z-not-working-under-ubuntu-14-10

I have a Creative Sound Blaster Z and am running Ubuntu 14.10.

I have been searching for quite a while about the problem with the Creative Sound Blaster Z not working under the 64-bit Linux Kernel.

Could someone help me to a similar solution as in the solution for the Creative Recon3D card.

Purple/Pink lines on screen after login on Ubuntu Desktop 13.04 https://askubuntu.com/questions/315518/purple-pink-lines-on-screen-after-login-on-ubuntu-desktop-13-04

I downloaded Ubuntu 13.04 and I loaded up the live system. It loaded up fine but when I clicked on the Ubuntu logo purple and pink lines appeared on screen and they didn't go away so I thought that if I installed the OS it would be fine so I installed the OS, logged in and lo and behold the purple and pink lines where back.

My video card is nVidia N force (I think) Anyone having the same problem???

Graphical slow response issues? https://askubuntu.com/questions/127132/graphical-slow-response-issues

I just installed Ubuntu 12.04 but my Ubuntu is not running smoothly. It is becoming stuck. Is there a problem with my graphic driver? I say this because 1 out of the 2 ATI graphic drivers failed installing.

ATI/AMD proprietary FGLRX graphics driver (post-release updates) - FAILED

ATI/AMD proprietary FGLRX graphics driver - FAILED