Linux

That worst designed thing known as systemd

Maybe systemd was not designed for people who customize their Linux systems a lot. So it must have been designed for the “average” end users, right?

How about something as end-user as switching wifi networks? Switching to a better wifi network is such a common thing you’d want to do (at least for people whose school sabotage their own eduroam connections so that people have to disable it while on campus but reenable it while off campus—yes, I’m talking about my own school, hello OCAD ITS) you’d think systemd must make it easy for the end user? How about easy to automate, as in you can script it?

When I started using Ubuntu a year ago I spent tons of time figuring out how to script Network Manager and all the pages I found suggest this simply can’t be done. You have to use the applet. So much for easy to use.

But nm-applet crashes all the time, and sometimes when you restart it it won’t even work. So what to do?

Just a few minutes ago I discovered that nmcli’s c command actually has an up subcommand, so I thought I discovered the treasure. But how well did it work, like actually?

ambrose@pingu:~$ nmcli c up 'xxxxxxxxxxxxxx 1'
Error: Connection activation failed: No suitable device found for this connection.
ambrose@pingu:~$ nmcli c down xxxxx
Error: 'xxxxx' is not an active connection.
Error: no active connection provided.
ambrose@pingu:~$ nmcli c down xxxxx\ 1
Connection 'xxxxx 1' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/0)
ambrose@pingu:~$ nmcli c up 'xxxxxxxxxxxxxx 1'
Error: Connection activation failed: No suitable device found for this connection.
ambrose@pingu:~$ nmcli c up 'xxxxxxxxxxxxxx 1' ifname wlp3s0
Error: device 'wlp3s0' not compatible with connection 'xxxxxxxxxxxxxx 1'.
ambrose@pingu:~$ 

Hello? How’s a wifi device incompatible with a wifi connection?

Ok, maybe it’s a permissions problem (which means their error messages are crap).

ambrose@pingu:~$ sudo nmcli c up 'xxxxxxxxxxxxxx 1' ifname wlp3s0
[sudo] password for ambrose: 
Error: device 'wlp3s0' not compatible with connection 'xxxxxxxxxxxxxx 1'.
ambrose@pingu:~$ 

Ok, I give up. I really don’t understand why anyone would think this Network Manager thing helps the end user. I had to work with wpa_supplicant directly on the Pi; working directly with wpa_supplicant is way easier than this once you figured out how to work with wpa_supplicant, you can’t even figure out how Network Manager does its thing.

Why is the granularity returned by the Linux driver so low?

So reading a Macbook’s ambient light sensor in Linux is just reading off /sys/class/hwmon/hwmon2/device/light – That seems easy and good, a far cry from having to write a C program.

The problem? Linux’s granularity of the read is way too low.

In MacOSX, the sample program returns numbers in at least the hundreds range. I can see the numbers change if I try very hard to cover where I think the sensors are. I get nonzero readings even in late afternoon when the room is nearly dark. In MacOSX, the light sensors felt super sensitive.

In Linux, the kernel returns an ordered pair like (12, 0) if I turn on my bright spotlights. If you put a piece of tape over the the webcam like a lot of people do, you get something more like (9, 0).

First disturbing thought: No matter what the ambient lighting looks like, Linux gives you zero for the right-hand-side sensor.

Even more disturbing: If I turn on just my regular 60W light I get all zeroes. From Linux’s point of view there’s no difference between no ambient light at all and having about 800 lumens dispersed in a small room. Heck, I get zero even during the day, right next to a window (so I live in an apartment – we get crappy lighting in apartments, but still). Compared to MacOSX, in Linux the light sensors seem so insensitive they are practically useless.

If we get zero even during the day, what point is reading from the light detectors? I can’t even tell night from day, or a darkened lecture hall from a brightly-lit classroom.

Short of reading the kernel source code is there even a way to figure out why granularity is so low?

Ubuntu disappoints, and software tweaks are what makes Macs usable

Months after the thought came up and my first failed trials, I have finally managed to install (so to speak) Ubuntu on my Mac, and I have to say Ubuntu disappoints on many small details. Coming from a pre-GNOME traditional Unix background, that’s some major disappointment I’m talking about. My major disappointment is with the trackpad. With Ubuntu the Mac’s trackpad is barely usable. Right-clicking doesn’t work, even with the ”Accessibility” option turned on. Heck, even single clicking often doesn’t work because the system would register some tiny, stray vertical movement so you would end up clicking the wrong thing. The system also often registers stray horizontal movements (so that, for example, when you’re scrolling through a page the browser would suddenly switch to a different tab, or even a different app). So it seems that the Mac’s trackpad isn’t actually any better than what Windows laptops have; all the perceived usability is in the software drivers and Apple has done a lot of work making sure the drivers are tweaked to screen out stray movements. Keyboard input also disappoints. The ”English (Macintosh)” mapping does not map the non-breaking space, and Chinese input does not seem to work. (Maybe Ubuntu is trying too hard to be “smart” and I need to disable all the modern stuff and go back to xkb and scim… or maybe it’s debugging and bug report time….) It’s also a major surprise to see that Emacs-style editing keys work on MacOS X but not in Ubuntu. With more than one input method installed, simply clicking the input menu would often, inexplicably, switch to a different input method. The Character Map is completely writing-script-based so you can’t pick out punctuation marks and other non-letter symbols; I had to resort to using printf in the terminal to get the symbols I need. All in all a disappointment, and in the meantime I’ll need a bigger (and hopefully faster) USB stick.
Syndicate content