Schlagwort-Archive: linux

Long website load times on Firefox under Linux

For quite a while now, browsing websites in Firefox on my Linux setup has been quite uncomfortable:
It often took half a minute to load pages properly, despite having a decent internet connection and hardware setup.

So I looked up the issue, and found that Linux‘ proxy lookup may prevents the browser to connect to servers more quickly.
That being said, there was the recommendation to simply disable any proxy usage by default (this only works with a VPN-less connection though, of course):

Results were amazing. Websites do show up quickly again!

Strange laptop display flashing artifacts after Linux kernel update

There’s this ’new‘ intel graphics feature in Linux kernels called Panel Self-Refresh.
This feature bypasses the GPU drawing cycle if there’s nothing to render on your display, so it’s ought to save certain amount of battery charge, as you can simply take the old drawing buffer contents and stream it to the display hardware.

Unfortunately, this somehow seems to work only on newer hardware, i.e. neither my Lenovo z510 from 2013 nor my even older Samsung N220 Atom netbook.
Symptoms are progressivley whitening screen contents if one doesn’t move the mouse (,so it has to reassemble display contents again) or even an entirely black display when booting up my netbook.

How to disable it?

Assign i915.enable_psr=0 to your kernel boot options, so either e.g. under /boot/refind_linux.conf or your grub config.

[Update: I had PSR disabled for a while now, but it seems they’ve fixed these display issues in recent kernel versions, so no need to apply this fix anymore – nice!]

Pulseaudio: Automatically make external sound card default device

It’s quite annoying to have to set your externally connected sound card as default device via pavucontrol again and again. To let pulseaudio automatically do this, append
load-module module-switch-on-connect
in your /etc/pulse/ file.

It was quite a relief that I found this config snippet in the interwebz 😀

Use Optirun/Primusrun in Steam on Linux

Until now, I always wondered how to launch games with my dedicated nVidia graphics chip for Steam games on Linux.
Now I found a solution: Just put

primusrun %command%

into the extended start parameters for a game in your Steam library.

Primusrun has to be taken due to some 32-bitness of the respective games;
I furthermore tried running games via optirun which resulted in some weird and misleading error messages (e.g. that glGetError couldn’t be found which obviously can’t be true).

Finally got some motivation for a new project!

An SDL2-binding for the Xwt framework while using OpenGL for drawing 2D UI components. Yes, it is theoretically redundant work as there are good UI toolkits out there, also for Mono/.Net, but well..I’m still young, I’ve got the time for doing it 🙂

Link to the project repository.

During the last couple of days I could even figure out an internal SDL bug! The event loop and basic lw-level component adaption runs nicely – more details will follow soon!

Locking screen slightly senseless on Linux?

At home, it’s not really happening that often but in public areas like at university: Being urged to leave the laptop unattended. First solution that might jumps into one’s head: Locking the screen to avoid others to mistreat your personal workspace and hack all your account information and so on.

This might be easy to do on Linux as well as on other operating systems (simply via hitting Ctrl+Alt+Del or running xlock4 in a terminal) – but you still can directly bypass the dark screen via accessing the kernel console via Ctrl+Alt+F1 (and/or other F-keys)!

Gotta research a little more on that!

Edit: Okay, though one might be able to switch to an other console instance, it’s needed to log in immediately after doing this! So yeah, it’s not a security issue after all, I just had the feeling it was like so..

Wow! Linux does Printing & Scanning documents it with absolutely no PITA!

I just installed Manjaro on my little Netbook which I’m quite only using for document printing & scanning purposes. And guess what: Setting up the printer driver using CUPS and installing the scanner directly in SANE only took a couple of minutes – doing so on Windows was a real PITA instead:
Searching the right driver from the manufacturer’s website, noticing that there was no x64 driver for Win7, reinstalling Windows just to finally have it available..and on Linux, all the drivers were there already. Still can’t believe it. It’s awesome! 😀

Oh and something beyond Windows’s „default“ capabilities: There’s a complete OCR functionality available in SANE – you just have got to install a ~2 MB large package called gocr!

How to: Convert aac/mp3 to mp4/m4a audio format on Linux

Now that I recorded a bunch of .aac files I have to make them compatible to the audio codecs installed on my car radio – which is mp3/wma and aac, whereas the latter does somehow not mean files which are called ‚.aac‘ but ‚.m4a‘! I have no choice – I didn’t invent it 😛

Anyway, a first halfway working approach to do this is to convert the input files to ‚.wav‘ files, store them in the RAM for fast enough performance, and convert them to the target format using NeroAacEnc (also available in the AUR) – it’s said by community members that this is the best codec available..for free!
Oh, ffmpeg is required as well, not to forget to mention this one 🙂

# Specify input format - can be everything that ffmpeg supports!
rm ${tmp}

for a in *$fmt; do
# decode to .wav and encode to .m4a
   ffmpeg -i "$a" ${tmp} && neroAacEnc -q 0.5 -if "${tmp}" -of "`basename \"$a\" .${fmt}`.m4a"
# remove temp file
   rm ${tmp}
# remove original file
   rm "$a"

Perhaps this should be done on multiple cores the next time. Gotta see how it’s done.

How to rip/record internet radio streams on Linux

Though I surpassed my first couple of months on Linux with just listening to internet radio stations without actually recording them I do want to record them now – just for having a bunch of tracks on my car radio as well:

  1. Install streamripper (build from source, from the AUR or from somewhere else)
  2. Download & Install Streamtastic – or an other streamripper front-end
  3. Start Streamtastic via Java
  4. Get started and let it record everything for you

Streamtastic internet radio ripping software