Posts Tagged ‘linux’

No Comments

Fixing crashes on AMD Strix Halo — Image & Video Toolbox

Wednesday, November 26th, 2025

kyuz0 introduced his simple to setup toolboxes for Fedora, they also run on Ubuntu. This collection of toolboxes gives any Strix Halo owner an easy way of trying different Ai Applications on their machine, without having to mess around with software installations.

https://github.com/kyuz0

I can say, they are a delight to use. Update a toolbox is as simple as running a script. No more hassle with dependencies or compiling issues.

What you do need is patience, a huge SSD, and a fast unmetered internet connection. You’ll end up downloading 250GB+ to try out  different things, such as LLMs, video and image generation.

Anyway the toolboxes are getting better and better. Performance is improving, with speedups of up to 300% in some cases, reduced memory usage, but stability remains another PITA.

ROCm is no fun because of instability and daily crashes. But there is good news on the horizon.

A fix is out, which stops ROCm from crashing. That is the good news. The bad news is that it’s only available in a release candidate for the new kernel.

In the end it is a missing feature in the kernel for the Strix Halo (or a bug), that is fixed in the upcoming Linux Kernel 6.18. Hopefully this patch will be backported to 6.17 otherwise we will have broken software support in Ubuntu 25.10 on the flagship AMD APU.

In the meantime, you can mitigate the problem in Ubuntu 25.10 / 25.04 with this workaround:

options amdgpu cwsr_enable=0

Just add that to `/etc/modprobe.d/strix-halo.conf` (or any file)

https://community.frame.work/t/amd-rocm-does-not-support-the-amd-ryzen-ai-300-series-gpus/68767/51

At least with that I got no more crashes on Ubuntu 25.10.

Not sure what impact this has on performance. AFAIK, a Strix Halo has 1.5 times the  VGPR capacity versus other RDNA3.5 hardware.

What does cwsr do?

cwsr_enable (int) (https://www.kernel.org/doc/html/v6.7/gpu/amdgpu/module-parameters.html)

CWSR(compute wave store and resume) allows the GPU to preempt shader execution in the middle of a compute wave. Default is 1 to enable this feature. Setting 0 disables it.

https://www.kernel.org/doc/html/v6.7/gpu/amdgpu/module-parameters.html#cwsr-enable-int

I really don’t know what  disabling means in practice, (changing the default is a workaround) and I don’t know why that is fixing the VGPR issue, but it does work as a workaround.

VGPR has something to do with dynamic wave32 compute shaders, I suspect that’s the issue, because in addition to crashes I also experienced hangings/deadlocks.

RDNA increased SIMD register file capacity to 128 KB, up from 64 KB on GCN. RDNA 3 introduced a 192 KB register file configuration for high end GPUs, where die area is likely less of a concern. But that strategy isn’t efficient for raytracing.

https://chipsandcheese.com/p/dynamic-register-allocation-on-amds

Please let me know in the comments, if you do.

Hopefully this patch will be backported to 6.17. Don’t forget to comment out or delete the added line `options amdgpu cwsr_enable=0 in  /etc/modprobe.d/strix-halo.conf` once the patch is released.

Links and resources:

  • https://gpuopen.com/learn/optimizing-gpu-occupancy-resource-usage-large-thread-groups/
  • https://github.com/kyuz0/amd-strix-halo-image-video-toolboxes
No Comments

Enable WakeOnLan (WOL) on Strix Halo

Saturday, November 15th, 2025

First enter the bios and enable Wake-On-LAN there.

Is that all? You might expect everything is working now, by sending the magic WOL packet from another machine to the Strix Halo’s correct MAC address on your LAN.

How to find the MAC address of your Strix Halo:

Boot your Strix Halo machine , open a terminal and type

ip a

look for eth0 or enoX and the line, link/ether

00:1A:2B:3C:4D:5E (example only)

Be aware that Wake-On-LAN can only work on Ethernet, not Wi-Fi.

Power off your Strix Halo

On another machine or laptop run:

wakeonlan <Strix-Halo-MAC-address>
whatis wakeonlan
wakeonlan (1) - Perl script to wake up computers

If you need to install it:

sudo apt install wakeonlan

But, this did not work from my laptop.

wakeonlan <Strix-Halo-MAC-address>

After powering off and issuing this command from my laptop, nothing happened.

So I started Strix Halo manually by pressing the power button and started debugging.

sudo ethtool eno1 | grep Wake
Supports Wake-on: pumbg
Wake-on: d

What does this mean?

According to Qwen-Coder:

This indicates which wake-on-LAN features your NIC supports, using a code:
Letter Meaning
p Magic Packet – The standard WoL packet that can wake the machine
u Unicast – Wake from a unicast packet (specific to your MAC address)
m Multicast – Wake from multicast packets
b Broadcast – Wake from broadcast packets
g Gigabit – Wake-on-LAN over gigabit Ethernet (if applicable)

Wake-on: d means it is disabled software wise.

You have to enable it in the software as well, a bit surprising.

Enable WakeOnLan on your ethernet, also activate WOL in software

sudo ethtool -s eno1 wol g

After that.

sudo ethtool eno1 | grep Wake
Supports Wake-on: pumbg
Wake-on: g

So g means, it is enabled now.

I shutdown my Strix Halo, and now I could start it from my laptop:

wakeonlan <MAC-address>

But it stopped working after reboot, it only worked once.

Enable Wake-On-LAN on your ethernet interface, persistently

To make it persistent after reboot, you have to configure it with nmcli:

Lookup the connection name for ethernet (netplan-eno1)

sudo nmcli d

Then make it persistent:

sudo nmcli c modify "netplan-eno1" 802-3-ethernet.wake-on-lan magic

Links and resources:

  • https://wiki.debian.org/WakeOnLan
Comments Off on Using an external AOC touchscreen on Ubuntu

Using an external AOC touchscreen on Ubuntu

Wednesday, March 1st, 2023

TL;DR

Using an external portable AOC 16T2 monitor as a secondary screen works well on a Ubuntu laptop, but it needs a bit of tweaking.

xinput map-to-output 14 HDMI-A-0

Connecting a touchscreen to an Ubuntu Laptop

One of the first things you’ll do when connecting an USB device, getting info about the device. Is it recognized? Issue an lsusb before and after connecting the device and watch the difference. In this case:

Check connected USB-devices in Linux

lsusb
Bus 001 Device 011: ID 1fd2:9004 Melfas LGDisplay Incell Touch

So Ubuntu does recognize the AOC 16T2 monitor as a touch-device.

For that of course an USB-C (3.0) display cable is necessary, touch information is not transferred over an HDMI cable, in that case you’ll need another USB-C cable, a USB-C 2.0 version is sufficiant.

Another check if the screen is recognized as a touchscreen, issue the xinput command, before and after

Check input devices in Linux

xinput
Melfas LGDisplay Incell Touch id=14 [slave pointer (2)]

Check connected screens in Linux

To check screen use xrandr.

xrandr
HDMI-A-0 connected

Using a touchscreen on Ubuntu, and using a touchpad at the same time causes some confusion. At the moment you use the touchscreen your mouse disappears. That does make some sense, otherwise you feel urged to move the mouse, which is of course not needed on a touchscreen.

Tip: enable locate pointer when using touchscreen

Enable the locate pointer settting in the accessibilty settings, helps you to find you’re invisible mouse. Press CTRL and you can find your mouse-position again.

Once you’re used to that, an external touchscreen works rather strange out of the box, when you’re using join display, extended desktop as a default for attaching an external monitor, which is wanted in most cases.

Strange default in Ubuntu using secondary touchscreen.

Visual the desktop is extended, but for touch-input it is not. SO the visual-desktop is different than the (touch) input-desktop. That means when you click on the second monitor, the gesture is interpreted like you touch on the first monitor.

 

 

And I tried but this cannot be solved by changing the order of screens in the display-setting, moving the external monitor to the left.

To get it working you’ll need to issue a command in the terminal.

Making a external touchscreen working in Ubuntu

To map the touch.input-desktop to the visual-desktop:

xinput map-to-output 14 HDMI-A-0

This will map the touch-desktop to the secondary AOC touchscreen.

You do wonder why this is not the default in Ubuntu. I’m not sure, maybe it was in earlier days.

But this is not working in Wayland

And there is a bigger problem. This solution works only in X11 window server, not in the new Wayland environment, which is the default nowadays in nearly all modern Linux desktop, including Ubuntu 22.04 LTS.

As it seems xinput does not find your touchscreen annymore, so no mapping can be done.

Wayland does recognize the touchscreen, there is no option yet to map  it to the right screen.

That is plain stupid a pity.

So that means you have to logout/login and switch to X11 to use your external touchscreen.

Hopefully this will fixed soon.

Comments Off on Trouble updating some packages in Ubuntu 22.04, because they are kept back

Trouble updating some packages in Ubuntu 22.04, because they are kept back

Tuesday, January 17th, 2023

Maybe you have seen this message more often then before, while updating your computer manually through the terminal:

The following packages have been kept back:
<package-name>
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Historically that could be the case with the classic commands

sudo apt update && sudo apt upgrade

Because that command is careful (doesn’t update) about packages that can introduce dependency conflicts

But that update command has been superseded by

sudo apt update && sudo apt full-upgrade -y

The latter commands also remove packages to resolve dependency conflicts, and in most cases that is everything you want.

But now upgraded to Ubuntu 22.04 I see the kept back message more and more, even when I did a sudo apt update && sudo apt full-upgrade -y

And as it seems, that is absolutely OK, it’s part of the new phased roll-out mechanism. Packages that can break things are introduced in batches. First only a small percentage of users are getting the new version, so if there are bugs, only a small number of people are hit, and the bugs can be fixed before it is introduced on a bigger scale.

How to check if packages are `phased`

apt-cache policy <package-name>

e.g. gnome-remote-desktop

apt-cache policy gnome-remote-desktop 
gnome-remote-desktop:
Installed: 42.4-0ubuntu1
Candidate: 42.7-0ubuntu1
Version table:
42.7-0ubuntu1 500 (phased 0%)
500 http://nl.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
*** 42.4-0ubuntu1 100
100 /var/lib/dpkg/status
42.0-4ubuntu1 500
500 http://nl.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Just be a little patient. The update will normally come in a few days.

1 Comment

Find the total size of certain files within a directory tree before deleting them

Friday, January 13th, 2023

Normally I use find, as it is installed by default on any Linux computer or server or terminal I worked with, but lately on my desktop I start using `fdfind` more and more.

Why? Its faster and easier to work with than find.

I really like the user-friendly syntax of `fd` AKA `fd-find` or `fdfind` compared to the classic `find` command.

In Ubuntu the program is installed with `sudo apt install fd-find` and executed as `fdfind`

`fd` uses a regex as the standard search pattern.

Time for some examples.

To find all files in a directory tree that have jpg in their name

Very intuitive and concise.

fdfind jpg

To find all jpg files (extension jpg) in a directory tree

Think I need all files with [e]xtension jpg, the command is again very intuitive:

fdfind -e jpg

To delete all jpg files in a directory tree

Think I need all files with [e]xtension jpg then e[x]ecute a command to delete them [rm], the command is very intuitive:

As the normal delete command in bash is `rm`

fdfind -e jpg -x rm

That’s all.

Another interesting thing to know, what disk-space I’m gonna win by deleting all jpg files.

Find the total size of jpg files within a directory tree (wrongly)

Think: I need all files, and then calculate the filespace of all files.

The normal command of getting a total size of several files is use `du -ch *.jpg` This will list of files and Count a total on the last line. To get just the last line. pipe it to tail, to gets just the last line.

du -ch *.jpg |  tail -1

But du doesn’t work recursive in subdirectory. You can use a trick with globstar, but much easier is it to combine with fd, so you would come to something like this.

fdfind -e jpg -x du -ch | tail -1

But that doesn’t work right, it seems to computes totals for every file, and just show to size of the last result.

Find the total size of jpg files within a directory tree (correctly)

We need the `-X` option here the `execute-batch` command, that runs the command only once on all search results as arguments

fdfind -e jpg -X du -ch | tail -1

Find correctly find the total size of jpg files in a directory and the first level of subdirectories

And with `fdfind` command it’s easy to control Depth, just add a -d option. This will only search in the main and the first subdirectory level.

fdfind -d 2 -e jpg -X du -ch | tail -1

And now you ask yourself. Can I find the size of all jpg files in the third level of subdirectories.

Of course! And easier than you think

Find the total size of jpg files in the third level of subdirectories depth

fdfind --min-depth 4 --max-depth 4 -e jpg -X du -ch | tail -1

See more:

https://github.com/sharkdp/fd

Comments Off on Firefox and Wayland support on Ubuntu snaps and the user-agent

Firefox and Wayland support on Ubuntu snaps and the user-agent

Friday, January 6th, 2023

Ubuntu 22.04 is shipping with Wayland as the default communication protocol for the display server, replacing the old and X11 (X Window System).

Interestingly although Firefox is supporting Wayland natively, the default stable Firefox snap package doesn’t use it. I is still using XWayland as compatibility layer.

How to check if Firefox is using Wayland or X11?

Open:

about:support

and search for `Window protocol`

Window Protocol xwayland

That is intentional, see

https://bugzilla.mozilla.org/show_bug.cgi?id=1631462#c21

So what about Firefox Beta? To install Firefox Beta snap next to Firefox stable, see the earlier blog-post Install seperate Fiefox Beta snap.

Open

about:support

And search for `Window protocol`

Window Protocol wayland

Note the missing X, that means Wayland is used as the communication protocol.

Why doesn’t show Wayland in the User-Agent header of Linux browsers?

To check the the User-Agent in Firefox Beta, navigate to something like a ip-address checker:

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0

Although X11 is not used, it still shows X11. I wonder if that is intentional? Probably that is. User-Agent strings are hampered by historical mistakes, like browser-sniffing.

And setting a detailed User-Agent is also a privacy and security risk. Giving to much and unnecessary information about your system. So it is about limiting exposure to browser-fingerprinting.

Be aware this sucks, once you’re aware there is market-power in user-agents. The major players make the rules of the game.